/* ============================================================
   RallyMatch — court-grounded minimalist landing
   ============================================================ */

:root {
  /* Palette */
  --surface: #EDF0E9;        /* green-tinted court-cream */
  --surface-2: #E4E8DF;      /* subtle panel */
  --ink: #16241B;            /* deep green-black */
  --ink-soft: #46564E;       /* muted body text */
  --green: #1B4D2E;          /* deep court green (accent) */
  --green-court: #2E7D44;    /* the green half of the court */
  --blue: #2A6DA0;           /* the blue half of the court */
  --ball: #E7F158;           /* high-vis pickleball yellow */
  --line: #F2EFE8;           /* court line off-white */
  --hairline: rgba(22, 36, 27, 0.14);

  /* Type */
  --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --container: 1120px;
  --radius: 14px;

  /* Court line thickness */
  --lw: clamp(2px, 0.55vw, 3px);
}

/* Reset (scoped, minimal) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.09375rem);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--surface);
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.skip:focus { left: 0; }

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   Typography
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 1.1rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

/* ============================================================
   Navigation
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 240, 233, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ball);
  box-shadow: 0 0 0 2px var(--green);
  flex: none;
}
.wordmark--footer { color: var(--line); }
.wordmark--footer .wordmark__dot { box-shadow: 0 0 0 2px var(--line); }

/* ============================================================
   App Store button
   ============================================================ */
.app-store {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: #0B0F0C;
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 1.05rem 0.55rem 0.85rem;
  border-radius: 999px;
  transition: transform 0.18s ease, background 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.app-store:hover { transform: translateY(-1px); background: #000; }
.app-store:active { transform: translateY(0); }
.app-store__logo {
  width: 22px;
  height: 22px;
  fill: #fff;
  flex: none;
}
.app-store__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.app-store__text small {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  opacity: 0.82;
}
.app-store__text b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.app-store--sm { padding: 0.42rem 0.8rem 0.42rem 0.62rem; }
.app-store--sm .app-store__logo { width: 18px; height: 18px; }
.app-store--sm .app-store__text small { font-size: 0.55rem; }
.app-store--sm .app-store__text b { font-size: 0.82rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}
.hero__inner {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
}
.hero__text { max-width: 38rem; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 1.4rem + 5.6vw, 4.6rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 0 0 1.2rem;
  color: var(--ink);
}
.hero__sub {
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 32rem;
  margin: 0 0 2rem;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.hero__note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* ============================================================
   The court — signature element
   ============================================================ */
.hero__court {
  display: flex;
  justify-content: center;
}
.court {
  position: relative;
  width: 100%;
  aspect-ratio: 44 / 20;
  border: var(--lw) solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 18px 40px -22px rgba(22, 36, 27, 0.55),
    0 2px 0 0 rgba(22, 36, 27, 0.08);
}
.court__surface {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--blue) 0 50%,
    var(--green-court) 50% 100%
  );
}
/* Net — vertical, at the midpoint */
.court__net {
  position: absolute;
  top: calc(-1 * var(--lw));
  bottom: calc(-1 * var(--lw));
  left: 50%;
  width: calc(var(--lw) * 1.6);
  transform: translateX(-50%);
  background: var(--line);
  box-shadow: 0 0 0 0.5px rgba(22, 36, 27, 0.25);
}
.court__net::after {
  /* faint net post caps */
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 14px;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
}
/* Kitchen (non-volley) lines — vertical, 7/44 ≈ 15.9% from net each side */
.court__kitchen {
  position: absolute;
  top: calc(-1 * var(--lw));
  bottom: calc(-1 * var(--lw));
  width: var(--lw);
  background: var(--line);
}
.court__kitchen--far { left: 34.1%; }
.court__kitchen--near { left: 65.9%; }
/* Center service lines — horizontal, from baseline to kitchen, at 50% height */
.court__center {
  position: absolute;
  left: calc(-1 * var(--lw));
  right: calc(-1 * var(--lw));
  top: 50%;
  height: var(--lw);
  transform: translateY(-50%);
}
.court__center--far { right: auto; width: 34.1%; left: 0; }
.court__center--near { left: auto; width: 34.1%; right: 0; }

/* The ball */
.court__ball {
  position: absolute;
  width: clamp(20px, 3.4vw, 30px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 26%, rgba(255,255,255,0.7) 0 8%, transparent 9%),
    radial-gradient(circle at 22% 62%, var(--green) 0 8%, transparent 9%),
    radial-gradient(circle at 68% 42%, var(--green) 0 8%, transparent 9%),
    radial-gradient(circle at 56% 74%, var(--green) 0 8%, transparent 9%),
    var(--ball);
  box-shadow:
    0 3px 6px rgba(22, 36, 27, 0.35),
    inset 0 -3px 4px rgba(22, 36, 27, 0.18);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* Ball rally: one orchestrated sequence on load */
@keyframes rally {
  0%   { left: 74%; top: 50%; }
  12%  { left: 60%; top: 38%; }
  24%  { left: 42%; top: 62%; }
  36%  { left: 26%; top: 40%; }
  48%  { left: 18%; top: 58%; }
  60%  { left: 30%; top: 40%; }
  72%  { left: 50%; top: 60%; }
  84%  { left: 66%; top: 44%; }
  100% { left: 74%; top: 50%; }
}
.court__ball { animation: rally 3.2s cubic-bezier(0.37, 0, 0.63, 1) 0.4s 1 both; }

/* ============================================================
   Sections (shared)
   ============================================================ */
.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

/* Court-line rule with a ball */
.rule {
  position: relative;
  height: 1px;
  background: var(--hairline);
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
}
.rule__ball {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ball);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--hairline);
}

/* ============================================================
   Lead
   ============================================================ */
.lead__inner { max-width: 48rem; }
.lead__copy {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 40rem;
}

/* ============================================================
   Features
   ============================================================ */
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.feature {
  display: grid;
  grid-template-columns: minmax(0, 11rem) 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline;
  padding-block: clamp(1.3rem, 3vw, 1.9rem);
  border-top: 1px solid var(--hairline);
}
.feature:last-child { border-bottom: 1px solid var(--hairline); }
.feature__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0;
}
.feature__copy {
  margin: 0;
  font-size: clamp(1.02rem, 0.97rem + 0.3vw, 1.18rem);
  color: var(--ink);
  max-width: 42rem;
}

/* ============================================================
   Matching formats
   ============================================================ */
.formats { background: var(--surface-2); }
.formats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}
.format {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 2.5vw, 1.8rem);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.format:hover {
  transform: translateY(-3px);
  border-color: rgba(27, 77, 46, 0.35);
}
.format__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.format__copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.formats__soon {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}
.formats__soon-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(27, 77, 46, 0.1);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}

/* ============================================================
   Final CTA
   ============================================================ */
.cta {
  background: var(--green);
  color: var(--line);
  text-align: center;
}
.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.cta__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 1.3rem + 3vw, 3rem);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--line);
}
.cta__copy {
  margin: 0 0 1rem;
  color: rgba(242, 239, 232, 0.82);
  font-size: clamp(1.02rem, 0.97rem + 0.3vw, 1.18rem);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(242, 239, 232, 0.7);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
  margin-left: auto;
}
.site-footer__legal-nav {
  display: flex;
  gap: 1.1rem;
}
.site-footer__legal-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(242, 239, 232, 0.6);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-footer__legal-nav a:hover { color: var(--line); }
.site-footer__tag {
  margin: 0.4rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: rgba(242, 239, 232, 0.6);
}
.site-footer__legal {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(242, 239, 232, 0.5);
}

/* ============================================================
   Legal pages (Privacy / Terms / EULA)
   ============================================================ */
.legal {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.legal__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 3vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.legal__updated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0 0 2.25rem;
}
.legal__body { max-width: 46rem; }
.legal__body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  margin: 2.2rem 0 0.7rem;
  color: var(--ink);
}
.legal__body p {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  line-height: 1.65;
}
.legal__body p strong { color: var(--ink); font-weight: 600; }
.legal__body ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}
.legal__body li { margin-bottom: 0.45rem; line-height: 1.6; }
.legal__body a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal__back {
  margin-top: 2.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.legal__back a {
  color: var(--green);
  text-decoration: none;
}
.legal__back a:hover { text-decoration: underline; }

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 860px) {
  .hero__inner {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
  .hero__court { order: 2; }
}

@media (max-width: 720px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .formats__grid {
    grid-template-columns: 1fr;
  }
  .site-nav__inner .app-store--sm { display: none; }
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-footer__links {
    align-items: flex-start;
    margin-left: 0;
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .court__ball { animation: none; }
  .app-store:hover, .format:hover { transform: none; }
}
