/* home.css: the homepage "The Thread" (home.jsx) and the sign-in flow skin
   (.ohc-auth in login.jsx), 2026-10-25. One palette for both so going from
   the homepage to sign-in never jumps from one colour world to another.

   The first screen is laid out from the approved comp (1344 x 752): every size
   is N comp-pixels times --u, so the composition scales with the window up to
   1600px wide and stays put beyond it. Phones get their own flow below 720px.

   Colour law: evergreen belongs to the agent's own bubbles and to Get started.
   Nothing else on the page wears it. */

@font-face {
  font-family: 'Darker Grotesque';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('vendor/fonts/darker-grotesque-700-latin.woff2') format('woff2');
}

.th, .ohc-auth {
  --th-bg: #f5f6f8;
  --th-card: #ffffff;
  --th-ink: #121a26;
  --th-dim: #5c6472;
  --th-mute: #646c7b;
  --th-line: rgba(18, 26, 38, 0.1);
  --th-guest: #e7e9ec;
  --th-bubble: #13855e;
  --th-green: #0d7a58;
  --th-green-hover: #0a6a4c;
  --th-green-soft: rgba(13, 122, 88, 0.12);
  --th-display: 'Darker Grotesque', 'Geist', system-ui, sans-serif;
  --th-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Geist', system-ui, sans-serif;
}

.th {
  --u: calc(min(100vw, 1600px) / 1344);
  min-height: 100vh;
  background: var(--th-bg);
  color: var(--th-ink);
  font-family: var(--th-sans);
  -webkit-font-smoothing: antialiased;
}
.th ::selection, .ohc-auth ::selection { background: var(--th-green-soft); color: var(--th-ink); }
.th a:focus-visible, .th button:focus-visible,
.ohc-auth a:focus-visible, .ohc-auth button:focus-visible {
  outline: 2px solid var(--th-green); outline-offset: 3px; border-radius: 999px;
}
.ohc-auth input:focus-visible { outline: 2px solid var(--th-green); outline-offset: 2px; border-radius: 12px; }

/* ---------- nav ---------- */
.th-nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: calc(1190 * var(--u)); margin: 0 auto; padding-top: calc(12 * var(--u));
  height: calc(40 * var(--u));
}
.th-brand {
  display: inline-flex; align-items: center; gap: calc(10 * var(--u));
  font-size: max(15px, calc(19 * var(--u))); font-weight: 600; letter-spacing: -0.01em;
  color: var(--th-ink); text-decoration: none;
}
.th-brand img { width: calc(38 * var(--u)); height: auto; min-width: 28px; }
.th-nav-links { display: flex; align-items: center; gap: calc(34 * var(--u)); }
.th-nav-link {
  font-size: max(13px, calc(13.5 * var(--u))); color: var(--th-ink); text-decoration: none; opacity: 0.62;
}
.th-nav-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- the one action ---------- */
.th-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--th-green); color: #fff; text-decoration: none; font-weight: 600;
  border-radius: 999px; white-space: nowrap;
  transition: background 0.2s ease, transform 0.15s ease;
}
.th-cta:hover { background: var(--th-green-hover); transform: translateY(-1px); }
.th-cta:active { transform: scale(0.98); }
.th-cta--sm { height: calc(34 * var(--u)); min-height: 36px; padding: 0 calc(18 * var(--u)); font-size: max(13px, calc(13.5 * var(--u))); box-shadow: none; }
.th-cta--lg { width: calc(602 * var(--u)); height: calc(57 * var(--u)); min-height: 52px; font-size: max(17px, calc(20 * var(--u))); }

/* ---------- hero ---------- */
.th-hero { max-width: calc(1190 * var(--u)); margin: 0 auto; padding-bottom: calc(40 * var(--u)); }
.th-h1 {
  font-family: var(--th-display); font-weight: 700;
  font-size: calc(56 * var(--u)); line-height: 0.86; letter-spacing: -0.01em;
  text-align: center; margin: calc(20 * var(--u)) auto 0; max-width: calc(650 * var(--u));
  color: var(--th-ink);
}
.th-sub {
  text-align: center; margin: calc(14 * var(--u)) auto 0; max-width: calc(680 * var(--u));
  font-size: calc(19.5 * var(--u)); line-height: 1.36; color: var(--th-dim);
}
.th-thread { display: flex; flex-direction: column; }
.th-hero .th-thread { margin-top: calc(24 * var(--u)); }
.th-stamp {
  text-align: center; font-size: calc(15.5 * var(--u)); color: var(--th-mute);
  font-variant-numeric: tabular-nums; margin-bottom: calc(8 * var(--u));
}
.th-stamp--left { text-align: left; font-size: calc(17.5 * var(--u)); line-height: 1; color: var(--th-mute); margin: calc(4 * var(--u)) 0 0 calc(6 * var(--u)); }
.th-row { display: flex; }
.th-row--agent { justify-content: flex-end; }
.th-row--guest { justify-content: flex-start; align-items: flex-start; gap: calc(14 * var(--u)); }

.th-bubble {
  position: relative; max-width: calc(636 * var(--u));
  font-size: calc(22.5 * var(--u)); line-height: 1.32;
  padding: calc(13 * var(--u)) calc(20 * var(--u)) calc(14 * var(--u));
  border-radius: calc(24 * var(--u));
}
.th-bubble--agent { background: var(--th-bubble); color: #fff; border-bottom-right-radius: calc(6 * var(--u)); }
.th-bubble--guest { background: var(--th-guest); color: var(--th-ink); border-bottom-left-radius: calc(6 * var(--u)); }
/* The tails, drawn like Messages: a curl of bubble colour, then a page-colour
   scoop cut out of it, on the sender's bottom corner. */
.th-bubble--agent::before, .th-bubble--agent::after,
.th-bubble--guest::before, .th-bubble--guest::after {
  content: ''; position: absolute; bottom: 0; height: calc(20 * var(--u));
}
.th-bubble--agent::before {
  right: calc(-7 * var(--u)); width: calc(20 * var(--u)); background: var(--th-bubble);
  border-bottom-left-radius: calc(16 * var(--u)) calc(14 * var(--u));
}
.th-bubble--agent::after {
  right: calc(-26 * var(--u)); width: calc(26 * var(--u)); background: var(--th-bg);
  border-bottom-left-radius: calc(10 * var(--u));
}
.th-bubble--guest::before {
  left: calc(-7 * var(--u)); width: calc(20 * var(--u)); background: var(--th-guest);
  border-bottom-right-radius: calc(16 * var(--u)) calc(14 * var(--u));
}
.th-bubble--guest::after {
  left: calc(-26 * var(--u)); width: calc(26 * var(--u)); background: var(--th-bg);
  border-bottom-right-radius: calc(10 * var(--u));
}

.th-card {
  display: flex; align-items: center; width: calc(607 * var(--u)); height: calc(136 * var(--u));
  margin-top: calc(4 * var(--u)); margin-right: calc(11 * var(--u));
  background: var(--th-card); border: 1px solid var(--th-line); border-radius: calc(16 * var(--u));
  overflow: hidden;
}
.th-card-photo { width: calc(214 * var(--u)); height: 100%; object-fit: cover; flex: 0 0 auto; display: block; }
.th-card-text { flex: 1; padding-left: calc(18 * var(--u)); }
.th-card-addr { font-size: calc(20.5 * var(--u)); font-weight: 600; line-height: 1.3; }
.th-card-meta { font-size: calc(20 * var(--u)); color: var(--th-dim); line-height: 1.38; }
.th-card-meta + .th-card-meta { color: var(--th-dim); }
.th-card-chev { color: var(--th-mute); margin-right: calc(22 * var(--u)); width: calc(12 * var(--u)); height: auto; }

.th-hero .th-row--guest { margin-top: calc(4 * var(--u)); margin-left: calc(5 * var(--u)); }
.th-hero .th-row--agent .th-bubble { width: calc(636 * var(--u)); box-sizing: border-box; }
.th-avatar {
  width: calc(48 * var(--u)); height: calc(48 * var(--u)); border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; background: #646c7b; color: #fff;
  font-size: calc(16 * var(--u)); font-weight: 600;
}
.th-hero .th-bubble--guest { font-size: calc(21.5 * var(--u)); line-height: 1.32; padding: calc(7 * var(--u)) calc(20 * var(--u)) calc(13 * var(--u)); }

.th-send { display: flex; flex-direction: column; align-items: center; margin-top: calc(46 * var(--u)); }
.th-offer-line { margin: calc(12 * var(--u)) 0 0; font-size: max(13px, calc(14 * var(--u))); color: var(--th-mute); text-align: center; }
.th-appstore { margin-top: 18px; }

/* The one authored entrance: the thread arrives message by message, the way
   it does on a phone. Visible by default; motion only adds the arrival. */
@media (prefers-reduced-motion: no-preference) {
  .th-in { animation: thArrive 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .th-in-1 { animation-delay: 0.15s; }
  .th-in-2 { animation-delay: 0.45s; }
  .th-in-3 { animation-delay: 1.05s; }
}
@keyframes thArrive { from { transform: translateY(14px) scale(0.97); } to { transform: none; } }
.th-nw { white-space: nowrap; }

/* ---------- below the fold ---------- */
.th-section {
  max-width: min(860px, calc(100% - 40px)); margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) 0 0;
}
.th-h2 {
  font-family: var(--th-display); font-weight: 700; font-size: clamp(36px, 4.2vw, 54px);
  line-height: 0.95; letter-spacing: -0.01em; text-align: center; margin: 0 0 36px; text-wrap: balance;
}
.th-section .th-thread { gap: 10px; }
.th-section .th-bubble { font-size: clamp(16px, 1.45vw, 19px); max-width: 78%; padding: 12px 18px 13px; border-radius: 22px; }
.th-section .th-bubble--agent { border-bottom-right-radius: 6px; }
.th-section .th-bubble--guest { border-bottom-left-radius: 6px; }
.th-thread--qa .th-row--agent { margin-bottom: 18px; }
.th-sup { font-size: 0.62em; margin-left: 2px; color: var(--th-mute); vertical-align: super; line-height: 0; }

.th-offer { text-align: center; padding-bottom: 24px; }
.th-offer-list {
  list-style: none; padding: 0; margin: 0 auto; max-width: 620px; text-align: left;
  display: grid; gap: 14px; font-size: 17px; line-height: 1.5; color: var(--th-ink);
}
.th-offer-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.th-offer-list li::before {
  content: ''; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%;
  background: #e4e7eb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121a26' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.th-avail { margin: 26px auto 0; max-width: 560px; font-size: 15px; line-height: 1.55; color: var(--th-dim); }
.th-offer-ctas { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 30px; }
.th-offer .th-cta--lg { width: min(602px, 100%); height: 58px; font-size: 19px; }

.th-foot { max-width: min(860px, calc(100% - 40px)); margin: 72px auto 0; padding: 28px 0 48px; border-top: 1px solid var(--th-line); }
.th-foot-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font-size: 13px; color: var(--th-mute); }
.th-foot-row a { color: var(--th-dim); text-decoration: none; }
.th-foot-row a:hover { text-decoration: underline; text-underline-offset: 3px; }

.th-sticky { display: none; }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  .th { --u: 1px; }
  .th-nav { height: 60px; padding: 0 16px; }
  .th-brand { font-size: 15.5px; } .th-brand img { width: 30px; }
  .th-nav-link { display: none; }
  .th-hero { padding: 0 16px 32px; }
  .th-h1 { font-size: 44px; margin-top: 18px; max-width: 360px; }
  .th-sub { font-size: 17px; max-width: 360px; }
  .th-bubble { font-size: 16.5px; max-width: 86%; }
  .th-hero .th-bubble--guest { font-size: 16.5px; }
  .th-card { width: 86%; height: 104px; margin-right: 6px; }
  .th-card-photo { width: 38%; }
  .th-card-addr { font-size: 15.5px; } .th-card-meta { font-size: 14.5px; }
  .th-card-chev { margin-right: 12px; width: 9px; }
  .th-avatar { width: 34px; height: 34px; font-size: 12px; }
  .th-stamp { font-size: 12.5px; }
  .th-send { margin-top: 30px; }
  .th-cta--lg { width: 100%; height: 56px; font-size: 18px; }
  .th-section .th-bubble { max-width: 86%; }
  .th-sticky {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--th-bg) 90%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--th-line);
    transform: translateY(110%); transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .th-sticky.is-on { transform: none; }
  .th-foot { padding-bottom: 110px; }
}

/* ---------- the sign-in flow, same world (login.jsx sets .ohc-auth) ---------- */
.ohc-auth {
  --bg-deep: var(--th-bg); --bg: var(--th-bg); --bg-card: var(--th-card);
  --bg-elev: #eceef1; --bg-elev-2: #eceef1;
  --cream: var(--th-ink); --cream-dim: var(--th-dim); --text: var(--th-ink);
  --text-dim: var(--th-dim); --text-muted: var(--th-mute);
  --gold: var(--th-green); --gold-bright: var(--th-green-hover); --gold-soft: var(--th-green-soft);
  --hairline: var(--th-line); --border: var(--th-line); --border-strong: rgba(18, 26, 38, 0.18);
  --sage: var(--th-green); --sage-soft: var(--th-green-soft);
  background: var(--th-bg) !important; color: var(--th-ink); font-family: var(--th-sans);
}
.ohc-auth .serif { font-family: var(--th-display) !important; font-weight: 700 !important; letter-spacing: -0.01em; line-height: 0.95 !important; }
.ohc-auth .btn-primary { background: var(--th-green); border-color: var(--th-green); color: #fff; border-radius: 999px; }
.ohc-auth .btn-primary:hover { background: var(--th-green-hover); border-color: var(--th-green-hover); }
.ohc-auth .btn { border-radius: 999px; }
