/* ============================================================
   Warrior - Black Belt Test, Class of 2026 registration
   Brand: Mat Black / White / Vegas Gold (scarce) · Teko + Montserrat
   Concept: the page is the certificate. Gold corner ornaments, double
   rules and an engraved seal frame a form that is otherwise plain and
   quick to fill on a phone at 9pm.
   ============================================================ */
:root {
  --black:      #050505;
  --panel:      #0E0E10;
  --raised:     #16161A;
  --white:      #FFFFFF;
  --mist:       rgba(255, 255, 255, 0.66);
  --faint:      rgba(255, 255, 255, 0.40);
  --ghost:      rgba(255, 255, 255, 0.22);
  --gold:       #C5B358;
  --gold-deep:  #9E8B3C;
  --gold-glow:  rgba(197, 179, 88, 0.13);
  --gold-soft:  rgba(197, 179, 88, 0.07);
  --line:       rgba(255, 255, 255, 0.09);
  --line-gold:  rgba(197, 179, 88, 0.32);
  --err:        #E0A0A0;
  --display: "Teko", "Arial Narrow", sans-serif;
  --body: "Montserrat", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--black); scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
}

/* Ambient backdrop - gold vignette top and bottom, ghost mark behind it all */
.backdrop {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(110% 55% at 50% -8%, var(--gold-glow), transparent 62%),
    radial-gradient(80% 45% at 50% 108%, rgba(197, 179, 88, 0.05), transparent 62%);
}

main#app {
  position: relative; z-index: 1;
  max-width: 660px; margin: 0 auto;
  padding: 22px 22px calc(56px + env(safe-area-inset-bottom));
}

/* ══════════ HERO - the invitation ══════════════════════════════════════ */
.hero {
  position: relative;
  padding: 46px 26px 44px;
  text-align: center;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(197, 179, 88, 0.045), transparent 55%),
    var(--panel);
  margin-bottom: 58px;
  overflow: hidden;
}
/* certificate frame: an inset gold hairline that stops short of the corners,
   where four gold wedges take over - the flyer's corner language, quieted */
.frame {
  position: absolute; inset: 11px; pointer-events: none;
  border: 1px solid var(--line-gold);
}
.corner {
  position: absolute; width: 26px; height: 26px; display: block;
  border: 0 solid var(--gold);
}
.corner.tl { top: -1px;    left: -1px;  border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: -1px;    right: -1px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: -1px; left: -1px;  border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

.mark { height: 44px; width: auto; margin: 0 auto 20px; display: block; opacity: 0.95; }

.eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 0.30em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}

.display {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(56px, 15vw, 92px); line-height: 0.86; letter-spacing: 0.005em;
  color: var(--white);
}
.display.sm { font-size: clamp(42px, 11vw, 62px); }

.classline {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(24px, 6.4vw, 34px); line-height: 1; letter-spacing: 0.16em;
  color: var(--gold); margin-top: 12px;
}

/* the double rule with a diamond in the middle - engraved, not decorative */
.rule { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 24px auto 22px; max-width: 320px; }
.rule span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-gold)); }
.rule span:last-child { background: linear-gradient(90deg, var(--line-gold), transparent); }
.rule b { width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }

.lead { color: var(--mist); font-size: 14.5px; line-height: 1.8; max-width: 46ch; margin: 0 auto; }

.cta {
  display: block; width: 100%; margin: 30px auto 0; padding: 17px 22px;
  font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1;
  letter-spacing: 0.12em; text-transform: uppercase; text-align: center; text-decoration: none;
  color: var(--black); background: var(--gold);
  border: 1px solid var(--gold); cursor: pointer;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.cta:hover { background: #D6C46B; box-shadow: 0 0 34px rgba(197, 179, 88, 0.26); }
.cta:active { transform: translateY(1px); }
.cta:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.cta-note { margin-top: 12px; font-size: 11.5px; color: var(--faint); text-align: center; }

/* ══════════ SHARED SECTION FURNITURE ═══════════════════════════════════ */
.block { margin-bottom: 58px; scroll-margin-top: 20px; }
.kicker {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.30em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.section-title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(32px, 8vw, 44px); line-height: 0.95; letter-spacing: 0.01em;
  margin-bottom: 22px;
}

/* ══════════ TIMELINE ═══════════════════════════════════════════════════ */
.timeline { list-style: none; position: relative; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, var(--line-gold), rgba(197, 179, 88, 0.08));
}
.timeline li { position: relative; padding: 0 0 26px; }
.timeline li:last-child { padding-bottom: 0; }
.node {
  position: absolute; left: -30px; top: 7px; width: 11px; height: 11px;
  border: 1px solid var(--gold-deep); background: var(--black); transform: rotate(45deg);
}
.timeline li.peak .node { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 16px rgba(197, 179, 88, 0.5); }
.tl-when {
  font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.1;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--gold);
}
.tl-what { font-size: 15px; font-weight: 600; margin-top: 2px; }
.timeline li.peak .tl-what { font-size: 17px; }
.tl-detail { font-size: 13px; color: var(--faint); margin-top: 1px; }

/* ══════════ INCLUDED CARD ══════════════════════════════════════════════ */
.incl-card { border: 1px solid var(--line-gold); background: var(--gold-soft); padding: 26px 24px; }
.fee { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.fee-num {
  font-family: var(--display); font-weight: 700; font-size: 52px; line-height: 0.9;
  color: var(--gold);
}
.fee-lab {
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--faint);
}
.incl { list-style: none; }
.incl li {
  position: relative; padding: 7px 0 7px 26px; font-size: 14.5px;
  border-bottom: 1px solid var(--line);
}
.incl li:last-child { border-bottom: 0; }
.incl li::before {
  content: ""; position: absolute; left: 3px; top: 15px; width: 6px; height: 6px;
  background: var(--gold); transform: rotate(45deg);
}
.incl-note { margin-top: 16px; font-size: 12.5px; line-height: 1.7; color: var(--faint); }

/* ══════════ FORM ═══════════════════════════════════════════════════════ */
.form-intro { color: var(--mist); font-size: 13.5px; line-height: 1.75; margin-bottom: 24px; }

.card {
  border: 1px solid var(--line); background: var(--panel);
  padding: 26px 22px 24px; margin-bottom: 16px;
}
.card legend {
  display: flex; align-items: center; gap: 12px; padding: 0 0 4px;
  font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--white);
}
.card .num {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--gold);
  border: 1px solid var(--line-gold); padding: 5px 8px 3px; line-height: 1;
  font-family: var(--body);
}

.f { display: block; margin-top: 20px; }
.card legend + .f, .card legend + .sub-note + .row, .card legend + .sub-note + .f { margin-top: 18px; }
.lab {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--white); margin-bottom: 7px;
}
.f.req .lab::after {
  content: ""; display: inline-block; width: 5px; height: 5px; background: var(--gold);
  border-radius: 50%; margin-left: 7px; vertical-align: 2px;
}
.help { display: block; font-size: 12px; line-height: 1.6; color: var(--faint); margin: -3px 0 8px; }

input[type="text"], input[type="tel"], input[type="email"], input[type="date"],
select, textarea {
  width: 100%; padding: 13px 14px;
  font-family: var(--body); font-size: 16px; color: var(--white);
  background: var(--raised); border: 1px solid var(--line); border-radius: 0;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  -webkit-appearance: none; appearance: none;
}
textarea { line-height: 1.65; resize: vertical; min-height: 52px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
input::placeholder, textarea::placeholder { color: var(--ghost); }
input.bad, select.bad, textarea.bad { border-color: var(--err); }

/* the date input on iOS renders its own text colour unless we insist */
input[type="date"] { color-scheme: dark; min-height: 49px; }

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%),
                    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
select option { background: var(--raised); color: var(--white); }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* city / state / zip - a two-letter state does not need a third of the row */
.row-3 { grid-template-columns: 2fr 0.7fr 1fr; }
/* name / phone / relationship - three real fields, so three equal columns */
.row-even { grid-template-columns: 1fr 1fr 1fr; }
.row .f { margin-top: 0; }
.f .row { margin-top: 0; }

.sub-head {
  margin-top: 26px; font-family: var(--display); font-weight: 600; font-size: 19px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold);
}
.sub-note { font-size: 12.5px; line-height: 1.7; color: var(--faint); margin-top: 6px; }

/* locked, non-editable fact - reads as engraved, not as a disabled input */
.locked {
  margin-top: 20px; padding: 15px 16px; border: 1px dashed var(--line-gold);
  background: var(--gold-soft); display: flex; flex-direction: column; gap: 3px;
}
.locked-lab {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--faint);
}
.locked-val {
  font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.1;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--gold);
}

/* checkboxes */
.check {
  display: flex; gap: 13px; align-items: flex-start; margin-top: 22px;
  padding: 15px 16px; border: 1px solid var(--line); background: var(--raised);
  font-size: 13.5px; line-height: 1.65; color: var(--mist); cursor: pointer;
}
.check input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--gold); cursor: pointer; }
.check b { color: var(--white); font-weight: 700; }
.check.req-check { border-color: var(--line-gold); background: var(--gold-soft); }
.check.bad { border-color: var(--err); }

.sig input { font-family: var(--display); font-size: 30px; letter-spacing: 0.04em; padding: 8px 14px 4px; }
.sig-date { margin-top: 8px; font-size: 11.5px; color: var(--faint); }

.err {
  margin-top: 22px; padding: 14px 16px; border: 1px solid var(--err);
  background: rgba(224, 160, 160, 0.07); color: var(--err); font-size: 13.5px; line-height: 1.6;
}
.submit { margin-top: 26px; }

/* ══════════ CONFIRMATION ═══════════════════════════════════════════════ */
.done { text-align: center; padding-top: 30px; }
.seal {
  width: 108px; height: 108px; margin: 0 auto 26px; position: relative;
  border: 2px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(197, 179, 88, 0.16), transparent 70%);
  animation: seal 0.9s var(--ease) both;
}
.seal::after {
  content: ""; position: absolute; inset: 7px; border: 1px solid var(--line-gold); border-radius: 50%;
}
.seal span {
  font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: 0.06em;
  color: var(--gold); line-height: 1;
}
@keyframes seal {
  from { opacity: 0; transform: scale(0.6) rotate(-14deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
.done .lead { margin-top: 16px; }
.done .lead b { color: var(--gold); }
.next { list-style: none; text-align: left; max-width: 44ch; margin: 30px auto 0; }
.next li {
  position: relative; padding: 10px 0 10px 28px; font-size: 14px; line-height: 1.65;
  color: var(--mist); border-bottom: 1px solid var(--line);
}
.next li:last-child { border-bottom: 0; }
.next .node { position: absolute; left: 3px; top: 17px; width: 7px; height: 7px; background: var(--gold); border: 0; }
.done .cta-note { margin-top: 26px; }

.foot {
  margin-top: 20px; padding-top: 22px; border-top: 1px solid var(--line);
  text-align: center; font-size: 11.5px; line-height: 1.9; color: var(--ghost);
}

/* ══════════ PAGE-LOAD REVEAL ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: no-preference) {
  .hero > *:not(.frame) { animation: rise 0.75s var(--ease) both; }
  .hero .mark      { animation-delay: 0.05s; }
  .hero .eyebrow   { animation-delay: 0.12s; }
  .hero .display   { animation-delay: 0.18s; }
  .hero .classline { animation-delay: 0.26s; }
  .hero .rule      { animation-delay: 0.34s; }
  .hero .lead      { animation-delay: 0.40s; }
  .hero .cta       { animation-delay: 0.48s; }
  .hero .cta-note  { animation-delay: 0.54s; }
  .frame { animation: frame 1.1s var(--ease) 0.1s both; }
}
@keyframes rise  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes frame { from { opacity: 0; } to { opacity: 1; } }

/* ══════════ NARROW ════════════════════════════════════════════════════ */
@media (max-width: 560px) {
  main#app { padding: 16px 15px calc(48px + env(safe-area-inset-bottom)); }
  .hero { padding: 38px 18px 36px; margin-bottom: 46px; }
  .block { margin-bottom: 46px; }
  .card { padding: 22px 17px 20px; }
  .row, .row-3, .row-even { grid-template-columns: 1fr; gap: 18px; }
  .row .f { margin-top: 0; }
  .f .row { gap: 14px; grid-template-columns: 1fr 1fr; }
  .incl-card { padding: 22px 18px; }
}
