/* SPIDTECH inner pages — shared design system.
   EliteZone design system (minimal, white, Apple patterns, hairline lists, Apple button
   states, white overlay veil) with Spider red #ED1C29 as the one accent. The global header
   is the home page's own; the local nav, rhythm and motion follow apple.com.
   Layout: 1200 px column, 144/120/112 px between sections, title 34/28/20 px from content. */

:root {
    /* accent — Spider red */
    --red: #ED1C29;
    --red-h: #F91D2B;          /* hover: lighter (×1.05), Apple / EliteZone rule */
    --red-a: #E61B28;          /* press: darker (×.97) */
    --red-ink: #D41926;        /* red text and links (≥4.5:1 on white and #f5f5f7) */
    --red-t: #FDE8EA;          /* red tint */

    /* EliteZone neutrals */
    --g100: #F8F9FA;
    --g200: #E9ECEF;
    --g300: #DEE2E6;
    --g400: #CED4DA;
    --g500: #ADB5BD;
    --g600: #6C757D;
    --g700: #495057;
    --g800: #343A40;
    --g900: #212529;

    /* surfaces, as on apple.com/apple-news (user, 2026-10-15): a white page, Apple's light grey
       for the cards on it */
    --page: #ffffff;
    --card: #f5f5f7;
    --media: #e8eaed;          /* the home «Take a closer look» card; the product images sit on it */

    --ease: cubic-bezier(.45, 0, .55, 1);        /* Apple ease-in-out (power2.inOut) */
    --ease-out: cubic-bezier(.16, 1, .3, 1);     /* expo-out, overlay panel */

    --lnav-h: 52px;            /* the local nav (css/localnav.css) */
    --col: 75rem;
    --gutter: 24px;
    --section-space: 64px;       /* between sections, at every width (user, 2026-10-19) */
    --title-gap: 32px;           /* title baseline → its content, at every width (Figma «17-section», user 2026-10-19) */
    --after-button: 20px;        /* a button → the link or line under it (user, 2026-10-24: «a standard gap, everywhere») */
    --radius-card: 28px;
    --radius-big: 32px;
    --shadow-dlg: 0 0 0 1px rgb(33 37 41 / .06), 0 2px 6px rgb(0 0 0 / .04), 0 24px 64px rgb(0 0 0 / .16);
}

@media (max-width: 734px) {
    :root {
        --lnav-h: 48px;
        --gutter: 20px;
        --radius-card: 24px;
        --radius-big: 24px;
    }
}

html {
    background: var(--page);
}

body.inner {
    margin: 0;
    background: var(--page);
    color: var(--g900);
    font-family: Montserrat, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    letter-spacing: .005em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

.inner button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.inner :focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
    border-radius: 6px;
}

.wrap {
    width: min(var(--col), 100% - 2 * var(--gutter));
    margin-inline: auto;
}

/* ---------- local nav: css/localnav.css (the apple.com/apple-news bar, shared with the home page) ---------- */

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--red);
    color: #fff !important;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .005em;
    white-space: nowrap;
    transition: background-color .25s var(--ease), transform .25s var(--ease);
}

.btn:hover {
    background: var(--red-h);
}

.btn:active {
    background: var(--red-a);
    transform: scale(.98);
}

.btn-s {
    min-height: 32px;
    padding: 0 15px;
    font-size: 14px;
}

.link {
    display: inline-flex;
    align-items: center;
    gap: .25em;
    color: var(--info, #0066CC) !important;   /* level 4: information (user, 2026-10-25) */
    font-weight: 400;
}

.link::after {
    content: "";
    width: .5em;
    height: .5em;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg) translate(-1px, 1px);
    transition: transform .25s var(--ease);
}

.link:hover {
    text-decoration: underline;
    text-underline-offset: .2em;
}

.link:hover::after {
    transform: rotate(45deg) translate(1px, -1px);
}

.link.ext::after {
    content: "\2197";
    width: auto;
    height: auto;
    border: 0;
    transform: none;
}

/* ---------- type ---------- */
.eyebrow {
    margin: 0;
    color: var(--red-ink);
    font-size: 17px;
    font-weight: 600;
}

.h1 {
    margin: 0;
    font-size: clamp(2.75rem, 5.6vw, 5rem);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -.005em;
    text-wrap: balance;
}

.h2 {
    margin: 0;
    font-size: clamp(2rem, 3.4vw, 3rem);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: .005em;
    text-wrap: balance;
}

/* Section titles are measured from their letters, as in Figma «17-section» (user, 2026-10-19):
   trimmed to the capitals' top and the baseline, so --section-space reaches the capitals and
   --title-gap starts at the baseline. Only the sides that face a section or content are trimmed:
   an eyebrow line above (p + .h2) and a lead line or link below (.h2:has(+ p, + a)) keep their own spacing.
   Without text-box trimming: Montserrat's metrics (ascent .97, descent .25, capitals .70) at
   line-height 1.12 → .22em above, .20em below. */
.h2 {
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
}

p + .h2 {
    text-box-trim: trim-end;
}

.h2:has(+ p, + a) {
    text-box-trim: trim-start;
}

p + .h2:has(+ p, + a) {
    text-box-trim: none;
}

@supports not (text-box: trim-both cap alphabetic) {
    .h2::before,
    .h2::after {
        content: "";
        display: table;
    }

    .h2::before {
        margin-bottom: -.22em;
    }

    .h2::after {
        margin-top: -.2em;
    }

    p + .h2::before,
    .h2:has(+ p, + a)::after {
        margin: 0;
    }
}

.lead {
    margin: 0;
    color: var(--g700);
    font-size: clamp(1.1875rem, 1.7vw, 1.5rem);
    line-height: 1.5;
    max-width: 34ch;
}

/* a headline's second line in Spider red (About, Our Partners — as on the staging pages) */
.accent {
    color: var(--red);
}

.meta {
    color: var(--g700);
    font-size: 14px;
    letter-spacing: .01em;
}

/* ---------- reveal (Apple: rise 30px .7s, fade .9s, ease-in-out, .175s apart) ---------- */
.rv {
    opacity: 0;
    transform: translateY(30px);
    transition: transform .7s var(--ease), opacity .9s var(--ease);
    transition-delay: calc(var(--i, 0) * .175s);
}

.rv.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .rv {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- round control (Apple control, EliteZone greys) ---------- */
.ctl {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    border: 0;
    border-radius: 50%;
    background: var(--g200);
    color: var(--g700);
    transition: background-color .15s linear, color .15s linear;
}

.ctl:hover {
    background: var(--g300);
    color: var(--g900);
}

.ctl:active {
    background: var(--g400);
}

.ctl svg {
    width: 14px;
    height: 14px;
}

/* ---------- overlay (EliteZone v220/v221: white veil 64 % + blur 4px, expo-out panel) ---------- */
.ovl {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 40px var(--gutter);
    background: rgb(255 255 255 / .64);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ovl[hidden] {
    display: none !important;
}

.ovl.in {
    animation: ovVeil .42s cubic-bezier(.4, 0, .2, 1) backwards;
}

.ovl.in .dlg {
    animation: ovPanel .62s var(--ease-out) .05s backwards;
}

.ovl.in .dlg > * {
    animation: ovItem .5s var(--ease-out) backwards;
}

.ovl.in .dlg > *:nth-child(1) { animation-delay: .12s; }
.ovl.in .dlg > *:nth-child(2) { animation-delay: .165s; }
.ovl.in .dlg > *:nth-child(3) { animation-delay: .21s; }
.ovl.in .dlg > *:nth-child(4) { animation-delay: .255s; }
.ovl.in .dlg > *:nth-child(5) { animation-delay: .3s; }
.ovl.in .dlg > *:nth-child(n+6) { animation-delay: .345s; }

.ovl.out {
    animation: ovOut .28s var(--ease) forwards;
}

@keyframes ovVeil {
    from {
        opacity: 0;
        -webkit-backdrop-filter: blur(0);
        backdrop-filter: blur(0);
    }
}

@keyframes ovPanel {
    from {
        opacity: 0;
        transform: translateY(28px) scale(.95);
        filter: blur(8px);
    }
}

@keyframes ovItem {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

@keyframes ovOut {
    to {
        opacity: 0;
    }
}

.dlg {
    position: relative;
    width: min(980px, 100%);
    background: #fff;
    border-radius: var(--radius-big);
    box-shadow: var(--shadow-dlg);
}

@media (prefers-reduced-motion: reduce) {
    .ovl.in,
    .ovl.in .dlg,
    .ovl.in .dlg > *,
    .ovl.out {
        animation: none;
    }
}

html.lock,
html.lock body {
    overflow: hidden;
}

/* ===== phones and tablets (2026-11-07), everything here sits inside a width query, the desktop stays as it was ===== */
:root {
    --sa-t: env(safe-area-inset-top, 0px);
    --sa-r: env(safe-area-inset-right, 0px);
    --sa-b: env(safe-area-inset-bottom, 0px);
    --sa-l: env(safe-area-inset-left, 0px);
    --sa-x: max(var(--sa-l), var(--sa-r));
}

@media (max-width: 1068px) {
    :root {
        --gutter: max(24px, var(--sa-x, 0px));
        --lnav-h: calc(52px + var(--sa-t, 0px));
    }

    /* a finger's room on the round controls and the blue links, without moving anything */
    .ctl {
        flex: none;
        width: 40px;
        height: 40px;
    }

    .inner a.link {
        padding-block: 8px;
        margin-block: -8px;
    }

    .chip,
    .inner button.chip {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
    }
}


@media (max-width: 734px) {
    :root {
        --gutter: max(20px, var(--sa-x, 0px));
        --lnav-h: calc(48px + var(--sa-t, 0px));
    }
}

/* ===== EliteZone phone/tablet rules (user 2026-11-08) ===== */
/* 4. Windows on phones and tablets = a sheet on the foot of the screen, round top corners only, a grab bar, rising .6 s
   from the bottom edge; it scrolls inside. Phones: full width, 12 under the status bar. Tablets: centred, up to 720.
   The white bottom border keeps the end clear of the home indicator. */
@media (max-width: 1068px) {
    html body .ovl {
        place-items: end center;
        align-content: end;
        padding: calc(var(--sa-t, 0px) + 12px) 0 0;
        overflow: hidden;
    }

    html body .ovl > .dlg {
        width: 100%;
        max-width: none;
        max-height: calc(100dvh - var(--sa-t, 0px) - 12px);
        margin: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-bottom: var(--sa-b, 0px) solid #fff;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 40px rgb(0 0 0 / .12);
    }

    html body .ovl > .dlg::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        z-index: 8;
        width: 36px;
        height: 4px;
        margin-left: -18px;
        border-radius: 2px;
        background: var(--g400, #CED4DA);
        pointer-events: none;
    }

    html body .ovl.in .dlg {
        animation: spSheetUp .6s cubic-bezier(.22, .61, .36, 1) backwards;
    }

    html body .ab-album-photo img {
        height: auto;
        max-height: min(56dvh, 460px);
    }
}

@media (min-width: 735px) and (max-width: 1068px) {
    html body .ovl {
        padding: calc(var(--sa-t, 0px) + 24px) 24px 0;
    }

    html body .ovl > .dlg {
        width: min(720px, 100%);
        max-height: calc(100dvh - var(--sa-t, 0px) - 24px);
        border-radius: 24px 24px 0 0;
    }
}

@keyframes spSheetUp {
    from {
        transform: translateY(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    html body .ovl.in .dlg {
        animation: none;
    }
}
/* ===== end of phones and tablets ===== */
