/* Foundervine Spaces lead capture — tokens from the Foundervine Spaces design system */

@font-face { font-family: "GT Walsheim"; src: url("fonts/GT-Walsheim-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "GT Walsheim"; src: url("fonts/GTWalsheimPro-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "GT Walsheim"; src: url("fonts/GTWalsheimPro-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Ivy Ora Text"; src: url("fonts/IvyOraText-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ivy Ora Text"; src: url("fonts/IvyOraText-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Ivy Ora Text"; src: url("fonts/IvyOraText-RegularItalic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Ivy Ora Text"; src: url("fonts/IvyOraText-MediumItalic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --wine-minus2: #590F0D;
  --wine: #751511;
  --wine-plus1: #8F1814;
  --wine-plus2: #A11C17;
  --orange: #FF5C33;
  --orange-minus3: #F53100;
  --amber: #FFC633;
  --teal: #063B40;
  --white: #FFFEFC;
  --snow: #FBF9F7;
  --ivory: #F7F5F2;
  --ink: #1A1817;
  --iron: #333230;
  --pebble: #5C5B5B;
  --line: #8F8A85;          /* control borders, ≥3:1 on white */
  --line-soft: #E4DED7;     /* decorative dividers only */
  --error: #A11C17;
  --wine-tint: #F6ECEA;

  --sans: "GT Walsheim", Arial, Helvetica, sans-serif;
  --serif: "Ivy Ora Text", Palatino, "Palatino Linotype", "Book Antiqua", serif;

  --radius: 18px;
  --radius-sm: 12px;
  --tap: 60px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.shell { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); }
.brand {
  position: relative; overflow: hidden; background: var(--wine);
  height: 10px; /* mobile: slim brand strip */
}
.brand__pattern {
  position: absolute; inset: -2%;
  background: url("brand/fvs-pattern-outline.svg") center / 150% auto repeat;
  opacity: .28;
}
.brand__art { display: none; }
.stage { display: flex; flex-direction: column; min-height: calc(100dvh - 10px); }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter) 6px;
}
.topbar__logo { display: inline-flex; border-radius: 8px; }
.logo { height: 38px; width: auto; }

main { flex: 1; padding: 12px var(--gutter) 40px; outline: none; }
.screen { max-width: 640px; margin: 0 auto; animation: rise .35s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.foot { padding: 0 var(--gutter) 24px; color: var(--pebble); font-size: 14px; }
.foot__inner { max-width: 640px; margin: 0 auto; }

/* Shared-screen (kiosk) and wide screens: split layout with brand panel */
@media (min-width: 960px) {
  .shell { grid-template-columns: minmax(340px, 40%) minmax(0, 1fr); height: 100dvh; }
  .brand { height: auto; }
  .brand__art { display: block; position: absolute; inset: 0; }
  .stage { min-height: 0; height: 100dvh; overflow-y: auto; }
  .topbar { padding-top: 32px; }
  main { display: flex; align-items: center; padding-top: 24px; }
  .screen { width: 100%; }
}

/* Brand composition: the circle at the heart, with grid shapes */
.shape { position: absolute; display: block; }
.shape--circle {
  width: min(62%, 420px); aspect-ratio: 1; border-radius: 50%;
  background: var(--orange) center / cover no-repeat;
  left: 50%; top: 46%; transform: translate(-50%, -50%);
}
.shape--circle.has-photo { background-color: var(--amber); box-shadow: 0 0 0 14px var(--orange); width: min(70%, 460px); }
.shape--vine {
  width: min(24%, 160px); aspect-ratio: 1; background: var(--wine-plus2);
  border-radius: 0 50% 0 50%; left: 12%; bottom: 10%;
}
.shape--crescent {
  width: min(16%, 110px); aspect-ratio: 1; right: 12%; top: 12%;
  background:
    radial-gradient(circle at 50% 0, var(--amber) 0 50%, transparent 50.5%) top / 100% 50% no-repeat,
    radial-gradient(circle at 50% 0, var(--amber) 0 50%, transparent 50.5%) bottom / 100% 50% no-repeat;
}

/* ---------- Type ---------- */
.eyebrow {
  font-weight: 400; font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--wine); margin: 0 0 14px;
}
h1, .h1 {
  font-family: var(--sans); font-weight: 500; color: var(--wine);
  font-size: clamp(36px, 7vw, 62px); line-height: 1.04; letter-spacing: -.02em; margin: 0 0 18px;
}
h1 em, .h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -.01em; }
h2 { font-weight: 500; color: var(--wine); font-size: clamp(28px, 5vw, 40px); line-height: 1.1; letter-spacing: -.015em; margin: 0 0 10px; }
.lede { font-family: var(--sans); font-weight: 300; font-size: clamp(19px, 2.4vw, 23px); line-height: 1.45; color: var(--iron); margin: 0 0 30px; max-width: 34ch; }
.muted { color: var(--pebble); }
.small { font-size: 15px; }

/* ---------- Welcome choices ---------- */
.choices { display: grid; gap: 14px; margin: 0 0 22px; }
@media (min-width: 620px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 150px; padding: 22px 24px; border-radius: var(--radius);
  font: inherit; text-align: left; cursor: pointer; border: 2px solid var(--wine);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s;
}
.choice:active { transform: scale(.985); }
.choice__title { font-weight: 500; font-size: clamp(24px, 3vw, 28px); line-height: 1.1; letter-spacing: -.01em; }
.choice__meta { font-size: 16px; font-weight: 300; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.choice__dot { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.choice__dot svg { width: 20px; height: 20px; }
.choice--primary { background: var(--wine); color: var(--white); }
.choice--primary .choice__dot { background: var(--orange); color: var(--ink); }
.choice--primary:hover { background: var(--wine-plus1); }
.choice--secondary { background: var(--white); color: var(--wine); }
.choice--secondary .choice__dot { background: var(--wine); color: var(--white); }
.choice--secondary:hover { background: var(--wine-tint); }
.hint { font-size: 16px; color: var(--pebble); margin: 0; }
.welcome-photo { width: 100%; height: auto; aspect-ratio: 1400 / 461; object-fit: cover; border-radius: 999px; margin: 0 0 22px; background: var(--amber); }
@media (min-width: 960px) { .welcome-photo { display: none; } }
.privacy__url { color: var(--wine); font-weight: 400; word-break: break-all; }

/* ---------- Progress ---------- */
.progress { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; }
.progress__label { font-size: 15px; font-weight: 400; color: var(--pebble); white-space: nowrap; }
.progress__bar { display: flex; gap: 6px; flex: 1; max-width: 220px; }
.progress__seg { height: 6px; flex: 1; border-radius: 6px; background: var(--line-soft); transition: background-color .3s; }
.progress__seg.is-done { background: var(--wine); }
.progress__seg.is-current { background: var(--orange); }

/* ---------- Option cards (radio / checkbox) ---------- */
fieldset { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
legend, .label { font-weight: 500; font-size: 19px; color: var(--ink); margin: 0 0 12px; padding: 0; }
.legend-note { font-weight: 300; color: var(--pebble); }
.options { display: grid; gap: 10px; }
.options--2 { grid-template-columns: 1fr 1fr; }
.options--4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .options--4 { grid-template-columns: repeat(4, 1fr); } }

.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt__box {
  display: flex; align-items: center; gap: 14px; min-height: var(--tap);
  padding: 14px 18px; border-radius: var(--radius-sm); background: var(--white);
  border: 1.5px solid var(--line); font-weight: 400; font-size: 18px; line-height: 1.25; color: var(--ink);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.opt--card .opt__box { min-height: 84px; font-size: 20px; font-weight: 500; }
.opt__tick {
  width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; background: var(--white); transition: all .15s;
}
.opt__tick svg { width: 14px; height: 14px; opacity: 0; color: var(--white); transition: opacity .15s; }
.opt input:checked + .opt__box { border-color: var(--wine); background: var(--wine-tint); box-shadow: inset 0 0 0 1.5px var(--wine); }
.opt input:checked + .opt__box .opt__tick { background: var(--wine); border-color: var(--wine); }
.opt input:checked + .opt__box .opt__tick svg { opacity: 1; }
.opt input:focus-visible + .opt__box { outline: 3px solid var(--orange-minus3); outline-offset: 3px; }
.opt:hover .opt__box { border-color: var(--wine); }
.options--4 .opt__box { justify-content: center; text-align: center; }
.options--4 .opt__tick { display: none; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 20px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--white);
  font-weight: 400; font-size: 17px; transition: all .15s;
}
.chip span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line-soft); transition: background-color .15s; }
.chip input:checked + span { background: var(--wine); border-color: var(--wine); color: var(--white); }
.chip input:checked + span::before { background: var(--orange); }
.chip input:focus-visible + span { outline: 3px solid var(--orange-minus3); outline-offset: 3px; }

/* ---------- Text fields ---------- */
.fields { display: grid; gap: 18px; margin: 0 0 26px; }
@media (min-width: 620px) { .fields--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; font-size: 17px; }
.field .opt-tag { font-weight: 300; color: var(--pebble); }
.input {
  width: 100%; min-height: var(--tap); padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--white); color: var(--ink);
  font: 400 19px/1.3 var(--sans); transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.input:hover { border-color: var(--wine); }
.input:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(117, 21, 17, .18); }
.input[aria-invalid="true"] { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.input--short { max-width: 200px; }
.err { color: var(--error); font-size: 15px; font-weight: 400; display: flex; gap: 6px; align-items: flex-start; margin: 0; }
.err::before { content: "!"; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--error); color: var(--white); font-size: 12px; font-weight: 500; display: grid; place-items: center; }
fieldset > .err { margin-top: 10px; }

/* Consent checkbox */
.check { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--white); border: 1.5px solid var(--line); cursor: pointer; margin: 0 0 8px; }
.check input { width: 28px; height: 28px; flex: none; margin: 0; accent-color: var(--wine); cursor: pointer; }
.check span { font-size: 17px; font-weight: 400; line-height: 1.4; }
.check:has(input:checked) { border-color: var(--wine); background: var(--wine-tint); }
.check:has(input:focus-visible) { outline: 3px solid var(--orange-minus3); outline-offset: 3px; }
.check-wrap { margin: 0 0 22px; }

.privacy { font-size: 15px; color: var(--pebble); margin: 0 0 22px; line-height: 1.5; }
.privacy a { color: var(--wine); font-weight: 400; }
.cfg-flag { display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; background: var(--amber); color: var(--ink); padding: 2px 8px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 0 28px; border-radius: 999px; cursor: pointer;
  font: 500 18px/1 var(--sans); letter-spacing: .005em; text-decoration: none;
  border: 2px solid transparent; transition: background-color .15s, transform .12s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible, .choice:focus-visible, .topbar__logo:focus-visible, a:focus-visible { outline: 3px solid var(--orange-minus3); outline-offset: 3px; }
.btn--primary { background: var(--wine); color: var(--white); }
.btn--primary:hover { background: var(--wine-plus1); }
.btn--primary[disabled] { opacity: .65; cursor: progress; }
.btn--ghost { background: transparent; color: var(--wine); border-color: var(--wine); }
.btn--ghost:hover { background: var(--wine-tint); }
.btn--link { background: none; border: 0; color: var(--wine); padding: 0 8px; min-height: 48px; text-decoration: underline; text-underline-offset: 4px; font-weight: 400; }
.btn--restart { background: var(--white); color: var(--wine); border-color: var(--wine); min-height: 56px; padding: 0 24px; font-size: 18px; }
.btn--restart::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.btn--restart:hover { background: var(--wine-tint); }
.btn--block { width: 100%; }

.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap-reverse; margin-top: 8px; }
.actions .btn--primary { flex: 1 1 260px; }
.back { display: inline-flex; align-items: center; gap: 8px; }
.back svg { width: 18px; height: 18px; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Error banner */
.banner { display: grid; gap: 12px; padding: 18px 20px; border-radius: var(--radius-sm); background: #FBEAE7; border: 1.5px solid var(--error); margin: 0 0 22px; }
.banner p { margin: 0; font-weight: 400; }
.banner strong { font-weight: 500; color: var(--wine-minus2); }
.banner .btn { justify-self: start; min-height: 52px; }

/* ---------- Success ---------- */
.success { text-align: left; }
.success__mark { width: 84px; height: 84px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; margin: 0 0 28px; animation: pop .45s var(--ease) both; }
.success__mark svg { width: 38px; height: 38px; color: var(--ink); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.countdown { margin-top: 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--pebble); font-size: 16px; }
.countdown__ring { width: 40px; height: 40px; }
.countdown__ring circle { fill: none; stroke-width: 4; }
.countdown__ring .track { stroke: var(--line-soft); }
.countdown__ring .bar { stroke: var(--wine); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1s linear; }

/* ---------- Dialog ---------- */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(26, 24, 23, .55); display: grid; place-items: center; padding: 20px; z-index: 50; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.dialog { background: var(--white); border-radius: 24px; padding: 32px; max-width: 480px; width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.dialog__title { margin-bottom: 8px; }
.dialog p { font-size: 19px; margin: 0 0 24px; }
.dialog__actions { display: grid; gap: 10px; }

.noscript { padding: 24px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kiosk: bigger everything, no text selection */
.is-kiosk body, body.is-kiosk { font-size: 19px; user-select: none; -webkit-user-select: none; }
body.is-kiosk input, body.is-kiosk textarea { user-select: text; -webkit-user-select: text; }
body.is-kiosk { --tap: 64px; }

/* Preview banner (only in the hosted preview build) */
.preview-bar { position: sticky; top: 0; z-index: 40; background: var(--teal); color: var(--white); font-size: 14px; padding: 8px var(--gutter); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.preview-bar b { font-weight: 500; }
.preview-bar label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.preview-bar select, .preview-bar button { font: inherit; border-radius: 8px; border: 1px solid rgba(255,255,255,.5); background: transparent; color: inherit; padding: 4px 10px; min-height: 32px; cursor: pointer; }
.preview-bar option { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
h1[tabindex="-1"]:focus, main:focus { outline: none; }
