/* Hallmark · custom · navy texture and condensed type from the club roll-up, gold script and snow from the invitation */
/* critique: signature is the gold script title between both club logos; the form is the one light surface */
/* waive 7b: pure white is the club white of the roll-up lettering and logo */

@font-face { font-family: "Allura"; font-display: swap; src: url("fonts/allura-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: "Allura"; font-display: swap; src: url("fonts/allura-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "League Gothic"; font-display: swap; src: url("fonts/league-gothic-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: "League Gothic"; font-display: swap; src: url("fonts/league-gothic-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "Source Sans 3"; font-display: swap; font-weight: 400; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: "Source Sans 3"; font-display: swap; font-weight: 400; src: url("fonts/source-sans-3-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "Source Sans 3"; font-display: swap; font-weight: 600; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: "Source Sans 3"; font-display: swap; font-weight: 600; src: url("fonts/source-sans-3-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --night: #06132f;
  --night-soft: rgb(6 19 47 / 0.72);
  --navy: #0d2a5c;
  --blue: #1f5799;
  --gold: #e8c766;
  --gold-bright: #f5da8a;
  --snow: #ffffff;
  --frost: #eef2f9;
  --ink: #0d1a33;
  --ink-soft: #46546f;
  --line: #7a89a8;
  --danger: #a8101c;
  --danger-soft: #fdecee;
  --shadow: 0 24px 60px rgb(0 0 0 / 0.45);
  --shade: rgb(0 0 0 / 0.55);
  --glow: rgb(255 255 255 / 0.75);
  --backdrop: rgb(6 19 47 / 0.8);
  --script: "Allura", "Snell Roundhand", cursive;
  --display: "League Gothic", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  --radius: 0.75rem;
  --radius-small: 0.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { background: var(--night); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--snow);
  font: 400 1.0625rem/1.5 var(--body);
}
/* A fixed layer covers every screen size without a visible tile seam. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: linear-gradient(var(--night-soft), transparent 45%, var(--night-soft)), url("img/texture.webp") center / cover, var(--night); }
[hidden] { display: none !important; }
h1, h2, p, dl, dd, ol { margin: 0; }
h1, h2 { text-wrap: balance; }
h2 { font: 400 2.25rem/1.05 var(--display); text-transform: uppercase; overflow-wrap: break-word; min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; }
.card :focus-visible, dialog :focus-visible { outline-color: var(--blue); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Controls */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0.5rem 1.5rem;
  border: 2px solid var(--gold); border-radius: var(--radius-small);
  background: var(--gold); color: var(--ink);
  font: 400 1.5rem/1 var(--display); letter-spacing: 0.01em; text-decoration: none; text-transform: uppercase;
  cursor: pointer; transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.button:hover { background: var(--gold-bright); }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: wait; background: var(--frost); border-color: var(--line); color: var(--ink-soft); }
.button.secondary { background: transparent; border-color: var(--navy); color: var(--navy); }
.button.secondary:hover { background: var(--frost); }
.button.quiet { min-height: 2.75rem; padding-inline: 0.75rem; background: transparent; border-color: transparent; color: var(--ink-soft); font: 600 1rem var(--body); text-transform: none; text-decoration: underline; }
.button.quiet:hover { color: var(--ink); background: var(--frost); }
.button.danger { background: var(--danger); border-color: var(--danger); color: var(--snow); }

input {
  width: 100%; min-height: 3rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--line); border-radius: var(--radius-small);
  background: var(--snow); color: var(--ink); font: inherit; font-size: 1.125rem;
}
input:hover { border-color: var(--navy); }
input[type="radio"], input[type="checkbox"] { flex: none; width: 1.375rem; min-height: 1.375rem; height: 1.375rem; margin: 0; accent-color: var(--navy); cursor: pointer; }
select { width: 100%; min-height: 3rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--snow); color: var(--ink); font: inherit; }
select:hover { border-color: var(--navy); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.5rem; margin-top: 0.5rem; }
.choices label { display: flex; align-items: center; gap: 0.625rem; min-height: 3rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-small); font-weight: 400; cursor: pointer; }
.choices label:hover { border-color: var(--navy); }
.choices label:has(input:checked) { border-color: var(--navy); background: var(--frost); box-shadow: 0 0 0 1px var(--navy); font-weight: 600; }
.price { margin-top: 0.75rem; font-weight: 600; }
.choices + .hint { margin-top: 0.5rem; }
.due { margin-top: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-small); background: var(--frost); font-weight: 600; font-size: 1.1875rem; }
.due:empty { display: none; }
input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }

.card {
  min-width: 0; padding: 1.75rem 1.25rem;
  border-radius: var(--radius); border-top: 6px solid var(--gold);
  background: var(--snow); color: var(--ink); box-shadow: var(--shadow);
}
.hint, .privacy { color: var(--ink-soft); }
.privacy { margin-top: 1rem; font-size: 0.9375rem; }
.field { margin: 1.5rem 0 0; padding: 0; border: 0; min-width: 0; }
label, legend { display: block; padding: 0; font-weight: 600; }
.field > label { margin-bottom: 0.375rem; }
legend { font-size: 1.1875rem; }
.error { color: var(--danger); font-weight: 600; margin-top: 0.375rem; }
.error:empty { display: none; }
.alert { margin-top: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-small); background: var(--danger-soft); color: var(--danger); font-weight: 600; }
form > .button { width: 100%; margin-top: 1.5rem; }

.stepper-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
fieldset .stepper-row { margin-top: 0.75rem; }
.stepper-row > label { flex: 1 1 8rem; }
.stepper { display: flex; align-items: center; gap: 0.375rem; }
.stepper input { width: 3rem; padding-inline: 0.25rem; text-align: center; font-weight: 600; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.stepper button {
  width: 2.75rem; height: 3rem; border: 0; border-radius: var(--radius-small);
  background: var(--navy); color: var(--snow); font: 600 1.5rem/1 var(--body); cursor: pointer; touch-action: manipulation;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.stepper button:hover { background: var(--blue); }
.stepper button:active { transform: scale(0.95); }
.stepper button[aria-disabled="true"] { background: var(--frost); color: var(--line); cursor: not-allowed; transform: none; }
.remaining { margin-top: 0.75rem; color: var(--ink-soft); }
.trap { position: absolute; left: -200rem; }

/* Invitation page */
.layout { display: grid; gap: 2.5rem; width: min(100% - 2rem, 68rem); margin-inline: auto; padding-top: 1.25rem; }
.intro { display: grid; gap: 2.5rem; align-content: start; min-width: 0; }
.hero { text-align: center; }
.logos img + img { filter: drop-shadow(0 0 2px var(--glow)) drop-shadow(0 6px 14px var(--shade)); }
.logos { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logos img { width: clamp(6.5rem, 30vw, 9.5rem); }
.logos img:first-child { filter: drop-shadow(0 6px 14px var(--shade)); }
.hero h1 {
  margin: 0.5rem 0 0.25rem; color: var(--gold);
  font: 400 clamp(3.75rem, 19vw, 7.5rem)/0.95 var(--script); -webkit-hyphenate-character: ""; hyphenate-character: "";
  overflow-wrap: break-word; min-width: 0; text-shadow: 0 4px 24px var(--shade);
}
.date { font: 400 clamp(2rem, 9.5vw, 3rem)/1.05 var(--display); text-transform: uppercase; }
.place { font: 400 1.625rem/1.2 var(--display); text-transform: uppercase; color: var(--gold); }
.hero-action { margin-top: 1.5rem; }
.schedule { text-align: center; }
.schedule h2 { color: var(--snow); }
.schedule ol { display: inline-grid; gap: 0.25rem; margin: 0.75rem 0 1.25rem; padding: 0; list-style: none; text-align: left; }
.schedule li { display: grid; grid-template-columns: 4.5rem 1fr; align-items: baseline; gap: 0.75rem; }
.schedule time { font: 400 2rem/1.2 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.schedule li span { font-size: 1.1875rem; }
.schedule > p { font: 400 1.875rem/1.1 var(--display); text-transform: uppercase; }
.card { scroll-margin-top: 1rem; }
.is-closed .hero-action, .is-closed .hint, .is-closed .price { display: none; }

#success-title:focus { outline: none; }
#success-view dl { margin: 1.5rem 0; }
#success-view dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--frost); }
#success-view dd { font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }
#success-view .button, #closed-view p { margin-top: 1.25rem; }

footer { padding: 3rem 1rem 2rem; text-align: center; }
.hashtag { font: 400 clamp(2.25rem, 11vw, 3.5rem)/1 var(--display); }
footer a { display: inline-block; padding: 0.625rem; font-size: 1.125rem; }

.sprite { position: absolute; width: 0; height: 0; }
.snow { position: fixed; inset: 0; pointer-events: none; overflow: clip; z-index: 1; }
.snow svg {
  position: absolute; top: -3rem; width: 1.25rem; height: 1.25rem; opacity: 0.5;
  fill: none; stroke: var(--snow); stroke-width: 1.4; stroke-linecap: round;
  animation: fall 22s linear infinite;
}
.snow svg:nth-child(3n) { width: 0.75rem; height: 0.75rem; stroke: var(--gold); animation-duration: 30s; }
.snow svg:nth-child(4n) { width: 1.75rem; height: 1.75rem; opacity: 0.3; animation-duration: 18s; }
.snow svg:nth-child(1) { left: 4%; animation-delay: -2s; }
.snow svg:nth-child(2) { left: 13%; animation-delay: -15s; }
.snow svg:nth-child(3) { left: 21%; animation-delay: -8s; }
.snow svg:nth-child(4) { left: 29%; animation-delay: -12s; }
.snow svg:nth-child(5) { left: 38%; animation-delay: -19s; }
.snow svg:nth-child(6) { left: 47%; animation-delay: -5s; }
.snow svg:nth-child(7) { left: 55%; animation-delay: -17s; }
.snow svg:nth-child(8) { left: 64%; animation-delay: -1s; }
.snow svg:nth-child(9) { left: 72%; animation-delay: -23s; }
.snow svg:nth-child(10) { left: 80%; animation-delay: -10s; }
.snow svg:nth-child(11) { left: 88%; animation-delay: -4s; }
.snow svg:nth-child(12) { left: 95%; animation-delay: -14s; }
@keyframes fall { to { transform: translate3d(2.5rem, calc(100vh + 6rem), 0) rotate(240deg); } }
/* The snow never covers the form. */
.card { position: relative; z-index: 2; }

@media (min-width: 58rem) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; padding-top: 2rem; align-items: start; }
  .logos { justify-content: center; gap: 5rem; }
  .logos img { width: 8.5rem; }
  .hero h1 { font-size: 6.5rem; }
  .card { padding: 2rem 2.25rem; }
}

/* Admin overview */
.admin-head { display: flex; align-items: center; gap: 1rem; width: min(100% - 2rem, 68rem); margin: 0 auto; padding-block: 1.25rem; }
.admin-head img { width: 4.5rem; }
.admin-head h1 { font: 400 clamp(1.875rem, 8vw, 3rem)/1.05 var(--display); text-transform: uppercase; overflow-wrap: break-word; min-width: 0; }
.admin main { width: min(100% - 2rem, 68rem); margin: 0 auto; padding-bottom: 3rem; }
.login { max-width: 28rem; margin-inline: auto; }
.totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.totals div { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--night-soft); border: 1px solid var(--blue); }
.totals dd { font: 400 3.5rem/1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; margin-bottom: 1rem; }
.toolbar .field { flex: 1 1 14rem; }
.toolbar .secondary { min-height: 3rem; font-size: 1.25rem; }

table { width: 100%; border-collapse: collapse; }
th { padding: 0.5rem; border-bottom: 2px solid var(--navy); text-align: left; font-size: 0.9375rem; }
td { padding: 0.625rem 0.5rem; border-bottom: 1px solid var(--frost); font-variant-numeric: tabular-nums; }
td:first-child { font-weight: 600; overflow-wrap: anywhere; }
td small { display: block; color: var(--ink-soft); font-size: 0.9375rem; font-weight: 400; }
.paid { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; cursor: pointer; }

.toolbar select { min-width: 12rem; }

@media (min-width: 40rem) { .totals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* On narrow screens every entry becomes its own block. */
@media (max-width: 52rem) {
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table, tbody, tr, td { display: block; }
  tr { padding: 0.75rem 0; border-bottom: 2px solid var(--frost); }
  td { display: flex; justify-content: space-between; gap: 1rem; padding: 0.125rem 0; border: 0; }
  td[data-label]::before { content: attr(data-label); color: var(--ink-soft); font-weight: 400; }
  td:first-child { display: block; font-size: 1.25rem; }
  td:first-child::before { display: none; }
  td:last-child { justify-content: flex-end; }
}

dialog { width: min(100% - 2rem, 26rem); padding: 1.5rem; border: 0; border-top: 6px solid var(--danger); border-radius: var(--radius); background: var(--snow); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: var(--backdrop); }
dialog p { margin-top: 0.75rem; overflow-wrap: anywhere; }
dialog form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.75rem; margin-top: 1.25rem; }
dialog form > .button { width: auto; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .snow svg:nth-child(odd) { top: 8%; }
  .snow svg:nth-child(even) { top: 34%; }
}
