/* ==========================================================================
   DEKHO — public website
   Warm ivory · deep ink · a single restrained gold accent
   ========================================================================== */

:root {
    --bg: #f6f2ea;
    --paper: #fbf9f4;
    --ink: #16130f;
    --ink-soft: #2b261f;
    --muted: #6a6358;
    --line: rgba(22, 19, 15, 0.1);
    --line-strong: rgba(22, 19, 15, 0.2);

    --gold: #b08a4a;
    --gold-deep: #8a6a2f;
    --gold-soft: #ead9b3;
    --dark: #14110d;
    --on-dark: #f3ede1;
    --on-dark-muted: #b6ad9d;

    --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
    --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
    --gutter: clamp(1.25rem, 4.5vw, 4rem);
    --max: 1500px;
    --header-h: 5rem;
    --radius: 22px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--muted);
    font-family: var(--sans);
    font-size: 1.02rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--gold-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; border-radius: 4px; }
section[id] { scroll-margin-top: 4rem; }

.skip-link {
    position: fixed; top: -4rem; left: 1rem; z-index: 200;
    padding: 0.7rem 1.1rem; background: var(--ink); color: var(--on-dark);
    font-weight: 600; border-radius: 8px; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }

/* Type --------------------------------------------------------------------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 0.9rem;
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--gold-deep);
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; }

.display {
    font-family: var(--serif);
    font-weight: 500;
    color: var(--ink);
    line-height: 1.02;
    letter-spacing: -0.02em;
    font-size: clamp(2.5rem, 5.4vw, 4.4rem);
}
.display em { font-style: italic; color: var(--gold-deep); font-weight: 500; }

/* Buttons ------------------------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
    padding: 1.05rem 1.9rem; border-radius: 999px; border: 1px solid transparent;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1;
    transition: transform 0.45s var(--ease), background 0.3s, color 0.3s, box-shadow 0.45s, border-color 0.3s;
}
.btn svg { width: 1rem; height: 1rem; transition: transform 0.45s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn--dark { background: var(--ink); color: var(--on-dark); }
.btn--dark:hover { background: var(--gold-deep); transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(138, 106, 47, 0.7); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-soft); transform: translateY(-2px); }
.btn--line { border-color: var(--line-strong); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); }

.link-arrow {
    display: inline-flex; align-items: center; gap: 0.7rem;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
    padding-bottom: 0.35rem; border-bottom: 1px solid var(--line-strong);
    transition: border-color 0.3s, gap 0.45s var(--ease), color 0.3s;
}
.link-arrow svg { width: 1rem; height: 1rem; }
.link-arrow:hover { border-color: var(--gold-deep); color: var(--gold-deep); gap: 1rem; }

/* Header ------------------------------------------------------------------- */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
    border-bottom: 1px solid transparent;
    transition: background 0.4s, border-color 0.4s, height 0.4s var(--ease);
}
.site-header.is-scrolled {
    height: 4.25rem;
    background: rgba(246, 242, 234, 0.82);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    border-bottom-color: var(--line);
}
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.brand { display: inline-flex; align-items: center; gap: 0.8rem; color: var(--ink); }
.brand__mark { width: 1.45rem; height: 1.45rem; flex: none; }
.brand__name {
    font-family: var(--serif); font-size: 1.5rem; font-weight: 600;
    letter-spacing: 0.26em; line-height: 1; text-transform: uppercase; padding-top: 0.1em;
}

.nav { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 2.75rem); }
.nav a {
    position: relative; padding-block: 0.4rem;
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
    transition: color 0.3s;
}
.nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold-deep);
    transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.site-header .btn { padding: 0.85rem 1.4rem; }

.nav-toggle {
    display: none; position: relative; z-index: 120; width: 2.9rem; height: 2.9rem;
    border-radius: 50%; border: 1px solid var(--line-strong); background: transparent;
}
.nav-toggle span {
    position: absolute; left: 50%; width: 1.1rem; height: 1.5px; background: var(--ink);
    transform: translateX(-50%); transition: transform 0.45s var(--ease), top 0.45s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 1.1rem; }
.nav-toggle span:nth-child(2) { top: 1.6rem; }
.menu-open .nav-toggle span:nth-child(1) { top: 1.35rem; transform: translateX(-50%) rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { top: 1.35rem; transform: translateX(-50%) rotate(-45deg); }

.menu {
    position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column; justify-content: center;
    gap: 2.5rem; padding: 6rem var(--gutter) 3rem; background: var(--bg);
    opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.menu-open .menu { opacity: 1; visibility: visible; }
.menu__links { display: grid; gap: 0.3rem; }
.menu__links a {
    font-family: var(--serif); font-size: clamp(2.6rem, 11vw, 4rem); font-weight: 500; line-height: 1.15; color: var(--ink);
    transform: translateY(1rem); opacity: 0; transition: transform 0.6s var(--ease), opacity 0.6s, color 0.3s;
}
.menu-open .menu__links a { transform: none; opacity: 1; }
.menu-open .menu__links a:nth-child(2) { transition-delay: 0.06s; }
.menu-open .menu__links a:nth-child(3) { transition-delay: 0.12s; }
.menu__links a:hover { color: var(--gold-deep); }
.menu__foot { display: grid; gap: 0.2rem; }
.menu__foot a { color: var(--ink); font-weight: 600; }

/* Hero --------------------------------------------------------------------- */
/* The hero is a dark "AI stage": a WebGL particle scene (hero-ai.js) behind the headline. */
.hero {
    --stage: #0d0b08;
    position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; isolation: isolate; overflow: hidden;
    padding-top: calc(var(--header-h) + 2rem); padding-bottom: 9rem; background: var(--stage); color: var(--on-dark-muted);
}
/* Static underlay: shown when WebGL is unavailable (or before it starts). */
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -3;
    background:
        radial-gradient(38% 52% at 74% 46%, rgba(176, 138, 74, 0.26), transparent 70%),
        repeating-radial-gradient(circle at 74% 46%, transparent 0 9.5vmin, rgba(176, 138, 74, 0.16) 9.5vmin calc(9.5vmin + 1px)),
        var(--stage);
}
.hero--live::before { background: radial-gradient(60% 70% at 72% 46%, rgba(70, 120, 150, 0.12), transparent 70%), var(--stage); }
.hero__canvas { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; display: block; }
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(13, 11, 8, 0.92) 0%, rgba(13, 11, 8, 0.55) 38%, rgba(13, 11, 8, 0) 62%),
        linear-gradient(0deg, rgba(13, 11, 8, 0.85), transparent 28%);
}

.hero__inner { position: relative; }
.hero__text { display: grid; gap: clamp(1.4rem, 2.4vw, 2rem); justify-items: start; max-width: 44rem; }
.hero .eyebrow { color: var(--gold); }
.hero__title {
    font-family: var(--serif); font-weight: 500; color: var(--on-dark);
    font-size: clamp(2.9rem, 6.6vw, 6rem); line-height: 1; letter-spacing: -0.03em;
}
.hero__title em { font-style: italic; color: var(--gold); }
.hero__copy { max-width: 28rem; font-size: clamp(1rem, 1.25vw, 1.15rem); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; margin-top: 0.3rem; }
.hero .link-arrow { color: var(--on-dark); border-bottom-color: rgba(243, 237, 225, 0.3); }
.hero .link-arrow:hover { color: var(--gold); border-color: var(--gold); }

/* HUD: stage name, typed system line, progress and status */
.hero__hud {
    position: absolute; left: 0; right: 0; bottom: clamp(1.5rem, 3.5vw, 2.75rem); margin-inline: auto; z-index: 2;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.74rem; letter-spacing: 0.08em;
    color: var(--on-dark-muted);
}
.hud__stage { display: block; color: var(--gold); text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 0.7rem; }
.hud__line { display: flex; align-items: center; min-height: 1.4em; color: var(--on-dark); font-size: 0.82rem; }
.hud__caret { display: inline-block; width: 0.55em; height: 1.05em; margin-left: 0.2em; background: var(--gold); animation: blink 1s steps(2) infinite; }
.hud__bar { display: flex; gap: 0.4rem; margin-top: 0.9rem; width: min(15rem, 60vw); }
.hud__bar i { flex: 1; height: 2px; background: rgba(243, 237, 225, 0.18); position: relative; overflow: hidden; }
.hud__bar i::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease); }
.hud__bar i.on::after { transform: scaleX(1); }
.hud__right { display: grid; justify-items: end; gap: 0.9rem; text-align: right; }
.hud__status { display: inline-flex; align-items: center; gap: 0.6rem; text-transform: uppercase; letter-spacing: 0.2em; }
.hud__status b { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #5fe0a0; box-shadow: 0 0 0 0 rgba(95, 224, 160, 0.6); animation: ping 2s infinite; }
.hud__replay {
    padding: 0.55rem 1rem; border-radius: 999px; border: 1px solid rgba(243, 237, 225, 0.25); background: transparent; color: var(--on-dark);
    font: inherit; text-transform: uppercase; letter-spacing: 0.16em; transition: border-color 0.3s, color 0.3s;
}
.hud__replay:hover { border-color: var(--gold); color: var(--gold); }
.hero:not(.hero--live) .hero__hud { display: none; } /* no scene running, so no readout */
@keyframes blink { 50% { opacity: 0; } }
@keyframes ping { 70% { box-shadow: 0 0 0 0.6rem rgba(95, 224, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 224, 160, 0); } }

/* Header sitting on top of the dark hero */
.site-header.on-dark .brand, .site-header.on-dark .nav a { color: var(--on-dark); }
.site-header.on-dark .nav a { color: rgba(243, 237, 225, 0.72); }
.site-header.on-dark .nav a:hover, .site-header.on-dark .nav a.is-active { color: var(--on-dark); }
.site-header.on-dark .nav a::after { background: var(--gold); }
.site-header.on-dark .btn--dark { background: var(--gold); color: var(--ink); }
.site-header.on-dark .btn--dark:hover { background: var(--on-dark); }
.site-header.on-dark.is-scrolled { background: rgba(13, 11, 8, 0.72); border-bottom-color: rgba(243, 237, 225, 0.1); }
.site-header.on-dark .nav-toggle { border-color: rgba(243, 237, 225, 0.3); }
.site-header.on-dark .nav-toggle span { background: var(--on-dark); }
.menu-open .site-header.on-dark .nav-toggle { border-color: var(--line-strong); }
.menu-open .site-header.on-dark .nav-toggle span { background: var(--ink); }

/* Section heads -------------------------------------------------------------- */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 2rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head .display { margin-top: 1rem; }

/* Project cards ---------------------------------------------------------------- */
/* Five projects per row on large screens, stepping down as the screen narrows. */
.work-grid {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(2rem, 3vw, 2.75rem) clamp(1rem, 1.6vw, 1.6rem);
}

.card__link { display: block; }
.card__media {
    position: relative; aspect-ratio: 16 / 11; border-radius: var(--radius); overflow: hidden;
    background: var(--gold-soft); box-shadow: 0 0 0 1px var(--line);
    transition: box-shadow 0.5s var(--ease), transform 0.6s var(--ease);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card__link:hover .card__media { transform: translateY(-6px); box-shadow: 0 0 0 1px var(--line), 0 34px 50px -34px rgba(22, 19, 15, 0.55); }
.card__link:hover .card__media img { transform: scale(1.04); }

.card__go {
    position: absolute; top: 1rem; right: 1rem; display: grid; place-items: center; width: 3rem; height: 3rem;
    border-radius: 50%; background: rgba(251, 249, 244, 0.94); color: var(--ink);
    opacity: 0; transform: translate(6px, -6px) scale(0.9);
    transition: opacity 0.4s, transform 0.5s var(--ease), background 0.3s, color 0.3s;
}
.card__go svg { width: 1.1rem; height: 1.1rem; }
.card__link:hover .card__go, .card__link:focus-visible .card__go { opacity: 1; transform: none; }
.card__go:hover { background: var(--ink); color: var(--on-dark); }

.card__media { border-radius: 16px; }
.card__go { top: 0.7rem; right: 0.7rem; width: 2.5rem; height: 2.5rem; }
.card__go svg { width: 1rem; height: 1rem; }

.card__meta { display: grid; justify-items: start; gap: 0.2rem; padding-top: 1rem; }
.card__title {
    font-family: var(--serif); font-weight: 500; font-size: clamp(1.35rem, 1.5vw, 1.6rem); line-height: 1.12;
    letter-spacing: -0.01em; color: var(--ink); transition: color 0.3s; overflow-wrap: anywhere;
}
.card__link:hover .card__title { color: var(--gold-deep); }
.card__host { font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }
.card__type {
    margin-top: 0.55rem; padding: 0.4rem 0.8rem; border: 1px solid var(--line-strong); border-radius: 999px;
    font-size: 0.64rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); line-height: 1;
}

/* About ------------------------------------------------------------------------ */
.about { background: var(--paper); border-block: 1px solid var(--line); }
.about__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about__grid .display { margin-top: 1rem; }
.about__body { display: grid; gap: 1.8rem; padding-top: 0.5rem; }
.about__body p { font-size: clamp(1.02rem, 1.3vw, 1.15rem); }
.tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tags li {
    padding: 0.6rem 1.1rem; border-radius: 999px; border: 1px solid var(--line-strong);
    font-size: 0.82rem; font-weight: 600; color: var(--ink); background: var(--bg);
}

/* Contact panel ------------------------------------------------------------------ */
.contact { padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2rem, 4vw, 3rem); }
.contact__panel {
    position: relative; overflow: hidden; isolation: isolate; text-align: center;
    padding: clamp(3.5rem, 8vw, 7rem) clamp(1.5rem, 6vw, 5rem); border-radius: 34px;
    background: var(--dark); color: var(--on-dark-muted); display: grid; justify-items: center; gap: 1.6rem;
}
.contact__panel::before {
    content: ""; position: absolute; z-index: -1; left: 50%; top: -30%; width: 90%; aspect-ratio: 1; transform: translateX(-50%);
    background: radial-gradient(circle, rgba(176, 138, 74, 0.32), rgba(176, 138, 74, 0) 62%);
}
.contact__panel .eyebrow { color: var(--gold); }
.contact__panel .display { color: var(--on-dark); font-size: clamp(2.5rem, 6.4vw, 5.2rem); max-width: 14ch; }
.contact__panel .display em { color: var(--gold); }
.contact__panel p { max-width: 30rem; }
.contact__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 2rem; font-size: 0.92rem; }
.contact__meta a:hover { color: var(--gold); }

/* Work page ---------------------------------------------------------------------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 6rem)); padding-bottom: clamp(2rem, 4vw, 3rem); }
.page-hero .display { font-size: clamp(3.2rem, 8vw, 6.6rem); margin-top: 1rem; }
.page-hero p { margin-top: 1.2rem; max-width: 34rem; font-size: 1.1rem; }

.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.chip {
    display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.75rem 1.2rem; border-radius: 999px;
    border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.chip small { font-size: 0.7rem; color: var(--muted); font-weight: 600; letter-spacing: 0; transition: color 0.3s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.chip[aria-pressed="true"] small { color: var(--on-dark-muted); }
.work-grid .card.is-filtering { animation: fadeUp 0.6s var(--ease) both; }

.empty {
    display: grid; justify-items: center; gap: 1rem; text-align: center;
    padding: clamp(3.5rem, 9vw, 7rem) 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.empty h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.8rem, 3vw, 2.5rem); color: var(--ink); }

/* Footer --------------------------------------------------------------------------- */
.site-footer { padding-block: 1.6rem 2.2rem; }
.footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; font-size: 0.86rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
.footer__links a { transition: color 0.3s; }
.footer__links a:hover { color: var(--gold-deep); }

/* Motion --------------------------------------------------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(1.8rem); transition: opacity 0.9s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(1.6rem); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Agency motion: smooth scroll, loader, word reveals, marquee, cursor
   ========================================================================== */

/* Smooth scroll (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Intro loader: ink curtain with a counter, lifts away to reveal the page */
.loader {
    position: fixed; inset: 0; z-index: 500; display: none; flex-direction: column; align-items: center; justify-content: center;
    background: var(--dark); color: var(--on-dark); border-radius: 0;
    transition: transform 1.1s cubic-bezier(0.76, 0, 0.24, 1), border-radius 1.1s cubic-bezier(0.76, 0, 0.24, 1);
}
.js:not(.skip-intro):not(.loader-done) .loader { display: flex; }
.loader.is-leaving { transform: translateY(-104%); border-radius: 0 0 50% 50% / 0 0 14vh 14vh; }
.loader__brand { color: var(--on-dark); animation: fadeUp 1s var(--ease) 0.1s both; }
.loader__brand .brand__name { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.loader__brand .brand__mark { width: 1.9rem; height: 1.9rem; }
.loader__count {
    position: absolute; left: var(--gutter); bottom: clamp(1.4rem, 4vw, 3rem); display: flex; align-items: flex-end; gap: 0.4rem;
    font-family: var(--serif); font-size: clamp(4.5rem, 14vw, 11rem); line-height: 0.78; letter-spacing: -0.03em; color: var(--on-dark);
    font-variant-numeric: lining-nums tabular-nums;
}
.loader__count small { font-size: 0.28em; color: var(--gold); line-height: 1; padding-bottom: 0.2em; }
.loader__bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: left; }

/* Header slides away while scrolling down, returns when scrolling up */
.site-header { transition: background 0.4s, border-color 0.4s, height 0.4s var(--ease), transform 0.6s var(--ease); }
.site-header.is-hidden { transform: translateY(-100%); }

/* Hero entrance (starts when the loader has lifted) */
.js .hero .eyebrow, .js .hero__copy, .js .hero__actions, .js .hero__hud,
.js .page-hero .eyebrow, .js .page-hero p { opacity: 0; }
.is-ready .hero .eyebrow, .is-ready .page-hero .eyebrow { animation: fadeUp 1s var(--ease) 0.05s both; }
.is-ready .hero__copy, .is-ready .page-hero p { animation: fadeUp 1s var(--ease) 0.55s both; }
.is-ready .hero__actions { animation: fadeUp 1s var(--ease) 0.7s both; }
.is-ready .hero__hud { animation: fadeUp 1.2s var(--ease) 1.1s both; }
@keyframes wipe { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

/* Word-by-word text reveals */
.js:not(.loader-done) [data-split]:not(.is-split),
.js:not(.loader-done) [data-scrub]:not(.is-split) { visibility: hidden; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.08em 0.14em 0; margin: 0 -0.08em -0.14em 0; }
.wi { display: inline-block; transform: translateY(115%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 55ms); will-change: transform; }
[data-split].is-in .wi,
.is-ready .hero [data-split] .wi,
.is-ready .page-hero [data-split] .wi { transform: none; }

/* Scroll-scrubbed statement: words light up as you scroll */
[data-scrub] .w { overflow: visible; }
[data-scrub] .wi { transform: none; opacity: 0.16; transition: opacity 0.5s; transition-delay: 0s; }
[data-scrub] .wi.on { opacity: 1; }

/* Images: wipe in, drift with scroll, zoom on hover */
.card__media img { transform: scale(1.12); translate: 0 var(--py, 0%); }

.js .card__media img { clip-path: inset(0 0 100% 0); transform: scale(1.32); }
.js .card.is-in .card__media img {
    clip-path: inset(0 0 0 0); transform: scale(1.12);
    transition: clip-path 1.3s cubic-bezier(0.76, 0, 0.24, 1), transform 1.4s var(--ease);
}
.card__link:hover .card__media img { transform: scale(1.19); }
.js .card.is-in .card__link:hover .card__media img { transform: scale(1.19); transition: transform 1.2s var(--ease); }

/* Marquee: big running type that speeds up and reverses with your scroll */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding-block: clamp(1rem, 2.2vw, 1.8rem); background: var(--bg); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; flex: none; }
.marquee__item {
    display: inline-flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); padding-right: clamp(1.5rem, 3vw, 3rem);
    font-family: var(--serif); font-weight: 500; font-size: clamp(3rem, 9vw, 8.5rem); line-height: 1.05; letter-spacing: -0.02em;
    color: var(--ink); white-space: nowrap;
}
.marquee__item:nth-child(even) { color: transparent; -webkit-text-stroke: 1px var(--ink); font-style: italic; }
.marquee__item svg { width: 0.4em; height: 0.4em; color: var(--gold); flex: none; }

/* Custom cursor (only on devices with a mouse) */
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor label { cursor: none; }
.cursor {
    position: fixed; left: 0; top: 0; z-index: 300; width: 0.9rem; height: 0.9rem; margin: 0; border-radius: 50%;
    background: #fff; mix-blend-mode: difference; pointer-events: none; opacity: 0;
    display: grid; place-items: center;
    transition: width 0.45s var(--ease), height 0.45s var(--ease), background 0.3s, opacity 0.3s;
}
.cursor.is-on { opacity: 1; }
.cursor.is-link { width: 3.4rem; height: 3.4rem; }
.cursor.is-view { width: 5.8rem; height: 5.8rem; background: var(--gold); mix-blend-mode: normal; }
.cursor__label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); opacity: 0; transition: opacity 0.25s; }
.cursor.is-view .cursor__label { opacity: 1; }

/* Buttons follow the cursor a little (JS sets the translate) */
.btn { transition: transform 0.45s var(--ease), background 0.3s, color 0.3s, box-shadow 0.45s, border-color 0.3s, translate 0.4s var(--ease); }

/* Responsive ------------------------------------------------------------------------ */
@media (max-width: 1200px) { .work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1020px) { .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 900px) {
    .nav, .site-header .btn { display: none; }
    .nav-toggle { display: block; }

    .about__grid { grid-template-columns: 1fr; }

    /* Phone/tablet: the scene sits up top, copy underneath it. */
    .hero { align-items: flex-end; padding-bottom: 8.5rem; }
    .hero::after {
        background:
            linear-gradient(0deg, rgba(13, 11, 8, 0.96) 0%, rgba(13, 11, 8, 0.78) 34%, rgba(13, 11, 8, 0) 66%),
            linear-gradient(180deg, rgba(13, 11, 8, 0.5), transparent 20%);
    }
    .hero__title { font-size: clamp(2.6rem, 11vw, 4.4rem); }
}

@media (max-width: 640px) {
    .card__go { opacity: 1; transform: none; }
    .hero__actions .btn { width: 100%; }
    .hero__actions { width: 100%; }
    .footer__row { flex-direction: column; align-items: flex-start; }
}

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

@media (max-width: 640px) {
    .hud__status { display: none; }
    .hero__hud { align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
    .loader, .cursor { display: none !important; }
    .wi { transform: none; }
    [data-scrub] .wi { opacity: 1; }
    .js .hero .eyebrow, .js .hero__copy, .js .hero__actions, .js .hero__hud,
    .js .page-hero .eyebrow, .js .page-hero p { opacity: 1; }
    .js .card__media img { clip-path: none; transform: scale(1.12); }
    .hud__caret, .hud__status b { animation: none; }
}
