/* ==========================================================================
   DeuceMate marketing site — hand-written, zero dependencies.
   Premium dark, court-themed. Colours mirror the app's "Classic" theme:
   green = you, blue = opponent, gold = server.
   ========================================================================== */

:root {
  --bg:        #080b0a;
  --bg-2:      #0c1110;
  --ink:       #f2f6f4;
  --muted:     #93a39a;
  --muted-2:   #6f7f77;
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.06);
  --glass:     rgba(255,255,255,.035);
  --glass-2:   rgba(255,255,255,.06);

  --green:     #2fd08a;   /* "me"      */
  --green-dim: #1f7a54;
  --blue:      #4f9bff;   /* "opponent"*/
  --gold:      #ffce4a;   /* "server"  */

  --radius:    20px;
  --radius-lg: 28px;
  --maxw:      1140px;
  --shadow:    0 24px 60px -24px rgba(0,0,0,.7);
  --shadow-glow: 0 0 70px -10px rgba(47,208,138,.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* --- Gradient-mesh backdrop ------------------------------------------------ */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .55;
  pointer-events: none;
}
body::before {
  top: -240px; left: -180px;
  width: 620px; height: 620px;
  background: radial-gradient(circle at center, var(--green) 0%, transparent 68%);
}
body::after {
  top: 280px; right: -260px;
  width: 680px; height: 680px;
  background: radial-gradient(circle at center, var(--blue) 0%, transparent 68%);
  opacity: .42;
}
/* faint court-line grid */
.mesh-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
}

/* --- Layout helpers ------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
section { position: relative; padding: 88px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green);
  background: rgba(47,208,138,.1);
  border: 1px solid rgba(47,208,138,.22);
  padding: 6px 13px; border-radius: 999px;
  margin: 0 0 18px;
}
h1, h2, h3 { line-height: 1.1; letter-spacing: -.02em; margin: 0; }
.section-head { max-width: 680px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
h2.title { font-size: clamp(1.9rem, 4.4vw, 2.9rem); font-weight: 800; }
.lede { color: var(--muted); font-size: 1.12rem; margin: 16px 0 0; }

.grad-text {
  background: linear-gradient(105deg, var(--green) 0%, #7fe3ff 55%, var(--blue) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 1rem; font-weight: 650; text-decoration: none;
  padding: 13px 22px; border-radius: 13px; border: 1px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  color: #052015;
  background: linear-gradient(135deg, var(--green) 0%, #45e0a0 100%);
  box-shadow: 0 12px 30px -12px rgba(47,208,138,.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(47,208,138,.85); }
.btn-ghost {
  color: var(--ink);
  background: var(--glass-2);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.1); }
.btn-block { width: 100%; }
.btn-disabled {
  background: var(--glass-2); color: var(--muted); border: 1px solid var(--line);
  box-shadow: none; cursor: not-allowed;
}
.btn-disabled:hover { transform: none; box-shadow: none; background: var(--glass-2); }

/* --- Top nav -------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8,11,10,.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand .logo { width: 34px; height: 34px; flex: none; border-radius: 9px; box-shadow: 0 4px 14px -4px rgba(47,208,138,.6); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .96rem; font-weight: 550; transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }
.nav-toggle svg { display: block; }

/* --- Hero ----------------------------------------------------------------- */
.hero { padding-top: 64px; padding-bottom: 36px; text-align: center; }
.hero h1 {
  font-size: clamp(2.5rem, 6.6vw, 4.6rem); font-weight: 850;
  max-width: 16ch; margin: 22px auto 0;
}
.hero .sub { color: var(--muted); font-size: clamp(1.06rem, 2.2vw, 1.3rem); max-width: 60ch; margin: 22px auto 0; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 34px 0 0; }
.hero-note { color: var(--muted-2); font-size: .9rem; margin: 16px 0 0; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 30px auto 0; max-width: 720px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .9rem; color: var(--ink);
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* Hero showpiece (landscape live scoreboard) */
.hero-shot {
  margin: 56px auto 0; max-width: 940px; position: relative;
}
.device-landscape {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #000;
  padding: 10px;
  box-shadow: var(--shadow), var(--shadow-glow);
  overflow: hidden;
}
.device-landscape img { display: block; width: 100%; height: auto; border-radius: 18px; }
.hero-shot::after { /* reflective floor glow */
  content: ""; position: absolute; left: 12%; right: 12%; bottom: -34px; height: 70px;
  background: radial-gradient(ellipse at center, rgba(47,208,138,.35), transparent 70%);
  filter: blur(18px); z-index: -1;
}

/* Trust strip */
.trust { padding: 34px 0 8px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; justify-content: center; color: var(--muted); font-size: .96rem; }
.trust-row strong { color: var(--ink); font-weight: 700; }
.trust-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2); }

/* --- Problem → relief cards ---------------------------------------------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.05); }
.card .ic {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(47,208,138,.12); border: 1px solid rgba(47,208,138,.25);
  margin-bottom: 16px;
}
.card .ic svg { width: 24px; height: 24px; stroke: var(--green); }
.card h3 { font-size: 1.18rem; font-weight: 750; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.card .pain { color: var(--muted-2); font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 10px; }

/* --- Alternating feature rows -------------------------------------------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px 0; }
.feature + .feature { border-top: 1px solid var(--line-2); }
.feature.flip .feature-media { order: 2; }
.feature h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
.feature .lede { font-size: 1.06rem; }
.feature .eyebrow { margin-bottom: 14px; }
.flist { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.flist li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink); font-size: 1rem; }
.flist li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 6px;
  background: rgba(47,208,138,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232fd08a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 13px no-repeat;
  border: 1px solid rgba(47,208,138,.28);
}
.flist li span { color: var(--muted); }
.feat-tip {
  margin: 20px 0 0; padding: 12px 16px; font-size: .92rem; line-height: 1.55; color: var(--muted);
  background: rgba(47,208,138,.07); border: 1px solid rgba(47,208,138,.22); border-radius: 12px;
}
.feat-tip strong { color: var(--ink); }

/* Phone mockup (portrait) */
.feature-media { display: flex; justify-content: center; }
.phone {
  position: relative; width: 270px; max-width: 78%;
  border-radius: 38px; padding: 9px;
  background: linear-gradient(160deg, #20262a, #0c0f10);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
}
.phone::before { /* notch */
  content: ""; position: absolute; top: 17px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 7px; border-radius: 99px; background: rgba(0,0,0,.7); z-index: 2;
}
.phone img { display: block; width: 100%; height: auto; border-radius: 30px; }
.phone.glow-blue { box-shadow: var(--shadow), 0 0 70px -14px rgba(79,155,255,.4); }
.phone.glow-green { box-shadow: var(--shadow), 0 0 70px -14px rgba(47,208,138,.4); }

/* Watch mockup */
.watch {
  width: 200px; aspect-ratio: 396/484; border-radius: 54px; padding: 12px;
  background: linear-gradient(160deg, #2a2f33, #0a0d0e);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow), 0 0 60px -16px rgba(47,208,138,.4);
}
.watch img { display: block; width: 100%; height: auto; border-radius: 42px; }

/* Hero demo cluster (static watch shot + iPhone mirror shot). */
.hero-demo { margin: 50px auto 0; max-width: 760px; }
.hero-demo-cap { text-align: center; color: var(--muted); font-size: .92rem; margin: 18px auto 0; max-width: 52ch; }
.hero-demo-cap a { color: var(--green); white-space: nowrap; }

/* "Simulated browser demo" callout (used on try.html). */
.sim-note {
  max-width: 62ch; margin: 22px auto 0; padding: 12px 18px; text-align: center;
  background: rgba(255,206,74,.08); border: 1px solid rgba(255,206,74,.3);
  border-radius: 12px; color: var(--muted); font-size: .92rem; line-height: 1.6;
}
.sim-note strong { color: var(--ink); }

/* --- AI Coach spotlight (full-bleed band) -------------------------------- */
.spotlight {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 18% 0%, rgba(47,208,138,.16), transparent 60%),
    radial-gradient(820px 480px at 90% 100%, rgba(79,155,255,.18), transparent 60%),
    var(--bg-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.spotlight .quote {
  font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 600; color: var(--ink);
  max-width: 46ch; margin: 22px 0 0; line-height: 1.45;
}
.spotlight .quote .grad-text { font-weight: 800; }
.coach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 34px 0 0; }
.coach-item {
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.coach-item .n { font-size: .8rem; font-weight: 800; color: var(--green); letter-spacing: .08em; }
.coach-item h4 { margin: 8px 0 5px; font-size: 1.04rem; font-weight: 700; }
.coach-item p { margin: 0; color: var(--muted); font-size: .92rem; }

.apps-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; align-items: center; }
.apps-row .lbl { color: var(--muted-2); font-size: .9rem; margin-right: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--glass-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 13px; font-size: .92rem; font-weight: 600; color: var(--ink);
}

/* AI screenshot strip */
.shot-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 52px 0 0; }
.shot-strip.cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 640px; margin: 52px auto 0; }
.shot-strip.cols-3 { grid-template-columns: repeat(3, 1fr); max-width: 820px; margin: 52px auto 0; }
.shot-strip figure { margin: 0; }
.shot-strip .phone { width: 100%; max-width: 100%; }
.shot-strip figcaption { color: var(--muted); font-size: .86rem; text-align: center; margin-top: 12px; }

/* --- Feature grid (depth) ------------------------------------------------ */
.grid-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mini {
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  transition: transform .2s ease, border-color .2s ease;
}
.mini:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.16); }
.mini .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(79,155,255,.12); border: 1px solid rgba(79,155,255,.25); margin-bottom: 14px; }
.mini .ic svg { width: 21px; height: 21px; stroke: var(--blue); }
.mini h3 { font-size: 1.06rem; font-weight: 720; margin-bottom: 6px; }
.mini p { margin: 0; color: var(--muted); font-size: .94rem; }

/* --- Themes showcase row ------------------------------------------------- */
/* Court themes — small cards pairing each colour with the surface it evokes. */
.theme-cards { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.theme-card {
  display: flex; align-items: center; gap: 11px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 11px 15px;
}
.theme-card .sw { width: 24px; height: 24px; border-radius: 7px; flex: none; box-shadow: 0 2px 10px -2px rgba(0,0,0,.5); }
.theme-card .tx { display: flex; flex-direction: column; line-height: 1.2; }
.theme-card .nm { font-weight: 700; font-size: .92rem; }
.theme-card .ct { color: var(--muted); font-size: .78rem; margin-top: 2px; }

/* --- Privacy band -------------------------------------------------------- */
.privacy {
  text-align: center;
  background: radial-gradient(700px 360px at 50% 0%, rgba(47,208,138,.1), transparent 65%);
  border-top: 1px solid var(--line-2);
}
.privacy .badges { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 30px 0 0; }
.privacy .badge {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; font-weight: 600;
}
.privacy .badge svg { width: 20px; height: 20px; stroke: var(--green); flex: none; }

/* --- FAQ ------------------------------------------------------------------ */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
details.faq {
  background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px;
  transition: border-color .2s ease, background .2s ease;
}
details.faq[open] { border-color: rgba(47,208,138,.3); background: rgba(255,255,255,.05); }
details.faq summary {
  list-style: none; cursor: pointer; padding: 16px 0; font-weight: 650; font-size: 1.04rem;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .plus { flex: none; width: 22px; height: 22px; position: relative; transition: transform .2s ease; }
details.faq summary .plus::before, details.faq summary .plus::after {
  content: ""; position: absolute; background: var(--green); border-radius: 2px;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
details.faq summary .plus::before { width: 13px; height: 2.5px; }
details.faq summary .plus::after  { width: 2.5px; height: 13px; transition: transform .2s ease; }
details.faq[open] summary .plus::after { transform: translate(-50%,-50%) scaleY(0); }
details.faq .body { padding: 0 0 18px; color: var(--muted); font-size: .98rem; }
details.faq .body a { color: var(--green); }

/* --- Final CTA ----------------------------------------------------------- */
.cta-final {
  text-align: center;
  background: linear-gradient(135deg, rgba(47,208,138,.14), rgba(79,155,255,.14));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 56px 28px; margin: 0 0 8px;
  box-shadow: var(--shadow);
}
.cta-final h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.cta-final p { color: var(--muted); margin: 14px auto 0; max-width: 52ch; }

/* --- Footer -------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 22px; justify-content: space-between; align-items: center; }
.footer .brand { font-size: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: var(--ink); }
.footer .fine { width: 100%; color: var(--muted-2); font-size: .86rem; margin-top: 8px; }

/* --- Support / docs page ------------------------------------------------- */
.doc-card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; margin: 18px 0;
}
.doc-card h2 { font-size: 1.35rem; font-weight: 750; margin: 0 0 4px; }
.doc-card h3 { font-size: 1.05rem; font-weight: 700; margin: 20px 0 6px; }
.doc-card p { color: var(--muted); margin: 10px 0; }
.doc-card li { margin: 6px 0; color: var(--muted); }
.doc-card strong { color: var(--ink); }
.doc-card a { color: var(--green); }
.kbd {
  display: inline-block; background: var(--glass-2); border: 1px solid var(--line);
  border-radius: 7px; padding: 1px 8px; font-size: .88em; font-weight: 650; color: var(--ink);
}

/* --- Scroll reveal -------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 66px; left: 0; right: 0;
    background: rgba(8,11,10,.96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); padding: 14px 22px 20px;
  }
  .nav.open .nav-links a { padding: 8px 0; width: 100%; font-size: 1.05rem; }

  .cards-3 { grid-template-columns: 1fr; }
  .grid-mini { grid-template-columns: repeat(2, 1fr); }
  .coach-grid { grid-template-columns: 1fr; }
  .shot-strip { grid-template-columns: repeat(2, 1fr); }

  .feature { grid-template-columns: 1fr; gap: 30px; padding: 44px 0; }
  .feature.flip .feature-media { order: 0; }
  .feature-media { order: -1; }
}
@media (max-width: 560px) {
  section { padding: 64px 0; }
  .grid-mini { grid-template-columns: 1fr; }
  .shot-strip, .shot-strip.cols-2, .shot-strip.cols-3 { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .trust-row { gap: 10px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .mini { transition: none; }
}
