@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

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

:root {
  --bg:        #ffffff;
  --surface:   #f8fafc;
  --border:    #e2e8f0;
  --purple:    #7c3aed;
  --purple-dim:#6d28d9;
  --purple-soft: rgba(124, 58, 237, 0.08);
  --purple-border: rgba(124, 58, 237, 0.25);
  --text:      #0f172a;
  --muted:     #64748b;
  --radius:    0.75rem;
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* ── NAVBAR ──────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  padding: 0 1.5rem;
  transition: background .3s var(--ease-out-quart),
              border-color .3s var(--ease-out-quart),
              box-shadow .3s var(--ease-out-quart);
}
nav.nav-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 20px rgba(15, 23, 42, 0.04);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
  transition: height .3s var(--ease-out-quart);
}
nav.nav-scrolled .nav-inner { height: 56px; }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #8b5cf6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .3s var(--ease-out-expo), box-shadow .3s var(--ease-out-expo);
}
.nav-logo:hover .nav-logo-icon {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
}
.nav-logo-icon img { width: 22px; height: 22px; }
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nav-logo-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.nav-right { display: flex; align-items: center; gap: 0.75rem; }

.btn-lang {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: color .2s, border-color .2s, background .2s, transform .15s;
}
.btn-lang:hover { color: var(--text); border-color: var(--muted); background: var(--bg); }
.btn-lang:active { transform: scale(0.95); }

.btn-primary {
  background: var(--purple);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background .25s var(--ease-out-quart),
              transform .2s var(--ease-out-expo),
              box-shadow .25s var(--ease-out-quart);
}
.btn-primary:hover {
  background: var(--purple-dim);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
}
.btn-primary:active { transform: translateY(0); }

/* ── SHARED LAYOUT ────────────────────────────────────── */
section { padding: 5rem 1.5rem; position: relative; }
.container { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.75rem;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}
.lead { font-size: 1.05rem; color: var(--muted); max-width: 560px; }

/* ── HERO ─────────────────────────────────────────────── */
#hero {
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Animated ambient gradient blobs */
#hero::before,
#hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}
#hero::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation: blob-drift-a 18s ease-in-out infinite;
}
#hero::after {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(196, 181, 253, 0.35) 0%, transparent 70%);
  bottom: -200px;
  right: -100px;
  animation: blob-drift-b 22s ease-in-out infinite;
}
@keyframes blob-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(80px, 60px) scale(1.1); }
}
@keyframes blob-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-80px, -40px) scale(0.95); }
}

.hero-decor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

/* Golfer emoji */
.hero-decor .golfer-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 150px;
  dominant-baseline: alphabetic;
}

/* Ball flight trajectory */
.hero-decor .trajectory {
  stroke: url(#trajGrad);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1000 1000;
  stroke-dashoffset: 1000;
  filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.15));
}

/* The golf ball */
.hero-decor .ball {
  fill: var(--purple);
  filter: drop-shadow(0 2px 3px rgba(124, 58, 237, 0.5));
}

#hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 700px;
  color: var(--text);
}
h1 em {
  font-style: normal;
  color: var(--purple);
  background: linear-gradient(90deg, var(--purple) 0%, #a78bfa 50%, var(--purple) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 4s linear infinite;
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.7;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.btn-primary-lg {
  background: var(--purple);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  padding: 0.9rem 2.2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: background .25s var(--ease-out-quart),
              transform .2s var(--ease-out-expo),
              box-shadow .3s var(--ease-out-quart);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}
.btn-primary-lg .btn-label { position: relative; z-index: 2; }
.btn-primary-lg .btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 80%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%);
  transform: skewX(-20deg);
  z-index: 1;
}
.btn-primary-lg:hover {
  background: var(--purple-dim);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.45);
}
.btn-primary-lg:hover .btn-shine {
  animation: btn-shine 0.9s ease;
}
.btn-primary-lg:active { transform: translateY(0); }
@keyframes btn-shine {
  0%   { left: -100%; }
  100% { left: 150%; }
}

/* ── PAINPOINTS ───────────────────────────────────────── */
#painpoints {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.pain-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--tilt-x, 0)) rotateY(var(--tilt-y, 0));
  transition: border-color .35s var(--ease-out-quart),
              box-shadow .35s var(--ease-out-quart),
              transform .2s var(--ease-out-expo);
}
.pain-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(124, 58, 237, 0.06),
    transparent 40%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.pain-card:hover {
  border-color: var(--purple-border);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.12),
              0 2px 8px rgba(15, 23, 42, 0.04);
}
.pain-card:hover::after { opacity: 1; }
.pain-quote-mark {
  font-size: 4rem;
  line-height: 1;
  color: var(--purple);
  opacity: 0.15;
  font-family: Georgia, serif;
  margin-bottom: -0.5rem;
  margin-top: -0.25rem;
  display: block;
  user-select: none;
  transition: opacity .3s ease, transform .4s var(--ease-out-expo);
  transform-origin: left top;
}
.pain-card:hover .pain-quote-mark {
  opacity: 0.35;
  transform: scale(1.15) rotate(-4deg);
}
.pain-problem {
  font-size: 0.975rem;
  color: var(--text);
  font-style: italic;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  position: relative;
}
.pain-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.pain-divider::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  transition: left .8s var(--ease-out-quart);
}
.pain-card:hover .pain-divider::after { left: 120%; }
.pain-solution-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.4rem;
}
.pain-solution {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── HOW IT WORKS ─────────────────────────────────────── */
#howitworks { position: relative; }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  position: relative;
}
.steps-connector {
  position: absolute;
  top: 20px;
  left: 5%;
  width: 90%;
  height: 4px;
  z-index: 0;
  display: none;
}
@media (min-width: 760px) {
  .steps-connector { display: block; }
}
.steps-connector line {
  stroke: var(--purple);
  stroke-width: 2;
  stroke-dasharray: 6 8;
  opacity: 0.25;
  stroke-dashoffset: 1200;
  transition: stroke-dashoffset 2s var(--ease-out-quart);
}
.steps.is-drawn .steps-connector line {
  stroke-dashoffset: 0;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}
.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--purple);
  color: var(--purple);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform .3s var(--ease-out-expo),
              background .3s var(--ease-out-quart),
              color .3s var(--ease-out-quart);
}
.step-number::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--purple);
  opacity: 0;
  transform: scale(0.8);
}
.step.is-visible .step-number::before {
  animation: pulse-ring 1.6s var(--ease-out-quart) 0.2s;
}
@keyframes pulse-ring {
  0%   { opacity: 0.6; transform: scale(0.8); }
  100% { opacity: 0;   transform: scale(1.6); }
}
.step:hover .step-number {
  background: var(--purple);
  color: #fff;
  transform: scale(1.08) rotate(-6deg);
}
.step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  transition: color .2s ease;
}
.step:hover h3 { color: var(--purple); }
.step p { font-size: 0.9rem; color: var(--muted); }

/* ── FEATURES ─────────────────────────────────────────── */
#features {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.feat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--tilt-x, 0)) rotateY(var(--tilt-y, 0)) translateZ(0);
  transition: border-color .35s var(--ease-out-quart),
              box-shadow .35s var(--ease-out-quart),
              transform .2s var(--ease-out-expo);
}
.feat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.feat-card:hover {
  border-color: var(--purple);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.15);
}
.feat-card:hover::before { opacity: 1; }
.feat-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--purple-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
  transition: transform .4s var(--ease-out-expo),
              background .3s var(--ease-out-quart);
}
.feat-card:hover .feat-icon {
  transform: translateY(-3px) scale(1.08) rotate(-6deg);
  background: var(--purple-border);
}
.feat-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); }
.feat-card p { font-size: 0.875rem; color: var(--muted); }

/* ── SECONDARY (golfers) ──────────────────────────────── */
#secondary .container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 720px;
  position: relative;
  overflow: hidden;
  transition: border-color .4s var(--ease-out-quart),
              box-shadow .4s var(--ease-out-quart),
              transform .4s var(--ease-out-expo);
}
#secondary .container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transition: transform .6s var(--ease-out-expo);
}
#secondary .container:hover {
  border-color: var(--purple-border);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.1);
}
#secondary .container:hover::before {
  transform: translate(-30px, 30px) scale(1.15);
}
#secondary h2 { font-size: 1.4rem; }
#secondary .lead { font-size: 0.95rem; }

/* ── FOOTER ───────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  background: var(--surface);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: transform .2s var(--ease-out-expo);
}
.footer-logo:hover { transform: translateX(2px); }
.footer-logo img { width: 24px; height: 24px; border-radius: 6px; }
.footer-logo span { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.footer-copy { font-size: 0.8rem; color: var(--muted); }
.footer-links { display: flex; gap: 1rem; }
.footer-link {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color .2s;
}
.footer-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width .3s var(--ease-out-quart);
}
.footer-link:hover { color: var(--text); }
.footer-link:hover::after { width: 100%; }

/* ── SCROLL REVEAL ────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-out-quart),
              transform .8s var(--ease-out-quart);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* If JS is blocked/fails, show content instead of hiding it forever */
html.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 640px) {
  section { padding: 3.5rem 1rem; }
  #hero { padding: 4rem 1rem 3rem; }
  .nav-inner { padding: 0; }
  #secondary .container { padding: 1.75rem 1.25rem; }
  /* disable tilt on mobile */
  .pain-card, .feat-card {
    transform: none !important;
  }
}

/* ── REDUCED MOTION ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .hero-decor .trajectory,
  .hero-decor .ball,
  .hero-decor .golfer-emoji,
  .hero-decor .impact-burst {
    opacity: 0.8;
  }
  #hero::before,
  #hero::after {
    animation: none;
  }
}
