/* Tap Bogey marketing site. Golf-themed, animated, dependency-free (every
   shape below is CSS/SVG; no illustration assets to source or ship). */

:root {
  --sky-top: #7EC8E3;
  --sky-bottom: #CFEFFF;
  --fairway-dark: #1B5E36;
  --fairway: #2E7D4F;
  --fairway-light: #4FA06A;
  --cream: #FFFBEA;
  --paper: #FFFFFF;
  --ink: #1E2B22;
  --ink-soft: #4B5A50;
  --gold: #FFC845;
  --gold-dark: #E8A800;
  --coral: #FF6F59;
  --shadow: 0 20px 45px -20px rgba(20, 40, 25, 0.35);
  --shadow-sm: 0 10px 24px -14px rgba(20, 40, 25, 0.3);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand {
  font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-soft); line-height: 1.65; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.section-inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fairway-dark);
  background: rgba(46, 125, 79, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.eyebrow.center { display: block; text-align: center; width: fit-content; margin-inline: auto; }
.lede { font-size: 18px; max-width: 560px; }
.lede.center { margin-inline: auto; text-align: center; }
.underline-pop { position: relative; white-space: nowrap; }
.underline-pop::after {
  content: '';
  position: absolute;
  left: -2px; right: -2px; bottom: 2px;
  height: 0.34em;
  background: var(--gold);
  z-index: -1;
  border-radius: 4px;
  transform: rotate(-1deg);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 17px 32px; font-size: 17px; }
.btn-primary {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #402B00;
  box-shadow: 0 10px 22px -10px rgba(232, 168, 0, 0.7);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 26px -12px rgba(232, 168, 0, 0.8); }
.btn-primary:active { transform: translateY(0) scale(0.99); }
.btn-ghost {
  background: rgba(27, 94, 54, 0.08);
  color: var(--fairway-dark);
}
.btn-ghost:hover { background: rgba(27, 94, 54, 0.16); transform: translateY(-2px); }
.btn:disabled { opacity: .65; cursor: progress; transform: none !important; }

/* ---------- sky / background scenery ---------- */
.skyline {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 55%, var(--cream) 100%);
  overflow: hidden;
}
.sun {
  position: absolute;
  top: -60px; right: 8%;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFF4CE 0%, var(--gold) 55%, var(--gold-dark) 100%);
  box-shadow: 0 0 90px 30px rgba(255, 200, 69, 0.45);
  animation: sun-pulse 6s ease-in-out infinite;
}
@keyframes sun-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
.cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  opacity: 0.85;
  filter: drop-shadow(0 8px 10px rgba(90, 130, 160, 0.15));
}
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: inherit; }
.cloud-a { width: 140px; height: 46px; top: 12%; left: -20%; animation: drift 46s linear infinite; }
.cloud-a::before { width: 70px; height: 70px; top: -34px; left: 18px; }
.cloud-a::after { width: 54px; height: 54px; top: -22px; left: 78px; }
.cloud-b { width: 110px; height: 38px; top: 26%; left: -20%; animation: drift 62s linear infinite; animation-delay: -18s; }
.cloud-b::before { width: 56px; height: 56px; top: -26px; left: 14px; }
.cloud-b::after { width: 40px; height: 40px; top: -16px; left: 62px; }
.cloud-c { width: 90px; height: 32px; top: 6%; left: -20%; animation: drift 54s linear infinite; animation-delay: -34s; }
.cloud-c::before { width: 46px; height: 46px; top: -22px; left: 10px; }
.cloud-c::after { width: 34px; height: 34px; top: -14px; left: 50px; }
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(140vw); }
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 251, 234, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(27, 94, 54, 0.08);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  color: var(--fairway-dark);
  text-decoration: none;
}
.brand.small { font-size: 17px; }
.brand-ball {
  width: 26px; height: 26px;
  border-radius: 50%;
  flex: none;
  background:
    radial-gradient(circle at 30% 28%, rgba(0,0,0,0.12) 0 2px, transparent 3px) 6px 5px/6px 6px no-repeat,
    radial-gradient(circle at 30% 28%, rgba(0,0,0,0.12) 0 2px, transparent 3px) 15px 8px/6px 6px no-repeat,
    radial-gradient(circle at 30% 28%, rgba(0,0,0,0.12) 0 2px, transparent 3px) 9px 15px/6px 6px no-repeat,
    radial-gradient(circle at 32% 30%, #fff 0%, #eef1ee 70%, #cfd6cf 100%);
  box-shadow: inset -2px -3px 4px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.15);
}

/* ---------- hero ---------- */
.hero { position: relative; padding-top: 32px; }
.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
  min-height: 560px;
}
.hero h1 { font-size: clamp(34px, 5vw, 56px); color: var(--fairway-dark); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 14px; }
.hero-note { font-size: 13px; color: var(--ink-soft); font-weight: 700; }

.hero-scene {
  position: relative;
  height: 420px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.hill {
  position: absolute;
  left: -10%; right: -10%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hill-back { bottom: -30px; height: 260px; background: var(--fairway-light); opacity: .55; }
.hill-front { bottom: -60px; height: 230px; background: var(--fairway); }
.tee {
  position: absolute;
  bottom: 78px; left: 14%;
  width: 10px; height: 34px;
  background: #E4C79A;
  border-radius: 3px;
  transform: rotate(-6deg);
}
.flagstick {
  position: absolute;
  bottom: 60px; right: 18%;
  width: 4px; height: 190px;
  background: linear-gradient(180deg, #E7E2D4, #C9C2AE);
  border-radius: 2px;
}
.flag {
  position: absolute;
  top: 4px; left: 4px;
  width: 60px; height: 40px;
  background: var(--coral);
  clip-path: polygon(0 0, 100% 20%, 0 40%);
  transform-origin: left center;
  animation: wave 2.6s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { transform: skewX(0deg) rotate(0deg); }
  50% { transform: skewX(-10deg) rotate(-3deg); }
}
.cup {
  position: absolute;
  bottom: -6px; left: -10px;
  width: 24px; height: 10px;
  border-radius: 50%;
  background: #0E2A18;
}
.golfball {
  position: absolute;
  bottom: 96px; left: 14%;
  width: 30px; height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(0,0,0,0.12) 0 2.5px, transparent 3.5px) 7px 6px/8px 8px no-repeat,
    radial-gradient(circle at 30% 28%, rgba(0,0,0,0.12) 0 2.5px, transparent 3.5px) 17px 9px/8px 8px no-repeat,
    radial-gradient(circle at 30% 28%, rgba(0,0,0,0.12) 0 2.5px, transparent 3.5px) 11px 17px/8px 8px no-repeat,
    radial-gradient(circle at 30% 28%, rgba(0,0,0,0.12) 0 2.5px, transparent 3.5px) 20px 18px/8px 8px no-repeat,
    radial-gradient(circle at 32% 30%, #fff 0%, #eef1ee 65%, #c9d1c9 100%);
  box-shadow: inset -3px -4px 5px rgba(0,0,0,0.15), 0 6px 10px rgba(20,40,25,0.35);
  transform: translateX(-320px) rotate(-540deg);
  animation: ball-roll-in 1.3s cubic-bezier(.2,.8,.35,1.15) forwards;
}
.golfball.is-idle { animation: ball-idle 2.6s ease-in-out infinite; }
@keyframes ball-roll-in {
  0% { transform: translateX(-320px) rotate(-540deg); }
  70% { transform: translateX(calc(66vw - 320px)) rotate(0deg); }
  100% { transform: translateX(min(66vw, 560px)) rotate(20deg); }
}
@keyframes ball-idle {
  0%, 100% { transform: translateY(0) rotate(20deg); }
  50% { transform: translateY(-8px) rotate(28deg); }
}
@media (prefers-reduced-motion: reduce) {
  .golfball { animation: none !important; transform: translateX(min(66vw, 560px)) rotate(20deg); }
  .flag, .sun, .cloud { animation: none !important; }
}

.wave-divider { display: block; width: 100%; height: 60px; margin-top: -2px; }
.wave-divider path { fill: var(--paper); }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- features ---------- */
.features { background: var(--paper); padding: 76px 0 88px; }
.features h2 { text-align: center; font-size: clamp(26px, 3.6vw, 38px); max-width: 640px; margin: 0 auto 48px; color: var(--fairway-dark); }
.lg-only { display: inline; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  border: 1px solid rgba(27, 94, 54, 0.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-sm); }
.feature-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  border-radius: 16px;
  background: var(--tint, #EAF6E9);
  margin-bottom: 16px;
  transition: transform .35s ease;
}
.feature-card:hover .feature-icon { transform: rotate(-8deg) scale(1.08); animation: icon-bounce .6s ease; }
@keyframes icon-bounce {
  0%, 100% { transform: translateY(0) rotate(-8deg) scale(1.08); }
  40% { transform: translateY(-6px) rotate(-8deg) scale(1.08); }
}
.feature-card h3 { font-size: 19px; margin-bottom: 8px; color: var(--ink); }
.feature-card p { font-size: 14.5px; margin: 0; }

/* ---------- download ---------- */
.download { background: linear-gradient(180deg, var(--paper), #FFF7E2); padding: 80px 0; text-align: center; }
.download h2 { font-size: clamp(26px, 3.6vw, 36px); color: var(--fairway-dark); }
.store-badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 16px;
  font-family: 'Baloo 2', sans-serif;
  opacity: 0.92;
  cursor: default;
}
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge span { display: flex; flex-direction: column; align-items: flex-start; font-weight: 700; font-size: 15px; line-height: 1.25; }
.store-badge em { font-style: normal; font-size: 11px; font-weight: 600; opacity: 0.75; letter-spacing: 0.02em; }

/* ---------- signup ---------- */
.signup { padding: 90px 24px 110px; display: flex; justify-content: center; }
.signup-card {
  position: relative;
  max-width: 560px;
  width: 100%;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 48px 40px 40px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(27, 94, 54, 0.08);
}
.signup-ball {
  width: 54px; height: 54px;
  margin: -84px auto 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(0,0,0,0.12) 0 3px, transparent 4px) 12px 10px/10px 10px no-repeat,
    radial-gradient(circle at 30% 28%, rgba(0,0,0,0.12) 0 3px, transparent 4px) 30px 16px/10px 10px no-repeat,
    radial-gradient(circle at 30% 28%, rgba(0,0,0,0.12) 0 3px, transparent 4px) 19px 30px/10px 10px no-repeat,
    radial-gradient(circle at 32% 30%, #fff 0%, #eef1ee 65%, #c9d1c9 100%);
  box-shadow: inset -3px -4px 6px rgba(0,0,0,0.15), 0 10px 18px -8px rgba(20,40,25,0.4);
  animation: ball-idle 3s ease-in-out infinite;
}
.signup-card h2 { color: var(--fairway-dark); font-size: 26px; }
.signup-card > p { max-width: 420px; margin-inline: auto; }
.honeypot { position: absolute; left: -9999px; top: -9999px; opacity: 0; }
.field-row { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }
.field-row input[type="email"] {
  flex: 1 1 260px;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  font-size: 16px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 2px solid #E1DCC8;
  background: var(--cream);
  color: var(--ink);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field-row input[type="email"]:focus { border-color: var(--fairway); box-shadow: 0 0 0 4px rgba(46,125,79,0.15); }
.field-row input.is-invalid { border-color: var(--coral); }
.form-note { min-height: 20px; font-size: 13.5px; font-weight: 700; margin: 12px 0 0; }
.form-note.is-error { color: var(--coral); }
.form-note.is-ok { color: var(--fairway-dark); }
.btn-spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(64,43,0,0.35);
  border-top-color: #402B00;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* :not([hidden]) rather than a bare .success-state rule: an unqualified
   `display: flex` here would tie with the UA stylesheet's [hidden] rule on
   specificity and win by cascade order, showing this before any submit. */
.success-state:not([hidden]) { display: flex; flex-direction: column; align-items: center; }
.success-badge {
  font-size: 40px;
  width: 76px; height: 76px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(46,125,79,0.12);
  margin-bottom: 12px;
  animation: pop-in .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop-in {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.success-state h3 { color: var(--fairway-dark); margin-bottom: 4px; }

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

/* ---------- footer ---------- */
.site-footer { background: var(--fairway-dark); color: #DCEAE0; padding: 30px 24px; }
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.site-footer .brand { color: #fff; }
.site-footer p { margin: 0; color: #A9C4B4; font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-scene { height: 300px; order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .lg-only { display: none; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 8px; }
  .signup-card { padding: 44px 24px 32px; }
  /* flex-basis tracks the main axis, which this rule just flipped to
     vertical -- without resetting it, input[type="email"]'s flex: 1 1 260px
     makes the box 260px TALL instead of wide. */
  .field-row { flex-direction: column; }
  .field-row input[type="email"] { flex: none; width: 100%; }
  .field-row button { width: 100%; }
  .store-badge { width: 100%; justify-content: center; }
}
