/* ============================================================
   RealTalk — marketing site
   Tokens are lifted verbatim from design-exports/original/README.md.
   There is NO red token in this system: errors use #334155.
   ============================================================ */

:root {
  --bg:            #F8FAFC;
  --surface:       #FFFFFF;
  --fill:          #E2E8F0;
  --border:        #CBD5E1;
  --text:          #111827;
  --text-2:        #334155;
  --muted:         #64748B;
  --accent:        #2563EB;
  --ink:           #0A1B3D;
  --bezel:         #0F172A;
  --gradient:      linear-gradient(135deg, #0A1B3D 0%, #2563EB 100%);

  --shadow-btn:    0 12px 28px rgba(37,99,235,.26);
  --shadow-nav:    0 8px 20px rgba(37,99,235,.24);
  --shadow-blue:   0 16px 40px rgba(37,99,235,.10);
  --shadow-found:  0 20px 48px rgba(37,99,235,.14);
  --shadow-device: 0 0 0 9px #0F172A, 0 40px 80px rgba(15,23,42,.26);

  --ease:          cubic-bezier(.2,.8,.25,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 92px; }

body {
  background: var(--bg);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }

img { max-width: 100%; }

/* ---------- Focus rings ------------------------------------
   Not present in the designs; required by the handoff.
   Applied to every input and button in all four states.       */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.field:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.field:focus-within input:focus-visible { outline: none; }

/* ---------- Layout ---------------------------------------- */
.page   { width: 100%; background: var(--bg); display: flex; flex-direction: column; align-items: center; }
.wrap   { max-width: 1160px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.band   { width: 100%; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-gradient { width: 100%; background: var(--gradient); }

/* ---------- Buttons --------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9999px; cursor: pointer;
  font-family: inherit; font-weight: 600;
  transition: transform .2s var(--ease);
  border: none; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { cursor: default; }
.btn[disabled]:active { transform: none; }

.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow-btn); }
.btn-white   { background: #fff; color: var(--ink); }
.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-nav     { height: 44px; padding: 0 20px; font-size: 15px; box-shadow: var(--shadow-nav); }
.btn-56      { height: 56px; font-size: 17px; }
.btn-56-flex { height: 56px; padding: 0 28px; font-size: 16px; flex: none; }

/* ---------- Fields ---------------------------------------- */
.field {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); background: #fff;
  transition: border-color .2s var(--ease), opacity .2s var(--ease);
}
.field-pill { min-height: 56px; border-radius: 9999px; padding: 0 22px; }
.field-14   { min-height: 56px; border-radius: 14px; padding: 0 16px; background: var(--bg); }
.field-12   { min-height: 52px; border-radius: 12px; padding: 0 15px; background: var(--bg); }

.field .dial { font-size: 16px; font-weight: 500; color: var(--text-2); flex: none; }
.field .rule { width: 1px; height: 20px; background: var(--border); flex: none; }

.field input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 16px; color: var(--text);
}
.field input::placeholder { color: var(--text-2); opacity: 1; }
.field-14 .dial, .field-14 input { font-size: 17px; }
.field-14 .rule { height: 22px; }

/* In the desktop row layout the field fills the space beside the button.
   This lives here rather than inline so the mobile media query can override
   it -- an inline style would beat any media query. */
.stack-sm .field { flex: 1 1 auto; }

/* Field marked invalid — #334155 border, never red */
.field.is-invalid { border: 1.5px solid var(--text-2); }
.field-error {
  font-size: 13.5px; line-height: 1.5; color: var(--text-2); padding-left: 4px;
}

/* ---------- Form state machine ---------------------------- */
/* Submitting: fields dim, button holds its box, label -> spinner. */
.is-submitting .field { opacity: .58; }
.is-submitting .btn   { pointer-events: none; }

.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.4px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn-outline .spinner,
.btn-white   .spinner {
  border-color: rgba(10,27,61,.25);
  border-top-color: var(--ink);
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* The success panel replaces the form inside the SAME container,
   so nothing jumps and no scroll position is lost. */
.success { display: flex; flex-direction: column; gap: 14px; }
.success-head { display: flex; gap: 13px; align-items: flex-start; }
.success-check {
  flex: none; width: 38px; height: 38px; border-radius: 9999px;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
}
.success-title { font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.success-body  { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.success-rule  { height: 1px; background: var(--border); }
.success-item  { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--text); }

.consent { font-size: 13.5px; line-height: 1.5; color: var(--muted); }

/* ---------- Section rhythm -------------------------------- */
.sec-84 { padding: 84px 40px; }
.sec-72 { padding: 72px 24px; }

.h1     { font-size: 60px; line-height: 1.04; font-weight: 700; letter-spacing: -.035em; text-wrap: balance; }
.h2     { font-size: 40px; line-height: 1.12; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.h2-38  { font-size: 38px; line-height: 1.12; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.eyebrow{ font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }

.grid-hero    { display: grid; grid-template-columns: 1.08fr .92fr; gap: 64px; align-items: center; }
.grid-2       { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.grid-2-tight { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.grid-3       { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-faq     { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 56px; }
/* The conference page already collapses on its own. */
.grid-auto-330 { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 48px; align-items: center; }
.grid-auto-320 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; align-items: start; }
.grid-auto-300 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; align-items: start; }
.grid-auto-260 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.grid-auto-q   { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px 52px; }

/* ---------- Phone mockup (decorative) --------------------- */
.hero-visual { display: flex; justify-content: center; }

/* Section padding lives in classes so the media queries below can reduce it. */
.hero-pad { padding: 88px 40px 96px; }

.phone {
  width: 340px; height: 736px; border-radius: 40px; background: var(--bg);
  box-shadow: var(--shadow-device); overflow: hidden;
  display: flex; flex-direction: column; position: relative; flex: none;
}
.phone-sm { width: 322px; height: 698px; border-radius: 38px; box-shadow: 0 0 0 9px #0F172A, 0 36px 74px rgba(15,23,42,.24); }

/* ============================================================
   Responsive — the public page uses fixed two-column grids and
   needs these; the conference page mostly collapses on its own.
   ============================================================ */
@media (max-width: 900px) {
  .grid-hero,
  .grid-2,
  .grid-2-tight,
  .grid-faq { grid-template-columns: 1fr; gap: 40px; }
  .grid-3   { grid-template-columns: 1fr; gap: 30px; }

  .h1    { font-size: 40px; }
  .h2    { font-size: 32px; }
  .h2-38 { font-size: 30px; }

  .sec-84 { padding: 56px 22px; }
  .sec-72 { padding: 56px 22px; }

  .hero-pad { padding: 56px 22px 64px; }

  /* Decorative by default — dropped rather than shrunk on phones. */
  .hero-visual { display: none; }
  /* ...except where it is doing real work: /txrealtors is scanned from a
     business card, so it is seen on a phone almost every time, and the
     screenshot is the reassurance that page exists to give. */
  .hero-visual--keep { display: flex; }

  .nav-links { gap: 16px; }
  .nav-link  { display: none; }
}

@media (max-width: 560px) {
  .h1 { font-size: 34px; }
  .stack-sm { flex-direction: column; align-items: stretch; }
  .stack-sm .btn { width: 100%; }
  .field-pill { padding: 0 18px; }
  .sec-84, .sec-72 { padding: 48px 18px; }
  .hero-pad { padding: 40px 18px 48px; }

  /* Stacked layout: the container's main axis is now vertical, so a
     flex-basis of 0 would apply to HEIGHT and collapse the field to its
     content height. Reset it so min-height governs. */
  .stack-sm .field { flex: none; }

  /* Scale rather than resize -- the mockup's internals are fixed px (the
     141px capture control, 12.5-21px type), so scaling keeps proportions.
     transform doesn't shrink the layout box, hence the negative margin to
     reclaim the empty space it leaves behind (698px x 0.18). */
  .hero-visual--keep .phone {
    transform: scale(.82);
    transform-origin: top center;
    margin-bottom: -125px;
  }
}
