/* The Chit landing page. Colours, type and radii come from the web app's own tokens (/site/tokens.css is a copy of
   core/web/src/theme/tokens.css made at build time), so the page and the app cannot drift apart. Only the layout lives here. */
@font-face { font-family: 'Space Grotesk Variable'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/site/fonts/space-grotesk.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono Variable'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('/site/fonts/jetbrains-mono.woff2') format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0; font-family: var(--font-ui); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--bg-void);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
}
.backdrop {                       /* the app's ambient backdrop: a grid and two soft pools of light */
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 85% -10%, var(--pool-a), transparent 60%),
    radial-gradient(50vmax 40vmax at -10% 110%, var(--pool-b), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg-void);
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 55%, rgb(0 0 0 / 0.55));
}
:root[data-theme='light'] .backdrop { opacity: 0.6; }
.wrap { max-width: 1120px; margin: 0 auto; min-width: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-weight: 700; font-size: clamp(2.3rem, 6vw, 4.3rem); line-height: 1.04; }
h2 { font-weight: 600; font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.12; }
h3 { font-weight: 600; font-size: 1.15rem; line-height: 1.25; }
.eyebrow { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--text-dim); }
.section-head .eyebrow, .join-copy .eyebrow { color: var(--accent); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-dim); max-width: 36rem; }
.muted { color: var(--text-dim); } .small { font-size: 0.875rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* top bar: the brand is the web client's header (core/web/src/theme/shell.css): the mark, the word, an amber Beta pill */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; flex: none; white-space: nowrap; }
.brand__word { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.brand__beta { align-self: center; margin-left: -4px; padding: 2px 8px; border-radius: 999px; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber);
               border: 1px solid color-mix(in srgb, var(--amber) 55%, transparent); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.brand-foot { gap: 10px; } .brand-foot .brand__word { font-size: 1.25rem; }
.nav-links { display: flex; gap: 18px; align-items: center; font-size: 0.95rem; }
.nav-links > a:not(.btn) { text-decoration: none; color: var(--text-dim); }
.nav-links > a:not(.btn):hover { color: var(--text); }
.theme { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--glass); color: var(--text); font-size: 1.05rem; cursor: pointer; }
.theme:hover { box-shadow: var(--glow); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: 600 1rem/1 var(--font-ui); border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-primary { background: var(--grad); color: var(--on-accent); box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 34px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-ghost { background: var(--glass); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); }
.btn[disabled] { opacity: 0.6; cursor: default; transform: none; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; padding-block: clamp(40px, 8vw, 96px) 72px; }
.hero-copy { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--glass); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--state-available); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--state-available) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* the example day */
.device { position: relative; min-width: 0; background: var(--glass-strong); border: 1px solid var(--line-strong); border-radius: 28px; padding: 24px; backdrop-filter: blur(14px);
          box-shadow: var(--shadow), 0 30px 90px -40px color-mix(in srgb, var(--accent) 45%, transparent); }
.device-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.timeline { list-style: none; margin: 0; padding: 18px 0 4px; display: flex; flex-direction: column; gap: 12px; }
.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius);
       background: var(--inset); border: 1px solid var(--line); animation: rise 0.7s var(--ease) both; }
.row:nth-child(2) { animation-delay: 0.1s; } .row:nth-child(3) { animation-delay: 0.2s; } .row:nth-child(4) { animation-delay: 0.3s; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.time { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.row-title { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.chip { display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; white-space: nowrap; align-self: flex-start;
        border: 1px solid currentColor; background: color-mix(in srgb, currentColor 10%, transparent); }
.chip-measured { color: var(--state-available); }       /* the same colours the app gives each data state (data-states.yaml) */
.chip-forecast { color: var(--state-forecast); }
.chip-hand { color: var(--state-manual); }
.chip-unavailable { color: var(--text-dim); border-style: dashed; background: none; }
.device-foot { padding-top: 14px; font-size: 0.85rem; color: var(--text-dim); }

/* sections */
section { padding-block: clamp(56px, 9vw, 104px); border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 46rem; margin-bottom: 40px; }
.problem-text { font-weight: 500; font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.35; max-width: 40rem; text-wrap: balance; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px);
        transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.card:hover { border-color: var(--line-strong); box-shadow: var(--glow); }
.card p { color: var(--text-dim); }
.card-small { padding: 22px; } .card-small p { font-size: 0.95rem; }

/* join */
.join { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.join-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.form { display: flex; flex-direction: column; gap: 18px; min-width: 0; padding: clamp(22px, 4vw, 36px); border-radius: 24px; background: var(--glass-strong); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input[type='text'], .field input[type='email'] {
  font: 500 1rem var(--font-ui); color: var(--text); background: var(--inset); border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px 16px; min-height: 52px; width: 100%; min-width: 0;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; box-shadow: var(--glow); }
.hint { font-size: 0.82rem; color: var(--text-dim); }
.err { font-size: 0.88rem; color: var(--red); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 400 !important; color: var(--text-dim); }
.consent input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form .btn { width: 100%; }
.status { font-size: 0.95rem; } .status.ok { color: var(--state-available); } .status.error { color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding-block: 40px 56px; border-top: 1px solid var(--line); }
.foot-mail { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.address { font-family: var(--font-mono); font-size: 0.95rem; user-select: all; }
.copy { font: 600 0.88rem var(--font-ui); color: var(--text); background: var(--glass); border: 1px solid var(--line-strong); border-radius: 999px; min-height: 40px; padding: 0 16px; cursor: pointer; }
.copy:hover { border-color: var(--accent); }

@media (max-width: 860px) {
  .hero, .join { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hide-small { display: none !important; }
}
@media (max-width: 420px) {
  body { font-size: 16px; }
  .nav { padding-block: 16px; gap: 10px; } .nav-links { gap: 10px; }
  .nav-links .btn { min-height: 44px; padding: 0 16px; font-size: 0.9rem; white-space: nowrap; }
  .brand__word { font-size: 1.5rem; } .brand svg { width: 38px; height: 38px; }
  .hide-phone { display: none !important; }
  .row { grid-template-columns: 52px minmax(0, 1fr); }
  .row .chip { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
