/* Tribe Mobility Group — single-page marketing site.
   Brand: navy #131C35, teal #4E9A8E, mint #A8D5CD. Mobile-first (PRD §5). */

:root {
  --navy: #131C35;
  --navy-soft: #1d2a4d;
  --teal: #4E9A8E;
  --teal-dark: #3d7d73;
  --mint: #A8D5CD;
  --ink: #22303f;
  --muted: #5d6d7e;
  --paper: #f7faf9;
  --line: #dde5e3;
  --danger: #c0392b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 680px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }

/* --- Navigation --- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19, 28, 53, 0.96);
  backdrop-filter: blur(8px);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand {
  font-size: 22px; font-weight: 800; color: var(--teal);
  text-decoration: none; letter-spacing: -0.03em;
}
.brand span { color: #fff; font-weight: 300; }
.nav-links { display: none; gap: 24px; margin-left: auto; }
.nav-links a { color: #cfd9e4; text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: #fff; }
.site-nav .btn-sm { margin-left: auto; }
@media (min-width: 720px) {
  .nav-links { display: flex; }
  .site-nav .btn-sm { margin-left: 0; }
}

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 0; transition: background 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-primary:disabled { background: var(--muted); cursor: wait; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-ghost:hover { border-color: #fff; }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-block { width: 100%; margin-top: 16px; }

/* --- Hero --- */
.hero {
  /* Fallback ground while the photo loads; the per-visit photo + overlay
     arrive via an inline background-image (see PagesController#home). */
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 60%, #234a44 130%);
  background-size: cover;
  background-position: center;
  background-color: var(--navy);
  color: #fff; padding: 96px 0 104px; text-align: left;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: 12px;
  color: var(--mint); margin: 0 0 16px;
}
.hero h1 { font-size: clamp(34px, 6vw, 56px); }
.lede { max-width: 560px; font-size: 18px; color: #cfd9e4; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* --- Sections --- */
.section { padding: 80px 0; }
.section-title { font-size: clamp(26px, 4vw, 36px); margin-bottom: 32px; }
.section-sub { color: var(--muted); max-width: 560px; margin: -20px 0 32px; }
.section-dark { background: var(--navy); color: #fff; }

/* --- Pillars / Why grids --- */
.pillars, .why-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pillars { grid-template-columns: 1fr 1fr; } .why-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .pillars { grid-template-columns: repeat(4, 1fr); } }

.pillar, .why-item {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.pillar.revealed, .why-item.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .pillar, .why-item { opacity: 1; transform: none; transition: none; }
}
.pillar h3, .why-item h3 { font-size: 17px; margin: 8px 0 6px; }
.pillar p, .why-item p { font-size: 14px; color: var(--muted); margin: 0; }
.pillar-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(78, 154, 142, 0.12);
  color: var(--teal-dark);
}

/* --- Business model flow --- */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.flow-node {
  background: var(--navy-soft); border: 1px solid rgba(168, 213, 205, 0.35);
  color: var(--mint); border-radius: 99px; padding: 10px 20px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.flow-node-accent { background: var(--teal); color: #fff; border-color: var(--teal); }
.flow-arrow { color: rgba(168, 213, 205, 0.6); font-size: 18px; }
.flow-caption { color: #9fb0c3; font-size: 14px; max-width: 620px; margin-top: 24px; }

/* --- Operating partners --- */
/* Equal-width cards (1fr tracks) with clear gutters between them. */
.partners-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .partners-grid { grid-template-columns: 1fr 1fr; } }

.partner-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.partner-card.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .partner-card { opacity: 1; transform: none; transition: none; }
}
/* The single portfolio card spans the full two-column track width; on
   desktop it splits internally into media | body halves. */
.partner-card { grid-column: 1 / -1; }
@media (min-width: 800px) {
  .partner-card { display: grid; grid-template-columns: 1fr 1fr; }
  .partner-media > img:first-child { height: 100%; min-height: 280px; }
  .partner-body { align-self: center; padding: 32px 36px; }
}

.partner-media { position: relative; }
.partner-media > img:first-child {
  display: block; width: 100%; height: 220px; object-fit: cover;
}
/* Legibility scrim behind the overlaid partner logo. */
.partner-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(19, 28, 53, 0.75) 0%, rgba(19, 28, 53, 0.05) 45%);
}
.partner-logo {
  position: absolute; left: 20px; bottom: 16px; z-index: 1;
  height: 26px; width: auto;
}
.partner-body { padding: 20px 24px 24px; }
.partner-body h3 { font-size: 17px; margin: 0 0 2px; }
.partner-link {
  display: inline-block; margin-top: 12px;
  font-size: 13px; font-weight: 600; color: var(--teal-dark);
  text-decoration: none;
}
.partner-link:hover { text-decoration: underline; }
.partner-role {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--teal-dark); margin: 0 0 8px;
}
.partner-body > p:not(.partner-role) { font-size: 14px; color: var(--muted); margin: 0; }

/* --- Smart intake form --- */
.section-contact { background: var(--paper); }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .field-full { grid-column: 1 / -1; } }

.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal);
}
.field textarea { resize: vertical; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 13px; color: var(--muted); }
.consent input { margin-top: 3px; }

.form-errors {
  background: #fdecea; border: 1px solid #f5c6c0; color: var(--danger);
  border-radius: 10px; padding: 14px 18px; font-size: 14px; margin-bottom: 20px;
}
.form-errors ul { margin: 6px 0 0; padding-left: 18px; }
.form-feedback { color: var(--danger); font-size: 14px; min-height: 1em; margin-top: 10px; }

/* Honeypot: moved out of the viewport, still submittable by naive bots. */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-success {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 48px 32px; text-align: center;
}
.form-success-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: grid; place-items: center;
}
.form-success h3 { font-size: 22px; }
.form-success p { color: var(--muted); max-width: 380px; margin: 0 auto; }

/* --- Footer --- */
.site-footer { background: var(--navy); color: #8fa3b8; font-size: 12px; padding: 24px 0; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--mint); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-credit { flex-basis: 100%; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* --- Team deal-workflow dashboard --- */
.dash { max-width: 1280px; margin: 0 auto; padding: 32px 20px 64px; }
.dash-narrow { max-width: 720px; }
.dash-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.dash-header h1 { font-size: 26px; margin: 0 0 4px; }
.dash-sub { color: var(--muted); font-size: 14px; max-width: 560px; margin: 0; }
.dash-total { font-size: 13px; color: var(--muted); white-space: nowrap; padding-top: 8px; }
.dash-back { color: var(--teal-dark); text-decoration: none; font-size: 14px; }
.dash-flash { border-radius: 10px; padding: 10px 16px; font-size: 14px; }
.dash-flash-ok { background: #e8f4f1; color: var(--teal-dark); }
.dash-flash-err { background: #fdecea; color: var(--danger); }

.board { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .board { grid-template-columns: repeat(5, 1fr); } }

.stage-col { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stage-col-lost { background: #faf6f5; }
.stage-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); display: flex; justify-content: space-between; margin: 2px 4px 12px; }
.stage-count { background: var(--line); border-radius: 99px; padding: 0 8px; font-size: 12px; }
.stage-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 12px 0; }

.lead-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.lead-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lead-name { font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; }
.lead-name:hover { color: var(--teal-dark); }
.lead-company { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.lead-meta { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.lead-meta-warn { color: #b9770e; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-high { background: #fdecea; color: var(--danger); }
.badge-medium { background: #fdf3e7; color: #b9770e; }
.badge-low { background: #eef2f5; color: var(--muted); }
.badge-stage { background: var(--navy); color: var(--mint); font-size: 12px; padding: 4px 14px; }

.lead-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lead-actions form { display: inline; }
.btn-stage { background: var(--teal); color: #fff; border: 0; border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-stage:hover { background: var(--teal-dark); }
.btn-stage-lost { background: #fff; color: var(--muted); border: 1px solid var(--line); }
.btn-stage-lost:hover { background: #fdecea; color: var(--danger); border-color: #f5c6c0; }
.lead-actions-detail .btn-stage { font-size: 14px; padding: 10px 18px; }

.lead-detail { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; font-size: 14px; margin: 0 0 24px; }
.lead-detail dt { color: var(--muted); }
.lead-detail dd { margin: 0; }
.lead-detail a { color: var(--teal-dark); }
.lead-message, .lead-analysis { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin-bottom: 20px; }
.lead-message h2, .lead-analysis h2 { font-size: 15px; margin: 0 0 10px; }
.lead-next-action { background: var(--navy); color: #e8f0ee; border-radius: 8px; padding: 14px 18px; font-size: 14px; }

.lead-reply { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin-bottom: 20px; }
.lead-reply h2 { font-size: 15px; margin: 0 0 4px; }
.lead-reply .field { margin-top: 14px; }
.btn-reply { font-size: 14px; padding: 10px 20px; margin-top: 14px; }
.field-hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

/* --- Team sign-in --- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.login-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 40px 36px; width: 100%; max-width: 400px;
  box-shadow: 0 10px 30px rgba(19, 28, 53, 0.06);
}
.login-logo { display: block; width: 180px; max-width: 60%; height: auto; margin: 0 auto 24px; }
.login-card h1 { font-size: 22px; text-align: center; margin: 0 0 4px; }
.login-sub { font-size: 14px; color: var(--muted); text-align: center; margin: 0 0 24px; }
.login-card .field { margin-bottom: 16px; }
.login-card .dash-flash { margin: 0 0 16px; }

.dash-header-side { display: flex; align-items: center; gap: 16px; }
.btn-signout {
  background: #fff; color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.btn-signout:hover { color: var(--danger); border-color: #f5c6c0; }
.reply-history { margin: 16px 0 4px; }
.reply-item { border-left: 3px solid var(--teal); background: var(--paper); border-radius: 0 8px 8px 0; padding: 12px 16px; margin-bottom: 10px; font-size: 14px; }
.reply-item header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.reply-item header span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.reply-item p { margin: 0 0 8px; color: var(--ink); }
.reply-item p:last-child { margin-bottom: 0; }
