/* ==========================================================================
   Lungful: lungful.app landing page
   Palette and spacing mirror the app design tokens in src/design/tokens.ts
   ========================================================================== */

:root {
  /* Surfaces */
  --bg:        #0D0D14;
  --surface:   #13131E;
  --surface-2: #1A1A28;
  --border:    #242438;

  /* Brand green */
  --green:        #16A357;
  --green-bright: #1DB968;
  --green-light:  #4DCB8E;
  --green-dim:    #0F8A48;

  /* Coral call-to-action */
  --coral:       #FF5528;
  --coral-deep:  #E8441A;
  --coral-light: #FFA98F;

  /* Accents */
  --gold: #FFD166;

  /* Text */
  --text:   #FFFFFF;
  --text-2: #C4C4D4;
  --muted:  #9090A8;
  --faint:  #66668A;

  /* Shape */
  --radius-sm: 8px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --wrap: 1120px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-light);
  margin-bottom: 14px;
}

.accent { color: var(--green-bright); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 13px 22px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  will-change: transform;
}
.btn-sm { padding: 9px 18px; font-size: 0.92rem; }
.btn-coral {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 85, 40, 0.28);
}
.btn-coral:hover { background: var(--coral-deep); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255, 85, 40, 0.36); }

.text-link { color: var(--green-light); font-weight: 700; }
.text-link:hover { color: var(--green-bright); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 20, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { display: block; filter: drop-shadow(0 2px 8px rgba(29, 185, 104, 0.35)); }
.brand-name { font-weight: 800; font-size: 1.16rem; letter-spacing: -0.01em; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero-glow {
  position: absolute;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 720px;
  background: radial-gradient(closest-side, rgba(22, 163, 87, 0.34), rgba(22, 163, 87, 0.08) 55%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-copy { max-width: 560px; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
.lead { color: var(--text-2); font-size: 1.12rem; margin-top: 22px; max-width: 30em; }

.store-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.store-row-center { justify-content: center; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 11px 18px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: default;
}
.store-btn svg { flex: 0 0 auto; }
.store-btn-text { display: flex; flex-direction: column; line-height: 1.12; text-align: left; }
.store-btn-text small { font-size: 0.66rem; color: var(--muted); letter-spacing: 0.03em; }
.store-btn-text strong { font-size: 1.06rem; font-weight: 700; }
.store-btn-light { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.22); }
.store-btn-light .store-btn-text small { color: rgba(255, 255, 255, 0.82); }
.store-note { color: var(--muted); font-size: 0.9rem; margin-top: 14px; }

/* ===== Hero device (CSS app preview) ===== */
.hero-device { display: flex; justify-content: center; }
.device {
  position: relative;
  width: 300px;
  max-width: 84vw;
  aspect-ratio: 300 / 610;
  background: linear-gradient(160deg, #15151F, #0E0E16);
  border: 1px solid var(--border);
  border-radius: 42px;
  padding: 14px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.02) inset,
              0 0 60px rgba(22, 163, 87, 0.16);
}
.device-notch {
  position: absolute;
  top: 16px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px;
  background: #07070C;
  border-radius: var(--radius-pill);
  z-index: 2;
}
.device-screen {
  position: relative;
  height: 100%;
  border-radius: 30px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(22, 163, 87, 0.22), transparent 60%),
    var(--surface);
  padding: 46px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}
.d-label { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
.d-days { margin-top: 6px; font-weight: 800; font-size: 1.5rem; color: var(--text); }
.d-num { color: var(--green-bright); font-size: 2.1rem; }
.d-clock {
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
  color: var(--green-light);
  font-size: 1.16rem;
  font-weight: 700;
}
.d-ring {
  margin: 20px auto 0;
  width: 132px; height: 132px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background:
    radial-gradient(closest-side, var(--surface) 71%, transparent 72% 100%),
    conic-gradient(var(--green) 0 68%, var(--surface-2) 68% 100%);
  box-shadow: 0 0 28px rgba(22, 163, 87, 0.22);
}
.d-ring-pct { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.d-ring-sub { color: var(--gold); font-weight: 800; font-size: 1.04rem; margin-top: 2px; }
.d-stats { display: flex; gap: 12px; margin-top: 22px; width: 100%; }
.d-stat {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
}
.d-stat strong { display: block; font-size: 1.16rem; color: var(--text); }
.d-stat span { font-size: 0.72rem; color: var(--muted); }
.d-sos {
  margin-top: auto;
  width: 100%;
  text-align: center;
  background: linear-gradient(180deg, var(--coral), var(--coral-deep));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  padding: 13px;
  box-shadow: 0 8px 22px rgba(255, 85, 40, 0.34);
}
.d-sos span { display: block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em; opacity: 0.9; }

/* ===== Generic sections ===== */
.section { padding: 84px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.section-sub { color: var(--text-2); font-size: 1.06rem; margin-top: 16px; }

/* ===== Why-different grid ===== */
.diff-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.diff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.diff-card:hover { transform: translateY(-4px); border-color: var(--green-dim); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.diff-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: rgba(22, 163, 87, 0.14);
  color: var(--green-light);
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.diff-card h3 { font-size: 1.16rem; margin-bottom: 8px; }
.diff-card p { color: var(--text-2); font-size: 0.97rem; }
.diff-card-cta {
  background: linear-gradient(155deg, rgba(22, 163, 87, 0.16), rgba(22, 163, 87, 0.04));
  border-color: var(--green-dim);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.diff-card-cta .text-link { margin-top: 14px; }

/* ===== Feature grid ===== */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  position: relative;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feat-card:hover { transform: translateY(-4px); border-color: var(--green-dim); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.feat-card h3 { font-size: 1.08rem; margin: 14px 0 8px; }
.feat-card p { color: var(--text-2); font-size: 0.94rem; }
.feat-card-quiet { opacity: 0.92; }

.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.tag-free { background: rgba(22, 163, 87, 0.16); color: var(--green-light); }
.tag-premium { background: rgba(255, 209, 102, 0.14); color: var(--gold); }

/* ===== Privacy band ===== */
.privacy-band {
  padding: 72px 0;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(22, 163, 87, 0.12), transparent 60%),
    var(--bg);
  text-align: center;
}
.privacy-inner { max-width: 720px; margin: 0 auto; }
.privacy-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.privacy-band p { color: var(--text-2); font-size: 1.1rem; margin-top: 18px; }

/* ===== Final CTA ===== */
.cta-band {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  text-align: center;
}
.cta-inner { max-width: 680px; margin: 0 auto; }
.cta-band h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.92); font-size: 1.1rem; margin: 16px 0 30px; }

/* ===== Footer ===== */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding: 40px 0 48px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--text-2); font-weight: 600; font-size: 0.95rem; }
.footer-links a:hover { color: var(--green-light); }
.footer-fine { margin-top: 26px; }
.footer-fine p { color: var(--faint); font-size: 0.84rem; }

/* ===== Reveal animation ===== */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.diff-card.reveal, .feat-card.reveal { transition-delay: .04s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .btn, .diff-card, .feat-card { transition: none; }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: none; text-align: center; margin: 0 auto; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .store-row { justify-content: center; }
  .hero-device { order: -1; }
  .diff-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .hero { padding: 48px 0 40px; }
  .section { padding: 60px 0; }
  .diff-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
