/* ============================================================
   TEMP TENNIS — Design System "Match Point"
   Bold sports-editorial: color-blocked sections in tennis's own
   palette (citrus, clay, court green, court blue, chalk), heavy
   condensed poster type, rotated photo cards with sticker badges.
   Mobile-first. WCAG 2.1 AA contrast throughout.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Core neutrals */
  --ink:      #0B140F;  /* near-black: body text, max contrast */
  --chalk:    #FAF7EE;  /* warm off-white: base page background */
  --white:    #FFFFFF;

  /* Section block colors — each a fully saturated "court surface" */
  --citrus:   #D7F900;  /* tennis ball: hero, primary CTA */
  --citrus-2: #B8D900;  /* citrus hover/shade */
  --court:    #0E3B2E;  /* deep court green: dark sections */
  --court-2:  #0A2B21;  /* darker green: header, footer, deep contrast */
  --clay:     #C1440E;  /* clay court terracotta: bold accent sections */
  --clay-2:   #A23A0C;  /* clay shade/hover */
  --skyline:  #1C6DD0;  /* hard-court blue: accent sections, links on chalk */
  --skyline-2:#154F9B;
  --grape:    #5B2A86;  /* occasional accent: badges, stickers only */

  /* Tints (for cards/badges sitting on a block color) */
  --citrus-tint: #EEFFAA;
  --clay-tint:   #FFD9C2;
  --court-tint:  #CFE9DC;
  --sky-tint:    #CFE3FA;

  --line: rgba(11,20,15,0.12);

  /* Type: heavy condensed display (sports-poster) + workhorse text */
  --font-display: "Anton", "Archivo Black", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Fluid type scale — big, confident jumps */
  --step--1: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
  --step-0:  clamp(1.05rem, 1rem + 0.25vw, 1.18rem);
  --step-1:  clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-2:  clamp(1.7rem, 1.5rem + 1vw, 2.3rem);
  --step-3:  clamp(2.2rem, 1.8rem + 2vw, 3.4rem);
  --step-4:  clamp(2.8rem, 2.1rem + 3.4vw, 5rem);
  --step-5:  clamp(3.4rem, 2.3rem + 5.4vw, 7.2rem);

  /* Space */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-6: 1.5rem;  --s-8: 2rem;   --s-12: 3rem;   --s-16: 4rem; --s-24: 6rem;

  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --container: 76rem;
  --shadow-hard: 8px 8px 0 var(--ink);
  --shadow-hard-sm: 5px 5px 0 var(--ink);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--chalk);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400; /* Anton is already black-weight */
  line-height: 0.96;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { max-width: 62ch; }

a { color: var(--court); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 600; }
a:hover { color: var(--clay); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-header :focus-visible, .section-dark :focus-visible { outline-color: var(--citrus); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--s-4); top: -100%; z-index: 100;
  padding: var(--s-3) var(--s-4); background: var(--citrus); color: var(--ink);
  border-radius: var(--radius-pill); font-weight: 700; transition: top 0.15s ease;
}
.skip-link:focus { top: var(--s-4); }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--s-6); }
.section { padding-block: var(--s-16); position: relative; }
@media (min-width: 48em) { .section { padding-block: var(--s-24); } }

.grid { display: grid; gap: var(--s-6); }
@media (min-width: 48em) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 64em) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Full-bleed color-block sections — the core "Match Point" device */
.block { color: var(--white); }
.block h2, .block h3, .block h4 { color: var(--white); }
.block p { color: rgba(255,255,255,0.88); }
.block a:not(.btn) { color: var(--citrus); }

.block-court   { background: var(--court); }
.block-clay    { background: var(--clay); }
.block-sky     { background: var(--skyline); }
.block-citrus  { background: var(--citrus); color: var(--ink); }
.block-citrus h2, .block-citrus h3, .block-citrus h4 { color: var(--ink); }
.block-citrus p { color: rgba(11,20,15,0.78); }
.block-citrus a:not(.btn) { color: var(--court); }
.block-chalk   { background: var(--chalk); color: var(--ink); }

/* Diagonal seam between stacked blocks for editorial rhythm.
   Combined variant lets top+bottom apply together on one element. */
.seam-top { clip-path: polygon(0 3.5vw, 100% 0, 100% 100%, 0% 100%); margin-top: -1px; }
.seam-bottom { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3.5vw), 0 100%); }
.seam-top.seam-bottom { clip-path: polygon(0 3.5vw, 100% 0, 100% calc(100% - 3.5vw), 0 100%); margin-top: -1px; margin-bottom: -1px; }
@media (max-width: 40em) {
  .seam-top { clip-path: polygon(0 6vw, 100% 0, 100% 100%, 0% 100%); }
  .seam-bottom { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6vw), 0 100%); }
  .seam-top.seam-bottom { clip-path: polygon(0 6vw, 100% 0, 100% calc(100% - 6vw), 0 100%); }
}

.kicker {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-display); font-size: var(--step-0);
  letter-spacing: 0.02em; text-transform: uppercase; color: var(--clay);
  margin-bottom: var(--s-3); padding: var(--s-1) var(--s-3);
  background: var(--citrus-tint); border-radius: var(--radius-pill);
}
.block-court .kicker, .block-clay .kicker, .block-sky .kicker { background: rgba(255,255,255,0.15); color: var(--citrus); }
.block-citrus .kicker { background: var(--white); color: var(--clay); }

.lede { font-size: var(--step-1); color: var(--ink); opacity: 0.72; margin-top: var(--s-4); font-weight: 500; }
.block .lede { color: var(--white); opacity: 0.88; }
.block-citrus .lede { color: var(--ink); opacity: 0.78; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--court-2); color: var(--white);
  border-bottom: 4px solid var(--citrus);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); min-height: 4.5rem;
}
.brand {
  display: inline-flex; align-items: center; text-decoration: none;
}
.brand img { height: 2.5rem; width: auto; display: block; }
@media (min-width: 64em) { .brand img { height: 2.75rem; } }

.nav-toggle {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: var(--citrus); border: 2px solid var(--ink); color: var(--ink);
  font: inherit; font-weight: 800; text-transform: uppercase; font-size: var(--step--1);
  padding: var(--s-2) var(--s-4); border-radius: var(--radius-pill); cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
}
.site-nav { display: none; }
.site-nav.open {
  display: block; position: absolute; inset: 100% 0 auto 0;
  background: var(--court-2); border-bottom: 4px solid var(--citrus);
  padding: var(--s-4) var(--s-6) var(--s-6);
}
.site-nav ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.site-nav a {
  display: block; padding: var(--s-3) var(--s-2); color: var(--white);
  text-decoration: none; font-weight: 700; font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.01em; border-radius: 8px; font-size: var(--step-0);
}
.site-nav a:hover { background: rgba(255,255,255,0.08); color: var(--citrus); }
.site-nav a[aria-current="page"]:not(.btn) { color: var(--citrus); }

@media (min-width: 64em) {
  .nav-toggle { display: none; }
  .site-nav { display: block; position: static; padding: 0; border: 0; }
  .site-nav ul { flex-direction: row; gap: var(--s-1); align-items: center; }
  .site-nav a { padding: var(--s-2) var(--s-3); font-size: var(--step--1); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-display); font-size: var(--step-0);
  text-transform: uppercase; letter-spacing: 0.01em;
  padding: 0.75em 1.6em; border-radius: var(--radius-pill);
  text-decoration: none; border: 3px solid var(--ink);
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-hard-sm);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
.btn-primary { background: var(--citrus); color: var(--ink); }
.btn-secondary { background: var(--white); color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); }
.block .btn-outline { color: var(--white); border-color: var(--white); box-shadow: 5px 5px 0 rgba(255,255,255,0.35); }
.block .btn-outline:hover { box-shadow: 7px 7px 0 rgba(255,255,255,0.35); }
.btn-lg { font-size: var(--step-1); padding: 0.85em 1.9em; }

.btn-primary .ball, .btn-secondary .ball { width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--court); }
@media (prefers-reduced-motion: no-preference) {
  .btn:hover .ball { animation: bounce 0.45s ease infinite alternate; }
  @keyframes bounce { from { transform: translateY(-0.18em); } to { transform: translateY(0.18em); } }
}

/* ---------- Cards ---------- */
.card {
  background: var(--white); color: var(--ink); border: 3px solid var(--ink);
  border-radius: var(--radius); padding: var(--s-8) var(--s-6);
  box-shadow: var(--shadow-hard); transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column; gap: var(--s-3);
}
@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translate(-3px,-3px); box-shadow: 11px 11px 0 var(--ink); }
}
.card h3 { font-size: var(--step-1); text-transform: none; color: var(--ink); }
.card p { opacity: 0.85; color: var(--ink); }
.card .card-meta {
  font-family: var(--font-display); font-size: var(--step--1);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--clay); opacity: 1;
}
.card .card-cta { margin-top: auto; font-weight: 700; }

.badge {
  display: inline-block; align-self: flex-start;
  background: var(--citrus); color: var(--ink); border: 2px solid var(--ink);
  font-family: var(--font-display); font-size: var(--step--1); letter-spacing: 0.03em;
  padding: var(--s-1) var(--s-3); border-radius: var(--radius-pill);
}

/* Sticker badge: rotated pill that overlaps a photo corner */
.sticker {
  position: absolute; z-index: 2;
  background: var(--citrus); color: var(--ink); border: 3px solid var(--ink);
  font-family: var(--font-display); font-size: var(--step--1); letter-spacing: 0.02em;
  padding: var(--s-2) var(--s-4); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-hard-sm); transform: rotate(-8deg);
  white-space: nowrap;
}
.sticker.alt { background: var(--white); transform: rotate(6deg); }
.sticker.clay { background: var(--clay); color: var(--white); transform: rotate(-5deg); }

/* Scoreboard stat chips */
.stats { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 48em) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--white); color: var(--ink); border: 3px solid var(--ink);
  border-radius: var(--radius-sm); padding: var(--s-6) var(--s-4); text-align: center;
  box-shadow: var(--shadow-hard-sm);
}
.stat b { display: block; font-family: var(--font-display); font-size: var(--step-3); color: var(--clay); line-height: 0.95; }
.stat span { font-size: var(--step--1); font-weight: 600; }

/* ---------- Schedule table ---------- */
.table-wrap { overflow-x: auto; border: 3px solid var(--ink); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-hard); color: var(--ink); }
table.schedule { width: 100%; border-collapse: collapse; min-width: 40rem; }
.schedule caption { text-align: left; padding: var(--s-4) var(--s-6); font-weight: 700; }
.schedule th, .schedule td { text-align: left; padding: var(--s-4) var(--s-6); border-top: 2px solid var(--line); font-weight: 500; }
.schedule thead th {
  border-top: 0; background: var(--ink); color: var(--white);
  font-family: var(--font-display); font-size: var(--step--1);
  letter-spacing: 0.05em; text-transform: uppercase; font-weight: 400;
}
.schedule tbody tr:hover { background: var(--citrus-tint); }
.schedule td a { color: var(--court); }

/* ---------- Pathway steps ---------- */
.pathway { list-style: none; padding: 0; display: grid; gap: var(--s-6); counter-reset: step; }
.pathway li {
  counter-increment: step; position: relative;
  background: var(--white); color: var(--ink); border: 3px solid var(--ink);
  border-radius: var(--radius); padding: var(--s-8) var(--s-6) var(--s-8) 5rem;
  box-shadow: var(--shadow-hard);
}
.pathway li h3, .pathway li p { color: var(--ink); }
.pathway li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: var(--s-6); top: var(--s-6);
  font-family: var(--font-display); font-size: var(--step-2); color: var(--clay); line-height: 1;
}
@media (min-width: 64em) { .pathway { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Testimonials ---------- */
.quote {
  background: var(--white); color: var(--ink); border: 3px solid var(--ink);
  border-radius: var(--radius); padding: var(--s-8) var(--s-6);
  display: flex; flex-direction: column; gap: var(--s-4);
  box-shadow: var(--shadow-hard);
}
.quote blockquote { font-size: var(--step-1); font-family: var(--font-display); text-transform: none; line-height: 1.25; }
.quote blockquote::before { content: "\201C"; color: var(--clay); }
.quote blockquote::after { content: "\201D"; color: var(--clay); }
.quote figcaption { color: var(--ink); opacity: 0.68; font-size: var(--step--1); font-weight: 600; }
.quote .stars { color: var(--clay); letter-spacing: 0.1em; font-size: var(--step-0); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s-6); color: var(--ink); }
.form fieldset { border: 0; padding: 0; display: grid; gap: var(--s-4); }
.form legend {
  font-family: var(--font-display); font-size: var(--step-1); text-transform: uppercase;
  margin-bottom: var(--s-2); padding: 0;
}
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 700; font-size: var(--step--1); }
.field .hint { font-size: var(--step--1); opacity: 0.65; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); padding: var(--s-3) var(--s-4);
  border: 2.5px solid var(--ink); border-radius: 10px; background: var(--white); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--clay); outline-offset: 1px;
}
.choice-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.choice {
  display: inline-flex; align-items: center; gap: var(--s-2);
  border: 2.5px solid var(--ink); border-radius: var(--radius-pill);
  padding: var(--s-2) var(--s-4); background: var(--white); cursor: pointer; font-weight: 600;
}
.choice:has(input:checked) { background: var(--citrus); }
.choice input { accent-color: var(--ink); }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--white); color: var(--ink); border: 3px solid var(--ink);
  border-radius: var(--radius-sm); padding: var(--s-4) var(--s-6);
  box-shadow: var(--shadow-hard-sm);
}
.faq details + details { margin-top: var(--s-4); }
.faq summary {
  font-family: var(--font-display); font-size: var(--step-0); text-transform: uppercase;
  cursor: pointer; padding-block: var(--s-2); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: var(--step-1); color: var(--clay); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding-block: var(--s-2) var(--s-3); opacity: 0.75; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--court); color: var(--white); border: 3px solid var(--ink);
  border-radius: var(--radius); padding: var(--s-12) var(--s-6); text-align: center;
  box-shadow: var(--shadow-hard);
}
.cta-band h2 { font-size: var(--step-3); color: var(--white); }
.cta-band p { margin: var(--s-3) auto 0; color: rgba(255,255,255,0.85); }
.cta-band .btn-primary { margin-top: var(--s-6); }

/* ---------- Photo cards (rotated, sticker-badged) ---------- */
.photo-card { position: relative; display: inline-block; max-width: 100%; }
.photo-card .media { border: 4px solid var(--ink); box-shadow: var(--shadow-hard); }
.photo-card.tilt-l { transform: rotate(-3deg); }
.photo-card.tilt-r { transform: rotate(3deg); }

/* ---------- Media (fixed ratio = zero CLS) ---------- */
.media {
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--court) 0%, var(--court-2) 60%, #1E7A5A 100%);
  aspect-ratio: 4 / 3; position: relative;
}
.media.wide { aspect-ratio: 16 / 9; }
.media.portrait { aspect-ratio: 3 / 4; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media .media-label { position: absolute; inset: auto var(--s-4) var(--s-4); color: rgba(255,255,255,0.85); font-size: var(--step--1); }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: var(--s-6); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 40em) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64em) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery .photo-card:nth-child(4n+1) { transform: rotate(-2deg); }
.gallery .photo-card:nth-child(4n+2) { transform: rotate(1.5deg); }
.gallery .photo-card:nth-child(4n+3) { transform: rotate(-1.5deg); }
.gallery .photo-card:nth-child(4n+4) { transform: rotate(2.5deg); }
.gallery .media { aspect-ratio: 4 / 5; border-radius: 12px; }
.gallery .media img { transition: transform 0.35s ease; }
@media (prefers-reduced-motion: no-preference) {
  .gallery .photo-card:hover { transform: rotate(0deg) scale(1.03); z-index: 3; }
}

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--court-2); color: rgba(255,255,255,0.8); padding-block: var(--s-16) var(--s-8); border-top: 4px solid var(--citrus); }
.site-footer h2, .site-footer h3 { color: var(--white); font-size: var(--step-1); text-transform: uppercase; }
.site-footer a { color: var(--white); font-weight: 500; }
.site-footer a:hover { color: var(--citrus); }
.footer-grid { display: grid; gap: var(--s-8); }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.footer-legal {
  margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1px solid rgba(255,255,255,0.15);
  font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between;
}
address { font-style: normal; }
