/* South Hills Flight v1 "The Court Sheet" shared styles */
:root {
  --gold: #D89820;
  --gold-rgb: 216, 152, 32;
  --ink-rgb: 20, 20, 20;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
  /* Keep anything scrolled into view clear of the two fixed bars: the sticky header
     at the top, and on small screens the Book court time bar pinned to the bottom.
     Without this the browser parks a focused field underneath them, which put the
     submit button 71px under the mobile bar on a 390px screen. */
  scroll-padding-top: 5.5rem;
}
@media (max-width: 1023px) {
  html { scroll-padding-bottom: 5.5rem; }
}
body { font-family: Figtree, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }

::selection { background: rgba(var(--gold-rgb), 0.35); color: #0A0A0A; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0A0A0A; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 0; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--gold); color: #0A0A0A; padding: 0.75rem 1.25rem; font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; outline: 3px solid #fff; outline-offset: 2px; }

/* Honeypot: hidden from users and screen readers */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Focus rings (visible everywhere) */
.focus-ring:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px;
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.85rem 1.6rem;
  font-family: "Big Shoulders Display", Impact, sans-serif; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.06em; text-transform: uppercase;
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease), background-color 250ms var(--ease), color 250ms var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-gold { background: var(--gold); color: #0A0A0A; box-shadow: 0 8px 30px rgba(var(--gold-rgb), 0.25); }
.btn-gold:hover { background: var(--gold); box-shadow: 0 14px 44px rgba(var(--gold-rgb), 0.45); }
.btn-outline { border: 2px solid var(--gold); color: #fff; }
.btn-outline:hover { background: rgba(var(--gold-rgb), 0.12); }
.btn-outline-ink { border: 2px solid #141414; color: #141414; }
.btn-outline-ink:hover { background: #141414; color: #F6F2EA; }

/* Inline text links get a 44px tap height without changing line layout */
.tap { display: inline-block; padding-top: 0.7rem; padding-bottom: 0.7rem; margin-top: -0.7rem; margin-bottom: -0.7rem; min-height: 44px; }

/* Nav links */
.nav-link { position: relative; padding: 0.5rem 0; font-weight: 600; color: #E7E1D5; min-height: 44px; display: inline-flex; align-items: center;
  transition: color 200ms var(--ease); }
.nav-link::after { content: ""; position: absolute; left: 0; bottom: 4px; height: 2px; width: 100%; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform 250ms var(--ease); }
.nav-link:hover, .nav-link[aria-current="page"] { color: #fff; }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* Drawer links mirror the desktop nav: resting links sit back in stone, the page you
   are on comes forward in white with a gold bar on the drawer edge. The bar is pulled
   out by the list container's 1.25rem padding so it sits flush against the border. */
.drawer-link { position: relative; color: #E7E1D5; transition: color 200ms var(--ease); }
.drawer-link:hover { color: #fff; }
.drawer-link[aria-current="page"] { color: #fff; }
.drawer-link[aria-current="page"]::before { content: ""; position: absolute; left: -1.25rem; top: 0.5rem; bottom: 0.5rem;
  width: 3px; background: var(--gold); }

/* The bottom bar is z-40 and the drawer sits at z-30 inside a z-40 header, so the
   bar painted over the drawer footer and a tap on the drawer's email link landed
   on the bar's Book Court Time instead. While the drawer is open the bar is behind
   a full-screen overlay and unusable anyway, and the drawer carries its own Book
   Court Time button, so take it out of the page for the duration. */
.menu-open .mobile-bar { display: none; }

/* Footer social buttons. 44px so they are a real tap target, gold ring at rest and
   a filled gold chip on hover, matching the outline buttons used elsewhere. */
.social-dot { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 9999px; border: 1px solid rgba(var(--gold-rgb), 0.45); color: #E7E1D5;
  transition: color 200ms var(--ease), background-color 200ms var(--ease), border-color 200ms var(--ease); }
.social-dot:hover { color: #0A0A0A; background: var(--gold); border-color: var(--gold); }

/* Phone numbers start with "(", which sits right on the underline. skip-ink cuts a
   gap around it and strands the piece of underline in the glyph's side bearing as a
   period-sized dot, so the number reads as ".(412) 440-7568". Draw it straight. */
a[href^="tel:"] { text-decoration-skip-ink: none; }

/* Every court photograph is an AI rendering for the pro shoot, so each one carries a
   quiet label: body face, no gold, no border, so it reads as a note rather than a
   badge. Sits above .photo::after, which draws the inset edge. */
.render-tag { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 3; pointer-events: none;
  background: rgba(10, 10, 10, 0.5); color: rgba(231, 225, 213, 0.72);
  border-radius: 3px; padding: 0.15rem 0.4rem;
  font-family: Figtree, system-ui, sans-serif;
  font-weight: 600; font-size: 10px; line-height: 1.3; letter-spacing: 0.08em; text-transform: uppercase; }
.render-tag--hero { top: auto; bottom: 0.75rem; right: 0.75rem; z-index: 20; }
/* the hero badge is bottom-anchored, so it must not pick up a top here:
   setting both stretches it to the full height of the hero. */
@media (min-width: 1024px) {
  .render-tag:not(.render-tag--hero) { top: 0.75rem; right: 0.75rem; }
  .render-tag--hero { bottom: 1rem; right: 1rem; }
}

/* Court-line texture (gold hairlines on black) */
.court-lines {
  background-color: #0A0A0A;
  background-image:
    linear-gradient(rgba(var(--gold-rgb), 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--gold-rgb), 0.10) 1px, transparent 1px);
  background-size: 96px 96px;
}
.court-lines-arc { position: relative; overflow: hidden; }
.court-lines-arc::before {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 120%;
  border: 2px solid rgba(var(--gold-rgb), 0.18); border-radius: 50%; pointer-events: none;
}

/* Cream section texture: faint tile grid */
.tile-grid {
  background-color: #F6F2EA;
  background-image: linear-gradient(rgba(var(--ink-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ink-rgb), 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Photo treatment: gold wash + hard gold edge */
.photo { position: relative; overflow: hidden; background: #161616; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.photo::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,10,10,0) 40%, rgba(10,10,10,0.55) 100%), rgba(var(--gold-rgb), 0.08); mix-blend-mode: normal; }
.photo-edge { box-shadow: inset 6px 0 0 var(--gold); }
.photo-edge::after { box-shadow: inset 6px 0 0 var(--gold); }
a.photo:hover img, .photo-zoom:hover img { transform: scale(1.04); }

/* Live open indicator */
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--gold-rgb), 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(var(--gold-rgb), 0); }
}

/* Accordion */
.acc-btn { transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.acc-btn svg { transition: transform 250ms var(--ease); }
.acc-btn[aria-expanded="true"] svg { transform: rotate(45deg); }

/* Court diagram tabs */
.tab-btn { transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease); }
.tab-btn[aria-selected="true"] { background: var(--gold); color: #0A0A0A; border-color: var(--gold); }
.court-layer { transition: opacity 300ms var(--ease); }

/* Mobile drawer */
#mobile-drawer { transition: transform 300ms var(--ease); }
#mobile-menu.hidden #mobile-drawer { transform: translateX(100%); }

/* Forms */
.field { width: 100%; background: #FFFFFF; border: 2px solid #E7E1D5; color: #141414; padding: 0.85rem 1rem; font-size: 16px; min-height: 48px;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
.field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.25); outline: none; }
.field-error { border-color: #B3261E; }

/* Print */
@media print {
  header, footer, .mobile-bar, .no-print { display: none !important; }
  body { padding-bottom: 0 !important; background: #fff; color: #000; }
  main { max-width: 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .pulse-dot { animation: none; }
}

/* --------------------------------------------------------------------------
   KT-V1: cinematic hero (from v8) in the v1 type and palette
   -------------------------------------------------------------------------- */
.hero-media { position: absolute; inset: -6% 0 -6% 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-vignette::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 85% at 50% 38%, rgba(10,10,10,0) 30%, rgba(10,10,10,0.55) 72%, rgba(10,10,10,0.92) 100%);
}
.court-texture {
  background-color: #161616;
  background-image: linear-gradient(rgba(216,152,32,0.10) 1px, transparent 1px), linear-gradient(90deg, rgba(216,152,32,0.10) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
}
.glass-card { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 4px 0 0 var(--gold); }

/* --------------------------------------------------------------------------
   KT-V1: rounded corners, matching v8 (cards 1rem, fields 0.9rem, dots round)
   -------------------------------------------------------------------------- */
:root { --r-card: 1rem; --r-field: 0.9rem; }

/* Buttons and pills */
.btn { border-radius: var(--r-card); }
.tab-btn { border-radius: 999px; }
#open-status { border-radius: 999px; }

/* Photos and framed media */
.photo { border-radius: var(--r-card); }
.photo::after { border-radius: inherit; }
.map-card, .map-card iframe { border-radius: var(--r-card); }
iframe[title^="Map showing"] { border-radius: var(--r-card); }

/* Cards built from utility classes (whole class names only, so bars and sections are never caught) */
.glass-card,
:is([class~="bg-charcoal"], [class~="bg-cream"], [class~="bg-white"], [class~="bg-gold"], [class~="bg-black"]):is([class~="p-3"], [class~="p-5"], [class~="p-6"], [class~="p-7"], [class~="p-8"], [class~="p-10"]),
div[class~="bg-charcoal"][class*="min-h-["],
figure[class~="bg-black"] {
  border-radius: var(--r-card);
}
/* Bars, bands and page sections stay square */
header, header nav, footer, .mobile-bar, .mobile-menu, #mobile-drawer, #booking-strip,
section[class*="bg-"], main > div[class*="bg-"], .tile-grid, .court-lines {
  border-radius: 0;
}

/* Form fields */
.field, .form input, .form select, .form textarea { border-radius: var(--r-field); }

/* Small square dots become circles, like v8 */
span[class*="w-2"][class*="h-2"], span[class*="w-1.5"][class*="h-1.5"], .pulse-dot { border-radius: 999px; }

/* Keep the left accent edge readable on rounded cards */
[class*="border-l-4"], [class*="border-l-8"] { overflow: hidden; }

/* Who books here: shot clock dial (homepage) */
.sc-sweep { transform-origin: 200px 200px; }
.sc-svg { overflow: visible; }   /* lets the connector spokes reach the labels */
.sc-spokes { display: none; }   /* only meaningful once the labels sit beside the dial */
@media (min-width: 1024px) {
  .sc-item { position: relative; }
  .sc-item p { text-wrap: balance; }   /* even line lengths, no orphan last line */
  .sc-spokes { display: block; }
  .sc-bottom::before { content: ""; position: absolute; left: 50%; top: -2.9rem; width: 2px; height: 2.15rem; background: #D89820; transform: translateX(-50%); }   /* top edge clears the stopwatch case, matching the gap on the four diagonal spokes */
}
@media (prefers-reduced-motion: no-preference) {
  .sc-sweep { animation: sc-spin 12s linear infinite; }
}
@keyframes sc-spin { to { transform: rotate(360deg); } }

/* How it works: the step's top rule thickens on hover (homepage) */
@media (min-width: 768px) {
  .step-bar { transition: transform 0.22s ease; }
  .step-bar:hover { transform: translateY(-6px); }
  .step-bar::after {
    content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px;
    background: #D89820; pointer-events: none;
    transition: top 0.22s ease, height 0.22s ease, box-shadow 0.22s ease;
  }
  .step-bar:hover::after { top: -5px; height: 5px; box-shadow: 0 -6px 18px rgba(216, 152, 32, 0.5); }
  /* the numeral steps right and turns cream on the same curve; transform does not reflow */
  .step-bar > span:first-child { display: inline-block; transition: transform 0.22s ease, color 0.22s ease; }
  .step-bar:hover > span:first-child { color: #F6F2EA; }
}
@media (prefers-reduced-motion: reduce) { .step-bar::after, .step-bar > span:first-child { transition: none; } }

/* Hero open-status dot: live pulse, only while the court is actually open */
#open-status[data-state="open"] [data-open-dot] { position: relative; }
#open-status[data-state="open"] [data-open-dot]::after {
  content: ""; position: absolute; inset: 0; border-radius: 9999px; background: #34d399;
}
@media (prefers-reduced-motion: no-preference) {
  #open-status[data-state="open"] [data-open-dot]::after {
    animation: open-halo 2s cubic-bezier(0.3, 0, 0.5, 1) infinite;
  }
}
@keyframes open-halo {
  0%        { transform: scale(1);   opacity: 0.7; }
  70%, 100% { transform: scale(3.2); opacity: 0; }
}

/* Pack the bag: check an item and it drops into the bag (court page) */
.pb-cb { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* fixed, not absolute: focusing a hidden input scrolls it into view, and an absolute one
   at the top of the section yanked the page up to 600px on every tick */
.pb-stage { position: relative; }
.pb-stage > img { display: block; width: 100%; height: auto; }
.pb-layer { position: absolute; inset: 0;
  clip-path: polygon(0% 0%, 100% 0%, 100% 33%, 86% 38%, 72% 43%, 58% 46%, 50% 47%, 42% 46%, 28% 43%, 14% 38%, 0% 33%); }
.pb-item { position: absolute; opacity: 0; transform: translateY(-70px) rotate(-7deg);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.28, 0.5, 1); }
.it-ball  { left: 10%;   top: 5%;  width: 35.5%; }
.it-shoes { left: 44%;   top: 21%; width: 44.2%; }
.it-water { left: 34%;   top: 0%;  width: 13.2%; }
.it-phone { left: 47.5%; top: 8%;  width: 11%; }

.pb-row { display: grid; grid-template-columns: 2.6rem 1fr; gap: 1.15rem; align-items: start;
  padding: 1.15rem 0; border-top: 2px solid var(--gold); cursor: pointer; }
.pb-box { width: 2rem; height: 2rem; margin-top: 0.15rem; border: 3px solid #141414; border-radius: 0.4rem;
  display: grid; place-items: center; transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease); }
.pb-box svg { opacity: 0; transition: opacity 0.18s var(--ease); }

/* Preview on hover, so the link between the row and the bag is discoverable.
   Lower specificity than the :checked rules below, so a packed item stays solid. */
@media (hover: hover) {
  .pb-grid:has([data-k="ball"]:hover)  .it-ball,
  .pb-grid:has([data-k="water"]:hover) .it-water,
  .pb-grid:has([data-k="shoes"]:hover) .it-shoes,
  .pb-grid:has([data-k="phone"]:hover) .it-phone { opacity: 0.38; transform: translateY(0) rotate(0deg); }
  .pb-grid:has([data-k="ball"]:hover)  [data-k="ball"]  .pb-box,
  .pb-grid:has([data-k="water"]:hover) [data-k="water"] .pb-box,
  .pb-grid:has([data-k="shoes"]:hover) [data-k="shoes"] .pb-box,
  .pb-grid:has([data-k="phone"]:hover) [data-k="phone"] .pb-box { border-color: var(--gold); }
}

#k-ball:checked  ~ .pb-grid [data-k="ball"]  .pb-box,
#k-water:checked ~ .pb-grid [data-k="water"] .pb-box,
#k-shoes:checked ~ .pb-grid [data-k="shoes"] .pb-box,
#k-phone:checked ~ .pb-grid [data-k="phone"] .pb-box { background: var(--gold); border-color: var(--gold); }
#k-ball:checked  ~ .pb-grid [data-k="ball"]  .pb-box svg,
#k-water:checked ~ .pb-grid [data-k="water"] .pb-box svg,
#k-shoes:checked ~ .pb-grid [data-k="shoes"] .pb-box svg,
#k-phone:checked ~ .pb-grid [data-k="phone"] .pb-box svg { opacity: 1; }
#k-ball:focus-visible  ~ .pb-grid [data-k="ball"]  .pb-box,
#k-water:focus-visible ~ .pb-grid [data-k="water"] .pb-box,
#k-shoes:focus-visible ~ .pb-grid [data-k="shoes"] .pb-box,
#k-phone:focus-visible ~ .pb-grid [data-k="phone"] .pb-box { outline: 3px solid #8F6212; outline-offset: 3px; }
#k-ball:checked  ~ .pb-grid .it-ball,
#k-water:checked ~ .pb-grid .it-water,
#k-shoes:checked ~ .pb-grid .it-shoes,
#k-phone:checked ~ .pb-grid .it-phone { opacity: 1; transform: translateY(0) rotate(0deg); }

/* Touch has no hover, so the first box pulses three times to read as interactive.
   It changes no state, and stops well under the 5 seconds that would need a pause control. */
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .pb-row[data-k="ball"] .pb-box { animation-name: pb-nudge; animation-duration: 1.1s;
    animation-timing-function: var(--ease); animation-iteration-count: 3; }
}
#k-ball:checked ~ .pb-grid [data-k="ball"] .pb-box { animation: none; }
@keyframes pb-nudge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--gold-rgb), 0); }
  50%      { box-shadow: 0 0 0 7px rgba(var(--gold-rgb), 0.35); }
}

@media (prefers-reduced-motion: reduce) {
  .pb-item { transition: opacity 1ms linear; transform: none; }
  #k-ball:checked  ~ .pb-grid .it-ball,
  #k-water:checked ~ .pb-grid .it-water,
  #k-shoes:checked ~ .pb-grid .it-shoes,
  #k-phone:checked ~ .pb-grid .it-phone { transform: none; }
  .pb-box, .pb-box svg { transition: none; }
}

/* Light closing CTA: the exact twin of the dark one, colours swapped.
   .tile-grid was the wrong partner for .court-lines, it is a 48px grid at 5%
   ink where the dark is a 96px grid at 10% gold, so it read twice as dense. */
.cta-light {
  background-color: #F6F2EA;
  background-image:
    linear-gradient(rgba(var(--ink-rgb), 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ink-rgb), 0.035) 1px, transparent 1px);
  background-size: 96px 96px;
}
/* gold at 18% on black is nearly invisible; golddeep needs to be fainter on
   cream to sit as quietly behind the headline */
.cta-light.court-lines-arc::before { border-color: rgba(143, 98, 18, 0.13); }
/* Court page only: same light CTA without the grid. Background image only,
   so the arc and the text do not move. */
.cta-light.cta-flat { background-image: none; }

/* Every closing CTA arc brushes the underside of the headline, on both colour
   ways. The arc is normally a share of section height, so a band with a longer
   blurb pushed the crest down: the homepage sat on the letterforms while
   Parties sat 11px below them. Anchoring from the top instead pins the crest
   to the headline whatever the blurb runs to. Values track the section padding
   plus the headline at each breakpoint. Scoped to CTA bands so the inner page
   heroes, which also use .court-lines-arc, are untouched. */
section[aria-labelledby="cta-heading"].court-lines-arc::before {
  top: 94px; bottom: auto; height: 120%;
}
@media (min-width: 640px) {
  section[aria-labelledby="cta-heading"].court-lines-arc::before { top: 112px; }
}
@media (min-width: 1024px) {
  section[aria-labelledby="cta-heading"].court-lines-arc::before { top: 164px; }
}
/* The FAQ headline wraps to two lines at the smallest size, so its arc needs
   to start lower there or it would cut through the second line. */
@media (max-width: 639px) {
  section[aria-labelledby="cta-heading"].cta-arc-2line.court-lines-arc::before { top: 147px; }
}

/* Hours dial: a 24 hour clock with the open window drawn as a gold band.
   12AM is at the top, so an unrotated SVG dash starts at 3 o'clock, which on a
   24 hour face is 6AM, and 255 degrees of sweep lands exactly on 11PM. */
.dial-arc { stroke-dasharray: 942.5; stroke-dashoffset: 942.5; }
.dial-hand { transform-origin: 260px 260px; transform: rotate(90deg); }
.dial-pip { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .dial-arc { animation: dial-open 1.9s cubic-bezier(0.2, 0.8, 0.25, 1) 0.25s both; }
  .dial-hand { animation: dial-hand 1.9s cubic-bezier(0.2, 0.8, 0.25, 1) 0.25s both; }
  .dial-pip { animation: dial-pip 0.5s ease-out 0.35s both; }
}
@media (prefers-reduced-motion: reduce) {
  .dial-arc { stroke-dashoffset: 274.9; }
  .dial-hand { transform: rotate(345deg); }
  .dial-pip { opacity: 1; }
}
@keyframes dial-open { to { stroke-dashoffset: 274.9; } }
@keyframes dial-hand { from { transform: rotate(90deg); } to { transform: rotate(345deg); } }
@keyframes dial-pip { to { opacity: 1; } }

/* Hours watch: the hand steps one hour at a time from the 6 index round past 12
   and stops on 11, which is 17 hours of travel, 510 degrees. Hovering or
   focusing the watch pauses it, since the loop runs longer than five seconds. */
.tick { transform-origin: 250px 250px; transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) {
  .tick { animation: tick 8.5s steps(17, end) infinite; }
  svg:hover .tick, svg:focus-within .tick { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .tick { transform: rotate(690deg); }
}
@keyframes tick { 0% { transform: rotate(180deg); } 82%, 100% { transform: rotate(690deg); } }

/* Parties package: the invitation. The reveal plays once on page load and a click
   replays it, so the card is never blank for someone who does not interact. */
.iv4-cb { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; }
.iv4-hit { display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 1rem; }
#iv4-go:focus-visible ~ .iv4-grid .iv4-hit { outline: 3px solid #8F6212; outline-offset: 4px; }
.iv4-st { position: relative; display: block; width: 100%; }
.iv4-st > svg { display: block; width: 100%; height: auto; overflow: visible; }
.iv4-off { display: none; }
#iv4-go:checked ~ .iv4-grid .iv4-on { display: none; }
#iv4-go:checked ~ .iv4-grid .iv4-off { display: inline; }

.iv4-t { font-family: "Big Shoulders Display", Impact, sans-serif; text-transform: uppercase; }
.iv4-eye { font-size: 21px; font-weight: 700; letter-spacing: .22em; }
.iv4-big { font-size: 72px; font-weight: 900; letter-spacing: .01em; }
/* Resting state is the FINISHED card, so anyone who never clicks still reads it.
   The reveal plays once on load and the checkbox replays it. */
/* Base state is the FINISHED card, so with JavaScript off the invitation is still
   readable. JS adds .iv4-armed on load to blank it, then .iv4-play to write it.
   Without that, the words were already on screen before the reveal ever ran. */
.iv4-t tspan { fill-opacity: 1; }
.iv4-rule { stroke-dasharray: 1 2; stroke-dashoffset: 0; }
.iv4-armed .iv4-t tspan { fill-opacity: 0; }
.iv4-armed .iv4-rule { stroke-dashoffset: 1.05; }
.iv4-armed.iv4-play .iv4-t tspan { fill-opacity: 1; }
.iv4-armed.iv4-play .iv4-rule { stroke-dashoffset: 0; }
.iv4-card { transition: transform .3s ease; }
@media (hover: hover) { #iv4-go:not(:checked) ~ .iv4-grid .iv4-hit:hover .iv4-card { transform: translateY(-4px); filter: url(#iv4-sh2); } }
@media (prefers-reduced-motion: no-preference) {
  /* The reveal waits for .iv4-play, which the observer in main.js adds once the card
     is actually on screen. Nothing is gated behind that: the card is readable at rest
     whether the class ever lands or not, so with JS off it simply does not animate.
     backwards fill holds the hidden state through the delay only while it plays. */
  .iv4-play .iv4-t tspan { fill-opacity: 1; animation: iv4-press .28s ease var(--d) backwards; }
  .iv4-play .iv4-rule { stroke-dashoffset: 0; animation: iv4-draw .8s cubic-bezier(.2,.8,.25,1) var(--d) backwards; }
  /* a second identical animation name is what restarts it on click */
  #iv4-go:checked ~ .iv4-grid .iv4-t tspan { animation: iv4-press-b .28s ease var(--d) backwards; }
  #iv4-go:checked ~ .iv4-grid .iv4-rule { animation: iv4-draw-b .8s cubic-bezier(.2,.8,.25,1) var(--d) backwards; }
}
@keyframes iv4-press { from { fill-opacity: 0; } to { fill-opacity: 1; } }
@keyframes iv4-draw { from { stroke-dashoffset: 1.05; } to { stroke-dashoffset: 0; } }
@keyframes iv4-press-b { from { fill-opacity: 0; } to { fill-opacity: 1; } }
@keyframes iv4-draw-b { from { stroke-dashoffset: 1.05; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .iv4-card { transition: none; } .iv4-t tspan, .iv4-rule { animation: none; } }

/* Contact form fields size off the FORM's width, not the window's. At 1024 the page
   goes two column, so the form card shrinks from 944px to 535px while the fields were
   still splitting two across, halving a name field from 430px to 218px as the window
   got BIGGER. A container query pairs them up only when the card can afford it. */
.form-panel { container-type: inline-size; }
.form-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
/* one column: every field spans the full width. Without this a child that spans two
   columns conjures an implicit second column and squeezes the first to 133px. */
.form-grid > * { grid-column: 1 / -1; }
@container (min-width: 36rem) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid > * { grid-column: auto; }
  .form-grid > .form-span-2 { grid-column: 1 / -1; }
}
/* fallback where container queries are unsupported: behave as before */
@supports not (container-type: inline-size) {
  @media (min-width: 640px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .form-grid > * { grid-column: auto; }
    .form-grid > .form-span-2 { grid-column: 1 / -1; }
  }
}
