/* ─── Tokens ─────────────────────────────────────────────────── */
:root {
  --white:      #ffffff;
  --gray-50:    #f5f5f7;
  --gray-100:   #f0f0f2;
  --gray-200:   #e8e8ed;
  --gray-400:   #b0b0b8;
  --gray-600:   #6e6e73;
  --gray-700:   #515154;
  --gray-900:   #1d1d1f;
  --blue:       #007aff;
  --blue-hover: #0071e3;
  --border:     rgba(0,0,0,0.07);
  --shadow-xs:  0 1px 4px rgba(0,0,0,0.06);
  --shadow-sm:  0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.10);
  --shadow-lg:  0 24px 72px rgba(0,0,0,0.13);
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --font:  "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  /* Sport accent colors */
  --sport-running: #34C759;
  --sport-hiit:    #FF3B30;
  --sport-cycling: #FF9500;
  --sport-surfing: #5AC8FA;
  --sport-yoga:    #AF52DE;

  --sport-gradient: linear-gradient(
    90deg,
    var(--sport-running),
    var(--sport-surfing),
    var(--sport-yoga),
    var(--sport-hiit),
    var(--sport-cycling),
    var(--sport-running)
  );
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--white);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── Nav ────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: rgba(255,255,255,0.80);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
}
.nav-brand img { width: 26px; height: 26px; border-radius: 6px; }
.nav-links {
  display: flex; align-items: center; gap: 28px;
  font-size: 13.5px; color: var(--gray-600);
}
.nav-links a { transition: color 0.15s; }
.nav-links a:hover { color: var(--gray-900); }
.nav-links a.active { color: var(--gray-900); font-weight: 500; }
.nav-cta {
  background: var(--gray-900); color: #fff !important;
  padding: 7px 16px; border-radius: 980px;
  font-size: 13.5px; font-weight: 500;
  transition: background 0.15s, transform 0.15s;
}
.nav-cta:hover { background: #333 !important; transform: translateY(-1px); }


/* ─── Shared section utilities ───────────────────────────────── */
.section { padding: 72px 24px; }
.section--alt { background: var(--gray-50); }
.container { max-width: 1040px; margin: 0 auto; }
.section-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 14px;
}
.section-heading {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 14px;
}
.section-body {
  font-size: 17px; color: var(--gray-600);
  line-height: 1.65; max-width: 520px;
}
.section-header { margin-bottom: 40px; }

/* Section kicker colors per section */
#features .section-kicker   { color: var(--sport-running); }
#screenshots .section-kicker { color: var(--sport-surfing); }
#import .section-kicker      { color: var(--sport-cycling); }
.roadmap-section .section-kicker { color: var(--sport-yoga); }
#about .section-kicker       { color: var(--sport-hiit); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-appstore {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--gray-900); color: #fff;
  padding: 13px 22px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 500;
  transition: all 0.25s;
}
.btn-appstore:hover {
  background: #2a2a2a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
}
.btn-appstore svg { flex-shrink: 0; }

/* ─── macOS window frame ─────────────────────────────────────── */
.mac-window {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.05);
  overflow: hidden;
}
.mac-titlebar {
  height: 38px; background: #ececec;
  display: flex; align-items: center; gap: 7px; padding: 0 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.tl { width: 12px; height: 12px; border-radius: 50%; }
.tl-r { background: #ff5f57; }
.tl-y { background: #febc2e; }
.tl-g { background: #28c840; }
.mac-window img { width: 100%; vertical-align: bottom; }

/* ─── kbd ────────────────────────────────────────────────────── */
kbd {
  font-family: var(--font); font-size: 12.5px; font-weight: 500;
  background: var(--white); color: var(--gray-900);
  border: 1px solid var(--gray-200);
  border-radius: 5px; padding: 3px 7px;
  box-shadow: 0 1px 0 var(--gray-200);
}

/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--gray-50);
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
}
.footer-brand img { width: 22px; height: 22px; border-radius: 5px; }
.footer-copy { font-size: 13px; color: var(--gray-400); }
.footer-links { display: flex; gap: 20px; font-size: 13px; color: var(--gray-400); }
.footer-links a:hover { color: var(--gray-600); }

/* ─── Scroll animations ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger.visible > *:nth-child(1) { opacity:1; transform:none; transition-delay: 0s; }
.stagger.visible > *:nth-child(2) { opacity:1; transform:none; transition-delay: 0.07s; }
.stagger.visible > *:nth-child(3) { opacity:1; transform:none; transition-delay: 0.14s; }
.stagger.visible > *:nth-child(4) { opacity:1; transform:none; transition-delay: 0.21s; }
.stagger.visible > *:nth-child(5) { opacity:1; transform:none; transition-delay: 0.28s; }
.stagger.visible > *:nth-child(6) { opacity:1; transform:none; transition-delay: 0.35s; }
.stagger.visible > *:nth-child(n+7) { opacity:1; transform:none; transition-delay: 0.35s; }

/* ─── Keyframes ──────────────────────────────────────────────── */
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.25); }
}
@keyframes strip-slide {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
@keyframes dot-cycle {
  0%, 100% { background: var(--sport-running); }
  20%      { background: var(--sport-surfing); }
  40%      { background: var(--sport-yoga); }
  60%      { background: var(--sport-hiit); }
  80%      { background: var(--sport-cycling); }
}
@keyframes pulse-color {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.25); }
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 800px) {
  nav { padding: 0 20px; }
  .nav-links { gap: 16px; }
}
@media (max-width: 560px) {
  nav .nav-links a:not(.nav-cta) { display: none; }
  footer { flex-direction: column; gap: 10px; text-align: center; }
  .footer-links { justify-content: center; }
}
