/* Okami – Material 3 Expressive foundation.
   Colour roles come from tokens.css (generated per area), shapes from shapes.css.
   This file holds type, shape and motion tokens plus everything shared by all
   pages: header toolbar, buttons, chips, labels, footer and motion. */

@font-face {
    font-family: "Roboto Flex";
    src: url("../fonts/roboto-flex-latin.woff2") format("woff2");
    font-weight: 100 1000;
    font-stretch: 25% 151%;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Roboto Flex";
    src: url("../fonts/roboto-flex-latin-ext.woff2") format("woff2");
    font-weight: 100 1000;
    font-stretch: 25% 151%;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: dark;

    /* Layout */
    --page: min(1280px, calc(100vw - 48px));

    /* Type: Roboto Flex. Display styles use a condensed width, the Okami signature. */
    --font: "Roboto Flex", "Segoe UI", system-ui, sans-serif;
    --display-stretch: 42%;
    --display-weight: 760;

    /* Shape scale (M3 Expressive corner tokens) */
    --shape-xs: 4px;
    --shape-sm: 8px;
    --shape-md: 12px;
    --shape-lg: 16px;
    --shape-lg-inc: 20px;
    --shape-xl: 28px;
    --shape-xl-inc: 32px;
    --shape-xxl: 48px;
    --shape-full: 999px;

    /* Motion: M3 Expressive springs as cubic-bezier approximations, tuned
       soft – a hint of overshoot, never a snap. "Effects" fades colour. */
    --spring-fast: cubic-bezier(.3, 1.18, .4, 1);
    --spring-fast-duration: 420ms;
    --spring-default: cubic-bezier(.28, 1.12, .32, 1);
    --spring-default-duration: 600ms;
    --spring-slow: cubic-bezier(.25, 1.08, .3, 1);
    --spring-slow-duration: 800ms;
    --effects: cubic-bezier(.4, 0, .2, 1);
    --effects-duration: 260ms;

    /* State layers */
    --state-hover: 8%;
    --state-press: 12%;
}

/* Semantic aliases, set per area so the same component rules work everywhere. */
:root,
.voidline-page,
.luna-page,
.luna-legal-page,
.mirrorgate-page {
    /* Near-black page: the lowest surface pushed most of the way to black,
       so the area tint survives only as a hint. */
    --bg: color-mix(in srgb, var(--md-sys-color-surface-container-lowest) 38%, #000);
    --surface: var(--md-sys-color-surface-container-low);
    --surface-solid: var(--md-sys-color-surface-container);
    --surface-raised: var(--md-sys-color-surface-container-high);
    --ink: var(--md-sys-color-on-surface);
    --ink-soft: var(--md-sys-color-on-surface-variant);
    --muted: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 72%, var(--md-sys-color-surface));
    --accent: var(--md-sys-color-primary-container);
    --accent-strong: var(--md-sys-color-primary);
    --secondary: var(--md-sys-color-tertiary);
    --line: color-mix(in srgb, var(--md-sys-color-outline-variant) 60%, transparent);
    --line-strong: var(--md-sys-color-outline-variant);
    --radius-xl: var(--shape-xxl);
    --radius: var(--shape-xl);
    --radius-sm: var(--shape-lg);
    --pill: var(--shape-full);
    --shadow: 0 24px 64px rgb(0 0 0 / .42);
    --shadow-soft: 0 12px 32px rgb(0 0 0 / .28);
}

* { box-sizing: border-box; }

html {
    overflow-x: clip;
    scroll-behavior: smooth;
    scroll-padding-top: 112px;
    scrollbar-color: var(--md-sys-color-primary-container) var(--md-sys-color-surface-container-lowest);
}

body {
    min-width: 320px;
    margin: 0;
    overflow-x: clip;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--font);
    font-size: 18px;
    font-optical-sizing: auto;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* One soft glow of the area colour behind everything – the old look, calmer. */
body::before {
    position: fixed;
    inset: 0;
    z-index: -5;
    content: "";
    pointer-events: none;
    background:
        radial-gradient(52rem 38rem at 85% -6%, color-mix(in srgb, var(--md-sys-color-primary-container) 14%, transparent), transparent 70%),
        radial-gradient(40rem 34rem at 6% 62%, color-mix(in srgb, var(--md-sys-color-tertiary) 5%, transparent), transparent 72%);
}

/* Film grain, as before, so large dark areas do not band. */
body::after {
    position: fixed;
    inset: 0;
    z-index: 500;
    content: "";
    pointer-events: none;
    opacity: .16;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

::selection { color: var(--md-sys-color-on-primary); background: var(--md-sys-color-primary); }
a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
p, li { text-wrap: pretty; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }

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

.skip-link {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1000;
    padding: 12px 20px;
    border-radius: var(--shape-full);
    color: var(--md-sys-color-on-primary);
    background: var(--md-sys-color-primary);
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform var(--spring-fast-duration) var(--spring-fast);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 4px; }

/* Background grid and pointer glow from the previous design. The grid lines
   carry a touch of the area colour and fade out towards the page edges. */
.site-grid {
    position: fixed;
    inset: 0;
    z-index: -4;
    pointer-events: none;
    --grid-line: color-mix(in srgb, var(--md-sys-color-primary) 9%, rgb(255 255 255 / .055));
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 72px 72px;
    background-position: center top;
    mask-image: radial-gradient(130% 95% at 50% 10%, #000 20%, rgb(0 0 0 / .35) 62%, transparent 92%);
}
/* Moved with a transform (no layout per pointer move) and eased, so it trails
   the pointer softly instead of sticking to it. */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -3;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    pointer-events: none;
    opacity: .1;
    background: var(--md-sys-color-primary-container);
    filter: blur(105px);
    transform: translate(calc(var(--pointer-x, 50vw) - 50%), calc(var(--pointer-y, 20vh) - 50%));
    transition: transform 900ms var(--effects);
    will-change: transform;
}

/* ─── Type roles ─────────────────────────────────────────────────────────── */

/* Label: small caps-like, used for eyebrows, statuses and kickers. */
.section-label,
.detail-badge,
.eyebrow,
.project-type,
.aside-label,
.journey-status,
.tier-label,
.contact-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--md-sys-color-primary);
    font-size: .78rem;
    font-weight: 650;
    font-stretch: 100%;
    letter-spacing: .08em;
    line-height: 1.35;
    text-transform: uppercase;
}
.section-label span {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--md-sys-color-on-primary-container);
    background: var(--md-sys-color-primary-container);
    clip-path: var(--shape-cookie6);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: 0;
}

/* Display: condensed, heavy, tight – the Okami voice in Roboto Flex. */
.display-copy,
.section-heading h2,
.contact-title,
.detail-section-head h2,
.voidline-section-intro h2,
.detail-cta h2 {
    margin: 0;
    font-size: clamp(2.9rem, 6.2vw, 6rem);
    font-stretch: var(--display-stretch);
    font-weight: var(--display-weight);
    letter-spacing: -.005em;
    line-height: .94;
}
.display-copy em,
.contact-title em,
.voidline-section-intro h2 em { color: var(--md-sys-color-primary); font-style: normal; }

/* ─── Header: floating glass toolbar ─────────────────────────────────────── */

/* Near-black glass with a hairline edge; it firms up once the page scrolls.
   Order: brand · navigation · language switch (menu button on small screens). */
.site-header {
    position: sticky;
    top: 14px;
    z-index: 100;
    isolation: isolate;
    display: flex;
    width: min(var(--page), calc(100% - 24px));
    min-height: 60px;
    margin: 14px auto 0;
    padding: 6px 7px 6px 8px;
    align-items: center;
    gap: 8px;
    border-radius: var(--shape-full);
    background: color-mix(in srgb, var(--bg) 58%, transparent);
    box-shadow:
        inset 0 0 0 1px rgb(255 255 255 / .07),
        inset 0 1px 0 rgb(255 255 255 / .05);
    backdrop-filter: blur(22px) saturate(140%);
    transition:
        background var(--effects-duration) var(--effects),
        box-shadow var(--effects-duration) var(--effects);
}
.site-header.is-scrolled {
    background: color-mix(in srgb, var(--md-sys-color-surface-container-lowest) 84%, transparent);
    box-shadow:
        inset 0 0 0 1px rgb(255 255 255 / .08),
        inset 0 1px 0 rgb(255 255 255 / .06),
        0 12px 32px rgb(0 0 0 / .5);
}

.brand { display: inline-flex; min-width: max-content; min-height: 46px; padding-right: 10px; align-items: center; gap: 10px; }
.brand-mark { position: relative; display: grid; width: 44px; height: 44px; place-items: center; }
.brand-mark img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; }
/* Reading progress: a thin ring that fills around the logo as the page scrolls. */
.brand-mark::before {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    content: "";
    background: conic-gradient(var(--md-sys-color-primary) calc(var(--scroll-progress, 0) * 1turn), color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent) 0);
    mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
    opacity: 0;
    transition: opacity var(--effects-duration) var(--effects);
}
.site-header.is-scrolled .brand-mark::before { opacity: 1; }
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { font-size: .95rem; font-stretch: 90%; font-weight: 800; letter-spacing: .14em; }
.brand-copy small { margin-top: 6px; color: var(--muted); font-size: .66rem; font-weight: 600; letter-spacing: .1em; }

.site-nav { display: flex; margin-left: auto; padding-right: 10px; align-items: center; gap: 2px; order: 1; border-right: 1px solid rgb(255 255 255 / .08); }
.site-nav a,
.site-nav .nav-status {
    position: relative;
    display: inline-flex;
    min-height: 42px;
    padding: 0 16px;
    align-items: center;
    justify-content: center;
    border-radius: var(--shape-full);
    color: var(--md-sys-color-on-surface-variant);
    font-size: .88rem;
    font-weight: 600;
    transition:
        color var(--effects-duration) var(--effects),
        background var(--effects-duration) var(--effects);
}
.site-nav a:hover { color: var(--md-sys-color-on-surface); background: color-mix(in srgb, var(--md-sys-color-on-surface) 6%, transparent); }
/* Active section: a soft tint of the area colour. */
.site-nav a.active { color: var(--md-sys-color-primary); background: color-mix(in srgb, var(--md-sys-color-primary) 15%, transparent); }
.site-nav .nav-out { margin-left: 6px; padding-inline: 20px; color: var(--md-sys-color-on-primary); background: var(--md-sys-color-primary); }
.site-nav .nav-out:hover { color: var(--md-sys-color-on-primary); background: color-mix(in srgb, var(--md-sys-color-on-primary) var(--state-hover), var(--md-sys-color-primary)); }
.site-nav .nav-status { opacity: .7; border: 1px solid var(--line-strong); }

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    order: 3;
    border-radius: var(--shape-full);
    color: var(--md-sys-color-primary);
    background: color-mix(in srgb, var(--md-sys-color-primary) 15%, transparent);
    cursor: pointer;
}
.menu-toggle > span:first-child { display: none; }
.menu-lines,
.menu-lines::before,
.menu-lines::after { display: block; width: 18px; height: 2px; border-radius: 2px; content: ""; background: currentColor; transition: transform var(--spring-fast-duration) var(--spring-fast), top var(--spring-fast-duration) var(--spring-fast); }
.menu-lines { position: relative; }
.menu-lines::before { position: absolute; top: -6px; }
.menu-lines::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-lines::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-lines::after { top: 0; transform: rotate(-45deg); }

/* Language: a segmented switch whose pill slides to the chosen language. */
.language-switch {
    position: relative;
    z-index: 102;
    isolation: isolate;
    display: inline-flex;
    padding: 3px;
    flex: 0 0 auto;
    order: 2;
    border-radius: var(--shape-full);
    background: color-mix(in srgb, var(--md-sys-color-on-surface) 7%, transparent);
}
.language-switch::before {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    z-index: -1;
    width: 42px;
    border-radius: var(--shape-full);
    content: "";
    background: var(--md-sys-color-primary);
    transition: translate var(--spring-default-duration) var(--spring-default);
}
.language-switch:has([data-language="de"][aria-pressed="true"])::before { translate: 100% 0; }
.language-option {
    width: 42px;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: var(--shape-full);
    color: var(--md-sys-color-on-surface-variant);
    background: transparent;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    transition: color var(--effects-duration) var(--effects);
}
.language-option:hover { color: var(--md-sys-color-on-surface); }
.language-option[aria-pressed="true"] { color: var(--md-sys-color-on-primary); }
.language-switch-standalone { position: fixed; top: 16px; right: 16px; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */

.section,
.detail-section,
.voidline-section,
.detail-cta,
.site-footer,
.detail-strip { width: var(--page); margin-inline: auto; }
.section,
.detail-section,
.voidline-section { padding-block: 112px; }

/* ─── Buttons: pill that squares off when pressed (M3 Expressive shape morph) ── */

.button,
.round-link,
.button-ghost {
    display: inline-flex;
    min-height: 56px;
    padding: 0 28px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: var(--shape-full);
    color: var(--md-sys-color-on-primary);
    background: var(--md-sys-color-primary);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    transition:
        border-radius var(--spring-fast-duration) var(--spring-fast),
        transform var(--spring-fast-duration) var(--spring-fast),
        background var(--effects-duration) var(--effects),
        color var(--effects-duration) var(--effects);
}
.button:hover,
.round-link:hover { background: color-mix(in srgb, var(--md-sys-color-on-primary) var(--state-hover), var(--md-sys-color-primary)); }
.button:active,
.round-link:active,
.button-ghost:active { transform: scale(.97); }
/* Tonal button for the second action. */
.button-ghost { color: var(--md-sys-color-on-secondary-container); background: var(--md-sys-color-secondary-container); }
.button-ghost:hover { background: color-mix(in srgb, var(--md-sys-color-on-secondary-container) var(--state-hover), var(--md-sys-color-secondary-container)); }
.button-disabled { opacity: .5; pointer-events: none; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.round-link svg,
.contact-email svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform var(--spring-fast-duration) var(--spring-fast); }
.round-link:hover svg { transform: translateX(4px); }

/* ─── Chips ──────────────────────────────────────────────────────────────── */

.tag-list,
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span,
.detail-tags span {
    display: inline-flex;
    min-height: 32px;
    padding: 6px 14px;
    align-items: center;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--shape-sm);
    color: var(--md-sys-color-on-surface-variant);
    font-size: .8rem;
    font-weight: 550;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 180px;
    margin-top: 64px;
    padding: 40px 40px 36px;
    overflow: hidden;
    grid-template-columns: minmax(280px, 1.15fr) minmax(190px, .7fr) auto;
    align-items: end;
    gap: 30px;
    border-radius: var(--shape-xxl) var(--shape-xxl) 0 0;
    color: var(--muted);
    background: var(--md-sys-color-surface-container);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
/* A large, slowly morphing shape peeking in from the corner. */
.site-footer::before {
    position: absolute;
    top: -130px;
    right: -90px;
    z-index: -1;
    width: 320px;
    height: 320px;
    content: "";
    background: color-mix(in srgb, var(--md-sys-color-primary-container) 18%, transparent);
    clip-path: var(--shape-cookie9);
    animation: spin 90s linear infinite;
    will-change: transform;
}
.site-footer a { transition: color var(--effects-duration) var(--effects), background var(--effects-duration) var(--effects), border-radius var(--spring-fast-duration) var(--spring-fast); }
.footer-copyright { display: grid; max-width: 470px; gap: 10px; }
.footer-copyright strong { color: var(--ink); font-size: 1rem; font-stretch: 90%; font-weight: 800; letter-spacing: .12em; }
.footer-copyright small { color: var(--muted); font-size: .8rem; font-weight: 450; letter-spacing: 0; line-height: 1.6; text-transform: none; }
.footer-motto { max-width: 280px; color: var(--md-sys-color-primary); line-height: 1.55; }
.footer-links { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.footer-links a,
.site-footer > a:last-child,
.footer-actions > a:not(.footer-kofi) {
    display: inline-flex;
    min-height: 44px;
    padding: 0 18px;
    align-items: center;
    justify-content: center;
    border-radius: var(--shape-full);
    color: var(--md-sys-color-on-secondary-container);
    background: var(--md-sys-color-secondary-container);
    letter-spacing: .02em;
    text-transform: none;
}
.footer-actions { display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.footer-kofi {
    display: inline-flex;
    min-height: 44px;
    padding: 0 18px;
    align-items: center;
    gap: 9px;
    border-radius: var(--shape-full);
    color: var(--md-sys-color-on-tertiary);
    background: var(--md-sys-color-tertiary);
    letter-spacing: .02em;
    text-transform: none;
}
.footer-kofi:hover { background: color-mix(in srgb, var(--md-sys-color-on-tertiary) var(--state-hover), var(--md-sys-color-tertiary)); }
.footer-kofi svg { width: 24px; height: 24px; overflow: visible; }
.footer-kofi .kofi-cup { fill: currentColor; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; }
.footer-kofi .kofi-handle { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.footer-kofi .kofi-heart { fill: #d9264f; }

/* ─── Code box (install commands) ────────────────────────────────────────── */

.code-box { display: flex; min-width: 0; overflow: hidden; align-items: stretch; border-radius: var(--shape-lg); background: var(--md-sys-color-surface-container-lowest); }
.code-box code { min-width: 0; padding: 16px 18px; flex: 1; overflow-x: auto; color: var(--md-sys-color-primary); font: .8rem/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: nowrap; }
.copy-code { min-width: 92px; padding: 10px 16px; border: 0; color: var(--md-sys-color-on-secondary-container); background: var(--md-sys-color-secondary-container); cursor: pointer; font-size: .8rem; font-weight: 700; }
.copy-code:hover { background: color-mix(in srgb, var(--md-sys-color-on-secondary-container) var(--state-hover), var(--md-sys-color-secondary-container)); }

/* ─── Motion ─────────────────────────────────────────────────────────────── */

.js .reveal { opacity: 0; transform: translateY(32px) scale(.98); transition: opacity var(--spring-slow-duration) var(--effects), transform var(--spring-slow-duration) var(--spring-slow); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-12px) rotate(1deg); } }
@keyframes blink { 50% { opacity: .25; } }

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1120px) {
    :root { --page: min(100% - 36px, 960px); }
    .brand-copy small { display: none; }
    .site-nav a { padding-inline: 14px; }
}

@media (max-width: 920px) {
    :root { --page: min(100% - 30px, 760px); }
    body { font-size: 17px; }
    .site-header { top: 10px; width: min(var(--page), calc(100% - 18px)); margin-top: 10px; }
    .menu-toggle { display: inline-flex; }
    .language-switch { margin-left: auto; }
    .site-nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        display: none;
        margin: 0;
        padding: 10px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        border: 0;
        border-radius: var(--shape-xl);
        background: color-mix(in srgb, var(--md-sys-color-surface-container-low) 97%, transparent);
        box-shadow: inset 0 0 0 1px rgb(255 255 255 / .07), var(--shadow);
    }
    .site-nav.open { display: flex; animation: menu-in var(--spring-default-duration) var(--spring-default); }
    .site-nav a,
    .site-nav .nav-status { min-height: 52px; justify-content: flex-start; padding-inline: 20px; border-radius: var(--shape-lg); }
    .site-nav .nav-out { margin: 4px 0 0; justify-content: center; border-radius: var(--shape-full); }
    .site-footer { grid-template-columns: 1fr 1fr; }
    .footer-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px) scale(.97); } }

@media (max-width: 680px) {
    :root { --page: calc(100% - 28px); }
    body { font-size: 16px; line-height: 1.6; }
    html { scroll-padding-top: 84px; }
    .site-header { min-height: 56px; padding: 5px 5px 5px 10px; }
    .brand { min-height: 44px; gap: 8px; padding-right: 4px; }
    .brand-mark { width: 42px; height: 42px; }
    .section,
    .detail-section,
    .voidline-section { padding-block: 76px; }
    .display-copy,
    .section-heading h2,
    .contact-title,
    .detail-section-head h2,
    .voidline-section-intro h2,
    .detail-cta h2 { font-size: clamp(2.5rem, 11.5vw, 3.8rem); }
    .detail-actions { width: 100%; }
    .detail-actions .button,
    .detail-actions .button-ghost { width: 100%; }
    .code-box { flex-direction: column; }
    .copy-code { min-height: 44px; }
    .site-footer { margin-top: 40px; padding: 32px 24px; grid-template-columns: 1fr; align-items: start; gap: 22px; border-radius: var(--shape-xl) var(--shape-xl) 0 0; }
}

@media (max-width: 560px) {
    .brand-copy { display: none; }
}

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

@media print {
    body { color: #111; background: #fff; }
    body::before, body::after, .site-grid, .cursor-glow, .site-header, .skip-link, .detail-actions, .site-footer, .legal-toc { display: none !important; }
}
