/* Glucose Tracker: Sugar Log — site styles */
:root {
  --teal-900: #1f4a52;
  --teal-800: #2c6470;
  --mint-600: #34c47a;
  --mint-500: #62dc93;
  --mint-100: #d8f6e3;

  --ink-900: #0f1f23;
  --ink-700: #2a3a3f;
  --ink-500: #5e7176;
  --ink-300: #a4b4b7;
  --ink-100: #e6edee;
  --paper: #fbfaf6;
  --paper-2: #f4f1e9;

  --shadow-soft: 0 1px 2px rgba(20,40,45,0.04), 0 8px 24px rgba(20,40,45,0.06);
  --shadow-card: 0 1px 2px rgba(20,40,45,0.05), 0 18px 40px rgba(20,40,45,0.08);
  --shadow-pill: 0 1px 0 rgba(255,255,255,0.4) inset, 0 8px 24px rgba(20,40,45,0.10);
  --shadow-phone: 0 30px 60px rgba(20,40,45,0.18), 0 12px 24px rgba(20,40,45,0.10);
}

[data-palette="mint"] {
  --bg: var(--paper);
  --bg-2: #f4f1e9;
  --bg-3: #ffffff;
  --fg: var(--ink-900);
  --muted: var(--ink-500);
  --line: #e8e4d6;
  --brand: #1f8067;
  --brand-soft: #d8f0e8;
  --brand-ink: #0e3d22;
  --hero-bg: linear-gradient(180deg, #f4f9ee 0%, var(--paper) 70%);
  --orb-1: #cfecd9;
  --orb-2: #f7d7dd;
}
[data-palette="teal"] {
  --bg: #0e2429;
  --bg-2: #14333a;
  --bg-3: #19414a;
  --fg: #f0efe9;
  --muted: #a6c0c4;
  --line: rgba(255,255,255,0.10);
  --brand: var(--mint-500);
  --brand-soft: rgba(98,220,147,0.15);
  --brand-ink: #07221a;
  --hero-bg: radial-gradient(ellipse at 20% 0%, #1f4a52 0%, #0e2429 60%);
  --orb-1: rgba(98,220,147,0.18);
  --orb-2: rgba(232,82,122,0.15);
}
[data-palette="cream"] {
  --bg: #f7f1e6;
  --bg-2: #efe7d4;
  --bg-3: #fbf6ea;
  --fg: #1a1410;
  --muted: #6b5a48;
  --line: #e2d6bf;
  --brand: #c75a3a;
  --brand-soft: #fbe4d9;
  --brand-ink: #3a1206;
  --hero-bg: linear-gradient(180deg, #faf3e3 0%, #f7f1e6 70%);
  --orb-1: #efd9b5;
  --orb-2: #c7e2cf;
}

[data-fonts="editorial"] {
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --display-weight: 500;
  --display-italic: italic;
  --display-tracking: -0.02em;
}
[data-fonts="modern"] {
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Geist", "Inter", system-ui, sans-serif;
  --display-weight: 400;
  --display-italic: normal;
  --display-tracking: -0.025em;
}
[data-fonts="clean"] {
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Bricolage Grotesque", system-ui, sans-serif;
  --display-weight: 600;
  --display-italic: normal;
  --display-tracking: -0.03em;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { max-width: 1440px; margin: 0 auto; padding: 0 clamp(24px, 2.5vw, 40px); }

.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight, 500);
  letter-spacing: var(--display-tracking, -0.02em);
  line-height: 1.0;
}
.display em { font-style: var(--display-italic, italic); font-weight: inherit; }

/* ======= NAV ======= */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 24px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; min-width: 0; }
.nav-brand em { font-family: var(--font-display); font-style: var(--display-italic, italic); font-weight: var(--display-weight, 500); color: var(--brand); margin-left: 2px; }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-links { display: flex; gap: 22px; font-size: 14.5px; color: var(--muted); }
.nav-links a:hover { color: var(--fg); }
.lang-toggle {
  display: inline-flex; background: var(--bg-2); border-radius: 999px; padding: 3px;
  font-size: 13px; font-weight: 600; border: 1px solid var(--line);
}
.lang-toggle button { padding: 6px 12px; border-radius: 999px; color: var(--muted); transition: all 0.15s; }
.lang-toggle button.active { background: var(--fg); color: var(--bg); }

/* ======= HERO ======= */
.hero { position: relative; padding: 28px 0 40px; background: var(--hero-bg); overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.hero::before { width: 460px; height: 460px; background: var(--orb-1); top: -160px; left: -100px; opacity: 0.7; }
.hero::after { width: 380px; height: 380px; background: var(--orb-2); bottom: -160px; right: -80px; opacity: 0.5; }
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-text { min-width: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 12px;
  background: var(--brand-soft); color: var(--brand-ink);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34c47a;
  box-shadow: 0 0 0 4px rgba(52, 196, 122, 0.25);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

.soon-chip .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 25%, transparent);
}

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 4px rgba(52, 196, 122, 0.25); }
  50%  { box-shadow: 0 0 0 8px rgba(52, 196, 122, 0.08); }
  100% { box-shadow: 0 0 0 4px rgba(52, 196, 122, 0.25); }
}

.hero-h1 {
  font-size: clamp(32px, 4.2vw, 50px);
  margin: 16px 0 18px;
  max-width: 14ch;
}
.hero-lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 48ch;
  margin: 0 0 24px;
  line-height: 1.55;
}
.hero-soon { display: flex; align-items: center; gap: 10px; }
.soon-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 10px;
  background: var(--bg-3);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-soft);
}
.soon-chip .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 25%, transparent);
}

/* ======= STORE BADGES (used in CTA block) ======= */
.store-row { display: flex; gap: 12px; flex-wrap: wrap; }
.store-row--onbrand { margin-top: 28px; }

.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 14px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 14px;
  font-family: var(--font-body);
  position: relative;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--shadow-pill);
  min-width: 227px;
}
.store-badge:hover { transform: translateY(-1px); }
.store-row--onbrand .store-badge {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
}
.store-badge svg { flex-shrink: 0; }
.store-badge > div { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge > div span {
  font-size: 10.5px; opacity: 0.7; letter-spacing: 0.02em; text-transform: uppercase; font-weight: 500;
}
.store-badge > div strong {
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-top: 1px;
}
.store-pill {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--brand); color: #fff; padding: 3px 7px; border-radius: 999px; margin-left: 2px;
}

/* ======= IPHONE FRAME — removed, mockups in screenshots ======= */
.phone {
  position: relative;
  flex-shrink: 0;
}
.phone::before { display: none; }
.phone-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 590 / 1280;
}
.phone-screen img {
  width: 100%; height: 100%;
  object-fit: fill;
  display: block;
}
.phone-notch { display: none; }
.phone-island { display: none; }

/* ======= PHONE FRAME SIZES ======= */
.phone-frame { flex-shrink: 0; }
.phone-frame--sm { width: 200px; }
.phone-frame--md { width: 240px; }
.phone-frame--lg { width: 280px; }

/* ======= HERO PHONES ======= */
.hero-phones {
  position: relative;
  height: 440px;
  max-width: 520px;
  display: flex; justify-content: center; align-items: center;
}
.phone-stage { position: absolute; }
.phone-stage--back { left: 2%; top: 10px; z-index: 1; filter: brightness(0.96); }
.phone-stage--front { right: 0%; top: 0; z-index: 2; }

/* ======= FEATURES ======= */
.features { padding: 58px 0 100px; background: var(--bg); position: relative; }
.features::before {
  content: "";
  position: absolute;
  top: -80px; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 0;
}
.section-head { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 56px; max-width: 720px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: var(--display-weight, 500);
  letter-spacing: var(--display-tracking, -0.02em);
  line-height: 1.0;
  margin: 4px 0 0;
}
.section-head h2 em { font-style: var(--display-italic, italic); color: var(--brand); }
.section-head p { color: var(--muted); font-size: 17px; margin: 8px 0 0; max-width: 52ch; }

/* Hero feature card (Reports) */
.feature-card.feature-hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 32px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 48px;
  margin-bottom: 22px;
  align-items: center;
  min-height: 420px;
  overflow: hidden;
  position: relative;
}
.feature-hero-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 42px) !important;
  line-height: 1.05 !important;
}
.feature-hero .feature-text { padding: 0; max-width: 44ch; }
.feature-bullets {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: flex; gap: 18px; flex-wrap: wrap;
}
.feature-bullets li {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--fg);
  font-family: ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: 0.04em;
}
.feature-bullets .bullet-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
}

.feature-hero-visual {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  min-height: 380px;
}

/* Mock PDF report */
.report-mock {
  position: relative;
  width: 100%;
  max-width: 380px;
  perspective: 800px;
}
.report-page {
  position: relative;
  background: #fdfdfb;
  border-radius: 14px;
  padding: 24px 22px 22px;
  box-shadow: 0 30px 60px rgba(20,40,45,0.18), 0 8px 20px rgba(20,40,45,0.10), 0 0 0 1px rgba(20,40,45,0.06);
  transform: rotate(-2deg);
  color: #1a1a1a;
  font-family: var(--font-body);
}
.report-shadow {
  position: absolute; inset: auto -8px -14px 8px;
  height: 30px;
  background: rgba(20,40,45,0.10);
  border-radius: 50%;
  filter: blur(20px);
  z-index: -1;
}
.rp-head { border-bottom: 1px solid #e9e6da; padding-bottom: 12px; margin-bottom: 14px; }
.rp-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.02em; color: #1f4a52; }
.rp-sub { font-size: 11.5px; color: #7d8a8c; font-family: ui-monospace, "JetBrains Mono", monospace; margin-top: 3px; }
.rp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.rp-stat { background: #f4f6f0; border-radius: 8px; padding: 8px 10px; }
.rp-k { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: #1f4a52; line-height: 1; letter-spacing: -0.02em; }
.rp-l { font-size: 9.5px; color: #7d8a8c; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; font-weight: 600; }
.rp-chart { width: 100%; height: 56px; margin-bottom: 12px; }
.rp-rows { display: flex; flex-direction: column; gap: 6px; }
.rp-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 10px;
  font-size: 11.5px;
  padding: 5px 10px;
  background: #f9f8f2;
  border-radius: 6px;
  align-items: center;
}
.rp-row > span:first-child { font-family: ui-monospace, monospace; color: #7d8a8c; }
.rp-row > span:nth-child(2) { color: #2a3a3f; }
.rp-row .rp-val { font-weight: 700; color: #1f4a52; font-family: var(--font-display); font-size: 14px; }

/* 2x2 grid below */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.feature-card:not(.feature-hero) {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0;
  min-height: 360px;
  transition: transform 0.3s, border-color 0.2s, box-shadow 0.2s;
  align-items: center;
}
.feature-card.variant-right { grid-template-columns: 1.1fr 1fr; }
.feature-card.variant-left  { grid-template-columns: 1fr 1.1fr; }
.feature-card.variant-left .feature-text { order: 2; padding: 36px 36px 36px 12px; }
.feature-card.variant-left .feature-shot { order: 1; }

.feature-card:not(.feature-hero):hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow-soft);
}

.feature-card.accent-teal { background: #1a3f47; border-color: rgba(255,255,255,0.06); }
.feature-card.accent-teal .feature-text h3 { color: #f6f4ec; }
.feature-card.accent-teal .feature-text p { color: rgba(246,244,236,0.72); }
.feature-card.accent-teal .feature-tag { color: #62dc93; }
.feature-card.accent-teal .feature-tag::before { background: #62dc93; }
.feature-card.accent-teal .feature-shot { background: transparent; }

.feature-text {
  padding: 36px 12px 36px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.feature-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand);
  font-family: ui-monospace, "JetBrains Mono", monospace;
}
.feature-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: var(--display-weight, 500);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  word-wrap: break-word;
}
.feature-card p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  max-width: 36ch;
}

.feature-shot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  min-height: 100%;
  overflow: hidden;
}
.feature-shot::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, color-mix(in oklab, var(--brand) 14%, transparent) 0%, transparent 60%);
  pointer-events: none;
}
.feature-card.accent-teal .feature-shot::before {
  background: radial-gradient(ellipse at center, rgba(98,220,147,0.18) 0%, transparent 60%);
}

/* ======= CTA ======= */
.cta-block { padding: 80px 0 100px; }
.cta-card {
  background: linear-gradient(135deg, #1f4a52 0%, #2c6470 60%, #1f8067 110%);
  border-radius: 32px;
  padding: 64px;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}
.cta-card::before {
  content: ""; position: absolute;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(98,220,147,0.30), transparent 70%);
  top: -160px; right: -120px;
  border-radius: 50%;
}
.cta-card > * { position: relative; }
.cta-content { min-width: 0; }
.cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: var(--display-weight, 500);
  letter-spacing: -0.02em;
  line-height: 1.0;
  margin: 16px 0 14px;
}
.cta-card h2 em { font-style: var(--display-italic, italic); color: #62dc93; }
.cta-card p { font-size: 16px; opacity: 0.85; margin: 0; max-width: 42ch; }
.cta-icon-wrap { display: flex; justify-content: center; align-items: center; }
.cta-icon {
  width: 180px; height: 180px;
  border-radius: 38px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.30), 0 1px 0 rgba(255,255,255,0.15) inset;
  transform: rotate(-4deg);
}

/* ======= FOOTER ======= */
.footer { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 14px; color: var(--muted); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-title { color: var(--fg); font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; }
.footer-owner { font-size: 13px; color: var(--muted); margin-top: 3px; }
.footer-links { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.footer-link {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--fg);
  font-weight: 500;
  background: var(--bg-3);
  transition: background 0.15s, border-color 0.15s;
}
.footer-link:hover { border-color: var(--brand); color: var(--brand); }
.footer-bottom { padding-top: 22px; font-size: 13px; color: var(--muted); }

/* ======= RESPONSIVE ======= */
@media (max-width: 980px) {
  .hero { padding: 24px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-phones { height: 540px; }
  .features { padding-top: 28px; }

  .feature-card.feature-hero { grid-template-columns: 1fr; padding: 36px; min-height: 0; }
  .feature-hero-visual { min-height: 0; padding: 8px 0 24px; }

  .feature-grid { grid-template-columns: 1fr; }
  .feature-card:not(.feature-hero) { grid-template-columns: 1fr !important; min-height: 0; }
  .feature-card.variant-left .feature-text,
  .feature-card.variant-right .feature-text { order: 1; padding: 32px 28px 8px; }
  .feature-card.variant-left .feature-shot,
  .feature-card.variant-right .feature-shot { order: 2; padding: 16px 24px 32px; }

  .cta-card { grid-template-columns: 1fr; padding: 48px 32px; gap: 28px; }
  .cta-icon { width: 130px; height: 130px; border-radius: 28px; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {

  /* Nav */
  .nav-brand { min-width: 0; }

  /* Hero */
  .hero { padding: 20px 0 36px; }
  .features { padding-top: 20px; }
  .hero-h1 { font-size: clamp(28px, 8vw, 38px); max-width: none; }
  .hero-lead { font-size: 15px; }
  .hero-phones { height: 380px; }
  .phone-stage--back { left: 2%; top: 16px; }
  .phone-stage--front { right: 2%; }

  /* Phone frame sizes */
  .phone-frame--sm { width: 155px; }
  .phone-frame--md { width: 185px; }

  /* Feature cards */
  .feature-card.feature-hero { padding: 24px 20px; }
  .feature-card.variant-left .feature-text,
  .feature-card.variant-right .feature-text { padding: 24px 20px 8px; }
  .feature-card.variant-left .feature-shot,
  .feature-card.variant-right .feature-shot { padding: 12px 20px 24px; }

  /* Store badges */
  .store-badge { min-width: 0; flex: 1 1 auto; }
  .store-row { flex-direction: column; }

  /* CTA */
  .cta-block { padding: 48px 0 64px; }
  .cta-card { padding: 32px 24px; }
  .cta-card h2 { font-size: clamp(24px, 7vw, 32px); }
  .cta-icon { width: 100px; height: 100px; border-radius: 22px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; }

  /* Misc */
  .feature-bullets { gap: 10px; }
  .section-head--center { margin: 0 auto 20px; }
  .section-head--center h2 { margin-bottom: 8px; }
}
@media (max-width: 400px) {
  .hero-phones { height: 320px; }
  .phone-frame--sm { width: 130px; }
  .phone-frame--md { width: 155px; }
  .cta-card { padding: 28px 20px; }
  .feature-card.feature-hero { padding: 20px 16px; }
}

.phone-island {
  position: absolute;
  top: 1.2%;
  left: 50%;
  transform: translateX(-50%);
  width: 29%;
  height: 3.8%;
  background: #000;
  border-radius: 999px;
  z-index: 5;
  pointer-events: none;
}
.section-head--center {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.section-head--center h2 {
  font-size: clamp(32px, 4.2vw, 52px);
  margin: 0 0 16px;
}
.section-head--center p {
  font-size: 18px;
  max-width: 48ch;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .section-head--center { margin: 0 auto 20px; }
  .section-head--center h2 { font-size: clamp(26px, 7.5vw, 36px); margin-bottom: 1px; }
  .section-head--center p { font-size: 15px; }
}
