/* ENCOUNTER* · Face to Face — RSVP. Dark editorial: ink black, warm off-white, one lime accent, hairlines, square corners. */

/* ---------- Founders Grotesk (self-hosted, see /fonts/README.txt) ---------- */
@font-face { font-family: "Founders Grotesk Condensed"; font-weight: 300; font-display: swap;
  src: local("Founders Grotesk Condensed Light"), url("/fonts/founders-grotesk-condensed-light.woff2") format("woff2"); }
@font-face { font-family: "Founders Grotesk Condensed"; font-weight: 600 900; font-display: swap;
  src: local("Founders Grotesk Condensed Bold"), url("/fonts/founders-grotesk-condensed-bold.woff2") format("woff2"); }
@font-face { font-family: "Founders Grotesk"; font-weight: 300; font-display: swap;
  src: local("Founders Grotesk Light"), url("/fonts/founders-grotesk-light.woff2") format("woff2"); }
@font-face { font-family: "Founders Grotesk"; font-weight: 400; font-display: swap;
  src: local("Founders Grotesk Regular"), url("/fonts/founders-grotesk-regular.woff2") format("woff2"); }
@font-face { font-family: "Founders Grotesk"; font-weight: 500 700; font-display: swap;
  src: local("Founders Grotesk Medium"), url("/fonts/founders-grotesk-medium.woff2") format("woff2"); }

:root {
  --bg: #0a0a0a;
  --raised: #141414;
  --deep: #0d0d0d;
  --line: #2a2a2a;
  --line-2: #3a3a3a;
  --text: #f4efe6;
  --text-2: #b8b3a8;
  --text-3: #6e695f;
  --lime: #c4ff00;
  --red: #b3261e;
  --err: #ff8a7a;
  --display: "Founders Grotesk", "Manrope", sans-serif;
  --body: "Founders Grotesk", "Inter", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gut: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1; outline: none; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
sup { line-height: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--lime); color: #000; padding: 10px 14px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; text-decoration: none; }
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gut); }
.wrap.narrow { max-width: 640px; }

/* ---------- type atoms ---------- */
.mono, .label {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; line-height: 1.4;
  text-transform: uppercase; letter-spacing: .12em;
}
.label { color: var(--lime); display: flex; align-items: center; gap: 12px; margin: 0; }
.label::before { content: ""; width: 28px; height: 1px; background: currentColor; flex: none; }
.lime { color: var(--lime); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 300; }
.h2 {
  margin: 18px 0 0; font: 800 clamp(34px, 8.4vw, 56px)/1 var(--display); letter-spacing: -.035em; outline: none;
  text-wrap: balance;
}
.intro { margin: 10px 0 0; font-size: clamp(19px, 4.6vw, 24px); line-height: 1.35; color: var(--text-2); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px var(--gut); background: rgba(10,10,10,.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.mark { font: 800 15px/1 var(--display); letter-spacing: -.02em; color: var(--text); text-decoration: none; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
/* the real ENCOUNTER asterisk (hand-drawn neon-lime PNG, /img/asterisk-neon.png) */
.ast { display: inline-block; width: auto; max-width: none; vertical-align: top; }
.mark .ast { height: .95em; margin: 1px 0 0 2px; position: relative; top: .1em; }
.topmeta { color: var(--text-2); font-size: 10.5px; text-align: right; white-space: nowrap; }
@media (max-width: 480px) { .tm-long { display: none; } }

.testbanner { background: var(--lime); color: #000; text-align: center; padding: 7px var(--gut); font-weight: 600; font-size: 11px; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(44px, 9vw, 96px) 0 clamp(56px, 9vw, 96px); }
.hero-photo {
  position: absolute; inset: 0; z-index: -1;
  background: url("/img/hero.jpg") 58% 30% / cover no-repeat;
  filter: grayscale(1) brightness(.34) contrast(1.1);
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,.55) 0%, rgba(10,10,10,0) 30%, rgba(10,10,10,.6) 72%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10,10,10,.65), rgba(10,10,10,0) 70%);
}
.hero-inner { display: flex; flex-direction: column; align-items: flex-start; }
.hero-label { margin-bottom: clamp(18px, 4vw, 32px); }
.wordmark {
  margin: 0; font: 800 clamp(41px, 13.2vw, 168px)/.86 var(--display); letter-spacing: -.045em; color: var(--text);
  max-width: 100%; white-space: nowrap;
}
.wordmark .ast { height: .78em; margin: -.04em 0 0 .02em; }
.theme { margin: clamp(10px, 2.4vw, 20px) 0 0; font-size: clamp(34px, 8.5vw, 80px); line-height: 1; color: var(--text); letter-spacing: -.02em; }
.rule { display: block; width: 72px; height: 2px; background: var(--lime); margin: clamp(26px, 5vw, 44px) 0 clamp(20px, 4vw, 28px); }
.verse { margin: 0; max-width: 620px; }
.verse p { margin: 0 0 14px; font-size: clamp(18px, 4.4vw, 24px); line-height: 1.4; color: var(--text); }
.verse footer { font-size: 11.5px; }
.meta { margin: clamp(32px, 6vw, 56px) 0 clamp(28px, 5vw, 40px); width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.meta > div { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.meta > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.meta > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.meta dt { color: var(--lime); }
.meta dd { margin: 6px 0 0; font: 600 clamp(17px, 4.4vw, 22px)/1.25 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
@media (min-width: 760px) {
  .meta { grid-template-columns: 1.5fr 1.2fr 1fr; }
  .meta > div:last-child:nth-child(odd) { grid-column: auto; }
  .meta > div { border-left: 1px solid var(--line); padding: 18px 16px; }
  .meta > div:first-child { border-left: 0; padding-left: 0; }
  .meta > div:nth-child(even) { padding-left: 16px; }
}
.fine { margin: 14px 0 0; color: var(--text-3); font-size: 10.5px; }
.hint.err-line { color: var(--err); margin-bottom: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 28px; border: 1px solid transparent; border-radius: 0;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em;
  text-decoration: none; transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.btn.primary { background: var(--lime); color: #000; }
.btn.primary:hover:not(:disabled) { background: #d6ff4d; }
.btn.primary:active:not(:disabled) { transform: translateY(1px); }
.btn.primary span { transition: transform .18s; }
.btn.primary:hover:not(:disabled) span { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--text); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.linkbtn { background: none; border: 0; border-bottom: 1px solid var(--lime); color: var(--text); padding: 12px 0 4px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; min-height: 44px; }
.linkbtn:hover { color: var(--lime); }

/* ---------- form shell ---------- */
.formview { padding: 32px 0 0; }
.progress { margin-bottom: 8px; }
.bar { margin-top: 14px; height: 2px; background: var(--line); position: relative; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 33.3%; background: var(--lime); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.section { padding: 8px 0 24px; animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
.section.back { animation-name: riseback; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes riseback { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.field { margin-top: 30px; }
.field label, .field legend { display: block; font: 600 17px/1.35 var(--body); margin-bottom: 10px; color: var(--text); }
.req, .opt { margin-left: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.req::before { content: "• "; color: var(--lime); }

input[type="text"], input[type="number"] {
  width: 100%; min-height: 54px; padding: 12px 14px; background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 0; font-size: 18px; transition: border-color .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
input[type="number"] { max-width: 160px; }
input[type="text"]:hover, input[type="number"]:hover { border-color: var(--line-2); }
input[type="text"]:focus-visible, input[type="number"]:focus-visible { outline: 2px solid var(--lime); outline-offset: 0; border-color: var(--lime); background: var(--deep); }
.field.invalid input[type="text"], .field.invalid input[type="number"] { border-color: var(--err); }
.hint { margin: 8px 0 0; font-size: 14.5px; color: var(--text-3); }
.err { margin: 8px 0 0; font-size: 14.5px; color: var(--err); min-height: 0; }
.err:empty { display: none; }
.err::before { content: "↳ "; }

/* segmented yes/no */
.seg { display: grid; grid-template-columns: 1fr 1fr; max-width: 320px; border: 1px solid var(--line); }
.seg-opt { position: relative; margin: 0 !important; }
.seg-opt + .seg-opt { border-left: 1px solid var(--line); }
.seg-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg-opt span { display: flex; align-items: center; justify-content: center; min-height: 54px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; color: var(--text-2); transition: background .15s, color .15s; }
.seg-opt input:checked + span { background: var(--lime); color: #000; font-weight: 600; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 3px; }
.seg-opt:hover input:not(:checked) + span { color: var(--text); background: var(--raised); }

/* guest cards */
#guests { margin-top: 22px; }
.guest { position: relative; border: 1px solid var(--line); background: var(--deep); padding: 20px 18px 22px; margin-bottom: 14px; animation: rise .35s cubic-bezier(.2,.7,.2,1) both; }
.guest-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.guest-head .label { color: var(--lime); }
.rm { background: none; border: 0; padding: 0 2px; min-height: 44px; min-width: 44px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); text-decoration: underline; text-underline-offset: 4px; }
.rm:hover { color: var(--err); }
.guest .field { margin-top: 20px; }
.guest .field label, .guest .field legend { font-size: 15.5px; }
.ages { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.age { position: relative; margin: 0 !important; }
.age + .age { border-left: 1px solid var(--line); }
.age input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.age span { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 58px; padding: 6px 4px; font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--text-2); transition: background .15s, color .15s; }
.age small { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; font-weight: 400; color: var(--text-3); margin-top: 3px; }
.age input:checked + span { background: var(--lime); color: #000; }
.age input:checked + span small { color: rgba(0,0,0,.7); }
.age input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 3px; }
#add-guest { margin-top: 6px; width: 100%; border-style: dashed; }
@media (min-width: 520px) { #add-guest { width: auto; } }

/* choice cards (sessions + roles) */
.cards { display: grid; gap: 12px; margin-top: 26px; }
.card { position: relative; display: block; margin: 0 !important; cursor: pointer; }
.card input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.card-body {
  position: relative; display: block; padding: 22px 20px 22px 58px; border: 1px solid var(--line); background: transparent;
  transition: border-color .18s, background .18s;
}
.card-body::before { /* marker box */
  content: ""; position: absolute; left: 20px; top: 26px; width: 18px; height: 18px; border: 1px solid var(--line-2); transition: background .15s, border-color .15s;
}
.card input:checked + .card-body { border-color: var(--lime); background: linear-gradient(180deg, rgba(196,255,0,.06), rgba(196,255,0,0) 80%); }
.card input:checked + .card-body::before { background: var(--lime); border-color: var(--lime); box-shadow: inset 0 0 0 4px var(--bg); }
.card:hover input:not(:checked):not(:disabled) + .card-body { border-color: var(--line-2); background: var(--raised); }
.card input:focus-visible + .card-body { outline: 2px solid var(--lime); outline-offset: 3px; }
.card input:disabled + .card-body { opacity: .42; }
.card input:disabled, .card.off { cursor: not-allowed; }
.s-day { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.s-main { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.s-time { font: 800 clamp(34px, 9vw, 46px)/1 var(--display); letter-spacing: -.035em; }
.s-date { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 21px; color: var(--text-2); }
.badge { display: inline-block; margin-top: 12px; padding: 4px 9px; border: 1px solid var(--lime); color: var(--lime); font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.badge.full { border-color: var(--text-3); color: var(--text-3); margin-left: 6px; }
.badge.low { border-color: var(--line-2); color: var(--text-2); margin-left: 6px; }
.roles { grid-template-columns: 1fr; }
.roles .card-body { padding: 18px 16px 18px 52px; min-height: 64px; }
.roles .card-body::before { left: 16px; top: 22px; }
.r-label { display: block; font: 700 21px/1.15 var(--display); letter-spacing: -.02em; }
.r-desc { display: block; margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--text-2); }

.notes { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--line); }
.notes li { padding: 14px 0 14px 28px; border-bottom: 1px solid var(--line); position: relative; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 18px; line-height: 1.4; color: var(--text-2); }
.notes li::before { content: ""; position: absolute; left: 3px; top: 14px; width: 18px; height: 20px; background: url("/img/asterisk-neon.png") center / contain no-repeat; }
.party-hint { margin-top: 18px; }

/* consent checkbox */
.field .check { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; cursor: pointer; font-weight: 400 !important; font-size: 16px !important; color: var(--text-2) !important; margin: 0 !important; padding: 4px 0; min-height: 44px; position: relative; }
.check input { position: absolute; opacity: 0; width: 26px; height: 26px; margin: 0; left: 0; top: 2px; cursor: pointer; }
.check .box { width: 26px; height: 26px; border: 1px solid var(--line-2); display: grid; place-items: center; margin-top: 1px; transition: background .15s, border-color .15s; }
.check .box::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #000; border-bottom: 2px solid #000; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .15s; }
.check input:checked ~ .box { background: var(--lime); border-color: var(--lime); }
.check input:checked ~ .box::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input:focus-visible ~ .box { outline: 2px solid var(--lime); outline-offset: 3px; }
.consent { margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line); }
.submit-err { margin-top: 20px; padding: 12px 14px; border: 1px solid var(--err); font-size: 15.5px; }
.submit-err::before { content: none; }

/* nav — sticky on mobile */
.nav {
  position: sticky; bottom: 0; z-index: 20; display: flex; gap: 12px; justify-content: space-between;
  margin: 12px calc(var(--gut) * -1) 0; padding: 14px var(--gut) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(10,10,10,0), var(--bg) 30%); border-top: 0;
}
.nav .btn { flex: 1; }
.nav .btn.ghost { flex: 0 0 auto; min-width: 112px; }
.nav .primary { flex: 1; }
@media (min-width: 720px) {
  .nav { position: static; margin: 20px 0 0; padding: 28px 0 0; background: none; border-top: 1px solid var(--line); justify-content: space-between; }
  .nav .btn { flex: 0 0 auto; min-width: 190px; }
  .nav .btn.ghost { min-width: 130px; }
}
.formview { padding-bottom: 28px; }

/* ---------- confirmation ---------- */
.doneview { padding: 44px 0 56px; }
.display-done { margin: 18px 0 0; font: 800 clamp(64px, 20vw, 132px)/.88 var(--display); letter-spacing: -.05em; outline: none; }
.receipt { margin-top: 36px; border: 1px solid var(--line-2); background: var(--deep); padding: 8px 20px 6px; position: relative; }
.receipt::before { content: ""; position: absolute; left: -1px; top: -1px; width: 56px; height: 3px; background: var(--lime); }
.rc-label { color: var(--text-3); margin: 0; }
.ref { margin: 8px 0 0; font: 600 clamp(34px, 10vw, 52px)/1.05 var(--mono); letter-spacing: .04em; color: var(--lime); word-break: break-all; }
.rc-grid { margin: 0; }
.rc-grid > div:first-child { border-top: 0; }
.rc-grid > div { display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.rc-grid dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding-top: 3px; }
.rc-grid dd { margin: 0; font-size: 18px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.rc-grid dd .ln { display: block; }
.rc-grid dd .ln + .ln { margin-top: 4px; }
.rc-grid dd small { color: var(--text-3); font-size: 15px; }
.thanks { margin-top: 20px; padding: 18px 20px 20px; border: 1px solid var(--lime); background: linear-gradient(180deg, rgba(196,255,0,.07), rgba(196,255,0,0) 90%); }
.thanks-label { margin: 0; color: var(--lime); }
.thanks-text { margin: 8px 0 0; font: 400 clamp(17px, 4.4vw, 20px)/1.45 var(--serif); font-style: italic; color: var(--text); }
.shot { margin: 28px 0 8px; color: var(--text-2); display: flex; align-items: center; gap: 12px; }
.shot::before { content: ""; width: 28px; height: 1px; background: var(--lime); }

/* ---------- footer, toast ---------- */
.foot { border-top: 1px solid var(--line); padding: 22px 0 26px; color: var(--text-3); }
.foot .wrap { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.foot .mono { font-size: 10.5px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--text); color: #000; padding: 12px 16px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (min-width: 720px) {
  :root { --gut: 32px; }
  .topbar { padding-left: var(--gut); padding-right: var(--gut); }
  .mark { font-size: 17px; }
  .topmeta { font-size: 11.5px; }
  .roles { grid-template-columns: 1fr 1fr; }
  .formview { padding-top: 56px; }
}
@media (max-width: 380px) {
  .rc-grid > div { grid-template-columns: 1fr; gap: 4px; }
  .age span { font-size: 14px; }
}
