:root {
  --ink: #f6f1e7;
  --muted: #cfc5b2;
  --accent: #e3a83b;
  --night: #14130f;
  --line: rgba(246, 241, 231, .28);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 90% at 85% 0%, #2a2618 0%, var(--night) 60%);
  color: var(--ink);
  font: 400 18px/1.5 "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex; flex-direction: column; min-height: 100dvh;
}
.top { display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 4vw, 40px); }
.brand { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 18px; color: var(--ink); text-decoration: none; }
.back-link { color: var(--muted); font-size: 15px; }
.bar { height: 3px; background: rgba(246,241,231,.1); }
#bar { display: block; height: 100%; width: 0; background: var(--accent); transition: width .35s ease; }

.steps { flex: 1; display: grid; align-items: center; padding: 24px clamp(16px, 6vw, 96px) 96px; }
.step { max-width: 720px; width: 100%; margin: 0 auto; }
.in-up { animation: up .38s ease both; }
.in-down { animation: down .38s ease both; }
@keyframes up { from { opacity: 0; transform: translateY(24px); } }
@keyframes down { from { opacity: 0; transform: translateY(-24px); } }
@media (prefers-reduced-motion: reduce) { .in-up, .in-down { animation: none; } #bar { transition: none; } }

.num { margin: 0 0 6px; color: var(--accent); font-size: 15px; font-weight: 600; }
h1 { font-family: Fraunces, Georgia, serif; font-weight: 400; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; margin: 0 0 10px; }
.hint { color: var(--muted); margin: 0 0 22px; max-width: 60ch; }

.field:is(input, textarea) {
  width: 100%; background: transparent; border: 0; border-bottom: 2px solid var(--line); color: var(--ink);
  font: 400 clamp(20px, 2.6vw, 26px)/1.35 "Hanken Grotesk", system-ui, sans-serif; padding: 8px 0 10px; margin-top: 12px;
}
textarea.field { min-height: 140px; resize: vertical; }
.field:is(input, textarea):focus { outline: none; border-bottom-color: var(--accent); }
.field::placeholder { color: rgba(246,241,231,.35); }

.options { display: grid; gap: 10px; margin-top: 12px; max-width: 560px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  background: rgba(227,168,59,.08); border: 1px solid rgba(227,168,59,.45); border-radius: 8px; color: var(--ink);
  font: 400 18px/1.35 "Hanken Grotesk", system-ui, sans-serif; padding: 10px 14px; cursor: pointer;
}
.opt:hover { background: rgba(227,168,59,.16); }
.opt[aria-checked="true"], .opt[aria-pressed="true"] { background: rgba(227,168,59,.28); border-color: var(--accent); }
.opt .key { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--accent); border-radius: 4px; font-size: 13px; font-weight: 600; color: var(--accent); margin-top: 1px; }
.opt[aria-checked="true"] .key, .opt[aria-pressed="true"] .key { background: var(--accent); color: var(--night); }
.otext small { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.agree { margin-top: 12px; max-width: 640px; }

.row { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.ok {
  display: inline-block; background: var(--accent); color: var(--night); border: 0; border-radius: 6px;
  font: 600 18px "Hanken Grotesk", system-ui, sans-serif; padding: 10px 20px; cursor: pointer; text-decoration: none;
}
.ok[disabled] { opacity: .6; cursor: progress; }
.tip { color: var(--muted); font-size: 14px; }
.err { min-height: 1.4em; color: #f0a58f; margin: 12px 0 0; font-size: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.nav { position: fixed; right: clamp(16px, 3vw, 32px); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 2px; }
.ghost { background: var(--accent); color: var(--night); border: 0; width: 40px; height: 36px; font-size: 18px; cursor: pointer; }
.ghost:first-child { border-radius: 6px 0 0 6px; } .ghost:last-child { border-radius: 0 6px 6px 0; }
.done h1 { font-size: clamp(32px, 5vw, 48px); }

/* the first screen: three picture cards */
.cards-step { max-width: 1040px; }
.cards-step h1 { text-align: center; font-size: clamp(28px, 4vw, 44px); margin-bottom: 26px; }
.pick-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pick { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; cursor: pointer;
  background: rgba(246,241,231,.05); border: 1px solid rgba(246,241,231,.16); border-radius: 14px; color: var(--ink);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.pick img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .4s ease; }
.pick:hover { transform: translateY(-4px); border-color: rgba(227,168,59,.7); box-shadow: 0 14px 36px rgba(0,0,0,.35); }
.pick:hover img { transform: scale(1.04); }
.pick[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.pick-text { display: grid; gap: 4px; padding: 16px 18px 20px; }
.pick-text strong { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 22px; }
.pick-text small { color: var(--muted); font-size: 15px; line-height: 1.4; }
/* side by side at every width; on a phone the row scrolls sideways, a card and a bit of the next in view */
@media (max-width: 640px) {
  .pick-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-padding: 16px; }
  .pick { scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) { .pick, .pick img { transition: none; } .pick:hover, .pick:hover img { transform: none; } }

/* several questions on one screen */
.qs { display: grid; gap: 22px; margin-top: 18px; }
.qlabel { display: block; font-weight: 600; font-size: 17px; color: var(--ink); margin: 0 0 4px; }
.q .hint { margin: 0 0 6px; font-size: 15px; }
.q .field:is(input, textarea) { margin-top: 2px; font-size: clamp(18px, 2vw, 21px); }
.q textarea.field { min-height: 110px; }
.q .err { min-height: 0; margin-top: 6px; }
.q.bad .field:is(input, textarea) { border-bottom-color: #f0a58f; }
.q .options { margin-top: 6px; }
@media (min-width: 900px) { .qs:has(> .q:nth-child(4)) { grid-template-columns: 1fr 1fr; column-gap: 28px; } .qs > .q:has(textarea, .options) { grid-column: 1 / -1; } }
.terms-link { margin-top: 10px; font-size: 15px; }
.terms-link a { color: var(--accent); }

/* the hero over the first screen */
.apply-hero { position: relative; border-radius: 18px; overflow: hidden; margin-bottom: 26px; aspect-ratio: 21 / 8; min-height: 260px; }
.apply-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.apply-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,19,15,.85) 0%, rgba(20,19,15,.25) 55%, rgba(20,19,15,0) 100%); }
.apply-hero-text { position: absolute; left: clamp(18px, 4vw, 40px); right: clamp(18px, 4vw, 40px); bottom: clamp(16px, 3vw, 32px); z-index: 1; }
.cards-step .apply-hero h1 { text-align: left; margin: 0 0 6px; font-size: clamp(28px, 4vw, 46px); text-shadow: 0 2px 16px rgba(0,0,0,.4); }
.apply-hero .eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.apply-hero-sub { margin: 0; color: var(--ink); font-size: clamp(15px, 1.6vw, 18px); max-width: 52ch; }
.apply-hero .concept { position: absolute; top: 10px; right: 12px; z-index: 1; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(246,241,231,.75); }
.steps:has(.cards-step) { align-items: start; padding-top: 20px; }
@media (max-width: 640px) { .apply-hero { aspect-ratio: 4 / 3; } }

/* quick-tap chips: many short options side by side */
.options.chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: none; }
.options.chips .opt { width: auto; padding: 7px 14px; border-radius: 999px; font-size: 16px; align-items: center; gap: 8px; }
.options.chips .opt .key { width: 18px; height: 18px; font-size: 11px; border-radius: 50%; margin-top: 0; }
.options.chips .opt:not([aria-checked="true"]):not([aria-pressed="true"]) .key { display: none; }
