/* ==========================================================================
   Impira design foundations — "One warm world"
   Loaded AFTER each page's inline <style> so shared tokens and components
   win the cascade. Legacy variable names are remapped here so existing
   page CSS resolves to the new palette without per-rule edits.
   Palette: ivory ground, soft-black ink, warm greys, one orange for actions.
   Type: Inter, weights 600/400 (nav 500). Navy is retired.
   ========================================================================== */

:root {
    /* New tokens */
    --ground: #FAF9F7;
    --panel: #FFFFFF;
    --ink: #1D1D1F;
    --ink-2: #6E6E73;
    --ink-3: #98989D;
    --hair: #E4E1DC;
    --hair-2: #D2D2D7;
    --accent: #E85D04;
    --accent-down: #C74F03;
    --band: #1D1D1F;
    --band-text: #F5F5F7;
    --band-sub: #A1A1A6;

    /* Legacy remap — navy and old greys resolve to the new system */
    --primary: #E85D04;
    --primary-light: #F27427;
    --secondary: #1D1D1F;
    --navy-deep: #1D1D1F;
    --orange: #E85D04;
    --orange-dark: #C74F03;
    --text-dark: #1D1D1F;
    --text-medium: #6E6E73;
    --text-light: #98989D;
    --bg-light: #FAF9F7;
    --bg-cream: #FAF9F7;
    --white: #FFFFFF;
    --border: #E4E1DC;
}

/* --------------------------------------------------------------------------
   Base typography — Apple's mechanics: body 17/1.55, tracking -0.012em,
   headlines weight 600 with line-height collapsing as size grows.
   -------------------------------------------------------------------------- */
body {
    background: var(--ground);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    letter-spacing: -0.012em;
    font-feature-settings: "cv05", "cv11";
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-weight: 600;
    color: var(--ink);
    text-wrap: balance;
}

h1 { line-height: 1.04; letter-spacing: -0.015em; }
h2 { line-height: 1.08; letter-spacing: -0.008em; }
h3 { line-height: 1.18; letter-spacing: -0.004em; }

strong, b { font-weight: 600; }

::selection { background: rgba(232, 93, 4, 0.18); }

/* --------------------------------------------------------------------------
   Global nav — thin, translucent, blurred. Links 500, ink. One pill CTA.
   -------------------------------------------------------------------------- */
nav, #navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(250, 249, 247, 0.85);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--hair);
    box-shadow: none;
    padding: 0;
}

.nav-container {
    max-width: 1068px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

nav .logo img, #navbar .logo img { height: 26px; display: block; }

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

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
    transition: color 0.1s ease-out;
    background: none;
    padding: 0;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a.current, .nav-links a.active { color: var(--accent); }

/* The one coloured element in the nav */
.nav-links a.btn, .nav-links .btn-primary, .nav-cta {
    background: var(--accent);
    color: #fff !important;
    border-radius: 980px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    box-shadow: none;
    transform: none;
}
.nav-links a.btn:hover, .nav-links .btn-primary:hover, .nav-cta:hover {
    background: var(--accent-down);
    color: #fff !important;
    transform: none;
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Buttons — pill radius 980px, orange for the primary action only,
   quiet hairline secondary. No gradients, no shadows, no lift transforms.
   -------------------------------------------------------------------------- */
.btn, .btn-primary, .btn-secondary {
    border-radius: 980px;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
    box-shadow: none;
    background-image: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}
.btn-primary:hover {
    background: var(--accent-down);
    border-color: var(--accent-down);
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--hair-2);
}
.btn-secondary:hover {
    background: rgba(29, 29, 31, 0.04);
    border-color: var(--ink-3);
    color: var(--ink);
    transform: none;
    box-shadow: none;
}

/* Secondary buttons that sit on a dark band */
.theme-dark .btn-secondary, .band .btn-secondary {
    color: var(--band-text);
    border-color: rgba(245, 245, 247, 0.35);
}
.theme-dark .btn-secondary:hover, .band .btn-secondary:hover {
    background: rgba(245, 245, 247, 0.08);
    border-color: rgba(245, 245, 247, 0.6);
}

/* --------------------------------------------------------------------------
   Eyebrows — quiet grey, never orange. Orange is for actions.
   -------------------------------------------------------------------------- */
.eyebrow, .section-eyebrow, .section-label, .kicker, .partners-label {
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: none;
}

/* --------------------------------------------------------------------------
   Links in running text
   -------------------------------------------------------------------------- */
a { color: var(--accent-down); }

/* --------------------------------------------------------------------------
   Footer — calm, light, hairline-separated. No dark slab.
   -------------------------------------------------------------------------- */
footer, .footer, .site-footer {
    background: var(--ground);
    color: var(--ink-2);
    border-top: 1px solid var(--hair);
}

footer a, .footer a, .site-footer a {
    color: var(--ink-2);
    text-decoration: none;
    transition: color 0.1s ease-out;
}
footer a:hover, .footer a:hover, .site-footer a:hover { color: var(--ink); }

footer h4, .footer h4, .site-footer h4,
footer .footer-heading, .footer .footer-heading {
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Cards — soft radius, hairline borders, no drop-shadow noise.
   -------------------------------------------------------------------------- */
.card, .tier-card, .metric-card, .svc, .play-card, .faq-item {
    border-color: var(--hair);
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Reveal motion — the only animation outside the film: 400ms fade-up.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.4s cubic-bezier(0, 0, 0.5, 1), transform 0.4s cubic-bezier(0, 0, 0.5, 1);
    }
    .reveal-up.is-visible {
        opacity: 1;
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   Localnav — the per-product sticky bar (Apple's signature pattern).
   Product name left, section anchors + one pill CTA right. Sits below the
   global nav at page top, then covers it on scroll (higher z-index).
   Uses div.ln-links, not a nested <nav>, to dodge the global nav selector.
   -------------------------------------------------------------------------- */
.localnav {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: rgba(250, 249, 247, 0.88);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--hair);
}

.localnav-inner {
    max-width: 1068px;
    margin: 0 auto;
    padding: 0 24px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.localnav .ln-name {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    white-space: nowrap;
}

.ln-links { display: flex; align-items: center; gap: 22px; }

.ln-links a {
    font-size: 13px;
    font-weight: 400;
    color: var(--ink-2);
    text-decoration: none;
    transition: color 0.1s ease-out;
}

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

.ln-links a.ln-cta {
    background: var(--accent);
    color: #fff;
    border-radius: 980px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.ln-links a.ln-cta:hover { background: var(--accent-down); color: #fff; }

@media (max-width: 760px) {
    .ln-links a:not(.ln-cta) { display: none; }
}

/* --------------------------------------------------------------------------
   Mobile: sub-page navs keep the pill CTA even when their links collapse.
   index.html (#navbar) has its own hamburger menu and is excluded.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    nav:not(#navbar) .nav-links { display: flex !important; gap: 12px; }
    nav:not(#navbar) .nav-links a:not(.btn):not(.btn-primary) { display: none; }
}

/* index.html's hamburger menu: the shared .nav-links flex base must not
   force the collapsed menu open. Re-assert the page's own behaviour. */
@media (max-width: 768px) {
    #navbar .nav-links:not(.active) { display: none; }
    #navbar .nav-links.active { display: flex; }
}

/* --------------------------------------------------------------------------
   Mobile tap targets — comfortable tap targets for pills and footer links.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .ln-links a.ln-cta { padding: 9px 16px; font-size: 13px; }
    .nav-links a.btn, .nav-links .btn-primary { padding: 10px 18px; }
    footer a, .footer a { padding: 4px 0; display: inline-block; }
    .localnav-inner { height: 52px; }
}
