/* === Reset & base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Typography */
    --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
    --font-body: 'DM Sans', ui-sans-serif, system-ui, sans-serif;

    /* Color — neutrals tinted faintly toward brand teal */
    --bg: #F6F8F8;
    --surface: #FFFFFF;
    --ink: #0F1A1C;
    --ink-muted: #5A6A6E;
    --ink-faint: #687578;       /* WCAG AA on bg @ small sizes (4.5:1+) */
    --rule: rgba(15, 26, 28, 0.08);

    /* One brand accent. Used as signal, not decoration. */
    --accent: #14B8A6;
    --accent-hover: #0F8F82;

    /* Dark slab (privacy section) */
    --dark: #0F1A1C;
    --dark-ink: rgba(255, 255, 255, 0.78);
    --dark-ink-faint: rgba(255, 255, 255, 0.55);

    /* Geometry — single radius scale, used semantically */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-mockup: 18px;     /* matches iPhone display radius at our render size */
    --max-width: 1160px;
    --gutter: clamp(20px, 4vw, 40px);

    /* Elevation — used sparingly, never as decoration */
    --elev-1: 0 1px 2px rgba(15, 26, 28, 0.05);
    --elev-2: 0 18px 50px rgba(15, 26, 28, 0.18);
}

html {
    scroll-behavior: smooth;
}

/* Anchor-link targets clear the fixed nav so #how / #accuracy / #privacy land below it */
:target,
section[id] {
    scroll-margin-top: 80px;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'ss01', 'cv11';
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* Body italics are just italics; brand-verb treatment is scoped to hero h1 */
em {
    font-style: italic;
}

h1 em {
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* === Type system — display + body, weight-led === */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.05;
    font-weight: 600;
}

h1 {
    font-size: clamp(2.75rem, 7vw, 5rem);
    line-height: 0.96;
    font-weight: 700;
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
}

h3 {
    font-size: clamp(1.4rem, 2.4vw, 1.875rem);
    line-height: 1.15;
    letter-spacing: -0.018em;
}

h4 {
    font-size: 1.0625rem;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.01em;
}

p {
    line-height: 1.6;
}

.lead {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    line-height: 1.55;
    color: var(--ink-muted);
    max-width: 36ch;
}

.section-lead {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    line-height: 1.55;
    color: var(--ink-muted);
    max-width: 52ch;
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
}

.eyebrow-light {
    color: var(--accent);
}

.ink-muted {
    color: var(--ink-muted);
}

/* Tabular figures for any numerals shown */
.tabular {
    font-variant-numeric: tabular-nums;
}

/* Fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    html { scroll-behavior: auto; }
    .fade-in { opacity: 1; transform: none; }
}

/* === Nav === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(246, 248, 248, 0.85);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--rule);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.nav-brand-mark {
    display: block;
    width: 28px;
    height: 28px;
    /* iOS squircle approximation — close to the home-screen icon shape */
    border-radius: 22%;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 28px;
    margin-left: auto;
    margin-right: 0;
}

.nav-links a {
    color: var(--ink-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: var(--ink);
}

/* Tertiary CTA in the nav so the hero's primary stays the only primary in viewport */
.btn-text {
    background: transparent;
    border: none;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    /* 44pt minimum tap target */
    min-height: 44px;
    padding: 12px 8px;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s;
}

.btn-text:hover {
    color: var(--accent);
}

/* === Mobile nav toggle === */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.75px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* === Mobile menu drawer ===
   Critical: `display: flex` is gated on :not([hidden]) so the [hidden] attribute's
   display:none isn't overridden. Without this gating, the menu renders invisibly
   (opacity 0) over the whole viewport and intercepts every pointer event below the nav. */
.mobile-menu {
    position: fixed;
    inset: 64px 0 0;
    z-index: 90;
    background: var(--bg);
    padding: 32px var(--gutter) 40px;
    flex-direction: column;
    gap: 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.mobile-menu:not([hidden]) {
    display: flex;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu nav a {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    /* 44pt tap target */
    min-height: 56px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--rule);
}

.mobile-menu nav a:hover {
    color: var(--accent);
}

.mobile-menu-cta {
    margin-top: 8px;
    width: 100%;
    min-height: 52px;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.08s ease;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    padding: 14px 26px;
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn-lg {
    padding: 17px 34px;
    font-size: 1.05rem;
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Tertiary link — plain inline anchor. No display override, no padding inflation,
   no flex. Hit area is the rendered text only. */
.link-arrow {
    color: var(--ink);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: underline;
    text-decoration-color: rgba(15, 26, 28, 0.45);
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.link-arrow:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.link-arrow-light {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.55);
}

.link-arrow-light:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* === Hero — asymmetric, type-led === */
.hero {
    padding: clamp(120px, 14vw, 180px) 0 clamp(72px, 9vw, 120px);
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: clamp(32px, 6vw, 80px);
}

.hero-text {
    max-width: 560px;
}

.hero-text h1 em {
    /* Display italic in accent on the brand verb */
    font-style: italic;
}

.lead {
    margin-top: 24px;
    max-width: 44ch;
}

.hero-ctas {
    margin-top: 36px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.hero-meta {
    margin-top: 20px;
    color: var(--ink-faint);
    font-size: 0.875rem;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone {
    border-radius: var(--radius-mockup);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--elev-2);
    /* Phones own their height via image aspect ratio */
    line-height: 0;
}

.phone img {
    width: 100%;
    height: auto;
    display: block;
}

.phone-hero {
    width: clamp(240px, 30vw, 320px);
}

/* === Section heads — left-aligned, generous max-width === */
.section-head {
    max-width: 720px;
    margin-bottom: clamp(56px, 7vw, 88px);
}

.section-head .eyebrow {
    margin-bottom: 14px;
}

.section-head h2 {
    margin-bottom: 20px;
}

.section-head-tight {
    margin-bottom: clamp(36px, 4vw, 56px);
}

/* === Ways (replaces pillars + walkthrough) === */
.ways {
    padding: clamp(72px, 9vw, 128px) 0;
}

.way {
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    align-items: center;
    gap: clamp(32px, 6vw, 96px);
    padding: clamp(56px, 7vw, 96px) 0;
    border-top: 1px solid var(--rule);
}

.way:last-child {
    border-bottom: 1px solid var(--rule);
}

.way-reverse {
    grid-template-columns: 0.85fr 1fr;
}

.way-reverse .way-text {
    order: 2;
}

.way-reverse .way-visual {
    order: 1;
}

.way-text {
    max-width: 38ch;
}

.way-text h3 {
    margin-bottom: 16px;
}

.way-text p {
    color: var(--ink-muted);
    font-size: 1.05rem;
}

.way-visual {
    display: flex;
    justify-content: center;
}

.way-visual img {
    width: clamp(220px, 24vw, 320px);
    border-radius: var(--radius-mockup);
    box-shadow: var(--elev-2);
}

/* === Accuracy (the proof section) === */
.accuracy {
    padding: clamp(96px, 12vw, 160px) 0;
    background: var(--surface);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.accuracy-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: clamp(40px, 6vw, 96px);
}

.accuracy-text .eyebrow {
    margin-bottom: 14px;
}

.accuracy-text h2 {
    margin-bottom: 24px;
    max-width: 18ch;
}

.accuracy-text p {
    color: var(--ink-muted);
    font-size: 1.075rem;
    max-width: 48ch;
}

.accuracy-text p + p {
    margin-top: 16px;
}

.accuracy-visual {
    display: flex;
    justify-content: center;
}

.accuracy-visual img {
    width: clamp(220px, 26vw, 340px);
    border-radius: var(--radius-mockup);
    box-shadow: var(--elev-2);
}

/* === Trends — flipped composition === */
.trends {
    padding: clamp(72px, 9vw, 128px) 0;
    /* Hairline between the two adjacent `--bg` sections (fix-it → trends)
       so they read as two beats instead of one flat slab. */
    border-top: 1px solid var(--rule);
}

.trends-inner {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: clamp(40px, 6vw, 96px);
}

.trends-text .eyebrow {
    margin-bottom: 14px;
}

.trends-text h2 {
    margin-bottom: 20px;
    max-width: 18ch;
}

.trends-text p {
    color: var(--ink-muted);
    font-size: 1.075rem;
    max-width: 48ch;
}

.trends-visual {
    display: flex;
    justify-content: center;
}

.trends-visual img {
    width: clamp(220px, 26vw, 340px);
    border-radius: var(--radius-mockup);
    box-shadow: var(--elev-2);
}

/* === Ways footnote (water, etc.) === */
.ways-footnote {
    margin-top: clamp(32px, 4vw, 56px);
    padding-top: clamp(28px, 3vw, 40px);
    border-top: 1px solid var(--rule);
    color: var(--ink-muted);
    font-size: 0.98rem;
    line-height: 1.65;
    max-width: 72ch;
}

/* === Accuracy bridge to the fix-it section === */
/* Uses a compound selector so it wins specificity against
   `.accuracy-text p + p` without needing !important. */
.accuracy-text p.accuracy-bridge {
    margin-top: 22px;
    font-size: 0.95rem;
    font-style: italic;
}

/* === Fix-it (chat-about-this-item) — the killer differentiator === */
.fix-it {
    padding: clamp(96px, 12vw, 160px) 0;
    background: var(--bg);
}


.fix-it-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: clamp(40px, 6vw, 96px);
}

.fix-it-text .eyebrow {
    margin-bottom: 14px;
}

.fix-it-text h2 {
    margin-bottom: 24px;
    max-width: 18ch;
}

.fix-it-text p {
    color: var(--ink-muted);
    font-size: 1.075rem;
    max-width: 52ch;
}

.fix-it-text p + p,
.fix-it-text p + ul {
    margin-top: 16px;
}

.fix-it-text ul + p {
    margin-top: 20px;
}

.fix-it-examples {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    max-width: 56ch;
}

.fix-it-examples li {
    color: var(--ink);
    font-size: 1.0rem;
    line-height: 1.55;
    padding-left: 14px;
    /* Quieter than the original 2px teal — the section's headline and
       eyebrow already carry the accent weight; the examples don't need
       to compete. */
    border-left: 1px solid var(--rule);
}

.fix-it-examples li em {
    color: var(--ink);
}

.fix-it-visual {
    display: flex;
    justify-content: center;
}

.fix-it-visual img {
    width: clamp(220px, 26vw, 340px);
    border-radius: var(--radius-mockup);
    box-shadow: var(--elev-2);
}

/* === Goals & energy — three-card row === */
.goals {
    padding: clamp(72px, 9vw, 128px) 0;
    background: var(--surface);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.goals-inner {
    /* container handles width */
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(28px, 3.5vw, 48px);
    margin-top: clamp(32px, 4vw, 56px);
}

/* Hairline-bordered cards, matching the `.features-list` pattern.
   Without this they read as three loose paragraphs on a white slab. */
.goals-card {
    padding-top: 24px;
    border-top: 1px solid var(--rule);
}

.goals-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.goals-card p {
    color: var(--ink-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

/* === Fasting widget — outside-the-app moment === */
.fasting {
    /* Tighter than the surrounding sections — single-paragraph beat,
       doesn't need full section padding. */
    padding: clamp(48px, 6vw, 80px) 0;
}

.fasting-inner {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: clamp(40px, 6vw, 96px);
}

.fasting-text .eyebrow {
    margin-bottom: 14px;
}

.fasting-text h2 {
    margin-bottom: 20px;
    max-width: 18ch;
}

.fasting-text p {
    color: var(--ink-muted);
    font-size: 1.075rem;
    max-width: 48ch;
}

.fasting-visual {
    display: flex;
    justify-content: center;
    order: -1;
}

.fasting-visual img {
    width: clamp(220px, 26vw, 340px);
    border-radius: var(--radius-mockup);
    box-shadow: var(--elev-2);
}

/* === Privacy — dark slab, kept (was the strongest moment) === */
.privacy {
    padding: clamp(96px, 11vw, 144px) 0;
    background: var(--dark);
    color: #fff;
}

.privacy-inner {
    max-width: 720px;
}

.privacy h2 {
    color: #fff;
    margin: 14px 0 24px;
    max-width: 16ch;
}

.privacy-body {
    color: var(--dark-ink);
    font-size: 1.075rem;
    line-height: 1.65;
    margin-bottom: 28px;
    max-width: 56ch;
}

/* === Also included — flat list, no icons === */
.also-included {
    padding: clamp(72px, 9vw, 120px) 0;
}

.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: clamp(40px, 5vw, 80px);
    row-gap: 0;
}

.features-list li {
    padding: 28px 0;
    border-top: 1px solid var(--rule);
}

.features-list li:nth-child(1),
.features-list li:nth-child(2) {
    border-top: 1px solid var(--rule);
}

.features-list h4 {
    margin-bottom: 6px;
}

.features-list p {
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 42ch;
}

/* === Closing CTA === */
.cta-section {
    padding: clamp(96px, 11vw, 144px) 0;
    background: var(--surface);
    border-top: 1px solid var(--rule);
}

.cta-inner {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.cta-inner h2 {
    margin-bottom: 16px;
}

.cta-lead {
    color: var(--ink-muted);
    font-size: 1.075rem;
    margin-bottom: 28px;
}

.cta-note {
    margin-top: 16px;
    color: var(--ink-faint);
    font-size: 0.85rem;
}

/* === Footer === */
.footer {
    padding: 32px 0 40px;
    background: var(--dark);
    color: var(--dark-ink-faint);
    font-size: 0.85rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-mark {
    font-family: var(--font-display);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--dark-ink-faint);
    transition: color 0.15s;
}

.footer-links a:hover {
    color: #fff;
}

/* === Modal === */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(15, 26, 28, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-backdrop.open {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--elev-2);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-muted);
    /* 44pt tap target */
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    border-radius: var(--radius-xs);
    transition: color 0.15s, background 0.15s;
}

.modal-close:hover {
    color: var(--ink);
    background: var(--rule);
}

.modal h2 {
    font-size: 1.625rem;
    line-height: 1.15;
    margin-bottom: 8px;
}

.modal-desc {
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 28px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
}

.modal-field input {
    padding: 12px 14px;
    border: 1.5px solid var(--rule);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--bg);
    transition: border-color 0.15s, background 0.15s;
    outline: none;
}

.modal-field input:focus-visible {
    border-color: var(--ink);
    background: var(--surface);
}

.modal-submit {
    width: 100%;
    margin-top: 8px;
}

.modal-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.modal-error {
    font-size: 0.875rem;
    color: #B42318;
    display: none;
    margin: -4px 0 0;
}

.modal-error.visible {
    display: block;
}

.modal-success {
    display: none;
    text-align: center;
    padding: 16px 0 8px;
}

.modal-success.visible {
    display: block;
}

.modal-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--ink);
    color: #fff;
    border-radius: 50%;
    margin-bottom: 16px;
}

.modal-success h3 {
    font-size: 1.375rem;
    margin-bottom: 8px;
}

.modal-success p {
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

/* === Focus states (a11y floor) === */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

.btn-primary:focus-visible {
    outline-offset: 3px;
}

/* === Responsive === */
@media (max-width: 960px) {
    .hero-inner,
    .way,
    .way-reverse,
    .accuracy-inner,
    .trends-inner,
    .fix-it-inner,
    .fasting-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .way-reverse .way-text { order: 0; }
    .way-reverse .way-visual { order: 0; }

    .hero-text { max-width: 100%; }
    /* Text first, phone below — keeps the headline in initial viewport on tablet/mobile */
    .hero-visual { order: 1; }

    .phone-hero {
        width: min(70vw, 300px);
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .features-list li:first-child {
        border-top: 1px solid var(--rule);
    }

    .goals-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* On mobile, drop the "outside the app" visual below the text. */
    .fasting-visual { order: 0; }
}

@media (max-width: 760px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    /* Smaller scroll-margin to match the smaller mobile nav */
    section[id] {
        scroll-margin-top: 70px;
    }

    .nav-inner {
        height: 60px;
    }

    .mobile-menu {
        inset: 60px 0 0;
    }

    .hero {
        padding: 96px 0 56px;
    }

    .hero-text h1 {
        /* Slightly punchier on small screens — display font handles it */
        font-size: clamp(2.5rem, 11vw, 3.25rem);
    }

    .lead {
        margin-top: 20px;
    }

    .hero-ctas {
        margin-top: 28px;
        gap: 16px;
    }

    .phone-hero {
        width: min(72vw, 280px);
    }

    .ways {
        padding: 48px 0;
    }

    .way,
    .way-reverse {
        padding: 40px 0;
    }

    .accuracy,
    .trends {
        padding: 64px 0;
    }

    .privacy {
        padding: 64px 0;
    }

    .also-included,
    .cta-section {
        padding: 56px 0;
    }

    .way-visual img,
    .accuracy-visual img,
    .trends-visual img {
        width: min(78vw, 280px);
    }

    .section-head {
        margin-bottom: 32px;
    }

    .section-head h2,
    .accuracy-text h2,
    .trends-text h2,
    .cta-inner h2 {
        max-width: 100%;
    }

    .modal {
        padding: 28px 24px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Prevent any overflow surprises on narrow viewports */
@media (max-width: 480px) {
    html, body {
        overflow-x: hidden;
    }

    .hero-text h1 {
        font-size: clamp(2.25rem, 11vw, 2.75rem);
    }

    .hero-ctas .btn-primary {
        width: 100%;
        justify-content: center;
    }
}
