/* Daily Fluctuations — marketing site
   One stylesheet, no build step. Palette mirrors the app's splash + trend line. */

:root {
  --bg: #fbfcfb;
  --bg-elevated: #ffffff;
  --text: #171a1f;
  --text-secondary: #565c66;
  --text-tertiary: #899099;
  --accent: #1f8a72;        /* trend-line green */
  --accent-2: #37a6a0;      /* teal */
  --accent-ink: #0e5f4e;
  --accent-soft: #e8f4f0;
  --pink: #e0567c;          /* the "support" heart */
  --amber: #e8a13a;
  --border: #e9ebee;
  --border-strong: #dcdfe4;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 8px 24px -8px rgba(16, 40, 34, .18), 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-lg: 0 30px 60px -20px rgba(16, 50, 42, .30), 0 12px 28px -12px rgba(16, 24, 40, .12);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1080px;
  --readw: 720px;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101219;
    --bg-elevated: #191c25;
    --text: #f1f3f6;
    --text-secondary: #aab1bd;
    --text-tertiary: #737a87;
    --accent: #4fc3ab;
    --accent-2: #56c8c2;
    --accent-ink: #9fe6d6;
    --accent-soft: #16261f;
    --pink: #f07a9a;
    --amber: #edb15c;
    --border: #262a35;
    --border-strong: #333846;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow-md: 0 10px 30px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 40px 70px -24px rgba(0,0,0,.7);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  line-height: 1.62;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Decorative background blooms (all pages) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 40% at 82% -8%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%),
    radial-gradient(45% 35% at 6% 4%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(50% 45% at 50% 120%, color-mix(in srgb, var(--pink) 10%, transparent), transparent 70%);
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: var(--readw); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 680; color: var(--text); font-size: 16.5px; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(140deg, var(--accent-2), var(--accent) 55%, var(--accent-ink));
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.25);
  position: relative; overflow: hidden;
}
.brand .mark::after {
  content: ""; position: absolute; left: 14%; right: 14%; bottom: 30%;
  height: 34%;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.9)) no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M2 15 Q10 16 16 10 T30 6 T38 4' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M2 15 Q10 16 16 10 T30 6 T38 4' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: .95;
}
nav.top { display: flex; align-items: center; gap: 4px; }
nav.top a { color: var(--text-secondary); font-size: 15px; padding: 8px 12px; border-radius: 9px; font-weight: 550; }
nav.top a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); text-decoration: none; }
nav.top a.pill { color: #fff; background: var(--accent); padding: 8px 16px; }
nav.top a.pill:hover { background: var(--accent-ink); color:#fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 24px; border-radius: 999px; font-weight: 640; font-size: 16px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: var(--bg-elevated); }
.btn-ghost:hover { border-color: var(--text-tertiary); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 640; letter-spacing: .02em;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -.028em; margin: 0 0 20px; font-weight: 720; }
.hero h1 .grad { background: linear-gradient(120deg, var(--accent-2), var(--accent) 60%, var(--accent-ink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(18px, 2.2vw, 20.5px); color: var(--text-secondary); max-width: 34em; margin: 0 0 32px; }
.cta-row { display: flex; gap: 13px; flex-wrap: wrap; align-items: center; }
.cta-note { margin: 18px 0 0; font-size: 14px; color: var(--text-tertiary); display: flex; align-items: center; gap: 7px; }
.cta-note svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- Phone mockup ---------- */
.phone {
  position: relative; width: 300px; max-width: 100%; margin: 0 auto;
  aspect-ratio: 300 / 610;
  border-radius: 46px;
  background: linear-gradient(160deg, #2a2e38, #14161c);
  padding: 12px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,.06);
}
.phone::after { /* side button */
  content: ""; position: absolute; right: -3px; top: 150px; width: 3px; height: 62px; border-radius: 3px;
  background: linear-gradient(#3a3f4a, #23262e);
}
.phone .screen {
  position: relative; width: 100%; height: 100%; border-radius: 35px; overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
}
.phone .notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 30px; background: #0b0d11; border-radius: 999px; z-index: 3;
}
.phone .screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone.floaty { animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .phone.floaty { animation: none; } }

/* In-mockup rendered dashboard (used in hero when no screenshot) */
.mini {
  position: absolute; inset: 0; padding: 46px 20px 20px; display: flex; flex-direction: column; gap: 14px;
  background:
    radial-gradient(120% 60% at 50% 0%, var(--accent-soft), transparent 60%),
    var(--bg-elevated);
}
.mini .label { font-size: 12px; color: var(--text-tertiary); font-weight: 600; letter-spacing: .02em; }
.mini .weight { font-size: 44px; font-weight: 720; letter-spacing: -.03em; line-height: 1; }
.mini .weight span { font-size: 20px; color: var(--text-tertiary); font-weight: 600; }
.mini .chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 640; color: var(--accent-ink); background: var(--accent-soft); padding: 5px 11px; border-radius: 999px; }
.mini .chart { margin-top: auto; }
.mini .ranges { display: flex; gap: 6px; margin-top: 4px; }
.mini .ranges span { flex: 1; text-align: center; font-size: 11px; font-weight: 600; color: var(--text-tertiary); padding: 6px 0; border-radius: 8px; }
.mini .ranges span.on { background: var(--accent); color: #fff; }

/* ---------- Sections ---------- */
section.block { padding: 76px 0; }
.section-head { max-width: 42rem; margin: 0 auto 44px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.kicker { font-size: 13.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.02em; margin: 0 0 14px; font-weight: 700; line-height: 1.12; }
.section-head p { color: var(--text-secondary); margin: 0; font-size: 18.5px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.feature {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.feature .ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(140deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 16%, transparent));
  color: var(--accent-ink);
}
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 7px; font-size: 18.5px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--text-secondary); font-size: 15.5px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 28px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.step .num {
  counter-increment: step; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 720; font-size: 15px; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); margin-bottom: 14px;
}
.step .num::before { content: counter(step); }
.step h3 { margin: 0 0 6px; font-size: 17.5px; }
.step p { margin: 0; color: var(--text-secondary); font-size: 15px; }

/* Screenshot gallery */
.shots { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; }
.shot { width: 244px; max-width: 68vw; }
.shot .phone { width: 100%; }
.shot .cap { text-align: center; margin: 16px 4px 0; font-size: 14.5px; color: var(--text-secondary); }
.shot .cap strong { color: var(--text); display: block; font-size: 15.5px; margin-bottom: 2px; }
.shots.stagger .shot:nth-child(even) { transform: translateY(26px); }
@media (max-width: 760px) { .shots.stagger .shot:nth-child(even) { transform: none; } }

/* Privacy strip / CTA banner */
.banner {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--accent-ink), var(--accent) 70%, var(--accent-2));
  color: #fff; border-radius: 26px; padding: 52px 48px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.banner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 90% -10%, rgba(255,255,255,.22), transparent 60%); }
.banner > * { position: relative; }
.banner h2 { font-size: clamp(26px, 3.6vw, 34px); margin: 0 0 12px; letter-spacing: -.02em; }
.banner p { margin: 0 auto 26px; font-size: 18px; max-width: 34em; color: rgba(255,255,255,.9); }
.banner .btn-primary { background: #fff; color: var(--accent-ink); }
.banner .btn-primary:hover { background: #f3fbf8; }

.privacy-strip {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 32px; box-shadow: var(--shadow-sm);
}
.privacy-strip .ico { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.privacy-strip .ico svg { width: 26px; height: 26px; }
.privacy-strip p { margin: 0; font-size: 16.5px; color: var(--text-secondary); }
.privacy-strip strong { color: var(--text); }

/* ---------- Long-form doc pages ---------- */
.doc { padding: 64px 0 24px; }
.doc-head { text-align: center; margin-bottom: 44px; }
.doc-head .kicker { margin-bottom: 14px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -.025em; margin: 0 0 8px; font-weight: 720; }
.doc .updated { color: var(--text-tertiary); font-size: 15px; margin: 0; }
.doc .lede { font-size: 19px; color: var(--text-secondary); margin: 0 0 8px; }
.doc h2 { font-size: 23px; margin: 44px 0 10px; letter-spacing: -.015em; font-weight: 660; }
.doc h3 { font-size: 18px; margin: 30px 0 8px; font-weight: 640; }
.doc p, .doc li { color: var(--text-secondary); }
.doc strong { color: var(--text); font-weight: 640; }
.doc ul { padding-left: 22px; }
.doc li { margin: 7px 0; }

.card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 26px; margin: 24px 0; box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.card.accent { border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: linear-gradient(180deg, var(--accent-soft), var(--bg-elevated) 60%); }

/* ---------- Footer ---------- */
footer.site-footer { border-top: 1px solid var(--border); padding: 46px 0; margin-top: 72px; color: var(--text-tertiary); font-size: 14.5px; }
footer.site-footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
footer.site-footer .brand { font-size: 15px; }
footer.site-footer nav a { color: var(--text-secondary); margin-left: 20px; }
footer.site-footer nav a:first-child { margin-left: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .cta-row, .cta-note { justify-content: center; }
  .hero .phone-col { order: -1; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* Collapse the header nav to the essentials so nothing clips; the full set of
     links still lives in the footer. */
  nav.top a:not(.pill):not(.home) { display: none; }
  nav.top a.pill { margin-left: 0; }
  .brand { font-size: 15.5px; }
  .brand .mark { width: 26px; height: 26px; }
  .hero { padding: 48px 0 40px; }
  section.block { padding: 56px 0; }
  .banner { padding: 40px 24px; }
  .privacy-strip { flex-direction: column; }
  footer.site-footer .wrap { flex-direction: column; align-items: flex-start; }
  footer.site-footer nav a { margin: 0 20px 0 0; }
}
