/* Pickleball App — marketing site (pickleballapp.online)
   Tokens from .cursor/rules/design-palette.mdc */

:root {
  --ball-yellow: #ffe135;
  --court-blue: #1e88e5;
  --court-green: #2e7d32;
  --line-white: #ffffff;
  --net-charcoal: #1a1a1a;
  --accent-orange: #f57c00;
  --sky-mist: #e3f2fd;
  --green-mist: #e8f5e9;
  --sand: #f7f4ef;
  --slate: #546e7a;

  --bg: var(--sand);
  --ink: var(--net-charcoal);
  --muted: var(--slate);
  --accent: var(--court-green);
  --accent-strong: var(--court-green);
  --brand: var(--court-blue);
  --court: var(--court-blue);
  --cta: var(--accent-orange);
  --ball: var(--ball-yellow);
  --surface: rgba(255, 255, 255, 0.78);
  --stroke: rgba(26, 26, 26, 0.12);
  --radius: 18px;
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font: "Figtree", system-ui, sans-serif;
  --shadow-soft: 0 18px 50px rgba(26, 26, 26, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--court-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--cta);
  color: var(--line-white);
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* Atmosphere */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 90% 55% at 70% -10%, rgba(30, 136, 229, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 45% at 0% 20%, rgba(46, 125, 50, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(255, 225, 53, 0.22), transparent 50%),
    linear-gradient(180deg, var(--sky-mist) 0%, var(--sand) 42%, var(--green-mist) 100%);
}

.bg-court {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.42;
  background-image: url('/assets/web-app-background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.wrap {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(247, 244, 239, 0.88);
  border-bottom: 1px solid var(--stroke);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: transparent;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

/* Hero — full-bleed composition */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3rem, 8vw, 5rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(115deg, rgba(247, 244, 239, 0.94) 0%, rgba(247, 244, 239, 0.55) 42%, transparent 68%),
    radial-gradient(ellipse 55% 70% at 85% 45%, rgba(30, 136, 229, 0.28), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  width: min(1120px, 92vw);
  margin-inline: auto;
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  nav ul {
    display: none;
  }
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0 0 1.1rem;
  color: var(--ink);
}

.brand-mark span {
  display: block;
  color: var(--court-blue);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 0 0 0.85rem;
  max-width: 22ch;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 34ch;
  margin: 0 0 1.75rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

a.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--cta);
  color: var(--line-white);
}

.btn-primary:hover {
  background: #e06e00;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(26, 26, 26, 0.2);
}

.btn-secondary:hover {
  border-color: var(--court-blue);
  color: var(--court-blue);
}

.btn-disabled {
  background: rgba(26, 26, 26, 0.06);
  color: var(--muted);
  border: 1px solid var(--stroke);
  cursor: default;
  pointer-events: none;
}

.platform-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.platform-note strong {
  color: var(--ink);
  font-weight: 700;
}

/* Phone mock carousel */
.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-copy {
  animation: fade-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.screenshot-carousel {
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
  position: relative;
}

.carousel-frame {
  position: relative;
  width: 100%;
}

.phone-shell {
  position: relative;
  border-radius: 36px;
  padding: 10px;
  background: linear-gradient(160deg, #243038, var(--net-charcoal));
  box-shadow: var(--shadow-soft);
}

.phone-shell--static {
  width: min(100%, 220px);
  margin-inline: auto;
}

.phone-shell--static .phone-screen {
  aspect-ratio: 470 / 1024;
  border-radius: 26px;
  overflow: hidden;
  background: #0d0d0d;
}

.phone-shell--static .phone-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 470 / 1024;
  border-radius: 28px;
  overflow: hidden;
  background: #0d0d0d;
}

.carousel-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 36%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.carousel-nav--prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 0.2rem;
}

.carousel-nav--next {
  right: 0;
  justify-content: flex-end;
  padding-right: 0.2rem;
}

.carousel-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--stroke);
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.carousel-nav:hover .carousel-nav-icon,
.carousel-nav:focus-visible .carousel-nav-icon {
  opacity: 1;
}

.carousel-nav:focus-visible {
  outline: none;
}

.carousel-nav:focus-visible .carousel-nav-icon {
  box-shadow: 0 0 0 2px var(--court-blue);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.2);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.carousel-dot.is-active {
  background: var(--court-blue);
  transform: scale(1.2);
}

.carousel-dot:focus-visible {
  outline: 2px solid var(--court-blue);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .hero-art,
  .carousel-slide {
    animation: none !important;
    transition: none !important;
  }
}

/* Sections */
section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
}

.section-intro {
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 2.25rem;
}

.section-intro em {
  color: var(--ink);
  font-style: italic;
}

.promo-lines {
  display: grid;
  gap: 1rem;
  max-width: 62ch;
}

.promo-lines p {
  margin: 0;
  color: var(--muted);
  padding-left: 1rem;
  border-left: 3px solid var(--court-blue);
}

/* Feature index — not card chrome */
.feature-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
  border-top: 1px solid var(--stroke);
}

.feature-index article {
  padding: 1.35rem 1.25rem 1.35rem 0;
  border-bottom: 1px solid var(--stroke);
  margin-right: 1.25rem;
}

.feature-index h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-index p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.dot-train {
  background: var(--court-green);
}

.dot-match {
  background: var(--court-blue);
}

.dot-learn {
  background: var(--accent-orange);
}

/* Feature showcase */
.feature-showcase {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.feature-block {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 0;
  border-top: 1px solid var(--stroke);
}

.feature-block:last-child {
  border-bottom: 1px solid var(--stroke);
}

.feature-block.reverse {
  direction: rtl;
}

.feature-block.reverse > * {
  direction: ltr;
}

@media (max-width: 800px) {
  .feature-block,
  .feature-block.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}

.feature-block h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.feature-block ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.feature-block li {
  margin-bottom: 0.35rem;
}

.draw-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.platform-band {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 800px) {
  .platform-band {
    grid-template-columns: 1fr;
  }
}

.platform-band p {
  color: var(--muted);
  margin: 0;
}

/* Privacy */
.privacy-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 0.5rem;
}

@media (max-width: 800px) {
  .privacy-points {
    grid-template-columns: 1fr;
  }
}

.privacy-points h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.privacy-points p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Download */
.download {
  text-align: center;
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.download .section-intro {
  margin-inline: auto;
}

.download .cta-row {
  justify-content: center;
}

/* Footer */
footer {
  border-top: 1px solid var(--stroke);
  padding: 2rem 0 2.5rem;
  background: rgba(255, 255, 255, 0.35);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.copyright {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Article (privacy) */
.article {
  padding: clamp(2rem, 5vw, 3.5rem) 0 4rem;
  max-width: 720px;
}

.article h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  max-width: none;
  margin-bottom: 0.5rem;
}

.article h2 {
  margin-top: 2rem;
}

.article p,
.article li {
  color: var(--muted);
}

.article strong {
  color: var(--ink);
}

.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-weight: 600;
  font-size: 0.92rem;
}
