/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d1b2a;
  --bg2:       #112233;
  --bg3:       #0a1520;
  --teal:      #00e5c8;
  --amber:     #ffb347;
  --teal-dim:  rgba(0, 229, 200, 0.12);
  --text:      #e8f0f8;
  --muted:     #7a9ab8;
  --card:      rgba(255,255,255,0.05);
  --border:    rgba(255,255,255,0.08);
  --radius:    16px;
  --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Semi-transparent section backgrounds — let the shader show through */
  --sec-a:  rgba(13,  27,  42,  0.78);   /* features, how-it-works, privacy */
  --sec-b:  rgba(10,  21,  32,  0.82);   /* screenshots, footer */
  --sec-c:  rgba(17,  34,  51,  0.78);   /* watch */
}

html { scroll-behavior: smooth; }

body {
  /* Fallback colour if WebGL canvas doesn't load */
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Fixed WebGL background canvas ────────────────────── */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -1;
  display: block;
  pointer-events: none;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Nav ──────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(13, 27, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 229, 200, 0.1);
  transition: background 0.3s;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; opacity: 0.85; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ─── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  /* Transparent — the fixed #bg-canvas shows through */
  background: transparent;
}

/* Gradient overlay — darkens left/text side, smooth bottom transition */
.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to right,
      rgba(13, 27, 42, 0.88) 0%,
      rgba(13, 27, 42, 0.65) 38%,
      rgba(13, 27, 42, 0.20) 62%,
      transparent 100%
    ),
    linear-gradient(
      to top,
      var(--sec-a) 0%,
      transparent 16%
    );
}

/* Content wrapper */
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px 80px;
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--teal);
  margin-bottom: 20px;
  opacity: 0.9;
}

.hero-text { flex: 1; }
.hero-text h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  color: #fff;
  margin-bottom: 22px;
}
.hero-sub {
  font-size: 1.15rem;
  color: rgba(232, 240, 248, 0.72);
  max-width: 440px;
  margin-bottom: 40px;
  line-height: 1.75;
}

.btn-appstore img { height: 52px; }
.btn-appstore:hover { opacity: 0.85; }

/* Phone images + teal glow behind them */
.hero-phones {
  flex: 0 0 auto;
  position: relative;
  width: 340px;
  height: 520px;
}

/* Radial teal glow — shader bleeds through this */
.hero-phones-glow {
  position: absolute;
  inset: -60px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 229, 200, 0.18) 0%,
    rgba(255, 179, 71, 0.06) 50%,
    transparent 75%
  );
  z-index: 0;
  pointer-events: none;
}

.phone {
  position: absolute;
  border-radius: 36px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65),
              0 0 0 1px rgba(255,255,255,0.06);
  z-index: 1;
}
.phone-main {
  width: 220px;
  left: 60px;
  top: 0;
  z-index: 2;
}
.phone-back {
  width: 200px;
  left: 0;
  top: 60px;
  z-index: 1;
  opacity: 0.55;
  filter: blur(1px);
}

/* Subtle scroll hint chevron */
.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0.4;
}
.hero-scroll-hint span {
  display: block;
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(45deg);
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.6; }
  50%       { transform: rotate(45deg) translateY(6px); opacity: 1; }
}

/* ─── Features ─────────────────────────────────────────── */
.features {
  background: var(--sec-a);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 100px 24px;
}
.features-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.features h2, .screenshots h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 52px;
  color: #fff;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.feature-card:hover {
  border-color: var(--teal);
  background: var(--teal-dim);
  transform: translateY(-3px);
}
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; color: #fff; }
.feature-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.65; }

/* ─── Screenshots ──────────────────────────────────────── */
.screenshots {
  padding: 100px 24px;
  background: var(--sec-b);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.screenshots-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}
.screenshots-row figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.screenshots-row img {
  width: 160px;
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55),
              0 0 0 1px rgba(255,255,255,0.05);
  transition: transform 0.25s, box-shadow 0.25s;
}
.screenshots-row img:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 64px rgba(0,0,0,0.65),
              0 0 24px rgba(0, 229, 200, 0.12);
}
.screenshots-row figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ─── Privacy Section ──────────────────────────────────── */
.privacy-section {
  background: var(--sec-a);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 100px 24px;
}
.privacy-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.privacy-icon { font-size: 3rem; margin-bottom: 16px; }
.privacy-inner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 28px;
  color: #fff;
}
.privacy-list {
  list-style: none;
  text-align: left;
  display: inline-block;
  margin-bottom: 36px;
}
.privacy-list li {
  color: var(--muted);
  padding: 7px 0 7px 28px;
  position: relative;
  font-size: 0.95rem;
}
.privacy-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}
.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--teal);
  color: var(--teal);
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover {
  background: var(--teal);
  color: var(--bg);
  text-decoration: none;
}

/* ─── Footer ───────────────────────────────────────────── */
.footer {
  background: var(--sec-b);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy { color: var(--muted); font-size: 0.8rem; }

/* ─── Prose (Privacy + Support pages) ─────────────────── */
.prose {
  max-width: 720px;
  margin: 60px auto;
  padding: 48px 52px 64px;
  background: rgba(13, 27, 42, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.prose h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 8px;
}
.prose .updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 48px;
}
.prose h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 40px 0 12px;
}
.prose p { color: var(--muted); margin-bottom: 16px; line-height: 1.75; }
.prose ul {
  color: var(--muted);
  padding-left: 24px;
  margin-bottom: 16px;
}
.prose ul li { margin-bottom: 6px; line-height: 1.7; }
.prose a { color: var(--teal); }
.prose strong { color: var(--text); }

/* FAQ */
.faq { margin: 0 0 40px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 12px;
  background: var(--card);
}
.faq-item h3 { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 10px; }
.faq-item p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.faq-item a { color: var(--teal); }

/* ─── How It Works ─────────────────────────────────────── */
.how-it-works {
  background: var(--sec-a);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 100px 24px;
}
.how-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.how-inner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: #fff;
}
.how-sub {
  color: var(--muted);
  font-size: 1rem;
  max-width: 640px;
  margin: 0 auto 52px;
  line-height: 1.75;
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.pillar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: left;
  position: relative;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.pillar-card:hover {
  border-color: var(--teal);
  background: var(--teal-dim);
  transform: translateY(-3px);
}
.pillar-card-bonus {
  border-color: rgba(0, 229, 200, 0.2);
  background: rgba(0, 229, 200, 0.03);
}
.pillar-weight {
  display: inline-block;
  background: var(--teal);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.pillar-weight-bonus {
  background: rgba(0, 229, 200, 0.18);
  color: var(--teal);
}
.pillar-icon { font-size: 1.6rem; margin-bottom: 8px; }
.pillar-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.pillar-card p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.58;
}
.how-footnote {
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ─── Apple Watch Section ───────────────────────────────── */
.watch-section {
  background: var(--sec-c);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 100px 24px;
}
.watch-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 80px;
}
.watch-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--teal);
  margin-bottom: 16px;
}
.watch-text { flex: 1; }
.watch-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 20px;
}
.watch-text p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 460px;
  margin-bottom: 32px;
}
.watch-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.watch-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.watch-bullet {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.watch-list strong { color: var(--text); }

.watch-visual {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animated teal ring badge */
.watch-badge-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.watch-badge-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  background: var(--teal-dim);
  /* Slow pulse to match the calm shader animation */
  animation: ringPulse 4s ease-in-out infinite;
}
.watch-badge-ring::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 200, 0.2);
  animation: ringPulse 4s ease-in-out infinite 2s;
}
@keyframes ringPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.03); }
}
.watch-badge-icon {
  position: relative;
  font-size: 3rem;
  z-index: 1;
}
.watch-badge-label {
  position: relative;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  z-index: 1;
}
.watch-badge-sub {
  position: relative;
  font-size: 0.75rem;
  color: var(--teal);
  text-align: center;
  z-index: 1;
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    padding: 100px 20px 60px;
    gap: 48px;
    text-align: center;
  }
  .hero-overlay {
    /* On mobile the overlay covers more of the canvas */
    background:
      rgba(13, 27, 42, 0.78),
      linear-gradient(to top, var(--bg2) 0%, transparent 18%);
  }
  .hero-sub { margin: 0 auto 36px; }
  .hero-phones {
    width: 280px;
    height: 420px;
  }
  .phone-main { width: 180px; left: 50px; }
  .phone-back { width: 160px; left: 0; top: 48px; }

  .nav-links { display: none; }
  .screenshots-row img { width: 130px; }
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .watch-inner {
    flex-direction: column;
    gap: 48px;
    text-align: center;
  }
  .watch-text p { margin: 0 auto 28px; }
  .watch-list li { text-align: left; }
  .watch-visual { order: -1; }

  .prose {
    margin: 24px 16px;
    padding: 32px 24px 48px;
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  .pillars-grid {
    grid-template-columns: 1fr;
  }
}
