/* ═══════════════════════════════════════════════════════════════
   HAKILABZ — Site design system  ·  red theme · living glow · no italics
   Shared across every page.
   ═══════════════════════════════════════════════════════════════ */

/* fonts are loaded via <link> in each page's <head> (parallel, non-blocking) */

:root {
    --red: #E8192C;
    --coral: #FF5470;
    --amber: #FF8A3D;
    --grad: linear-gradient(115deg, #E8192C, #FF5470 55%, #FF8A3D);
    --grad-soft: linear-gradient(135deg, rgba(232, 25, 44, .10), rgba(255, 138, 61, .06));

    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 26px;
    --r-pill: 999px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --spring: cubic-bezier(0.34, 1.4, 0.5, 1);
    --maxw: 1140px;
}

[data-theme="light"] {
    --bg: #FAFAF8;
    --bg-2: #F3F1EC;
    --surface: #FFFFFF;
    --ink: #0E0E10;
    --muted: #6E6E73;
    --faint: #9A9AA0;
    --line: rgba(0, 0, 0, 0.09);
    --line-2: rgba(0, 0, 0, 0.14);
    --glass: rgba(250, 250, 248, 0.72);
    --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.22);
    --field: radial-gradient(120% 90% at 50% 28%, #FFFFFF 0%, #FAFAF8 46%, #F1EFEA 100%);
    --gop: .42;
    --nop: .5;
    --grain: .028;
}

[data-theme="dark"] {
    --bg: #09080B;
    --bg-2: #0E0D12;
    --surface: #141318;
    --ink: #F4F2EC;
    --muted: #A6A4AC;
    --faint: #67656E;
    --line: rgba(255, 255, 255, 0.10);
    --line-2: rgba(255, 255, 255, 0.18);
    --glass: rgba(9, 8, 11, 0.62);
    --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
    --field: radial-gradient(120% 90% at 50% 26%, #141019 0%, #0B0A0E 48%, #050406 100%);
    --gop: .8;
    --nop: .85;
    --grain: .05;
}

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

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    transition: background .5s var(--ease), color .5s var(--ease);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background: var(--field);
    transition: background .5s var(--ease);
}

/* film grain — premium texture, and it hides banding in the big soft gradients */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9500;
    pointer-events: none;
    opacity: var(--grain, .04);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

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

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.mono {
    font-family: 'IBM Plex Mono', monospace;
}

.grad-text {
    background: var(--grad);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: grad-sheen 8s ease-in-out infinite;
}

@keyframes grad-sheen {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* safety net: never render invisible text if background-clip:text is unsupported */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .grad-text {
        -webkit-text-fill-color: currentColor;
        color: var(--red);
        background: none;
    }
}

/* ── LIVING GLOW (background motif) ───────────────────────────── */
.glowfield {
    position: fixed;
    inset: 0;
    z-index: -2;
    display: grid;
    place-items: center;
    pointer-events: none;
    overflow: hidden;
    animation: glow-in 1.3s ease-out backwards;
}

@keyframes glow-in {
    from {
        opacity: 0;
    }
}

.gwrap {
    position: relative;
    width: min(70vh, 600px);
    height: min(70vh, 600px);
    /* explicit height = fallback for browsers without aspect-ratio support */
    aspect-ratio: 1;
    margin-top: -4vh;
    transform: translate(var(--gx, 0px), var(--gy, 0px));
    transition: transform .6s var(--ease);
}

.gwrap>* {
    position: absolute;
}

.ginner {
    position: absolute;
    inset: 0;
    animation: g-drift 13s var(--ease) infinite, g-hue 17s ease-in-out infinite;
    will-change: transform, filter;
}

.ginner>* {
    position: absolute;
}

.g-node {
    width: 46%;
    height: 46%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 25, 44, .85) 0%, rgba(255, 84, 112, .35) 45%, transparent 70%);
    filter: blur(20px);
    opacity: var(--nop);
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
}

.g-node.head {
    left: 50%;
    top: 24%;
    animation: g-pulse 4.2s var(--ease) infinite;
}

.g-node.l {
    left: 23%;
    top: 78%;
    animation: g-pulse 4.2s var(--ease) infinite 1.4s;
}

.g-node.r {
    left: 77%;
    top: 78%;
    animation: g-pulse 4.2s var(--ease) infinite 2.8s;
}

.g-legs {
    inset: 0;
    background:
        radial-gradient(40% 8% at 36% 52%, rgba(232, 25, 44, .4), transparent 70%),
        radial-gradient(40% 8% at 64% 52%, rgba(255, 84, 112, .4), transparent 70%);
    filter: blur(16px);
    opacity: .7;
}

.g-aura {
    left: 50%;
    top: 50%;
    width: 118%;
    height: 118%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(232, 25, 44, .14), transparent 62%);
    filter: blur(36px);
    opacity: var(--gop);
    animation: g-breathe 6s var(--ease) infinite;
}

.g-orbit {
    left: 50%;
    top: 50%;
    width: 88%;
    height: 88%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed rgba(232, 25, 44, .12);
    animation: g-spin 40s linear infinite;
}

@keyframes g-pulse {

    0%,
    100% {
        opacity: calc(var(--nop) * .7);
        transform: translate(-50%, -50%) scale(.92);
    }

    50% {
        opacity: var(--nop);
        transform: translate(-50%, -50%) scale(1.16);
    }
}

@keyframes g-drift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(12px, -14px) scale(1.04);
    }
}

@keyframes g-hue {

    0%,
    100% {
        filter: hue-rotate(0deg);
    }

    50% {
        filter: hue-rotate(-16deg) saturate(1.1);
    }
}

@keyframes g-breathe {

    0%,
    100% {
        opacity: calc(var(--gop) * .8);
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: var(--gop);
        transform: translate(-50%, -50%) scale(1.06);
    }
}

@keyframes g-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* small inline mark (favicon-like lockups, footer) */
.markicon path {
    stroke: var(--red);
}

.markicon circle {
    fill: var(--red);
}

/* ── HEADER ───────────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    inset-inline: 0;
    z-index: 900;
    height: 74px;
    display: flex;
    align-items: center;
    transition: background .4s var(--ease), backdrop-filter .4s, height .3s var(--ease);
}

/* scroll progress — the brand hairline fills as you read */
.site-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 2px;
    background: var(--grad);
    transform: scaleX(var(--sp, 0));
    transform-origin: left;
    z-index: 2;
    pointer-events: none;
}

.site-header::after {
    content: '';
    position: absolute;
    left: clamp(1.5rem, 5vw, 3.5rem);
    right: clamp(1.5rem, 5vw, 3.5rem);
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 25, 44, .32), transparent);
    opacity: 1;
    transition: opacity .4s;
}

.site-header.scrolled {
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    height: 64px;
}

.header-inner {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wordmark {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: .26em;
    color: var(--ink);
    font-size: .98rem;
}

.wordmark b {
    color: var(--red);
    font-weight: inherit;
    /* "Z" is a narrow glyph that optically reads smaller than the wider caps —
       nudge it up ~6% so it looks the same size as the rest of the wordmark */
    font-size: 1.06em;
}

.site-nav {
    display: flex;
    gap: 1.9rem;
    align-items: center;
}

.site-nav a {
    font-size: .82rem;
    font-weight: 500;
    color: var(--muted);
    transition: color .2s;
}

.site-nav a:hover {
    color: var(--ink);
}

.site-nav a.active {
    color: var(--red);
}

/* desktop: animated gradient underline on hover/active */
@media (min-width: 781px) {
    .site-nav a {
        position: relative;
    }

    .site-nav a::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -7px;
        height: 1.5px;
        border-radius: 2px;
        background: var(--grad);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .35s var(--ease);
    }

    .site-nav a:hover::after,
    .site-nav a.active::after {
        transform: scaleX(1);
    }
}

.theme-toggle {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: color .2s, border-color .2s, transform .3s var(--spring);
}

.theme-toggle:hover {
    color: var(--red);
    border-color: var(--red);
    transform: rotate(12deg) scale(1.06);
}

.theme-toggle svg {
    position: absolute;
    width: 15px;
    height: 15px;
    transition: opacity .35s var(--ease), transform .5s var(--spring);
}

[data-theme="dark"] .sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .moon {
    opacity: 0;
    transform: rotate(90deg) scale(.4);
}

[data-theme="light"] .sun {
    opacity: 0;
    transform: rotate(-90deg) scale(.4);
}

[data-theme="light"] .moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.hamburger span {
    width: 22px;
    height: 1.6px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .3s var(--spring), opacity .3s;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(6.6px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-6.6px) rotate(-45deg);
}

@media (max-width: 780px) {
    .hamburger {
        display: flex;
    }

    .site-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        inset: 64px 0 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem 0 env(safe-area-inset-bottom, 0);
        background: var(--bg);
        border-top: 1px solid var(--line);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: transform .35s var(--ease), opacity .35s var(--ease);
    }

    .site-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .site-nav a {
        font-size: 1.1rem;
        padding: 1.1rem clamp(1.5rem, 5vw, 3.5rem);
        border-bottom: 1px solid var(--line);
    }

    .site-nav .toggle-li {
        padding: 1.1rem clamp(1.5rem, 5vw, 3.5rem);
    }
}

/* ── BUTTONS ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 1.7rem;
    border-radius: var(--r-pill);
    font-family: 'Outfit', sans-serif;
    font-size: .92rem;
    font-weight: 500;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: transform .35s var(--spring), box-shadow .35s var(--ease), background .3s, color .3s, border-color .3s;
}

.btn-primary {
    position: relative;
    overflow: hidden;
    background: var(--grad);
    color: #fff;
    box-shadow: 0 8px 26px -8px rgba(232, 25, 44, .6);
}

/* gloss sheen that sweeps across on hover */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 38%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .38), transparent);
    transform: skewX(-20deg) translateX(-170%);
    pointer-events: none;
}

.btn-primary:hover::after {
    transition: transform .65s ease;
    transform: skewX(-20deg) translateX(430%);
}

.btn-primary:hover {
    box-shadow: 0 14px 34px -8px rgba(232, 25, 44, .7);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-2);
}

.btn-ghost:hover {
    border-color: var(--red);
    color: var(--red);
}

.btn .arr {
    transition: transform .4s var(--ease);
}

.btn:hover .arr {
    transform: translateX(4px);
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ── HERO ─────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem clamp(1.25rem, 4vw, 3rem) 6rem;
}

.hero-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .7rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 1.6rem;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: clamp(2.4rem, 6.4vw, 5rem);
    line-height: 1.06;
    letter-spacing: -.03em;
    color: var(--ink);
    max-width: 16ch;
}

.hero-sub {
    margin-top: clamp(1.4rem, 3vh, 2rem);
    font-size: clamp(1rem, 1.7vw, 1.16rem);
    font-weight: 300;
    line-height: 1.7;
    color: var(--muted);
    max-width: 46ch;
}

.hero-sub b {
    color: var(--ink);
    font-weight: 500;
}

.hero-cta {
    margin-top: clamp(1.8rem, 4vh, 2.6rem);
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── SECTIONS ─────────────────────────────────────────────────── */
.section {
    padding: clamp(5rem, 12vh, 9rem) 0;
    position: relative;
    scroll-margin-top: 80px;
}

.section-alt {
    background: var(--bg-2);
    border-block: 1px solid var(--line);
    transition: background .5s var(--ease);
}

.section-head {
    max-width: 640px;
    margin: 0 auto clamp(3rem, 6vh, 4.5rem);
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: .7rem;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 1.1rem;
}

.eyebrow .blip {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 10px var(--red);
    animation: blip-ping 2.8s var(--ease) infinite;
}

@keyframes blip-ping {
    0% {
        box-shadow: 0 0 10px var(--red), 0 0 0 0 rgba(232, 25, 44, .45);
    }

    70%,
    100% {
        box-shadow: 0 0 10px var(--red), 0 0 0 10px rgba(232, 25, 44, 0);
    }
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: clamp(1.9rem, 4.4vw, 3rem);
    line-height: 1.12;
    letter-spacing: -.025em;
    color: var(--ink);
}

.section-sub {
    margin-top: .9rem;
    font-size: 1.02rem;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.7;
}

/* ── GRID + CARDS ─────────────────────────────────────────────── */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

@media (max-width: 880px) {
    .grid-3 {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-inline: auto;
    }
}

.vcard {
    position: relative;
    padding: 2.2rem 2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    overflow: hidden;
    transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}

.vcard::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(232, 25, 44, .07), transparent 60%);
    opacity: 0;
    transition: opacity .5s var(--ease);
}

.vcard:hover {
    transform: translateY(-6px);
    border-color: rgba(232, 25, 44, .35);
    box-shadow: var(--shadow);
}

.vcard:hover::before {
    opacity: 1;
}

.vcard-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    margin-bottom: 1.3rem;
    background: var(--grad-soft);
    border: 1px solid rgba(232, 25, 44, .14);
    color: var(--red);
    position: relative;
    transition: transform .5s var(--spring);
}

.vcard:hover .vcard-icon {
    transform: scale(1.07) rotate(-4deg);
}

.vcard-icon svg {
    width: 22px;
    height: 22px;
}

.vcard h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 1.18rem;
    letter-spacing: -.01em;
    margin-bottom: .55rem;
    position: relative;
}

.vcard p {
    font-size: .93rem;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.65;
    position: relative;
}

.vcard .vnum {
    position: absolute;
    top: 1.5rem;
    right: 1.7rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: .7rem;
    color: var(--faint);
}

.prose-center {
    max-width: 640px;
    margin: clamp(3rem, 6vh, 4rem) auto 0;
    text-align: center;
}

.prose-center p {
    font-size: 1.04rem;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.85;
    margin-bottom: 1rem;
}

.prose-center p:last-child {
    margin-bottom: 0;
}

/* ── PRODUCTS ─────────────────────────────────────────────────── */
.pcard {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.4rem 2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    overflow: hidden;
    transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}

.pcard:hover {
    transform: translateY(-8px);
    border-color: rgba(232, 25, 44, .35);
    box-shadow: var(--shadow);
}

.p-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .32rem .8rem;
    border-radius: var(--r-pill);
    font-family: 'IBM Plex Mono', monospace;
    font-size: .66rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: var(--grad);
    color: #fff;
    margin-bottom: 1.5rem;
}

.p-badge.soon {
    background: transparent;
    color: var(--muted);
    border: 1px dashed var(--line-2);
}

.p-icon {
    width: 66px;
    height: 66px;
    border-radius: 17px;
    overflow: hidden;
    margin-bottom: 1.4rem;
    box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .35);
    transition: transform .5s var(--spring);
}

.pcard:hover .p-icon {
    transform: scale(1.06) rotate(-3deg);
}

.p-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: -.02em;
    margin-bottom: .25rem;
}

.p-tag {
    font-size: .86rem;
    font-weight: 500;
    color: var(--red);
    margin-bottom: 1rem;
}

.p-desc {
    font-size: .92rem;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 1.4rem;
    flex: 1;
}

.p-features {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1.8rem;
}

.p-feature {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .86rem;
    color: var(--muted);
}

.p-feature .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--grad);
    flex-shrink: 0;
}

.p-cta {
    margin-top: auto;
}

.p-cta .btn {
    font-size: .86rem;
    padding: .7rem 1.4rem;
}

.pcard-empty {
    align-items: center;
    justify-content: center;
    text-align: center;
    border-style: dashed;
    min-height: 320px;
}

.empty-plus {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1.5px dashed var(--line-2);
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    color: var(--faint);
    margin-bottom: 1.3rem;
    transition: transform .5s var(--spring), color .3s, border-color .3s;
}

.pcard-empty:hover .empty-plus {
    transform: rotate(90deg) scale(1.08);
    color: var(--red);
    border-color: var(--red);
}

/* ── CONTACT ──────────────────────────────────────────────────── */
.contact-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    max-width: 760px;
    margin: 0 auto;
}

@media (max-width: 680px) {
    .contact-links {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
}

.clink {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .9rem;
    padding: 2rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    color: var(--muted);
    font-size: .92rem;
    text-align: center;
    transition: transform .45s var(--spring), border-color .35s, color .35s, box-shadow .45s;
}

.clink:hover {
    transform: translateY(-5px);
    border-color: rgba(232, 25, 44, .35);
    color: var(--red);
    box-shadow: var(--shadow);
}

.clink-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: var(--grad-soft);
    border: 1px solid rgba(232, 25, 44, .14);
    color: var(--red);
    transition: background .35s, color .35s, transform .45s var(--spring);
}

.clink:hover .clink-icon {
    background: var(--grad);
    color: #fff;
    transform: scale(1.08);
}

/* ── FOOTER ───────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    padding: clamp(3.5rem, 8vh, 5rem) 0 2.4rem;
    transition: background .5s var(--ease);
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 720px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

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

.footer-brand .wordmark {
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: .9rem;
    font-weight: 300;
    color: var(--muted);
    max-width: 260px;
    line-height: 1.7;
}

.footer-col h4 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 1.2rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.footer-col a {
    font-size: .92rem;
    color: var(--muted);
    transition: color .25s, transform .25s var(--ease);
    display: inline-block;
}

.footer-col a:hover {
    color: var(--red);
    transform: translateX(3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    font-family: 'IBM Plex Mono', monospace;
    font-size: .7rem;
    letter-spacing: .06em;
    color: var(--faint);
}

/* ── COOKIE BANNER ────────────────────────────────────────────── */
.cookie {
    position: fixed;
    z-index: 9000;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(680px, calc(100vw - 2rem));
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--line-2);
    border-radius: var(--r-md);
    padding: 1.2rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    box-shadow: var(--shadow);
}

/* the [hidden] attribute (toggled by Accept/Decline) must win over display:flex */
.cookie[hidden] {
    display: none !important;
}

.cookie p {
    font-size: .86rem;
    font-weight: 300;
    color: var(--muted);
    flex: 1;
    line-height: 1.55;
}

.cookie a {
    color: var(--red);
}

.cookie-btns {
    display: flex;
    gap: .6rem;
    flex-shrink: 0;
}

.cookie-btns button {
    padding: .5rem 1.1rem;
    border-radius: var(--r-pill);
    font-size: .82rem;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    border: 1px solid transparent;
    transition: all .25s;
}

.c-accept {
    background: var(--grad);
    color: #fff;
}

.c-decline {
    background: transparent;
    border-color: var(--line-2);
    color: var(--muted);
}

.c-decline:hover {
    border-color: var(--red);
    color: var(--red);
}

@media (max-width: 560px) {
    .cookie {
        flex-direction: column;
        left: .75rem;
        right: .75rem;
        width: auto;
        transform: none;
    }

    .cookie-btns {
        width: 100%;
    }

    .cookie-btns button {
        flex: 1;
    }
}

/* ── LEGAL / PROSE PAGES ──────────────────────────────────────── */
.page-head {
    padding: 9rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
    text-align: center;
}

.page-head .eyebrow {
    justify-content: center;
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    letter-spacing: -.025em;
    color: var(--ink);
}

.page-meta {
    margin-top: .8rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--faint);
}

.prose {
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem clamp(1.25rem, 4vw, 3rem) 6rem;
}

.prose h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 1.4rem;
    letter-spacing: -.01em;
    color: var(--ink);
    margin: 2.6rem 0 .9rem;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--ink);
    margin: 1.8rem 0 .7rem;
}

.prose p {
    font-size: 1rem;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 1.1rem;
}

.prose ul {
    list-style: none;
    margin: 0 0 1.3rem;
    padding: 0;
}

.prose li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 1rem;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: .6rem;
}

.prose li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--grad);
}

.prose a {
    color: var(--red);
    border-bottom: 1px solid rgba(232, 25, 44, .3);
    transition: border-color .25s;
}

.prose a:hover {
    border-color: var(--red);
}

.prose strong {
    color: var(--ink);
    font-weight: 500;
}

/* ── 404 ──────────────────────────────────────────────────────── */
.error-wrap {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7rem 1.5rem 4rem;
}

.error-code {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(6rem, 22vw, 13rem);
    line-height: 1;
    letter-spacing: -.05em;
    margin-bottom: .5rem;
    background: var(--grad);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: grad-sheen 8s ease-in-out infinite, err-float 3.6s ease-in-out infinite alternate;
}

@keyframes err-float {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-12px);
    }
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .error-code {
        -webkit-text-fill-color: currentColor;
        color: var(--red);
        background: none;
    }
}

/* ── REVEAL (IntersectionObserver) ────────────────────────────── */
/* hidden initial state only when JS is running (html.js set by the inline
   head script) — without JS all content stays fully visible */
html.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}

html.js .reveal.in {
    opacity: 1;
    transform: none;
}

/* spatial: cards reveal from depth (3D tilt-up) */
html.js .vcard.reveal,
html.js .pcard.reveal,
html.js .clink.reveal {
    transform: perspective(1100px) rotateX(9deg) translateY(34px);
    transform-origin: 50% 85%;
    transition: transform .6s var(--ease), opacity .85s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
    will-change: transform;
}

html.js .vcard.reveal.in,
html.js .pcard.reveal.in,
html.js .clink.reveal.in {
    transform: perspective(1100px) rotateX(0deg) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

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

/* ── THEME SWITCH: circular view-transition reveal ────────────── */
/* progressive enhancement — browsers without the View Transitions API
   (and reduced-motion users, guarded in JS) get an instant switch */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-new(root) {
    clip-path: circle(0px at var(--vtx, 50%) var(--vty, 50%));
    animation: vt-reveal .55s ease-in forwards;
}

@keyframes vt-reveal {
    to {
        clip-path: circle(155vmax at var(--vtx, 50%) var(--vty, 50%));
    }
}
