/* ==========================================================================
   Nature Nudge — marketing site
   Palette and type scale mirror the iOS app: deep indigo night, sunrise amber.
   ========================================================================== */

:root {
    /* Dark canvas — the app's night gradient. Identical in both colour schemes;
       the hero, feature band, CTA and footer are always dark. */
    --ink:            #0B0E24;
    --ink-2:          #12163A;

    --on-dark:        #FFFFFF;
    --on-dark-muted:  #C6CBEA;
    --line-dark:      rgba(255, 255, 255, 0.14);
    --card-dark:      rgba(255, 255, 255, 0.055);

    /* Sunrise accent — constant across schemes */
    --amber:          #F59A2E;
    --amber-bright:   #FFB65A;

    /* Surface canvas — every token below flips under prefers-color-scheme: dark.
       "surface" is the lighter of the two alternating bands, "surface-alt" the
       other; in dark mode both are dark, just separable. */
    --surface:            #FBF9F5;
    --surface-alt:        #F2EEE6;
    --card-surface:       #FFFFFF;
    --on-surface:         #14162C;
    --on-surface-muted:   #4C5170;
    --accent-ink:         #8A4A05;   /* amber that clears 4.5:1 on the surface */
    --on-accent:          #FFFFFF;   /* text sitting on an --accent-ink chip */
    --line:               rgba(20, 22, 44, 0.12);
    --shadow-card:        0 2px 4px rgba(20, 22, 44, 0.04),
                          0 12px 32px -12px rgba(20, 22, 44, 0.14);

    /* Geometry */
    --radius-sm:  10px;
    --radius:     18px;
    --radius-lg:  28px;
    --measure:    68ch;
    --gutter:     clamp(1.25rem, 5vw, 3rem);
    --section-y:  clamp(4.5rem, 10vw, 8.5rem);

    --shadow-lift: 0 24px 60px -20px rgba(5, 7, 25, 0.55);
}

@media (prefers-color-scheme: dark) {
    :root {
        --surface:            #171C3D;
        --surface-alt:        #0F1330;
        --card-surface:       rgba(255, 255, 255, 0.055);
        --on-surface:         #FFFFFF;
        --on-surface-muted:   #C6CBEA;
        --accent-ink:         #FFB65A;
        --on-accent:          #1A1204;
        --line:               rgba(255, 255, 255, 0.14);
        --shadow-card:        0 2px 4px rgba(0, 0, 0, 0.28),
                              0 14px 34px -14px rgba(0, 0, 0, 0.55);
    }
}

/* --------------------------------------------------------------- Reset -- */

*, *::before, *::after { box-sizing: border-box; }

html {
    background: var(--ink);
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Helvetica, Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--on-surface);
    background: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "ss01";
}

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

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.022em;
    text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

/* ------------------------------------------------------- Accessibility -- */

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100%;
    z-index: 999;
    padding: 0.75rem 1.25rem;
    background: var(--amber);
    color: #1A1204;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
    outline: 3px solid var(--amber-bright);
    outline-offset: 3px;
    border-radius: 4px;
}
.section--surface :focus-visible,
.section--surface-alt :focus-visible { outline-color: var(--accent-ink); }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ------------------------------------------------------------- Layout -- */

.wrap {
    width: 100%;
    max-width: 1160px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.section--surface { background: var(--surface); color: var(--on-surface); }
.section--surface-alt { background: var(--surface-alt); color: var(--on-surface); }
.section--dark {
    background: var(--ink);
    color: var(--on-dark);
}

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.section--surface .eyebrow,
.section--surface-alt .eyebrow { color: var(--accent-ink); }
.section--dark .eyebrow { color: var(--amber-bright); }

h2 { font-size: clamp(1.95rem, 4.4vw, 3rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.014em; }

.lede {
    margin-top: 1.25rem;
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    line-height: 1.6;
    max-width: var(--measure);
}
.section--surface .lede,
.section--surface-alt .lede { color: var(--on-surface-muted); }
.section--dark .lede { color: var(--on-dark-muted); }
.section-head--center .lede { margin-inline: auto; }

/* ------------------------------------------------------------ Buttons -- */

.badge-link {
    display: inline-block;
    border-radius: 9px;
    transition: transform 0.18s ease, filter 0.18s ease;
}
.badge-link:hover { filter: brightness(1.14); }
.badge-link:hover { transform: translateY(-2px); }
.badge-link img { width: 168px; height: auto; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 650;
    font-size: 1rem;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease,
                transform 0.18s ease;
}
.btn--ghost-dark {
    border-color: var(--line-dark);
    color: var(--on-dark);
}
.btn--ghost-dark:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.32);
}
.btn--solid {
    background: var(--amber);
    color: #1A1204;
}
.btn--solid:hover { background: var(--amber-bright); transform: translateY(-2px); }

/* --------------------------------------------------------------- Nav --- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 9, 28, 0.78);
    backdrop-filter: saturate(125%) blur(16px);
    -webkit-backdrop-filter: saturate(125%) blur(16px);
    border-bottom: 1px solid transparent;
    color: var(--on-dark);
    transition: border-color 0.25s ease, background-color 0.25s ease;
}
.site-header.is-stuck {
    background: rgba(9, 12, 32, 0.92);
    border-bottom-color: var(--line-dark);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 1.0625rem;
    letter-spacing: -0.015em;
    text-decoration: none;
    margin-right: auto;
}
.brand img { width: 30px; height: 30px; border-radius: 7px; }

.nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.875rem;
    border-radius: 999px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--on-dark-muted);
    text-decoration: none;
    transition: color 0.18s ease, background-color 0.18s ease;
}
.nav-list a:hover { color: var(--on-dark); background: rgba(255, 255, 255, 0.08); }

.site-header .badge-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
.site-header .badge-link img { width: 132px; }

@media (max-width: 720px) {
    .nav-list { display: none; }
}

/* Footer links sit flush with the wordmark once the row wraps. */
@media (max-width: 720px) {
    .site-footer nav ul { margin-inline-start: -0.75rem; }
}

@media (max-width: 400px) {
    .site-header .wrap { gap: 0.75rem; }
    .brand { font-size: 1rem; }
    .brand span { white-space: nowrap; }
    .site-header .badge-link img { width: 120px; }
}

/* --------------------------------------------------------------- Hero -- */

.hero {
    position: relative;
    isolation: isolate;
    background: var(--ink);
    color: var(--on-dark);
    overflow: hidden;
    padding-block: clamp(3.5rem, 8vw, 6.5rem) 0;
}

/* Sunrise rising from behind the device: night at the top of the frame, warm
   horizon at the bottom, so the phone reads as lit by it. --dawn-x follows the
   device, which is centred on mobile and right-hand on desktop. */
.hero__sky {
    position: absolute;
    inset: 0;
    z-index: -2;
    --dawn-x: 50%;
    background:
        radial-gradient(128% 58% at var(--dawn-x) 103%,
            rgba(255, 183, 88, 0.50) 0%,
            rgba(246, 140, 42, 0.22) 30%,
            rgba(246, 140, 42, 0.06) 50%,
            rgba(246, 140, 42, 0) 70%),
        linear-gradient(180deg,
            #06081A 0%, #090C22 28%, #0E1236 58%, #161C49 82%, #1C2358 100%);
}
@media (min-width: 940px) { .hero__sky { --dawn-x: 68%; } }

/* Fine grain over the gradient. Without it the large soft ramps band on
   8-bit displays and read flat. */
.hero__grain {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.05;
    mix-blend-mode: overlay;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__grid {
    display: grid;
    gap: clamp(2.5rem, 6vw, 4rem);
    align-items: center;
}
@media (min-width: 940px) {
    .hero__grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: 3.5rem;
    }
}

.hero__title {
    font-size: clamp(2.5rem, 6.2vw, 4.25rem);
    letter-spacing: -0.035em;
    line-height: 1.03;
}
.hero__title .accent {
    display: block;
    color: var(--amber-bright);
}

.hero__sub {
    margin-top: 1.5rem;
    max-width: 34rem;
    font-size: clamp(1.0625rem, 1.8vw, 1.3125rem);
    line-height: 1.55;
    color: var(--on-dark-muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    margin-top: 2.25rem;
}

/* Secondary action: a quiet link, so the badge is unambiguously the CTA. */
.hero__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 44px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--on-dark);
    text-decoration: none;
}
.hero__link svg { width: 16px; height: 16px; color: var(--amber-bright); }
.hero__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero .badge-link img { width: 164px; }

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1.35rem;
    margin-top: 1.75rem;
    font-size: 0.875rem;
    letter-spacing: 0.005em;
    color: var(--on-dark-muted);
}
.hero__meta li { white-space: nowrap; }

/* Device art */

.device {
    position: relative;
    margin-inline: auto;
    width: min(280px, 72vw);
    padding: 9px;
    border-radius: 44px;
    background: linear-gradient(160deg, #3B4176 0%, #171B41 50%, #2A2F62 100%);
    box-shadow: var(--shadow-lift), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.device img {
    width: 100%;
    border-radius: 36px;
    display: block;
}
.device--lg { width: min(310px, 76vw); }

.hero__device {
    position: relative;
    display: flex;
    justify-content: center;
    padding-bottom: clamp(2rem, 5vw, 3.5rem);
}
.hero__device::before {
    content: "";
    position: absolute;
    inset: 12% -6% -4%;
    background: radial-gradient(50% 50% at 50% 50%, rgba(245, 154, 46, 0.30), rgba(245, 154, 46, 0) 70%);
    filter: blur(10px);
    z-index: -1;
}

.watch {
    position: absolute;
    right: -8%;
    bottom: 16%;
    width: min(132px, 32vw);
    padding: 7px;
    border-radius: 30px;
    background: linear-gradient(160deg, #454A80 0%, #14183C 100%);
    box-shadow: var(--shadow-lift);
}
.watch img { width: 100%; border-radius: 24px; display: block; }
/* iPhone widths: keep the watch fully on screen and clear of the streak pill. */
@media (max-width: 600px) {
    .hero { padding-block: clamp(2.25rem, 7vw, 6.5rem) 0; }
    .hero__sub { margin-top: 1.125rem; }
    .hero__actions { margin-top: 1.75rem; gap: 0.75rem; }
    .hero__meta { margin-top: 1.5rem; gap: 0.625rem 1.25rem; }
    .hero__device { padding-bottom: 2rem; }
    .device--lg { width: min(272px, 70vw); }
    .watch { right: 0; bottom: 7%; width: min(88px, 24vw); }
}

/* --------------------------------------------------------- How it works */

.steps {
    display: grid;
    gap: clamp(2rem, 4vw, 2.5rem);
    counter-reset: step;
}
@media (min-width: 800px) {
    .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.step {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step__shot {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--ink-2);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
}
.step__shot img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% var(--shot-y, 40%);   /* measured content centre */
}

.step__n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-ink);
    color: var(--on-accent);
    font-size: 0.9375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.step h3 { margin-top: 0.875rem; }
.step p { margin-top: 0.5rem; color: var(--on-surface-muted); }

/* ----------------------------------------------------------- Features -- */

.features {
    display: grid;
    gap: 1.25rem;
}
@media (min-width: 660px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }

.feature {
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--card-dark);
    border: 1px solid var(--line-dark);
}
.feature__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    background: rgba(245, 154, 46, 0.16);
    color: var(--amber-bright);
}
.feature__icon svg { width: 22px; height: 22px; }
.feature p { margin-top: 0.625rem; color: var(--on-dark-muted); font-size: 0.9875rem; }

/* -------------------------------------------------------------- Split -- */

.split {
    display: grid;
    gap: clamp(2.5rem, 6vw, 4.5rem);
    align-items: center;
}
@media (min-width: 900px) {
    .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split--flip .split__media { order: -1; }
}

.split__body h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }

.checklist { margin-top: 1.75rem; display: grid; gap: 0.875rem; }
.checklist li {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 0.75rem;
    align-items: start;
    line-height: 1.55;
}
.checklist svg { width: 22px; height: 22px; margin-top: 2px; }
.section--dark .checklist svg { color: var(--amber-bright); }
.section--surface .checklist svg,
.section--surface-alt .checklist svg { color: var(--accent-ink); }
.section--dark .checklist li { color: var(--on-dark-muted); }
.section--surface .checklist li,
.section--surface-alt .checklist li { color: var(--on-surface-muted); }
.checklist strong { color: inherit; }
.section--dark .checklist strong { color: var(--on-dark); }
.section--surface .checklist strong,
.section--surface-alt .checklist strong { color: var(--on-surface); }

/* ------------------------------------------------------------ Pricing -- */

.plans {
    display: grid;
    gap: 1.25rem;
    max-width: 62rem;
    margin-inline: auto;
}
@media (min-width: 760px) { .plans { grid-template-columns: repeat(3, 1fr); } }

.plans--two { max-width: 46rem; }
@media (min-width: 760px) { .plans--two { grid-template-columns: repeat(2, 1fr); } }

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.75rem;
    border-radius: var(--radius);
    background: var(--card-surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
}
.plan--featured { border-color: var(--accent-ink); border-width: 2px; }

.plan__tag {
    position: absolute;
    top: -0.75rem;
    left: 1.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-ink);
    color: var(--on-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.plan p { margin-top: 0.75rem; color: var(--on-surface-muted); font-size: 0.9875rem; }

.plan p.plan__price {
    margin-top: 0.625rem;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--on-surface);
}
.plan p.plan__price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--on-surface-muted);
    letter-spacing: 0;
}

/* ---------------------------------------------------------------- FAQ -- */

.faq { max-width: 48rem; margin-inline: auto; }

.faq details {
    border-bottom: 1px solid var(--line);
}
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.375rem 0;
    font-weight: 650;
    font-size: 1.0625rem;
    cursor: pointer;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    flex: none;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--accent-ink);
    border-bottom: 2px solid var(--accent-ink);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details p { padding-bottom: 1.5rem; color: var(--on-surface-muted); max-width: 60ch; }

/* ---------------------------------------------------------------- CTA -- */

.cta {
    position: relative;
    isolation: isolate;
    text-align: center;
    background: var(--ink);
    color: var(--on-dark);
    overflow: hidden;
}
.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(90% 120% at 50% 100%, rgba(245, 154, 46, 0.24) 0%, rgba(245, 154, 46, 0) 62%);
}
.cta h2 { font-size: clamp(2rem, 5vw, 3.25rem); }
.cta .lede { margin-inline: auto; }
.cta__actions {
    display: flex;
    justify-content: center;
    margin-top: 2.25rem;
}
.cta .badge-link img { width: 176px; }
.cta__fine {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--on-dark-muted);
}

/* ------------------------------------------------------------- Footer -- */

.site-footer {
    background: #070917;
    color: var(--on-dark-muted);
    padding-block: 3.5rem 2.5rem;
    font-size: 0.9375rem;
}
.site-footer__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.site-footer .brand { color: var(--on-dark); margin-right: 0; }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.site-footer nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--on-dark-muted);
}
.site-footer nav a:hover { color: var(--on-dark); text-decoration: underline; }
.site-footer__base {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: space-between;
    padding-top: 1.75rem;
    font-size: 0.875rem;
}

/* -------------------------------------------------------------- Prose -- */

.prose {
    max-width: 44rem;
    margin-inline: auto;
}
.prose h1 {
    font-size: clamp(2.1rem, 5vw, 2.9rem);
    margin-bottom: 0.625rem;
}
.prose h2 {
    font-size: 1.375rem;
    margin-top: 2.75rem;
    margin-bottom: 0.75rem;
}
.prose p { margin-bottom: 1.125rem; color: var(--on-surface-muted); }
.prose a { color: var(--accent-ink); text-underline-offset: 3px; }
.prose > p:first-of-type {
    margin-bottom: 2.25rem;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--accent-ink);
    text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

.prose__end {
    margin-top: 3rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
    font-weight: 650;
    color: var(--on-surface);
}

/* ------------------------------------------------------------ Reveals -- */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

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

/* --------------------------------------------------- Forced colors ---- */

@media (forced-colors: active) {
    .feature, .plan, .step__shot, .device, .watch { border: 1px solid CanvasText; }
    .faq summary::after { border-color: CanvasText; }
}
