/* PureHits — marketing site
   Tokens mirror baseball-app/mobile/constants/theme.ts (dark shell, cobalt accent,
   Fraunces display + DM Sans body). */

:root {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-raised: #2c2c2e;
  --analysis-bg: #0b0c0e;
  --analysis-surface: #121417;
  --analysis-secondary: #191c20;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --text-warm: #f4f2ed;
  --text-secondary: #a1a1a6;
  --text-muted: #8e8e93;
  --accent: #2f5bff;
  --accent-pressed: #4c73ff;
  --accent-soft: rgba(47, 91, 255, 0.22);
  --success: #34c759;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-pressed);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
}
.skip-link:focus {
  top: 16px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Type ---------- */

.display,
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  font-optical-sizing: auto;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.75rem);
}
h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
}
h3 {
  font-size: 1.375rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 18px;
}

.lede {
  font-size: clamp(1.075rem, 1.6vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 34em;
  margin: 24px 0 0;
}

.accent {
  color: var(--accent-pressed);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img {
  height: 22px;
  width: auto;
}
.brand span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.nav a:hover {
  color: var(--text);
}
.nav .btn {
  color: #fff;
}

@media (max-width: 720px) {
  .nav a:not(.btn) {
    display: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover {
  background: var(--accent-pressed);
}
.btn:active {
  transform: scale(0.98);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px 11px 18px;
  background: #fff;
  color: #000;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.store-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(47, 91, 255, 0.28);
}
.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.store-badge .small {
  display: block;
  font-size: 0.7rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.store-badge .big {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: 36px;
}
.cta-note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(48px, 8vw, 104px) 0 clamp(64px, 9vw, 120px);
  overflow: hidden;
}
.hero::before {
  /* Soft cobalt wash, echoing the app's "Current focus" glow. */
  content: "";
  position: absolute;
  inset: -20% -10% auto 30%;
  height: 80%;
  background: radial-gradient(closest-side, rgba(23, 58, 135, 0.45), transparent 70%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--text-warm);
}

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    order: 2;
  }
}

/* ---------- Phone mock ---------- */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: min(330px, 100%);
  aspect-ratio: 9 / 19.2;
  border-radius: 48px;
  padding: 10px;
  background: linear-gradient(160deg, #3a3a3e, #121214 40%, #26262a);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 120px rgba(47, 91, 255, 0.18);
}
.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 39px;
  overflow: hidden;
  background: #000;
  display: flex;
  flex-direction: column;
}
.phone-screen::before {
  /* Dynamic Island */
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 28px;
  border-radius: 20px;
  background: #000;
  z-index: 3;
}

.mock-video {
  position: relative;
  height: 54%;
  background: url("img/hero-batter.webp") center 30% / cover no-repeat, #0b0c0e;
}
.mock-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 30%, transparent 60%, #000);
}
.mock-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.mock-tag {
  position: absolute;
  left: 14px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.68rem;
  color: var(--text-warm);
  letter-spacing: 0.02em;
}
.mock-tag i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-pressed);
}

.mock-body {
  flex: 1;
  padding: 6px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mock-score {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.mock-score .label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.mock-score .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.4rem;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.mock-score .delta {
  font-size: 0.75rem;
  color: var(--success);
  margin-bottom: 6px;
}
.mock-bars {
  display: grid;
  gap: 8px;
}
.mock-bar {
  display: grid;
  grid-template-columns: 74px 1fr 22px;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--text-secondary);
}
.mock-bar b {
  font-weight: 500;
  color: var(--text);
  text-align: right;
}
.mock-bar .track {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: var(--surface-raised);
  overflow: hidden;
}
.mock-bar .fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--text-secondary);
}
.mock-bar.focus .fill {
  background: var(--accent);
}
.mock-bar.focus {
  color: var(--text);
}
.mock-focus {
  margin-top: auto;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.mock-focus .k {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-pressed);
}
.mock-focus .t {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 2px;
}

.float-card {
  position: absolute;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(28, 28, 30, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  font-size: 0.8rem;
  line-height: 1.35;
  max-width: 210px;
}
.float-card .k {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.float-card.one {
  left: -4%;
  top: 18%;
}
.float-card.two {
  right: -6%;
  bottom: 16%;
}
@media (max-width: 1040px) {
  .float-card {
    display: none;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(72px, 10vw, 136px) 0;
  border-top: 1px solid var(--border);
}
.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head .lede {
  margin-top: 20px;
}

/* Problem strip */
.statement {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 22em;
  color: var(--text-secondary);
  margin: 0;
}
.statement strong {
  font-weight: 600;
  color: var(--text);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px 26px 30px;
  border-radius: var(--radius-lg);
  background: var(--analysis-surface);
  border: 1px solid var(--border);
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent-pressed);
  margin-bottom: 40px;
}
.step p {
  color: var(--text-secondary);
  margin: 10px 0 0;
  font-size: 0.98rem;
}
@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .step::before {
    margin-bottom: 20px;
  }
}

/* Film guide */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.split figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.split figure img {
  width: 100%;
  height: auto;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 14px;
}
.checklist li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--text-secondary);
}
.checklist li strong {
  display: block;
  color: var(--text);
  font-weight: 500;
}
.checklist svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent-pressed);
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* Categories */
.cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cat {
  background: var(--bg);
  padding: 30px 28px 34px;
}
.cat svg {
  width: 28px;
  height: 28px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}
.cat p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin: 8px 0 0;
}
@media (max-width: 860px) {
  .cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .cats {
    grid-template-columns: 1fr;
  }
}

/* Result anatomy */
.report {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--analysis-bg);
}
.report-score {
  padding: 36px 32px;
  border-right: 1px solid var(--border);
  background: var(--analysis-surface);
}
.report-score .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 5.5rem;
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin-top: 8px;
}
.report-score .sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
}
.report-rows {
  display: grid;
}
.report-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 32px;
  border-bottom: 1px solid var(--border);
}
.report-row:last-child {
  border-bottom: 0;
}
.report-row .k {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 4px;
}
.report-row .v {
  color: var(--text-secondary);
}
.report-row .v strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 4px;
}
.report-row.hl .k {
  color: var(--accent-pressed);
}
@media (max-width: 860px) {
  .report {
    grid-template-columns: 1fr;
  }
  .report-score {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .report-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 22px 24px;
  }
}

/* Principles */
.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.principle {
  padding: 30px 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.principle p {
  color: var(--text-secondary);
  margin: 10px 0 0;
}
@media (max-width: 760px) {
  .principles {
    grid-template-columns: 1fr;
  }
}

/* FAQ */
.faq {
  max-width: 820px;
  border-top: 1px solid var(--border);
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  font-size: 1.1rem;
  font-weight: 500;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: 0 0 24px;
  color: var(--text-secondary);
  max-width: 44em;
}

/* Final CTA */
.final {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.final::before {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(23, 58, 135, 0.5), transparent 70%);
  pointer-events: none;
}
.final .container {
  position: relative;
}
.final .icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 32px;
  border-radius: 20px;
  box-shadow: 0 0 0 1px var(--border-strong), 0 20px 50px rgba(0, 0, 0, 0.6);
}
.final .lede {
  margin-left: auto;
  margin-right: auto;
}
.final .cta-row {
  justify-content: center;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 56px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.site-footer a {
  text-decoration: none;
  color: var(--text-secondary);
}
.site-footer a:hover {
  color: var(--text);
}

/* ---------- Legal pages ---------- */

.legal {
  padding: clamp(48px, 7vw, 88px) 0 clamp(72px, 9vw, 120px);
}
.legal .container {
  max-width: 780px;
}
.legal h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
}
.legal .meta {
  color: var(--text-muted);
  margin: 16px 0 40px;
  font-size: 0.95rem;
}
.legal h2 {
  font-size: 1.6rem;
  margin: 48px 0 14px;
  letter-spacing: -0.015em;
}
.legal h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 28px 0 8px;
}
.legal p,
.legal li {
  color: var(--text-secondary);
}
.legal strong {
  color: var(--text);
  font-weight: 500;
}
.legal ul {
  padding-left: 1.25em;
}
.legal li {
  margin: 6px 0;
}
.legal a {
  color: var(--accent-pressed);
  text-underline-offset: 3px;
}
.legal .summary {
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.legal .summary p {
  margin: 0;
}
.legal .caps {
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.no-js .reveal {
  opacity: 1;
  transform: none;
}
