/* dulceo.app — GLASS design system
   Liquid-glass direction: aurora mesh ground, frosted translucent surfaces,
   one glowing signal teal, SF Rounded voice. Zone colors remain reserved for
   ADA-band semantics only. No frameworks, no external fonts. */

:root {
  --ink: #0d3b34;
  --ink-soft: #4c7a70;
  --signal: #0fa48c;
  --signal-deep: #0a7a6a;
  --frost: rgba(255, 255, 255, 0.52);
  --frost-strong: rgba(255, 255, 255, 0.68);
  --frost-edge: rgba(255, 255, 255, 0.78);
  --glass-shadow: 0 16px 40px rgba(13, 59, 52, 0.12);
  --glass-shadow-soft: 0 8px 24px rgba(13, 59, 52, 0.08);
  --zone-normal: #2fa05c;
  --zone-pre: #e39a2e;
  --zone-pre-ink: #8a5a12;
  --zone-diab: #e0684b;
  --zone-diab-ink: #a8442a;
  --radius: 28px;
  --radius-sm: 16px;
  --font-display: "SF Pro Rounded", ui-rounded, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --max: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
/* Aurora ground — fixed layer so the glass has something to refract */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 12% 0%, #bff0e2 0%, transparent 55%),
    radial-gradient(130% 100% at 95% 18%, #bfe0f5 0%, transparent 52%),
    radial-gradient(130% 120% at 55% 110%, #d8f2c8 0%, transparent 55%),
    linear-gradient(180deg, #eefaf4, #e4f2ee);
}

img, video, svg { max-width: 100%; height: auto; }
a { color: var(--signal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---- typography ---- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 0.5em; }
h3 { font-size: 1.12rem; margin-bottom: 0.35em; font-weight: 700; }
p { margin-bottom: 1em; }
.muted { color: var(--ink-soft); }
.overline {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.big-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4rem);
  color: var(--signal);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ---- glass primitives ---- */
.glass, .card, .result, .disclaimer, .hero-card {
  background: var(--frost);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--frost-edge);
  box-shadow: var(--glass-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ---- header / nav: floating glass pill ---- */
.site-header { padding: 18px 0; position: sticky; top: 0; z-index: 60; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--frost-strong);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--frost-edge);
  border-radius: 999px;
  padding: 10px 22px;
  box-shadow: var(--glass-shadow);
  max-width: calc(var(--max) - 48px);
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 27px; height: 27px; display: block; flex: 0 0 27px; }
.nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft); font-family: var(--font-display); font-weight: 600;
  font-size: 0.92rem; padding: 7px 14px; border-radius: 999px;
}
.nav a:hover { color: var(--ink); text-decoration: none; background: rgba(255, 255, 255, 0.5); }
.nav a.active { color: var(--ink); background: rgba(15, 164, 140, 0.16); }
@media (max-width: 720px) {
  .site-header .wrap { flex-direction: column; gap: 6px; border-radius: 26px; padding: 12px 16px; }
  .nav { justify-content: center; }
  .nav a { padding: 6px 11px; font-size: 0.88rem; }
}

/* ---- hero ---- */
.hero { padding: 56px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-grid > * { min-width: 0; } /* grid items must be allowed to shrink */
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 33em; }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  padding: 14px 28px; border-radius: 999px; border: none; cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:focus-visible, .nav a:focus-visible, .seg button:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(180deg, #14b89e, var(--signal-deep));
  color: #f4fbf8;
  box-shadow: 0 10px 26px rgba(15, 164, 140, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-secondary {
  background: var(--frost-strong);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  color: var(--signal-deep);
  border: 1px solid var(--frost-edge);
  box-shadow: var(--glass-shadow-soft);
}

/* ---- cards & sections ---- */
.card { border-radius: var(--radius); padding: 24px; }
a.card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--glass-shadow); text-decoration: none; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.section { padding: 44px 0; }
.section-tight { padding: 28px 0; }

/* hero-card: the deep-glass feature panel (kept name for page compat) */
.hero-card {
  background: linear-gradient(135deg, rgba(15, 164, 140, 0.92), rgba(8, 74, 66, 0.94));
  color: #f4fbf8;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 30px;
  box-shadow: 0 20px 50px rgba(13, 59, 52, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.hero-card .overline { color: rgba(244, 251, 248, 0.75); }
.hero-card .big-number { color: #f4fbf8; }
.hero-card a { color: #f4fbf8; }

/* ---- glowing progress ring (site hero + accents) ---- */
.ringwrap { position: relative; width: 128px; height: 128px; flex: 0 0 128px; }
.ring {
  width: 100%; height: 100%; border-radius: 50%;
  background: conic-gradient(from -90deg, var(--signal-deep) 0%, #35d0a8 11%, rgba(13, 59, 52, 0.1) 11% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 12px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 12px));
  filter: drop-shadow(0 2px 10px rgba(15, 164, 140, 0.5));
}
.ringnum { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ringnum b { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ringnum span { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

/* ---- calculator forms ---- */
.calc { max-width: 640px; }
.calc label { display: block; font-family: var(--font-display); font-weight: 700; font-size: 0.92rem; margin: 16px 0 6px; }
.calc input[type="number"], .calc input[type="date"], .calc select {
  width: 100%;
  font-size: 1.05rem;
  padding: 13px 16px;
  border: 1px solid var(--frost-edge);
  border-radius: var(--radius-sm);
  background: var(--frost-strong);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  color: var(--ink);
  font-family: var(--font-body);
  box-shadow: inset 0 1px 3px rgba(13, 59, 52, 0.06);
}
.calc input:focus, .calc select:focus { outline: 2px solid var(--signal); border-color: var(--signal); }
.seg {
  display: inline-flex;
  background: rgba(13, 59, 52, 0.08);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.seg button {
  border: none; background: transparent; padding: 8px 18px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  color: var(--ink-soft); cursor: pointer;
}
.seg button.on {
  background: var(--frost-strong); color: var(--signal-deep);
  box-shadow: 0 2px 8px rgba(13, 59, 52, 0.15), inset 0 1px 0 rgba(255,255,255,0.8);
}
.result { margin-top: 22px; padding: 24px; border-radius: var(--radius); }
.result[hidden] { display: none; }

/* ---- ADA band visual (zone colors live ONLY here) ---- */
.band { position: relative; height: 14px; border-radius: 7px; display: flex; overflow: visible; margin: 26px 0 8px; }
.band .b-normal { background: var(--zone-normal); border-radius: 7px 0 0 7px; }
.band .b-pre { background: var(--zone-pre); }
.band .b-diab { background: var(--zone-diab); border-radius: 0 7px 7px 0; }
.band-marker {
  position: absolute; top: 50%; width: 17px; height: 17px; border-radius: 50%;
  background: var(--ink); border: 3px solid #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.band-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--ink-soft); }
.zone-chip {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 0.82rem;
  padding: 5px 14px; border-radius: 999px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.zone-chip.normal { background: rgba(47, 160, 92, 0.16); color: #1e7a42; border: 1px solid rgba(47, 160, 92, 0.4); }
.zone-chip.pre { background: rgba(227, 154, 46, 0.18); color: var(--zone-pre-ink); border: 1px solid rgba(227, 154, 46, 0.45); }
.zone-chip.diab { background: rgba(224, 104, 75, 0.16); color: var(--zone-diab-ink); border: 1px solid rgba(224, 104, 75, 0.4); }

/* ---- pricing ---- */
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.price-cards .card.featured { border: 2px solid var(--signal); box-shadow: 0 16px 40px rgba(15, 164, 140, 0.25), inset 0 1px 0 rgba(255,255,255,0.9); }
.badge {
  display: inline-block;
  background: rgba(15, 164, 140, 0.15); color: var(--signal-deep);
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.06em; padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(15, 164, 140, 0.35);
}
.price { font-family: var(--font-display); font-weight: 800; font-size: 2rem; font-variant-numeric: tabular-nums; }
.price small { font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); }

/* ---- video ---- */
.video-frame {
  border-radius: 34px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(13, 59, 52, 0.3);
  border: 1px solid var(--frost-edge);
  background: #0a2e29;
  max-width: 340px; margin: 0 auto;
}
.video-frame video { display: block; width: 100%; }

/* ---- disclaimer & footer ---- */
.disclaimer { border-radius: var(--radius); padding: 18px 22px; font-size: 0.85rem; color: var(--ink-soft); margin-top: 30px; }
.site-footer { margin-top: 56px; padding: 12px 0 44px; font-size: 0.88rem; color: var(--ink-soft); }
.site-footer .wrap {
  background: var(--frost);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--frost-edge);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--glass-shadow-soft);
  max-width: calc(var(--max) - 48px);
}
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.site-footer a { color: var(--ink-soft); font-weight: 600; }
.site-footer a:hover { color: var(--signal-deep); }
.footnote { font-size: 0.8rem; margin-top: 18px; }

/* ---- tables (privacy/sources) ---- */
table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(13, 59, 52, 0.12); vertical-align: top; }
th { font-family: var(--font-display); font-size: 0.85rem; }

/* ---- prose pages get a glass panel ---- */
.prose {
  max-width: 760px;
  background: var(--frost);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--frost-edge);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow-soft);
  padding: 40px 44px;
}
@media (max-width: 640px) { .prose { padding: 28px 22px; } }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { margin: 0 0 1em 1.4em; }
.prose li { margin-bottom: 0.4em; }

/* ---- phone mock (landing hero) ---- */
.phone {
  width: min(360px, 100%);
  border-radius: 54px; padding: 11px; background: #08211d;
  box-shadow: 0 34px 80px rgba(13, 59, 52, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.08);
  margin: 0 auto;
}
.phone .screen {
  border-radius: 43px; overflow: hidden; position: relative; height: 700px;
  background:
    radial-gradient(120% 90% at 15% 8%, #bff0e2 0%, transparent 55%),
    radial-gradient(130% 100% at 92% 22%, #bfe0f5 0%, transparent 50%),
    radial-gradient(120% 120% at 60% 105%, #d8f2c8 0%, transparent 55%),
    linear-gradient(180deg, #eefaf4, #e4f2ee);
  font-family: var(--font-display);
}
.phone .island { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 104px; height: 30px; background: #08211d; border-radius: 18px; z-index: 5; }
.phone .p-status { display: flex; justify-content: space-between; padding: 18px 30px 0; font-weight: 700; font-size: 0.85rem; }
.phone .p-brand { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 18px 0 12px; font-weight: 800; font-size: 1.05rem; }
.phone .p-brand svg { width: 20px; height: 20px; }
.phone .p-stack { padding: 0 16px; display: flex; flex-direction: column; gap: 13px; }
.phone .p-glass {
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 26px; padding: 18px;
  box-shadow: 0 12px 30px rgba(13, 59, 52, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.phone .p-hero { display: flex; gap: 16px; align-items: center; }
.phone .p-hero .ringwrap { width: 104px; height: 104px; flex: 0 0 104px; }
.phone .p-hero .ringnum b { font-size: 2.1rem; }
.phone .p-hero .over { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.phone .p-hero h4 { font-size: 1.02rem; font-weight: 800; line-height: 1.25; margin-bottom: 4px; }
.phone .p-hero p { font-size: 0.72rem; color: var(--ink-soft); margin: 0; }
.phone .p-zone { display: inline-block; margin-top: 8px; background: rgba(227, 154, 46, 0.18); border: 1px solid rgba(227, 154, 46, 0.45); color: var(--zone-pre-ink); font-size: 0.62rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.phone .p-row { display: flex; justify-content: space-between; align-items: center; }
.phone .p-row b { font-size: 0.95rem; font-weight: 800; }
.phone .p-row span { font-size: 0.7rem; color: var(--ink-soft); display: block; }
.phone .p-delta { font-size: 1.45rem; font-weight: 800; color: var(--signal); font-variant-numeric: tabular-nums; }
.phone .p-tab {
  position: absolute; left: 18px; right: 18px; bottom: 20px;
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px; padding: 11px 6px;
  box-shadow: 0 10px 26px rgba(13, 59, 52, 0.14);
  font-size: 0.95rem;
}
.phone .p-tab span { opacity: 0.5; }
.phone .p-tab span.on { opacity: 1; background: rgba(15, 164, 140, 0.18); border-radius: 999px; padding: 3px 14px; }

@media (prefers-reduced-motion: no-preference) {
  .hero > .wrap { animation: heroin 0.7s ease both; }
  @keyframes heroin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
