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

:root {
  --bg:            #F5F2EA;
  --surface:       #FFFFFF;
  --fill:          #E5E9E0;
  --border:        #CFD7D0;
  --text:          #202926;
  --text-2:        #3D4944;
  --muted:         #5C6962;
  --accent:        #183D36;
  --ink:           #0F2C26;
  --bezel:         #1B2622;
  --gradient:      linear-gradient(135deg, #2E6A50 0%, #143630 100%);

  --shadow-btn:    0 12px 28px rgba(24,61,54,.26);
  --shadow-nav:    0 8px 20px rgba(24,61,54,.24);
  --shadow-blue:   0 16px 40px rgba(24,61,54,.10);
  --shadow-found:  0 20px 48px rgba(24,61,54,.14);
  --shadow-device: 0 0 0 9px #1B2622, 0 40px 80px rgba(32,41,38,.26);

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

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

/* `hidden` must win over any display a class or inline style sets --
   the video and testimonial slots rely on it to render nothing. */
[hidden] { display: none !important; }
[data-testimonials] { display: flex; }

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 — #3D4944 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(15,44,38,.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 #1B2622, 0 36px 74px rgba(32,41,38,.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; }
  .hero-kicker { font-size: 20px; }
  .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;
  }
}

/* ---------- Pillar cards (/, /demo) ----------------------- */
.pillar {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 30px;
}
.pillar-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
}
.pillar-title { font-size: 21px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.pillar-body  { font-size: 16px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }

/* ---------- Demo video slot (/, /demo) --------------------
   The slot carries `hidden` until site.js has a real URL to put
   in it, so an unset video takes no space at all.              */
.demo-video {
  width: 100%; max-width: 470px; border-radius: 20px; overflow: hidden;
  background: var(--bezel); border: 1px solid var(--border);
  box-shadow: var(--shadow-blue);
}
.demo-video.is-portrait { max-width: 280px; }
.demo-video video,
.demo-video iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.demo-page .demo-video { max-width: 760px; margin: 0 auto; }
.demo-page .demo-video.is-portrait { max-width: 340px; }

/* ---------- Testimonials (/) -------------------------------- */
.quote-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px;
}
/* Only ever visible on localhost -- see site-config.js. */
.quote-card.is-todo { border-style: dashed; }
.quote-text { font-size: 17px; line-height: 1.6; color: var(--text); text-wrap: pretty; }
.quote-who { display: flex; align-items: center; gap: 12px; }
.quote-face { width: 44px; height: 44px; border-radius: 9999px; object-fit: cover; flex: none; }
.quote-initials {
  background: var(--gradient); color: #fff; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.quote-names { display: flex; flex-direction: column; gap: 2px; }
.quote-name { font-size: 15px; font-weight: 600; color: var(--text); }
.quote-brokerage { font-size: 14px; color: var(--muted); }

/* ---------- Hero kicker (/) --------------------------------
   The second message under the H1: data entry + what Carlo is. */
.hero-kicker { font-size: 24px; line-height: 1.4; font-weight: 600; color: var(--text); letter-spacing: -.015em; max-width: 540px; text-wrap: pretty; }

/* ---------- Carlo lockup (Oct 2026 rebrand) -------------------------
   The designer's lockup (brand/carlo/svg/carlo-lockup.svg: tile + outlined
   Outfit wordmark), one image so the two parts can never drift. Each
   placement sets its height inline; the width follows the 730:240 box. */
.brand-lockup { display: block; width: auto; flex: none; }
