/* ==========================================================================
   VolleySheet marketing site
   Tokens are documented in docs/design.md. Do not introduce a value here that
   isn't in that file.
   ========================================================================== */

/* --- Font ---------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;              /* variable: only 400 and 700 are used */
  font-display: swap;
  src: url('../fonts/inter-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens -------------------------------------------------------------- */
:root {
  --c-primary:       #16a34a;
  --c-primary-hover: #15803d;
  --c-accent-text:   #166534;  /* AA on white AND on --c-surface-alt */
  --c-link-blue:     #1f5edc;  /* the hero's inline brand emphasis (5.7:1) */
  --c-navy:          #0f172a;

  --c-ink:           #2b2b2b;
  --c-body:          #272727;
  --c-muted:         #6b7280;

  --c-surface:       #ffffff;
  --c-surface-alt:   #f2f2f2;
  --c-border:        #e2dbdb;

  --w-content: 1200px;
  --w-prose:   68ch;
  --radius:    12px;
  --h-header:  80px;   /* sticky header height; anchors offset by this */

  --space-section: clamp(3rem, 8vw, 6rem);
  --space-gutter:  clamp(1rem, 4vw, 2rem);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', sans-serif;
}

/* --- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.125rem);
  line-height: 1.6;
  color: var(--c-body);
  background: var(--c-surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--c-ink); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw + 1rem, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw + 0.75rem, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 2vw + 0.5rem, 1.5rem); }
p  { margin: 0 0 1rem; max-width: var(--w-prose); }
ul { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }
a  { color: var(--c-accent-text); }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; border-radius: 4px; }

/* The header is sticky, so an in-page anchor would otherwise land its heading
   underneath it. Offset every anchor target by the header height plus a gap. */
[id] { scroll-margin-top: calc(var(--h-header) + 1rem); }

.skip-link {
  /* fixed, not absolute: an absolutely-positioned skip link lands at the top of
     the document and stays off-screen when the page is already scrolled */
  position: fixed; left: 0; top: -100%;
  background: var(--c-navy); color: #fff; padding: 0.75rem 1.25rem;
  z-index: 100; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }

/* --- Layout -------------------------------------------------------------- */
.container {
  max-width: var(--w-content);
  margin-inline: auto;
  padding-inline: var(--space-gutter);
}
.section { padding-block: var(--space-section); }
.section--alt  { background: var(--c-surface-alt); }
.section--navy { background: var(--c-navy); color: #e2e8f0; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.center { text-align: center; }
.text-left { text-align: left; }
.mt-xl { margin-top: clamp(2rem, 5vw, 3rem); }
.figure-plain { margin: 0; }
.center p { margin-inline: auto; }
.lead {
  font-size: clamp(1.125rem, 1vw + 1rem, 1.375rem);
  color: var(--c-body);
}
.section--navy .lead { color: #cbd5e1; }
.eyebrow {
  font-size: 0.875rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--c-accent-text); margin-bottom: 0.75rem;
}

/* --- Buttons ------------------------------------------------------------- */
/* 20px/700 keeps white-on-green inside the WCAG large-text threshold.
   Do not reduce the size or weight — see docs/design.md § 1. */
.btn {
  display: inline-block;
  font: inherit; font-size: 1.25rem; font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  min-height: 44px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--c-primary); color: #fff; border: 1.5px solid var(--c-primary); }
.btn--primary:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }
.btn--secondary { background: #fff; color: var(--c-ink); border: 1.5px solid var(--c-border); }
.btn--secondary:hover { border-color: var(--c-ink); }
.btn-row {
  display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem;
}
.center .btn-row { justify-content: center; }

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-navy);
  /* 44px nav target centred in --h-header */
  padding-block: calc((var(--h-header) - 44px) / 2);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
/* 44px minimum tap target (docs/design.md § 3) */
.site-header .container > a { display: inline-flex; align-items: center; min-height: 44px; }
.site-header img { width: 130px; }
.site-nav { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); }
.site-nav a {
  color: #e2e8f0; text-decoration: none; font-size: 0.9375rem; font-weight: 400;
  padding: 0.5rem 0.25rem;
  /* 44px minimum tap target (docs/design.md § 3) */
  display: inline-flex; align-items: center; min-height: 44px;
}
.site-nav a:hover { color: #fff; text-decoration: underline; }
.site-nav .btn {
  font-size: 1rem; padding: 0.5rem 1rem; min-height: 44px; color: #fff;
}
/* Below 560px the header only has room for the logo plus one link. Secondary
   items drop out; anything still marked up stays reachable. "Scoring App"
   points at the same place as the logo, so nothing is lost by hiding it. */
@media (max-width: 560px) {
  .site-nav a.nav-secondary { display: none; }
  .site-nav { gap: 0.5rem; }
  .site-nav a { font-size: 0.875rem; }
  .site-header img { width: 110px; }
}

/* --- Hero ---------------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2rem, 5vw, 3.5rem); }
.hero .lead { margin-bottom: 0; }
.hero-figure { margin: clamp(2rem, 5vw, 3rem) auto 0; max-width: 900px; }
.hero-figure img { border-radius: var(--radius); box-shadow: 0 10px 40px rgb(15 23 42 / 0.15); }

/* --- Contrast band ------------------------------------------------------- */
.compare {
  display: grid; gap: clamp(2rem, 5vw, 3rem);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare figure { margin: 0; text-align: center; }
.compare img { border-radius: var(--radius); margin-inline: auto; }
.compare figcaption {
  margin-top: 1.25rem; font-size: 1.125rem; font-weight: 700; color: #fff;
}
.compare .mark { display: block; font-size: 1.75rem; line-height: 1; margin-top: 1rem; }
.mark--no  { color: #f87171; }
.mark--yes { color: #4ade80; }

/* --- Steps --------------------------------------------------------------- */
.steps { display: grid; gap: 2rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem; margin-bottom: 1rem;
  background: var(--c-primary); color: #fff;
  font-weight: 700; border-radius: 50%;
}
.step h3 { margin-bottom: 0.35rem; }
.step p { margin: 0; }

/* --- Feature cards ------------------------------------------------------- */
.cards { display: grid; gap: clamp(1.5rem, 3vw, 2rem); grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.card img { width: 100%; border-bottom: 1px solid var(--c-border); }
.card-body { padding: 1.25rem; }
.card h3 { font-size: 1.125rem; margin-bottom: 0.35rem; }
.card p { font-size: 0.9375rem; color: var(--c-body); margin-bottom: 0.75rem; }
.note {
  font-size: 0.9375rem; font-weight: 700; color: var(--c-accent-text);
  display: flex; gap: 0.5rem; align-items: flex-start; margin: 0;
}
.note::before { content: '✓'; flex: none; }

/* --- Split (audience) ---------------------------------------------------- */
.split { display: grid; gap: clamp(2rem, 5vw, 3.5rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split img { border-radius: var(--radius); box-shadow: 0 8px 30px rgb(15 23 42 / 0.12); }
.ticks { list-style: none; padding: 0; }
.ticks li { display: flex; gap: 0.6rem; align-items: flex-start; }
.ticks li::before { content: '✓'; color: var(--c-accent-text); font-weight: 700; flex: none; }

/* --- Quote --------------------------------------------------------------- */
.quote {
  border-left: 4px solid var(--c-primary);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 0 auto;
  max-width: var(--w-prose);
  font-size: clamp(1.125rem, 1vw + 1rem, 1.375rem);
}
.quote p:last-child { margin-bottom: 0; }
.quote cite { display: block; margin-top: 0.75rem; font-size: 1rem; font-style: normal; color: var(--c-muted); }

/* --- Pricing ------------------------------------------------------------- */
.tiers { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-bottom: 2rem; }
@media (min-width: 640px) { .tiers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tiers { grid-template-columns: repeat(4, 1fr); } }
.tier {
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 1.5rem; background: var(--c-surface); text-align: center;
}
.tier .price { font-size: 2rem; font-weight: 700; color: var(--c-ink); line-height: 1.1; }
.tier .price span { font-size: 1rem; font-weight: 400; color: var(--c-muted); }
.tier .size { margin: 0.5rem 0 0; color: var(--c-body); font-size: 0.9375rem; }

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--c-navy); color: #cbd5e1; padding-block: clamp(2.5rem, 6vw, 4rem); }
.site-footer img { width: 150px; margin-bottom: 1rem; }
.site-footer a {
  color: #e2e8f0;
  display: inline-flex; align-items: center; min-height: 44px;
}
.site-footer p { font-size: 0.9375rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h2 { font-size: 1rem; color: #fff; margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: 0.5rem; font-size: 0.9375rem; }
.footer-bottom {
  border-top: 1px solid #1e293b; margin-top: 2.5rem; padding-top: 1.5rem;
  font-size: 0.875rem; color: #94a3b8;
}
.footer-bottom p { margin: 0; max-width: none; }

/* --- Motion -------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Classic layout — a faithful port of the live volleysheet.com page.
   Measurements taken from the running site; see docs/reference-current-site.md.
   Deviations are limited to accessibility fixes, noted inline.
   ========================================================================== */

/* Header: single uppercase nav item, as on the live site */
.site-nav--classic a {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  font-weight: 400;
}

/* Hero: 102px block padding, 51.2px heading, 16px subhead — all as measured */
.classic-hero { padding-block: clamp(3rem, 8vw, 6.4rem); text-align: center; }
.classic-hero h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.2rem);
  margin-bottom: 0.625rem;
}
.classic-sub {
  font-size: 1rem;
  /* Live site uses #797979 (4.35:1) which fails AA. --c-muted is 4.83:1. */
  color: var(--c-muted);
  /* Wider than --w-prose so it holds one line at desktop, as on the live site */
  max-width: 64rem;
  margin: 0 auto;
}
.classic-sub b { color: var(--c-link-blue); font-weight: 700; }
.classic-hero .btn-row { margin-top: 3.75rem; justify-content: center; }

/* Contrast band: image, then mark, then caption */
.compare-classic { display: grid; gap: clamp(2.5rem, 6vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 768px) { .compare-classic { grid-template-columns: 1fr 1fr; } }
.compare-classic figure { margin: 0; text-align: center; }
/* Live site sizes both band images to a matched 250px height, not a matched
   width, so the two captions line up. A fixed-height box holds that alignment
   even at tablet widths, where the images become width-constrained instead and
   would otherwise end up different heights. */
.compare-classic picture {
  display: flex; align-items: center; justify-content: center;
  height: 250px;
}
.compare-classic img {
  max-height: 250px;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
  border-radius: 4px;
}
.compare-classic .mark { display: block; margin: 1.5rem auto 1rem; width: 34px; height: 34px; }
.compare-classic figcaption {
  color: #fff; font-size: 1.125rem; font-weight: 700;
  max-width: 26ch; margin-inline: auto;
}

/* Feature rows: 38px block padding, 500px image, centred text */
.feature-row { padding-block: clamp(2rem, 4vw, 2.4rem); text-align: center; }
.feature-row--alt { background: var(--c-surface-alt); }
.feature-row img { max-width: min(500px, 100%); margin-inline: auto; border-radius: 4px; }
.feature-row h3 {
  font-size: clamp(1.25rem, 1.5vw + 0.8rem, 1.44rem);
  margin: 1.75rem 0 0.5rem;
}
.feature-row p { font-size: 1rem; margin: 0 auto 0.5rem; max-width: 46ch; }
.note-line {
  display: flex; gap: 0.5rem; align-items: center; justify-content: center;
  /* Live site uses #18a050 at 16px (3.4:1) which fails AA. */
  color: var(--c-accent-text);
  font-weight: 600; font-size: 1rem; margin: 0 auto;
}
.note-line svg { width: 1.15em; height: 1.15em; flex: none; }
.section-title { text-align: center; padding-block: clamp(2rem, 5vw, 3rem) 0; }
