/* ==========================================================================
   Zmew — base styles shared by every page
   Tokens, reset, typography, nav, buttons, footer, icons, motion.
   Page-specific styles live in home.css (landing) and content.css (subpages).
   ========================================================================== */

/* ── TOKENS ─────────────────────────────────────────────────────────────── */
:root {
    color-scheme: light;

    /* Brand — iOS system red, matches the app accent */
    --brand: #FC3925;
    --brand-rgb: 252, 57, 37;

    /* Surfaces & text */
    --fg: #0F172A;
    --fg2: #475569;
    --bg: #FFFFFF;
    --bg2: #F8FAFC;
    --surface: #FFFFFF;
    --border: rgba(15, 23, 42, .08);
    --border-strong: rgba(15, 23, 42, .15);
    --nav-bg: rgba(255, 255, 255, .82);
    --footer-bg: #0F172A;

    /* Buttons */
    --button-bg: #0F172A;
    --button-fg: #FFFFFF;

    /* Effects */
    --card-shadow: 0 4px 24px rgba(var(--brand-rgb), .10), 0 1px 4px rgba(0, 0, 0, .06);

    /* Icon tints (feature cards, floating cards) */
    --tint-amber: #FEF3C7;
    --tint-green: #DCFCE7;
    --tint-violet: #EDE9FE;
    --tint-mint: #D1FAE5;
    --tint-orange: #FFEDD5;
    --tint-red: #FEE2E2;
    --tint-indigo: #E0E7FF;

    /* Layout */
    --gutter: 5%;
    --nav-height: 64px;
    --radius-sm: 14px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-pill: 50px;

    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        --brand: #FF453A;
        --brand-rgb: 255, 69, 58;

        --fg: #F8FAFC;
        --fg2: #CBD5E1;
        --bg: #0F172A;
        --bg2: #1E293B;
        --surface: #1E293B;
        --border: rgba(255, 255, 255, .12);
        --border-strong: rgba(255, 255, 255, .22);
        --nav-bg: rgba(15, 23, 42, .82);
        --footer-bg: #020617;

        --button-bg: #FF453A;
        --button-fg: #FFFFFF;

        --card-shadow: 0 4px 24px rgba(0, 0, 0, .35), 0 1px 4px rgba(0, 0, 0, .2);

        --tint-amber: rgba(251, 191, 36, .16);
        --tint-green: rgba(74, 222, 128, .14);
        --tint-violet: rgba(167, 139, 250, .16);
        --tint-mint: rgba(52, 211, 153, .14);
        --tint-orange: rgba(251, 146, 60, .16);
        --tint-red: rgba(248, 113, 113, .16);
        --tint-indigo: rgba(129, 140, 248, .16);
    }
}

/* ── RESET ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ── ICONS ──────────────────────────────────────────────────────────────── */
/* SF Symbols-style outline icons, referenced from the inline sprite with <use>. */
.icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-solid {
    fill: currentColor;
    stroke: none;
}

/* ── LOGO ───────────────────────────────────────────────────────────────── */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.02em;
    text-decoration: none;
    color: var(--fg);
}

.logo img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

/* ── NAV ────────────────────────────────────────────────────────────────── */
.site-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--gutter);
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a,
.nav-back {
    color: var(--fg2);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: color .2s;
}

.nav-back {
    font-weight: 600;
}

.nav-links a:hover,
.nav-back:hover {
    color: var(--fg);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--button-bg);
    color: var(--button-fg);
    text-decoration: none;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    font-size: .875rem;
    font-weight: 600;
    transition: opacity .2s;
}

.nav-cta:hover {
    opacity: .8;
}

.nav-cta .icon {
    width: 16px;
    height: 16px;
}

/* ── BUTTONS ────────────────────────────────────────────────────────────── */
.btn-appstore {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--button-bg);
    color: var(--button-fg);
    text-decoration: none;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(15, 23, 42, .18);
    transition: transform .2s, box-shadow .2s;
}

.btn-appstore:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(15, 23, 42, .22);
}

.btn-appstore .icon {
    width: 24px;
    height: 24px;
}

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

.btn-appstore .btn-label small {
    font-size: .7rem;
    font-weight: 400;
    opacity: .7;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid var(--border);
    color: var(--fg);
    text-decoration: none;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    background: transparent;
    transition: background .2s, border-color .2s;
}

.btn-secondary:hover {
    background: var(--bg2);
    border-color: var(--border-strong);
}

.btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--button-bg);
    color: var(--button-fg);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: .9rem;
    font-weight: 600;
    transition: opacity .2s;
}

.btn-pill:hover {
    opacity: .85;
}

/* ── SHARED TYPE ────────────────────────────────────────────────────────── */
.eyebrow {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 14px;
}

.pro-tag {
    display: inline-flex;
    align-items: center;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--brand);
    background: rgba(var(--brand-rgb), .1);
    border: 1px solid rgba(var(--brand-rgb), .2);
    border-radius: var(--radius-pill);
    padding: 3px 8px;
    line-height: 1;
}

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--footer-bg);
    color: rgba(255, 255, 255, .5);
    padding: 48px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.site-footer .logo {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.site-footer .logo img {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}

.site-footer p {
    font-size: .8rem;
}

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

.footer-links a {
    color: rgba(255, 255, 255, .5);
    text-decoration: none;
    font-size: .85rem;
    transition: color .2s;
}

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

/* ── SCROLL REVEAL ──────────────────────────────────────────────────────── */
/* Only hidden when JS is running (html.js is set by reveal.js), so content
   is never invisible for users without JavaScript. */
.js .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .6s ease, transform .6s ease;
}

.js .reveal.visible {
    opacity: 1;
    transform: none;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
}

@media (max-width: 600px) {
    :root {
        --gutter: 4%;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
    }
}
