/* ---------------------------------------------------------------
   Subtrack — calm, premium subscription tracker landing page
   Palette pulled from the app icon: banded cyan → blue → indigo
   on a soft, near-white canvas. Headspace-quiet, airy spacing.
----------------------------------------------------------------*/

:root {
  --cyan:   #7ed4f4;
  --sky:    #5ea3f0;
  --blue:   #5e7ef0;
  --indigo: #5856d6;
  --violet: #514ca8;
  --ink:    #1d2238;
  --ink-2:  #565d7a;
  --navy:   #2c2d40;

  --bg:      #f4f7fc;
  --bg-2:    #eef3fb;
  --surface: #ffffff;
  --line:    rgba(36, 48, 92, 0.09);

  --grad-brand: linear-gradient(135deg, var(--cyan) 0%, var(--sky) 30%, var(--blue) 55%, var(--indigo) 80%, var(--violet) 100%);
  --grad-sphere: linear-gradient(132deg,
      #8fdcf6 0%, #8fdcf6 14%,
      #6fb0f1 14%, #6fb0f1 30%,
      #5e7ef0 30%, #5e7ef0 48%,
      #5a64e4 48%, #5a64e4 64%,
      #5453c2 64%, #5453c2 78%,
      #45427e 78%, #45427e 90%,
      #33344a 90%);

  --shadow-sm: 0 1px 2px rgba(29, 34, 56, 0.05), 0 6px 16px rgba(29, 34, 56, 0.04);
  --shadow-md: 0 10px 30px rgba(40, 60, 120, 0.10), 0 2px 8px rgba(29, 34, 56, 0.05);
  --shadow-lg: 0 30px 70px rgba(40, 55, 120, 0.18);

  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;

  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

img { display: block; }

/* ---- atmospheric mesh background ---- */
.mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 110% -5%, rgba(94, 126, 240, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 5%, rgba(126, 212, 244, 0.12), transparent 55%),
    var(--bg);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}
.blob--cyan   { width: 460px; height: 460px; top: -120px; left: -80px;  background: radial-gradient(circle, rgba(126,212,244,0.7), transparent 70%); }
.blob--blue   { width: 520px; height: 520px; top: 18%;   right: -160px; background: radial-gradient(circle, rgba(94,126,240,0.55), transparent 70%); }
.blob--indigo { width: 480px; height: 480px; bottom: -160px; left: 30%; background: radial-gradient(circle, rgba(88,86,214,0.40), transparent 70%); }

/* ---- layout helpers ---- */
section { padding: clamp(64px, 9vw, 132px) clamp(20px, 5vw, 48px); }
.section-head { max-width: 640px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }

.eyebrow {
  display: inline-block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 18px;
}

/* ---- nav (floating iOS glass pill) ---- */
.nav {
  position: sticky;
  top: 14px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 12px 10px 18px;
  width: min(960px, calc(100% - 32px));
  margin: 14px auto 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 30px rgba(40, 60, 120, 0.12), 0 1px 2px rgba(29, 34, 56, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.brand__mark { border-radius: 9px; box-shadow: var(--shadow-sm); }
.brand__name { font-size: 1.18rem; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 30px; margin-left: auto; font-size: 0.95rem; font-weight: 500; color: var(--ink-2); }
.nav__links a { transition: color 0.2s; }
.nav__links a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 11px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}
.btn--ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.nav__cta { margin-left: 0; }
@media (max-width: 760px) { .nav__links { display: none; } .nav__cta { margin-left: auto; } }

/* ---- App Store badge ---- */
.appstore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--navy);
  color: #fff;
  padding: 11px 22px 11px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.appstore:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.appstore svg { flex: none; }
.appstore__txt { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore__txt small { font-size: 0.68rem; opacity: 0.82; font-weight: 500; letter-spacing: 0.01em; }
.appstore__txt strong { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.appstore--light { background: #fff; color: var(--navy); }

/* ---- hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(36px, 6vw, 80px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: clamp(40px, 7vw, 90px);
  padding-bottom: clamp(60px, 8vw, 110px);
}
.hero__title { font-size: clamp(2.6rem, 6vw, 4.3rem); letter-spacing: -0.025em; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo);
  background: linear-gradient(135deg, rgba(126, 212, 244, 0.20), rgba(88, 86, 214, 0.16));
  border: 1px solid rgba(94, 126, 240, 0.25);
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero__badge-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(94, 126, 240, 0.18);
}
.hero__lede {
  margin-top: 26px;
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  color: var(--ink-2);
  max-width: 30ch;
}
.hero__actions { margin-top: 38px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero__note { font-size: 0.9rem; color: var(--ink-2); font-weight: 500; }

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: clamp(28px, 6vw, 60px);
  }
  .hero__lede { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__visual { margin-top: 12px; }
}
@media (max-width: 720px) {
  .hero__visual { display: none; }
  .hero { padding-bottom: clamp(40px, 9vw, 70px); }
}

/* ---- phone mockup ---- */
.hero__visual { position: relative; display: flex; justify-content: center; }
.orbit {
  position: absolute;
  width: 118%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--grad-brand);
  filter: blur(8px);
  opacity: 0.22;
  z-index: 0;
  animation: float 9s ease-in-out infinite;
}
.phone {
  position: relative;
  z-index: 1;
  width: min(320px, 78vw);
  aspect-ratio: 320 / 660;
  background: #0f1222;
  border-radius: 46px;
  padding: 13px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.06) inset;
  animation: float 9s ease-in-out infinite;
}
.phone__notch {
  position: absolute;
  top: 13px; left: 50%; transform: translateX(-50%);
  width: 38%; height: 26px;
  background: #0f1222;
  border-radius: 0 0 16px 16px;
  z-index: 3;
}
.phone__screen {
  height: 100%;
  border-radius: 34px;
  background: linear-gradient(180deg, #f7faff, #eef3fc);
  padding: 26px 18px 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.appbar { display: flex; align-items: center; justify-content: space-between; }
.appbar__title { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.sphere {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad-sphere);
  box-shadow: 0 3px 10px rgba(88,86,214,0.4);
}
.sphere--lg { width: 64px; height: 64px; margin: 0 auto 6px; }

.total {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.total__label { font-size: 0.78rem; color: var(--ink-2); font-weight: 600; }
.total__value { font-family: "Fraunces", serif; font-size: 2.1rem; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0; }
.total__sub { font-size: 0.78rem; color: var(--ink-2); }

.alert {
  display: flex;
  gap: 11px;
  align-items: center;
  background: linear-gradient(120deg, rgba(94,126,240,0.12), rgba(126,212,244,0.12));
  border: 1px solid rgba(94,126,240,0.25);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.alert strong { display: block; font-size: 0.82rem; }
.alert span { font-size: 0.75rem; color: var(--ink-2); }
.alert__dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(94,126,240,0.18);
}

.subs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sub {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 11px;
  align-items: center;
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
}
.sub:last-child { border-bottom: none; }
.sub__icon { grid-row: 1 / 3; width: 26px; height: 26px; border-radius: 8px; overflow: hidden; background: var(--c, var(--blue)); }
.sub__icon svg { display: block; width: 100%; height: 100%; }
.sub__name { font-size: 0.85rem; font-weight: 600; }
.sub__meta { font-size: 0.7rem; color: var(--ink-2); }
.sub__price { grid-row: 1 / 3; font-size: 0.85rem; font-weight: 700; }

/* ---- trust / security ---- */
.trust { max-width: var(--maxw); margin: 0 auto; }
.trust__inner {
  background: var(--navy);
  color: #eaecf6;
  border-radius: var(--r-lg);
  padding: clamp(34px, 5vw, 60px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.trust__inner::after {
  content: "";
  position: absolute;
  width: 380px; height: 380px;
  right: -120px; top: -120px;
  background: var(--grad-brand);
  filter: blur(60px);
  opacity: 0.35;
}
.trust__lead h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); position: relative; }
.trust__lead p { margin-top: 16px; color: #b8bdd6; position: relative; }
.trust__points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; position: relative; }
.trust__points li { display: flex; gap: 15px; align-items: flex-start; }
.trust__points .ic {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.07);
  color: var(--cyan);
}
.trust__points strong { display: block; font-size: 0.98rem; color: #fff; }
.trust__points span { font-size: 0.86rem; color: #aeb4d0; }
@media (max-width: 820px) { .trust__inner { grid-template-columns: 1fr; } }

/* ---- how it works ---- */
.steps { list-style: none; margin: 0 auto; padding: 0; max-width: var(--maxw); display: flex; flex-direction: column; gap: clamp(24px, 4vw, 44px); }
.step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(26px, 4vw, 44px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step:nth-child(even) { background: linear-gradient(120deg, #fff, var(--bg-2)); }
.step__num {
  font-family: "Fraunces", serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 500;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.step__body h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.step__body p { margin-top: 10px; color: var(--ink-2); max-width: 52ch; }
.step__art { width: 96px; height: 96px; border-radius: 24px; flex: none; box-shadow: var(--shadow-sm); display: grid; place-items: center; }
.step__art svg { width: 58px; height: 58px; }
.step__art--connect { background: linear-gradient(135deg, var(--cyan), var(--sky)); }
.step__art--find    { background: linear-gradient(135deg, var(--sky), var(--indigo)); }
.step__art--control { background: linear-gradient(135deg, var(--indigo), var(--violet)); }
@media (max-width: 720px) {
  .step { grid-template-columns: auto 1fr; }
  .step__art { display: none; }
}

/* ---- features ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.4vw, 24px);
  max-width: var(--maxw);
  margin: 0 auto;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(26px, 3vw, 38px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card--wide { grid-column: span 1; }
.card__glyph {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(126,212,244,0.18), rgba(88,86,214,0.16));
  color: var(--indigo);
  margin-bottom: 20px;
}
.card h3 { font-size: 1.32rem; }
.card p { margin-top: 10px; color: var(--ink-2); }
@media (min-width: 880px) {
  .feature-grid { grid-template-columns: repeat(6, 1fr); }
  .card { grid-column: span 2; }
  .card--wide { grid-column: span 3; }
}
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---- final CTA ---- */
.cta { max-width: var(--maxw); margin: 0 auto; }
.cta__card {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(150deg, #ffffff, var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(48px, 7vw, 88px) clamp(24px, 5vw, 48px);
  box-shadow: var(--shadow-md);
}
.cta__card::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(500px 320px at 50% -20%, rgba(94,126,240,0.16), transparent 70%);
  pointer-events: none;
}
.cta__card h2 { font-size: clamp(2rem, 4.4vw, 3rem); position: relative; }
.cta__card p { margin: 16px auto 32px; max-width: 44ch; color: var(--ink-2); position: relative; }
.cta__card .appstore { position: relative; }
.cta__card .appstore--light { box-shadow: var(--shadow-md); border: 1px solid var(--line); }

/* ---- footer ---- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 48px) 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
}
.footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.footer__brand img { border-radius: 8px; }
.footer__links { display: flex; gap: 24px; }
.footer__links a:hover { color: var(--ink); }

/* ---- legal pages ---- */
.legal { max-width: 760px; margin: 0 auto; padding-top: clamp(40px, 6vw, 72px); }
.legal__back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem; font-weight: 600; color: var(--indigo);
  margin-bottom: 26px;
}
.legal__back:hover { color: var(--blue); }
.legal h1 { font-size: clamp(2.1rem, 5vw, 3rem); }
.legal__date { margin-top: 10px; color: var(--ink-2); font-weight: 500; }
.legal__intro { margin-top: 22px; font-size: 1.08rem; color: var(--ink-2); }
.legal h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin-top: clamp(36px, 5vw, 52px);
  margin-bottom: 14px;
}
.legal h3 { font-family: "Plus Jakarta Sans", sans-serif; font-size: 1rem; font-weight: 700; margin-top: 22px; color: var(--ink); }
.legal p { margin-top: 14px; color: var(--ink-2); }
.legal ul { margin: 14px 0 0; padding-left: 22px; color: var(--ink-2); }
.legal li { margin-top: 7px; }
.legal a { color: var(--indigo); }
.legal a:hover { color: var(--blue); }

/* ---- reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
