/* triage.rest (SMA-173, Figma 189:222). The app's palettes: Sunrise by
   day, Sunset at night (follows the visitor's light/dark setting). No text
   sits on the sky: everything readable is on a card. */
:root {
  --bg: #FEF4E3;
  --fg: #142A41;
  --muted: #44576B;
  --card: #FFFFFF;
  --glass: rgba(255, 255, 255, 0.88);
  --line: #E6D5BB;
  --input: rgba(254, 244, 227, 0.8);
  --input-line: rgba(20, 42, 65, 0.18);
  --primary: #CF4433;
  --on-primary: #FFFFFF;
  --overline: #CF4433;
  --shadow: 0 16px 40px rgba(20, 42, 65, 0.12);
  --beach-wide: url("/img/beach-wide-sunrise.svg");
  --beach-narrow: url("/img/beach-narrow-sunrise.svg");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1F1332;
    --fg: #F9F1E3;
    --muted: #D0B198;
    --card: #261D3E;
    --glass: rgba(38, 29, 62, 0.9);
    --line: rgba(255, 255, 255, 0.14);
    --input: rgba(31, 19, 50, 0.8);
    --input-line: rgba(249, 241, 227, 0.2);
    --overline: #FF9710;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    --beach-wide: url("/img/beach-wide-sunset.svg");
    --beach-narrow: url("/img/beach-narrow-sunset.svg");
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.glass {
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease;
}
.btn:hover { transform: scale(1.02); }
.btn:active { transform: scale(0.98); }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover, .btn:active { transform: none; transition: none; } }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-outline { background: var(--card); color: var(--fg); border-color: color-mix(in srgb, var(--fg) 20%, transparent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 70%, transparent); outline-offset: 2px; }

/* Hero: the beach behind the header, headline card and phones. */
.hero {
  position: relative;
  background-color: var(--bg);
  background-image: var(--beach-wide);
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  min-height: 960px;
  padding: 28px 48px 60px;
}
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px 6px 8px;
  border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 20px;
}
.brand img { width: 40px; height: 40px; }
.nav { display: flex; align-items: center; gap: 22px; padding: 6px 6px 6px 22px; border-radius: 999px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: 15px; }
.nav .btn { padding: 10px 20px; font-size: 15px; }

.hero-body { display: grid; grid-template-columns: minmax(0, 600px) 1fr; gap: 40px; align-items: end; max-width: 1344px; margin: 0 auto; padding-top: 240px; }
.hero-card { border-radius: 28px; padding: 36px 40px; }
.hero-card h1 { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero-card .lede { font-size: 19px; color: var(--muted); margin: 0 0 22px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.fine { font-size: 14px; font-weight: 500; color: var(--muted); margin: 0; }

.phones { position: relative; height: 680px; }
.phone {
  position: absolute; background: #0E0F12; overflow: hidden;
  box-shadow: 0 30px 50px rgba(13, 26, 51, 0.35);
}
.phone img, .phone video { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone .screen { position: absolute; overflow: hidden; background: #FEF4E3; }
.phone-ios { width: 296px; height: 640px; border-radius: 50px; left: 10%; top: 0; z-index: 2; }
.phone-ios .screen { inset: 11px; border-radius: 39px; }
.phone-ios::after { content: ""; position: absolute; top: 21px; left: 50%; width: 96px; height: 28px; margin-left: -48px; border-radius: 14px; background: #000; }
.phone-android { width: 270px; height: 580px; border-radius: 34px; left: calc(10% + 250px); top: 80px; transform: rotate(-4deg); }
.phone-android .screen { inset: 9px; border-radius: 25px; }
.phone-android::after { content: ""; position: absolute; top: 19px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #000; }

/* Sections on the sand */
main section { max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.section-head { text-align: center; margin: 80px auto 32px; }
.overline { color: var(--overline); font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 8px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid3 .card { padding: 28px; }
.grid3 h3 { font-size: 21px; margin: 0 0 8px; }
.grid3 p { color: var(--muted); margin: 0; font-size: 16px; }

/* A look inside: the top half of each app screen, one message per shot. */
.shots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.shot { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.shot figcaption { color: var(--muted); font-size: 15px; line-height: 1.4; }
.shot figcaption strong { display: block; color: var(--fg); font-size: 17px; margin-bottom: 2px; }
.shot img {
  display: block; width: 100%; height: auto; margin-top: auto;
  border: 1px solid var(--line); border-radius: 22px; background: #FEF4E3;
  box-shadow: var(--shadow);
}
.step-num { display: inline-block; border-radius: 999px; padding: 4px 14px; font-weight: 700; margin-bottom: 12px; }
.step-1 .step-num { background: rgba(23, 208, 216, 0.25); }
.step-2 .step-num { background: rgba(246, 200, 53, 0.3); }
.step-3 .step-num { background: rgba(243, 98, 93, 0.25); }

.works {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 44px;
  width: fit-content; max-width: 100%; margin: 56px auto 0; padding: 22px 44px; border-radius: 999px;
}
.works .label { color: var(--muted); font-weight: 600; }
.works span { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.works svg { width: 28px; height: 28px; flex: none; }
.works sup { font-size: 0.6em; margin-left: 1px; }

/* Launch list */
.join { max-width: 640px; margin: 96px auto 0; padding: 44px; border-radius: 32px; box-shadow: var(--shadow); }
.join h2 { font-size: 36px; margin: 0 0 12px; }
.join .lede { color: var(--muted); font-size: 17px; margin: 0 0 20px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field input {
  font: inherit; font-size: 16px; color: var(--fg); background: var(--input);
  border: 1px solid var(--input-line); border-radius: 999px; padding: 13px 20px; min-height: 48px;
}
.field input::placeholder { color: var(--muted); opacity: 0.8; }
.field input[aria-invalid="true"] { border-color: var(--primary); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { margin-top: 16px; min-height: 0; }
.join .btn-primary { width: 100%; margin-top: 18px; padding: 16px; font-size: 17px; }
.join .btn-primary[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.form-error { color: var(--primary); font-weight: 600; margin: 14px 0 0; }
.consent { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.state { text-align: center; }
.state .icon { font-size: 40px; margin: 0 0 8px; }
.state h2 { font-size: 30px; }
.state p { color: var(--muted); font-size: 16px; }
.state .again { color: var(--primary); font-weight: 600; background: none; border: 0; font: inherit; cursor: pointer; padding: 6px; }

footer { text-align: center; padding: 72px 24px 48px; font-size: 13px; color: var(--muted); }
footer .made { color: var(--fg); font-weight: 600; font-size: 14px; margin: 0 0 6px; }
footer p { margin: 4px 0; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Tablet: stack the hero, keep the wide beach. */
@media (max-width: 960px) {
  .hero { padding: 20px 24px 40px; min-height: 0; }
  .hero-body { grid-template-columns: 1fr; padding-top: 300px; gap: 28px; }
  .phones { height: 560px; max-width: 520px; width: 100%; margin: 0 auto; }
  .phone-ios { left: 4%; transform: scale(0.85); transform-origin: top left; }
  .phone-android { left: auto; right: 4%; transform: rotate(-4deg) scale(0.85); transform-origin: top right; }
  .grid3 { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
  .shots { grid-template-columns: repeat(2, 1fr); max-width: 640px; margin: 0 auto; gap: 28px 20px; }
  .nav a:not(.btn) { display: none; }
  .nav { padding: 6px; }
}

/* Phones: the narrow beach, sized to the screen width like the app. */
@media (max-width: 600px) {
  .hero {
    background-image: var(--beach-narrow);
    background-size: 100% auto;
    background-position: center top;
    padding: 16px 16px 24px;
  }
  .brand { font-size: 17px; padding: 4px 14px 4px 6px; }
  .brand img { width: 34px; height: 34px; }
  .nav .btn { padding: 9px 16px; }
  .hero-body { padding-top: 24px; gap: 28px; }
  .hero-card { padding: 24px 22px; border-radius: 24px; }
  .hero-card .lede { font-size: 16px; }
  /* The hero phones give way to the full-width shots below, so the beach
     ends under the card: fade it into the page. */
  .phones { display: none; }
  .hero { padding-bottom: 56px; }
  .hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 96px;
    background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none;
  }
  .hero-body { position: relative; z-index: 1; }
  .shots { grid-template-columns: 1fr; gap: 32px; }
  .phone-ios, .phone-android { transform: none; width: 46%; height: auto; aspect-ratio: 168 / 364; top: 0; }
  .phone-ios { left: 2%; border-radius: 30px; }
  .phone-ios .screen { inset: 7px; border-radius: 23px; }
  .phone-ios::after { top: 14px; width: 54px; height: 16px; margin-left: -27px; }
  .phone-android { left: auto; right: 2%; top: 24px; border-radius: 22px; }
  .phone-android .screen { inset: 6px; border-radius: 16px; }
  .phone-android::after { top: 12px; width: 8px; height: 8px; margin-left: -4px; }
  .section-head { text-align: left; margin: 56px 0 18px; }
  main section { padding: 0 16px; }
  .grid3 { gap: 12px; }
  .grid3 .card { padding: 20px; border-radius: 22px; }
  .works { flex-direction: column; align-items: flex-start; border-radius: 22px; padding: 20px; width: 100%; gap: 12px; margin-top: 28px; }
  .join { padding: 24px; border-radius: 26px; margin-top: 56px; }
  .join h2 { font-size: 28px; }
  .fields { grid-template-columns: 1fr; }
}

/* /launch-list/confirmed and /launch-list/link-expired: the beach and one card. */
.hero-simple { min-height: 100vh; min-height: 100dvh; }
.simple-body { display: flex; justify-content: center; padding-top: 34vh; }
.simple-body .join { margin: 0; width: 100%; }
.simple-body h1 { font-size: 30px; margin: 0 0 10px; }
.simple-body .btn { margin-top: 8px; }
@media (max-width: 600px) { .simple-body { padding-top: 24px; } }
