/* ============================================================
   Happy by Sonangol — landing page
   Motion follows Emil Kowalski's design-engineering principles:
   - custom easing curves (built-in easings lack punch)
   - animate transform/opacity only (GPU, skips layout+paint)
   - scale(0.97) press feedback on every pressable element
   - never scale from 0; pair scale with opacity
   - reveals are ease-out, staggered 60ms; reduced-motion respected
   ============================================================ */

:root {
    --ink: #030519;
    --paper: #ffffff;
    --paper-2: #f5f5f4; /* alternating section bg, matches the mock */
    --accent: #fdce08;
    --accent-press: #ecc007;
    --line: rgba(3, 5, 25, 0.08);
    --muted: rgba(3, 5, 25, 0.56);

    --r-sm: 14px;
    --r-md: 22px;
    --r-lg: 32px;
    --r-pill: 999px;

    --shadow-card: 0 1px 2px rgba(3, 5, 25, 0.04), 0 18px 40px -22px rgba(3, 5, 25, 0.22);
    --shadow-float: 0 2px 6px rgba(3, 5, 25, 0.05), 0 28px 60px -28px rgba(3, 5, 25, 0.35);

    /* Strong custom curves — the built-in CSS easings are too weak. */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    /* A foot planting: travels fast, then a tiny overshoot settle
       (peaks ~1.03). Subtle bounce, never springy. */
    --ease-step: cubic-bezier(0.22, 1.12, 0.36, 1);

    --maxw: 1180px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Alan Sans", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 {
    font-family: "Alan Sans", system-ui, sans-serif;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 700;
}

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

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

ol, ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: fixed;
    top: -60px;
    left: 16px;
    z-index: 100;
    background: var(--ink);
    color: var(--paper);
    padding: 10px 16px;
    border-radius: var(--r-sm);
    transition: top 180ms var(--ease-out);
}

.skip-link:focus {
    top: 16px;
}

/* ───────── Buttons — must feel responsive on press ───────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 600 15px/1 "Alan Sans", sans-serif;
    padding: 15px 26px;
    border-radius: var(--r-pill);
    cursor: pointer;
    border: 1px solid transparent;
    user-select: none;
    /* Specify exact properties — never transition: all */
    transition: transform 160ms var(--ease-out),
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.btn:active {
    transform: scale(0.97);
}

/* instant "I heard you" */

.btn--primary {
    background: var(--accent);
    color: var(--ink);
    /* Flat, like the design — no coloured glow. */
}

/* Pressed colour set on :active (not just :hover) so touch gets it too,
   and so the colour stays stable through the press. */
.btn--primary:active {
    background: var(--accent-press);
}

.btn--ghost {
    /* Filled surface already separates it from the page — a 1px outline
       on top of that is redundant noise next to the primary button.
       Border stays transparent (from .btn) so there's no layout shift. */
    background: var(--paper-2);
    color: var(--ink);
}

.btn--ghost:active {
    background: #ededec;
}

@media (hover: hover) and (pointer: fine) {
    /* :not(:active) — the hover lift yields to the press so the
       scale(0.97) feedback from .btn:active always reads. */
    .btn--primary:hover:not(:active) {
        background: var(--accent-press);
        transform: translateY(-1px);
    }

    .btn--ghost:hover {
        background: #ededec;
    }
}

/* ───────────────────────── Header ───────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.site-header.is-stuck {
    border-color: var(--line);
    box-shadow: 0 8px 30px -24px rgba(3, 5, 25, 0.5);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 76px;
    position: relative; /* anchor for the centred nav */
}

.brand {
    display: flex;
    align-items: center;
    color: var(--ink);
}

/* Inline SVG recoloured via fill:currentColor — crisp and robust,
   no CSS-mask fragility. Ink on the light header (.brand sets the
   colour), accent on the dark footer. */
.brand-logo {
    display: block;
    width: 116px;
    height: auto;
}

.brand-logo--accent {
    color: var(--accent);
}

.footer-brand .brand {
    color: var(--accent);
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); /* truly centred, not just after the brand */
}

.nav-link {
    position: relative;
    font-size: 15px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 160ms ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 200ms var(--ease-out);
}

.nav-link.is-active {
    color: var(--ink);
    font-weight: 600;
}

.nav-link.is-active::after {
    transform: scaleX(1);
}

@media (hover: hover) and (pointer: fine) {
    .nav-link:hover {
        color: var(--ink);
    }

    .nav-link:hover::after {
        transform: scaleX(1);
    }
}

.contact-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    transition: transform 160ms var(--ease-out);
}

.contact-pill:active {
    transform: scale(0.97);
}

.contact-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--r-pill);
    display: grid;
    place-items: center;
    background: var(--paper-2);
    color: var(--ink);
}

.contact-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.contact-text small {
    font-size: 12px;
    color: var(--muted);
}

.contact-text strong {
    font-size: 15px;
    font-family: "Alan Sans", sans-serif;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    /* Filled grey surface (no border) keeps the control visible against
       the header without an outline. */
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--r-sm);
    background: var(--paper-2);
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), background-color 160ms ease;
}

.menu-toggle:active {
    background: #ededec;
}

.menu-toggle:active {
    transform: scale(0.95);
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 200ms var(--ease-out), opacity 160ms ease;
}

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

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

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

/* grid-rows 0fr→1fr animates the open/close instead of a jarring
   instant show/hide (same pattern as the FAQ accordion). */
/* Collapse via max-height (not grid 0fr): the grid trick leaves a
   visible sliver of the first link on iOS/Safari. max-height:0 +
   overflow:hidden truly collapses everywhere. */
.mobile-menu {
    overflow: hidden;
    max-height: 0;
    background: var(--paper);
    transition: max-height 300ms var(--ease-out);
}

/* The mobile menu only exists for the hamburger (≤980px). Above that the
   full nav is shown, so keep this out of the layout entirely. */
@media (min-width: 981px) {
    .mobile-menu {
        display: none;
    }
}

.mobile-menu.is-open {
    max-height: 480px;          /* comfortably taller than the link list */
    border-bottom: 1px solid var(--line);
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 24px 22px;
}

.mobile-link {
    padding: 14px 4px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
    transition: transform 140ms var(--ease-out);
}

.mobile-link:active {
    transform: scale(0.99);
}

.mobile-link--accent {
    color: var(--ink);
    font-weight: 600;
    border-bottom: 0;
}

/* ───────────────────────── Hero ───────────────────────── */
.hero {
    padding: 56px 0 90px;
}

.hero .container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.hero-copy {
    max-width: 720px;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 70px);
    font-weight: 800;
}

.hl {
    background: linear-gradient(180deg, transparent 62%, var(--accent) 62%);
    padding: 0 4px;
}

.hero-sub {
    margin-top: 22px;
    max-width: 560px;
    font-size: 18px;
    color: var(--muted);
}

.hero-sub strong {
    color: var(--ink);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.product-by {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.product-by-label {
    font: 600 11px/1.2 "Alan Sans", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.product-by-logo {
    height: 26px;
    width: auto;
    display: block;
}

/* Image collage */
.hero-media {
    position: relative;
    display: grid;
    grid-template-columns: 2.2fr 1fr; /* main banner is dominant, like the mock */
    grid-template-rows: auto auto;
    gap: 16px;
}

.media {
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--paper-2);
}

.media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.03) saturate(1.05); /* full colour — subtle polish only */
}

.media--main {
    grid-row: 1 / 3;
    aspect-ratio: 4 / 2.7;
}

.media--water {
    aspect-ratio: 4 / 3.1;
}

.media--friends {
    aspect-ratio: 4 / 2.2;
}

/* Floating cards — soft, glassy, layered above the photos */
.float-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-float);
    padding: 16px 18px;
}

.float-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font: 600 15px "Alan Sans", sans-serif;
}

.float-card--steps {
    width: 248px;
    top: -28px;
    left: 40%;          /* shifted left so the water bottle stays visible */
}

.sparkline {
    width: 100%;
    height: 46px;
    margin: 12px 0 8px;
}

.sparkline-path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

.float-card-foot {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2px 10px;
}

.float-card-foot strong {
    font: 800 26px/1 "Alan Sans", sans-serif;
}

.float-card-foot strong + span {
    font-size: 12px;
    color: var(--muted);
    margin-left: 5px;
}

.float-card-foot em {
    grid-column: 1;
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
}

.chip-next {
    grid-row: 1 / 3;
    grid-column: 2;
    align-self: center;
    width: 30px;
    height: 30px;
    border-radius: var(--r-pill);
    background: var(--paper-2);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--ink);
    transition: transform 140ms var(--ease-out), background-color 140ms ease;
}

.chip-next:active {
    transform: scale(0.92);
}

.float-card--water {
    width: 186px;
    bottom: 30%;
    left: -34px;
}

.water-head {
    margin-bottom: 12px;
}

.water-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font: 600 14px "Alan Sans", sans-serif;
}

.water-title em {
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
}

.chip-add {
    width: 26px;
    height: 26px;
    border-radius: var(--r-pill);
    background: var(--accent);
    border: 0;
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 140ms var(--ease-out), background-color 140ms ease;
}

.chip-add:active {
    transform: scale(0.9);
}

@media (hover: hover) and (pointer: fine) {
    .chip-add:hover {
        background: var(--accent-press);
    }
}

.glass {
    height: 88px;
    width: 50px;
    border-radius: 0 0 1rem 1rem;
    background: var(--paper-2);
    border: 2px solid var(--line);
    overflow: hidden;
    display: flex;
    margin-left: auto;
    margin-right: auto;
    align-items: flex-end;
}

.glass span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #bfe3ff, #79b8ee);
    /* Fill rises from the bottom via clip-path (compositor-only);
       animating `height` would trigger layout + paint. */
    clip-path: inset(calc(100% - var(--fill)) 0 0 0);
    transition: clip-path 500ms var(--ease-out);
}

.water-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 12px;
}

.water-foot small {
    font-size: 11px;
    color: var(--muted);
    display: block;
}

.water-foot strong {
    font: 700 16px "Alan Sans", sans-serif;
}

.water-ratio {
    font: 700 16px "Alan Sans", sans-serif;
    background: var(--ink);
    color: var(--paper);
    padding: 4px 10px;
    border-radius: var(--r-pill);
}

/* ───────── Shared section bits ───────── */
/* Standardised: dark pill with brand-yellow text. Any icon uses
   currentColor, so it follows the text. */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--ink);
    border: 1px solid var(--ink);
    color: var(--accent);
    font: 600 13px "Alan Sans", sans-serif;
    padding: 8px 15px;
    border-radius: var(--r-pill);
}

/* --dark and --accent are kept as aliases so existing markup stays valid;
   both now resolve to the same dark + yellow treatment as the base. */
.badge--dark,
.badge--accent {
    background: var(--ink);
    color: var(--accent);
    border-color: var(--ink);
}

.section-head {
    max-width: 620px;
    margin: 0 auto 50px;
    text-align: center;
}

.section-head--left {
    margin-inline: 0;
    text-align: left;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 44px);
    margin: 16px 0 12px;
}

.section-head p {
    color: var(--muted);
    font-size: 17px;
}

/* ───────── Flagship event ───────── */
.flagship {
    background: var(--paper-2);
    padding: 84px 0;
}

.flagship-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.flagship-copy h2 {
    font-size: clamp(30px, 4.4vw, 52px);
    margin: 18px 0 16px;
}

.flagship-copy p {
    font-size: 18px;
    color: var(--muted);
    max-width: 480px;
}

.flagship-copy strong {
    color: var(--ink);
}

.flagship-cta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.flagship-meta {
    font-size: 14px;
    color: var(--muted);
}

/* ───────── Countdown — rotating gradient ring + pointer spotlight ─────────
   --cd-angle (inherited, so the ::before ring picks it up) is driven from JS
   so the spin speed can EASE on hover instead of jumping like a changed
   animation-duration would. --mx/--my let the spotlight lerp toward the
   cursor via their @property transition. */
@property --cd-angle { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
@property --mx { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --my { syntax: "<percentage>"; inherits: false; initial-value: 26%; }

.countdown {
    position: relative;
    isolation: isolate;            /* keep the z-index:-1 layers inside the card */
    overflow: hidden;
    text-align: center;
    background: radial-gradient(125% 125% at 50% 0%, #16131f 0%, var(--ink) 58%);
    color: var(--paper);
    border-radius: var(--r-lg);
    padding: 38px 30px 34px;
}

/* The signature: a gradient ring masked to a thin border, slowly rotating. */
.countdown::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--cd-angle),
        transparent 0deg,
        rgba(253, 206, 8, 0.12) 40deg,
        var(--accent) 92deg,
        #ff8a3d 132deg,
        rgba(253, 206, 8, 0.12) 184deg,
        transparent 232deg,
        transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
}

/* Pointer-tracked spotlight; the @property transition smooths the trail. */
.cd-glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(360px circle at var(--mx) var(--my),
        rgba(253, 206, 8, 0.20), transparent 60%);
    opacity: 0.5;
    transition: --mx 220ms var(--ease-out), --my 220ms var(--ease-out),
                opacity 320ms ease;
}
@media (hover: hover) and (pointer: fine) {
    .countdown:hover .cd-glow { opacity: 1; }
}

.cd-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.cd-days strong {
    display: block;
    font: 900 clamp(60px, 9vw, 104px)/0.9 "Alan Sans", sans-serif;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #ffe680 0%, var(--accent) 48%, #f0a200 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.cd-days span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.5);
}

.cd-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    padding: 12px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
}

.cd-unit strong {
    font: 800 clamp(28px, 4vw, 40px)/1 "Alan Sans", sans-serif;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.cd-unit span {
    margin-top: 7px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
}

.cd-sep {
    align-self: center;
    font: 800 26px "Alan Sans", sans-serif;
    color: rgba(253, 206, 8, 0.45);
    animation: cd-blink 1.6s ease-in-out infinite;
}
@keyframes cd-blink { 50% { opacity: 0.25; } }

.stat-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 36px 56px;
    margin-top: 56px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    flex: none;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
}

.stat-text {
    display: flex;
    flex-direction: column;
}

.stat strong {
    font: 800 clamp(28px, 4vw, 42px)/1 "Alan Sans", sans-serif;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    margin-top: 5px;
    font-size: 14px;
    color: var(--muted);
}

/* ───────── Feature split (events / phones) ───────── */
.feature-split {
    padding: 96px 0;
}

.feature-split-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

/* App-screens slideshow — "walking" steps.
   The next screen waits as a small peek on the right, then steps
   forward and plants in the main slot with a soft settle. Successive
   steps tilt opposite ways (--tilt flips) so it reads as left foot /
   right foot. Transitions (not keyframes) so a tab click can
   retarget the step mid-motion. */
.phones {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    min-height: 540px;
    overflow: visible;
}

.phone-stage {
    position: relative;
    align-self: center;
    width: 470px;
    height: 504px;
    --tilt: 5deg; /* JS flips the sign every step */
}

.app-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 230px;
    /* Only transform + opacity animate — GPU, skips layout & paint. */
    transition: transform 560ms var(--ease-step), opacity 460ms ease;
    will-change: transform;
    /* 3 elements in a perpetual loop —
                                a justified persistent layer */
}

.app-slide[data-pos="main"] { /* planted, front and centre */
    transform: translate(0, 4px) scale(1) rotate(0deg);
    opacity: 1;
    z-index: 3;
}

.app-slide[data-pos="peek"] { /* the waiting foot, small & right */
    transform: translate(252px, 52px) scale(0.56) rotate(var(--tilt));
    opacity: 0.5;
    z-index: 2;
}

.app-slide[data-pos="back"] { /* stepped off — forward, up, gone */
    transform: translate(-82px, -8px) scale(1.03) rotate(calc(var(--tilt) * -1));
    opacity: 0;
    z-index: 1;
}

/* Recycle: a slide leaving the hidden back slot snaps into position
   (no transform transition) then fades in — it never sweeps across. */
.app-slide.no-anim {
    transition: opacity 460ms ease;
}

.phone {
    width: 230px;
    border-radius: 24px;
    background: #e9e9e7;
    overflow: hidden; /* one clean clay block — no frame */
    box-shadow: var(--shadow-card);
}

.phone-screen {
    border-radius: inherit;
    overflow: hidden;
    aspect-ratio: 430 / 932;
    background: #e1e1de;
}

.phone-shot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.phone-aside {
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    width: 100%;
    max-width: 360px;
}

/* Tabs name the functionality on screen. The indicator slides between
   them in step with the slideshow — the only nod to "stepping" here,
   kept subtle. */
.phone-tabs {
    position: relative;
    display: flex;
    width: 100%;
    background: var(--paper-2);
    border-radius: var(--r-pill);
    padding: 4px;
}

.phone-tabs-ind {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / 3);
    background: var(--paper);
    border-radius: var(--r-pill);
    box-shadow: 0 1px 2px rgba(3, 5, 25, 0.06), 0 4px 12px -6px rgba(3, 5, 25, 0.18);
    transform: translateX(calc(var(--i, 0) * 100%));
    transition: transform 560ms var(--ease-step);
}

.phone-tab {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    padding: 9px 8px;
    border: 0;
    background: none;
    cursor: pointer;
    font: 600 14px/1 "Alan Sans", sans-serif;
    color: var(--muted);
    transition: color 220ms ease;
}

.phone-tab[aria-selected="true"] {
    color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
    .phone-tab:not([aria-selected="true"]):hover {
        color: rgba(3, 5, 25, 0.78);
    }
}

.phone-caption {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
    max-width: 280px;
    transition: opacity 200ms ease, transform 220ms var(--ease-out);
}

.phone-caption.is-swapping {
    opacity: 0;
    transform: translateY(5px);
}

.feature-split-copy h2 {
    font-size: clamp(28px, 4vw, 44px);
    margin: 18px 0 14px;
}

.feature-split-copy > p {
    color: var(--muted);
    font-size: 17px;
    margin-bottom: 16px;
}

.mini-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 30px;
}

.mini-feature {
    display: flex;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    transition: transform 200ms var(--ease-out), box-shadow 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .mini-feature:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-card);
    }
}

.mf-icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    background: var(--paper-2);
    display: grid;
    place-items: center;
}

.mini-feature h3 {
    font-size: 17px;
    margin-bottom: 4px;
}

.mini-feature p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

/* ───────── Feature grid ───────── */
.features {
    background: var(--paper-2);
    padding: 96px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.f-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 30px 26px;
    transition: transform 220ms var(--ease-out), box-shadow 220ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .f-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-card);
    }
}

.f-card--accent {
    background: var(--accent);
    border-color: var(--accent);
}

.f-card h3 {
    font-size: 19px;
    margin: 18px 0 8px;
}

.f-card p {
    color: var(--muted);
    font-size: 15px;
}

.f-card--accent p {
    color: rgba(3, 5, 25, 0.7);
}

.f-ico {
    width: 50px;
    height: 50px;
    border-radius: var(--r-sm);
    background: var(--paper-2);
    display: block;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.f-card--accent .f-ico {
    background: rgba(3, 5, 25, 0.12);
}

.f-ico::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: var(--ink);
    -webkit-mask: var(--svg) center / 26px no-repeat;
    mask: var(--svg) center / 26px no-repeat;
}

.f-ico[data-ico="steps"] {
    --svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 13c-1.5 2-1 5 1 6s4-1 4-3M16 10c1.5-2 1-5-1-6s-4 1-4 3"/></svg>');
}

.f-ico[data-ico="gps"] {
    --svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 21s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11Z"/><circle cx="12" cy="10" r="2.5"/></svg>');
}

.f-ico[data-ico="map"] {
    --svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 4 3 6v14l6-2 6 2 6-2V4l-6 2-6-2Zm0 0v14m6-12v14"/></svg>');
}

.f-ico[data-ico="trophy"] {
    --svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 4h10v5a5 5 0 0 1-10 0V4ZM5 5H3v2a3 3 0 0 0 3 3M19 5h2v2a3 3 0 0 1-3 3M9 19h6M12 14v5"/></svg>');
}

.f-ico[data-ico="water"] {
    --svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3s6 7 6 11a6 6 0 0 1-12 0c0-4 6-11 6-11Z"/></svg>');
}

.f-ico[data-ico="sos"] {
    --svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2 3 7v6c0 5 4 8 9 9 5-1 9-4 9-9V7l-9-5Zm0 6v4m0 4h.01"/></svg>');
}

/* ───────── How it works ───────── */
.steps-section {
    padding: 96px 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.step {
    border: 1px solid var(--line);
    border-radius: 2rem;
    background: var(--paper);
}

.step-img {
    width: 95%;
    display: block;
    margin-top: .5rem;
    margin-left: auto;
    margin-right: auto;
}

.step-img  img{
    width: 100%;
    object-fit: cover;
}

.step-description {
    padding: 10px 30px 30px;
}

.step-n {
    font: 800 15px "Alan Sans", sans-serif;
    color: var(--ink);
    background: var(--accent);
    padding: 6px 12px;
    border-radius: var(--r-pill);
}

.step h3 {
    font-size: 20px;
    margin: 22px 0 8px;
}

.step p {
    color: var(--muted);
    font-size: 15px;
}

/* ───────── FAQ ───────── */
.faq {
    background: var(--paper-2);
    padding: 96px 0;
}

.faq-inner {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 56px;
    align-items: start;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--paper);
    border-radius: var(--r-md);
    overflow: hidden;
}

.faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    cursor: pointer;
    background: none;
    border: 0;
    text-align: left;
    font: 600 17px "Alan Sans", sans-serif;
    color: var(--ink);
    transition: transform 140ms var(--ease-out);
}

.faq-q:active {
    transform: scale(0.99);
}

.faq-q svg {
    flex: none;
    transition: transform 240ms var(--ease-out);
}

.faq-q[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* grid-rows 0fr→1fr animates open height smoothly without max-height guessing */
.faq-a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 260ms var(--ease-out);
}

.faq-q[aria-expanded="true"] + .faq-a {
    grid-template-rows: 1fr;
}

.faq-a > div {
    overflow: hidden;
}

.faq-a p {
    padding: 0 24px 24px;
    color: var(--muted);
    font-size: 15px;
}

/* ───────── Download CTA ───────── */
.download {
    padding: 96px 0;
}

.download-inner {
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--r-lg);
    padding: 72px 40px;
    text-align: center;
}

.download-inner h2 {
    font-size: clamp(28px, 4vw, 46px);
}

.download-inner p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 18px;
    margin: 14px 0 32px;
}

.store-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    color: var(--ink);
    padding: 14px 24px;
    border-radius: var(--r-pill);
    transition: transform 160ms var(--ease-out), background-color 160ms ease;
}

.store-btn:active {
    transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
    .store-btn:hover {
        transform: scale(0.97);
    }
}

.store-btn span {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.store-btn small {
    font-size: 11px;
    color: var(--muted);
}

.store-btn strong {
    font: 700 16px "Alan Sans", sans-serif;
}

/* ───────── Footer ───────── */
/* ───────── Legal pages (Termos / Privacidade) ───────── */
.legal {
    padding: 56px 0 88px;
}

.legal-head {
    max-width: 760px;
    margin: 0 auto 44px;
}

.legal-head h1 {
    font-size: clamp(32px, 5vw, 46px);
    margin-top: 18px;
}

.legal-updated {
    margin-top: 14px;
    color: var(--muted);
    font-size: 15px;
}

.legal-body {
    max-width: 760px;
    margin: 0 auto;
}

.legal-body h2 {
    font-size: 22px;
    margin: 44px 0 12px;
    letter-spacing: -0.01em;
}

.legal-body > h2:first-child {
    margin-top: 0;
}

.legal-body h3 {
    font-size: 17px;
    margin: 24px 0 8px;
}

.legal-body p {
    margin-bottom: 14px;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(3, 5, 25, 0.78);
}

/* Global reset hides bullets — re-enable them inside legal prose. */
.legal-body ul {
    margin: 0 0 18px;
    padding-left: 22px;
    list-style: disc;
}

.legal-body li {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(3, 5, 25, 0.78);
}

.legal-body strong {
    color: var(--ink);
}

.legal-body a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    transition: text-decoration-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .legal-body a:hover {
        text-decoration-color: var(--accent);
    }
}

.legal-note {
    margin-top: 40px;
    padding: 18px 20px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

.footer-legal {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.45);
    transition: color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .footer-legal a:hover {
        color: var(--accent);
    }
}

.site-footer {
    background: var(--ink);
    color: var(--paper);
    padding: 60px 0 30px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    margin-top: 16px;
}

.footer-love {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.footer-love svg {
    color: var(--accent);
}

.footer-brand .footer-credit {
    margin-top: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.footer-credit a {
    color: inherit;            /* same muted tone as the "by" text */
    text-decoration: none;
    transition: color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .footer-credit a:hover {
        color: var(--accent);
    }
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a, .footer-contact a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 15px;
    transition: color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .footer-nav a:hover, .footer-contact a:hover {
        color: var(--accent);
    }
}

.footer-contact small {
    display: block;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    margin-bottom: 8px;
}

.footer-contact a {
    font: 700 18px "Alan Sans", sans-serif;
}

/* Secondary to the phone — smaller, on its own line. */
.footer-contact .footer-email {
    display: block;
    margin-top: 10px;
    font: 600 14px "Alan Sans", sans-serif;
    word-break: break-word;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

/* ───────── Scroll reveal ─────────
   Base hidden state; .is-in plays it. Never scale from 0 —
   small translateY + opacity reads as "settling into place". */
[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
    /* No persistent will-change: ~45 reveal elements would pin
       compositor layers for the whole page life — wasteful for a
       one-shot transition. */
}

[data-reveal].is-in {
    opacity: 1;
    transform: none;
}

.app-icon-holder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* ───────── Reduced motion: gentler, not zero ─────────
   Keep opacity/comprehension transitions; drop movement & looping. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    [data-reveal] {
        transform: none;
        transition: opacity 300ms ease;
    }

    .sparkline-path {
        stroke-dashoffset: 0 !important;
    }

    /* Slideshow still advances (comprehension), but it's a calm
       crossfade in place — no walking, no peek, no tilt. */
    .app-slide {
        transform: translate(0, 4px) !important;
        transition: opacity 320ms ease;
    }

    .app-slide[data-pos="peek"],
    .app-slide[data-pos="back"] {
        opacity: 0;
        pointer-events: none;
    }

    .phone-tabs-ind {
        transition: none;
    }

    /* jump, don't slide */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ───────── Responsive ───────── */
@media (max-width: 980px) {
    .primary-nav, .contact-pill {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .flagship-inner,
    .feature-split-inner,
    .faq-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .feature-grid, .steps {
        grid-template-columns: 1fr 1fr;
    }

    .stat-strip {
        gap: 28px 44px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .hero-media {
        grid-template-columns: 1fr;
    }

    .media--main {
        grid-row: auto;
        aspect-ratio: 4 / 3;
    }

    .float-card--steps {
        left: auto;
        right: 12px;
        top: -20px;
        width: 220px;
    }

    .float-card--water {
        left: 12px;
        bottom: 12px;
    }

    .feature-grid, .steps {
        grid-template-columns: 1fr;
    }

    /* One full-width card per row — stops the cramped text wrapping. */
    .mini-features {
        grid-template-columns: 1fr;
    }

    /* Full-bleed download CTA: edge to edge, no rounded corners. */
    .download {
        padding: 0;
    }

    .download-inner {
        max-width: none;
        margin: 0;
        border-radius: 0;
        padding: 64px 24px;
    }

    /* Scale the stage, not .phones, so the caption keeps its real size.
       Negative margin reclaims the space scale() leaves behind. */
    .phones {
        gap: 8px;
        min-height: auto;
        overflow: hidden;
    }

    .phone-stage {
        transform: scale(0.78);
        transform-origin: top center;
        margin-bottom: -118px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 36px;
    }

    .phone-stage {
        transform: scale(0.6);
        margin-bottom: -200px;
    }

    .countdown {
        padding: 26px 16px 24px;
    }

    .cd-clock {
        gap: 5px;
    }

    .cd-unit {
        min-width: 60px;
        padding: 10px 6px;
    }

    .stat-strip {
        gap: 22px 36px;
    }
}
