/* =========================================================
   RADIANT ACT — v8
   Editorial Theater Programme
   Wow stack: scroll-driven animations (animation-timeline:
   scroll() / view()), variable-font weight reveal, sticky
   horizontal-scroll services, spotlight cursor, marquee.
   ========================================================= */

/* CSS reset / base ---------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Header is ~80px tall (fixed) — keep section eyebrows from
       sliding under it on anchor navigation. */
    scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    overflow-x: clip;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg,
video { display: block; max-width: 100%; height: auto; }

ul, ol { list-style: none; padding: 0; margin: 0; }

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

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

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

/* Tokens -------------------------------------------------- */
:root {
    --bg: #0a0908;
    --bg-2: #11100e;
    --bg-3: #1a1816;
    --ink: #f3eee5;
    --ink-mute: #a8a195;
    --ink-dim: #6b665d;
    --paper: #efe7d6;
    --red: #b9130d;
    --red-soft: #d63b35;
    --gold: #d4a017;
    --line: rgba(243, 238, 229, 0.12);
    --line-2: rgba(243, 238, 229, 0.06);

    --serif: 'Fraunces', 'Times New Roman', Georgia, serif;
    --sans: 'Inter', system-ui, sans-serif;

    --max: 1440px;
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --section-pad: clamp(5rem, 10vw, 9rem);

    --ease: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* cqi = container inline (width), cqb = container block (height).
       min() picks whichever dimension is the constraint, so the title
       always fits the hero in BOTH width and height.
       Outside any container, cq* falls back to small viewport units. */
    --t-hero: clamp(2.75rem, min(11cqi, 19cqb), 7rem);
    --t-display: clamp(1.75rem, 4.2vw, 3.5rem);
    --t-h2: clamp(1.4rem, 2.2vw, 2.2rem);
    --t-h3: clamp(1.2rem, 1.8vw, 1.65rem);
    --t-eyebrow: 0.75rem;
}

/* Property registration for animatable gradient angles --- */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* Spotlight cursor (theatrical wow) ---------------------- */
.spotlight {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    background: radial-gradient(
        420px circle at var(--mx, 50%) var(--my, 50%),
        rgba(212, 160, 23, 0.10),
        rgba(185, 19, 13, 0.06) 30%,
        transparent 60%
    );
    mix-blend-mode: screen;
}
body.cursor-active .spotlight { opacity: 1; }

/* Film grain overlay ------------------------------------- */
.grain {
    position: fixed;
    inset: -50%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.06;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.7 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
    animation: grain 8s steps(8) infinite;
}
@keyframes grain {
    0%   { transform: translate(0,0); }
    25%  { transform: translate(-3%, 2%); }
    50%  { transform: translate(2%, -3%); }
    75%  { transform: translate(-2%, -2%); }
    100% { transform: translate(0,0); }
}

/* Scroll progress (uses scroll-driven animation) --------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--line-2);
    z-index: 60;
}
.scroll-progress__bar {
    height: 100%;
    width: 100%;
    transform-origin: left center;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--red) 0%, var(--gold) 50%, var(--red-soft) 100%);
    animation: progress linear;
    animation-timeline: scroll(root);
}
@keyframes progress {
    to { transform: scaleX(1); }
}

/* Typography helpers ------------------------------------- */
.eyebrow {
    font-family: var(--sans);
    font-size: var(--t-eyebrow);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ink-mute);
    margin: 0 0 1rem;
    font-weight: 500;
}
.display {
    font-family: var(--serif);
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "opsz" 90, "SOFT" 30;
    font-size: var(--t-display);
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--paper);
    margin: 0 0 1.5rem;
    text-wrap: balance;
}
.display em {
    font-style: normal;
    color: var(--red-soft);
}
.lead {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    color: var(--ink-mute);
    max-width: 60ch;
    text-wrap: pretty;
}

/* Header ------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem var(--gutter);
    background: linear-gradient(to bottom, rgba(10, 9, 8, 0.85), rgba(10, 9, 8, 0));
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease), padding 0.3s var(--ease);
}
.site-header.is-scrolled {
    background: rgba(10, 9, 8, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--line-2);
}

.site-header__logo {
    display: inline-flex;
    align-items: center;
}
.site-header__logo img {
    height: 44px;
    width: auto;
    transition: height 0.3s var(--ease), opacity 0.4s var(--ease-out);
}
.site-header.is-scrolled .site-header__logo img {
    height: 38px;
}
.site-header__logo:hover img { opacity: 0.85; }

.site-nav {
    display: flex;
}
.site-nav ul {
    display: flex;
    gap: 2.25rem;
}
.site-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink);
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.25s var(--ease);
}
.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.4s var(--ease-out);
}
.site-nav a:hover { color: var(--paper); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left center; }

.site-header__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    background: transparent;
    transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header__cta:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}
.site-header__cta svg { transition: transform 0.3s var(--ease); }
.site-header__cta:hover svg { transform: translateX(3px); }

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 60;
}
.menu-toggle span {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.3s var(--ease), top 0.3s var(--ease), opacity 0.2s var(--ease);
}
.menu-toggle span:first-child { top: 14px; }
.menu-toggle span:last-child { top: 24px; }
.menu-toggle.is-open span:first-child { top: 19px; transform: rotate(45deg); }
.menu-toggle.is-open span:last-child { top: 19px; transform: rotate(-45deg); }

.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(10, 9, 8, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
}
.mobile-nav nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.mobile-nav a {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 6vw, 3rem);
    color: var(--paper);
    transition: color 0.3s var(--ease);
}
.mobile-nav a:hover { color: var(--red-soft); }
.mobile-nav__cta {
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-family: var(--sans) !important;
    font-size: 1rem !important;
}

@media (max-width: 880px) {
    .site-nav, .site-header__cta { display: none; }
    .menu-toggle { display: block; }
}

/* HERO --------------------------------------------------- */
.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 9rem var(--gutter) 5rem;
    overflow: hidden;
    isolation: isolate;
    /* Establish a size container so the title can scale to room
       in BOTH dimensions via cqi (width) + cqb (height). */
    container-type: size;
    container-name: hero;
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;
}
.hero__slide {
    display: block;
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.6s var(--ease);
    will-change: opacity;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Keep colors so each scene is visibly distinct in the rotation,
       just darkened to preserve the cinematic mood. */
    filter: brightness(0.7) saturate(0.8);
    animation: heroZoom 18s ease-out infinite alternate;
}
.hero__media-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 20% 30%, rgba(185, 19, 13, 0.22), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 160, 23, 0.10), transparent 55%),
        linear-gradient(to bottom, rgba(10, 9, 8, 0.45) 0%, rgba(10, 9, 8, 0.75) 100%);
}
@keyframes heroZoom {
    from { transform: scale(1) translate(0, 0); }
    to   { transform: scale(1.08) translate(-1%, -1%); }
}

/* Theatrical curtains — open on load */
.curtain {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 5;
    background:
        repeating-linear-gradient(90deg,
            #1a0303 0px,
            #2a0606 6px,
            #4a0808 12px,
            #2a0606 18px,
            #1a0303 24px),
        radial-gradient(ellipse at center, #5a0a0a, #1a0303 70%);
    background-blend-mode: multiply;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    transform-origin: top;
    animation: curtainOpen 1.8s 0.3s var(--ease-out) forwards;
}
.curtain--left {
    left: 0;
    transform-origin: left center;
}
.curtain--right {
    right: 0;
    transform-origin: right center;
}
.curtain--left {
    animation-name: curtainOpenLeft;
}
.curtain--right {
    animation-name: curtainOpenRight;
}
@keyframes curtainOpenLeft {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-105%); }
}
@keyframes curtainOpenRight {
    0%   { transform: translateX(0); }
    100% { transform: translateX(105%); }
}

.hero__content {
    max-width: var(--max);
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 3;
}

.hero__title {
    font-family: var(--serif);
    font-weight: 350;
    font-style: normal;
    font-size: var(--t-hero);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--paper);
    margin: 0 0 1.5rem;
    font-variation-settings: "opsz" 144, "SOFT" 30;
    text-wrap: balance;
}
.hero__title .line {
    display: block;
}
.hero__title em {
    font-style: normal;
    color: var(--red-soft);
}

.hero__lede {
    max-width: 56ch;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    color: var(--ink-mute);
    margin: 0 0 2.5rem;
    text-wrap: pretty;
    opacity: 0;
    animation: fadeUp 0.8s 2.2s var(--ease-out) forwards;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    opacity: 0;
    animation: fadeUp 0.8s 2.4s var(--ease-out) forwards;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.7rem;
    border-radius: 999px;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 0.9rem;
    overflow: hidden;
    isolation: isolate;
    transition:
        background 0.5s var(--ease-out),
        border-color 0.5s var(--ease-out),
        color 0.5s var(--ease-out),
        box-shadow 0.5s var(--ease-out);
}
.btn svg {
    position: relative;
    z-index: 2;
    transition: transform 0.5s var(--ease-out);
}
.btn span { position: relative; z-index: 2; }

.btn--primary {
    background: var(--red);
    color: #fff;
    border: 1px solid var(--red);
}
.btn--primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(95deg, var(--red-soft) 0%, #e85852 100%);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
    z-index: 1;
}
.btn--primary:hover {
    border-color: var(--red-soft);
    box-shadow: 0 14px 40px -16px rgba(214, 59, 53, 0.55);
}
.btn--primary:hover::before { opacity: 1; }
.btn--primary:hover svg { transform: translateX(5px); }

.btn--ghost {
    background: transparent;
    color: var(--ink-mute);
    border: 1px solid var(--line);
}
.btn--ghost::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(243, 238, 229, 0.06);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
    z-index: 1;
}
.btn--ghost:hover {
    border-color: var(--paper);
    color: var(--paper);
}
.btn--ghost:hover::before { opacity: 1; }

.hero__scroll {
    position: absolute;
    bottom: 2rem;
    right: var(--gutter);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ink-mute);
    opacity: 0;
    animation: fadeIn 0.8s 2.8s var(--ease-out) forwards;
    z-index: 4;
}
.hero__scroll svg { animation: bob 2s ease-in-out infinite; }
.hero__scroll:hover { color: var(--paper); }

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.9); }
}
@keyframes fadeIn {
    to { opacity: 1; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* SERVICES — editorial grid ------------------------------ */
.services {
    background: var(--bg);
    position: relative;
    padding: var(--section-pad) var(--gutter);
}

.services__intro {
    max-width: var(--max);
    margin: 0 auto 4rem;
}
.services__intro .display {
    max-width: 22ch;
}

.services__grid {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.service {
    background: var(--bg-2);
    padding: clamp(1.6rem, 2.4vw, 2.4rem);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-height: 320px;
    transition: background 0.45s var(--ease-out);
}

@media (max-width: 980px) {
    .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .services__grid { grid-template-columns: 1fr; }
    .service { min-height: 0; }
}
.service::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        300px circle at var(--lx, 50%) var(--ly, 50%),
        rgba(185, 19, 13, 0.18),
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    pointer-events: none;
}
.service:hover::before { opacity: 1; }
.service:hover {
    background: var(--bg-3);
}
.service article {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.service__head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.4rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--line);
}
.service__num {
    font-family: var(--serif);
    font-style: italic;
    font-size: 2rem;
    color: var(--red-soft);
    line-height: 1;
    font-variation-settings: "opsz" 144;
    flex-shrink: 0;
}
.service__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: var(--t-h3);
    line-height: 1.2;
    color: var(--paper);
    margin: 0;
    font-variation-settings: "opsz" 90;
    flex: 1 1 auto;
    min-width: 0;
    text-wrap: balance;
}
.service__lead {
    color: var(--ink-mute);
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    line-height: 1.55;
}
.service__list {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.service__list li {
    position: relative;
    padding-left: 1.4rem;
    font-size: 0.9rem;
    color: var(--ink);
    line-height: 1.4;
}
.service__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.7rem;
    height: 1px;
    background: var(--red);
}

/* MANIFESTO ---------------------------------------------- */
.manifesto {
    padding: var(--section-pad) var(--gutter);
    background:
        radial-gradient(ellipse 800px 600px at 80% 10%, rgba(185, 19, 13, 0.06), transparent 60%),
        var(--bg);
    position: relative;
    border-top: 1px solid var(--line);
}
.manifesto__grid {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: clamp(2rem, 6vw, 6rem);
}
.manifesto__head .display {
    max-width: 12ch;
}
.manifesto__lede {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 1.6vw, 1.5rem);
    line-height: 1.35;
    color: var(--paper);
    margin: 0 0 1.5rem;
    font-variation-settings: "opsz" 90;
    text-wrap: pretty;
}
.manifesto__body p {
    color: var(--ink-mute);
    max-width: 60ch;
    margin: 0 0 1.2rem;
}
.manifesto__body strong {
    color: var(--paper);
    font-weight: 600;
}
.manifesto__pillars {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--line);
    padding-top: 3rem;
}
.manifesto__pillars li {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 2.5rem;
    position: relative;
}
.manifesto__pillars li + li {
    padding-left: 2.5rem;
    border-left: 1px solid var(--line);
}

.pillar-num {
    font-family: var(--serif);
    font-style: italic;
    color: var(--red-soft);
    font-size: 2rem;
    line-height: 1;
    font-variation-settings: "opsz" 144;
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.3rem;
}
.pillar-num::after {
    content: "";
    flex: 0 0 auto;
    width: 2.4rem;
    height: 1px;
    background: currentColor;
    opacity: 0.45;
    transition: width 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
}
.manifesto__pillars li:hover .pillar-num::after {
    width: 3.6rem;
    opacity: 0.7;
}

.manifesto__pillars h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.4rem;
    color: var(--paper);
    margin: 0;
    line-height: 1.2;
    font-variation-settings: "opsz" 90;
    text-wrap: balance;
}
.manifesto__pillars p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ink-mute);
    text-wrap: pretty;
    max-width: 32ch;
}

@media (max-width: 880px) {
    .manifesto__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .manifesto__pillars {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 2.5rem;
    }
    .manifesto__pillars li {
        padding-right: 0;
        padding-bottom: 2rem;
    }
    .manifesto__pillars li + li {
        padding-left: 0;
        padding-top: 2rem;
        border-left: none;
        border-top: 1px solid var(--line);
    }
    .manifesto__pillars li:last-child { padding-bottom: 0; }
}

/* CLIENTS — tile wall ------------------------------------ */
.clients {
    padding: var(--section-pad) var(--gutter);
    background: var(--bg);
    border-top: 1px solid var(--line);
}
.clients__head {
    max-width: var(--max);
    margin: 0 auto 4rem;
}
.clients__head .display { max-width: 22ch; }

.clients__grid {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    /* Solid dark hairline so the 1px gap is visible against cream tiles */
    background: rgba(10, 9, 8, 0.22);
    border: 1px solid rgba(10, 9, 8, 0.22);
}

.client-tile {
    background: var(--paper);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 1.4rem;
    overflow: hidden;
    position: relative;
    transition: background 0.5s var(--ease-out);
}
.client-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(185, 19, 13, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
    pointer-events: none;
}
.client-tile:hover::before { opacity: 1; }
.client-tile img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: saturate(0.5);
    transition: filter 0.5s var(--ease-out), transform 0.5s var(--ease-out);
    mix-blend-mode: multiply;
}
.client-tile:hover img {
    filter: saturate(1);
    transform: scale(1.04);
}

@media (max-width: 1100px) {
    .clients__grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 760px) {
    .clients__grid { grid-template-columns: repeat(3, 1fr); }
    .client-tile { padding: 1rem; }
}
@media (max-width: 460px) {
    .clients__grid { grid-template-columns: repeat(2, 1fr); }
}

/* CONTACT ------------------------------------------------ */
.contact {
    padding: var(--section-pad) var(--gutter);
    background:
        radial-gradient(ellipse 1000px 600px at 50% 0%, rgba(185, 19, 13, 0.10), transparent 70%),
        var(--bg);
    border-top: 1px solid var(--line);
    text-align: center;
    position: relative;
}
.contact__inner {
    max-width: 900px;
    margin: 0 auto;
}
.contact__title {
    font-size: clamp(2rem, 5vw, 4.5rem);
    margin-bottom: 2rem;
}
.contact__lede {
    color: var(--ink-mute);
    margin: 0 0 3rem;
    font-size: 1.1rem;
    max-width: 50ch;
    margin-inline: auto;
}
.contact__email {
    display: inline-block;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    color: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 0;
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
    font-variation-settings: "opsz" 144;
}
.contact__email[data-encoded] {
    direction: rtl;
    unicode-bidi: bidi-override;
}
.contact__email:hover {
    color: var(--red-soft);
    border-color: var(--red-soft);
}
.contact__email .encoded {
    display: none;
}
.contact__social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}
.contact__social a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--ink-mute);
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.contact__social a:hover {
    color: var(--paper);
    border-color: var(--paper);
}

/* SCROLL-DRIVEN view() reveals --------------------------- */
@supports (animation-timeline: view()) {
    /* Generic reveal — fades + lifts items as they enter view */
    .display,
    .lead,
    .service,
    .manifesto__pillars li,
    .client-tile {
        animation: revealUp linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 30%;
    }

    /* Numerals — rotate in */
    .service__num,
    .pillar-num {
        animation: numRotate linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 50%;
    }
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}
@keyframes numRotate {
    from { opacity: 0; transform: rotate(-12deg) translateY(20px); }
    to   { opacity: 1; transform: rotate(0) translateY(0); }
}

/* JS-fallback reveal (used when scroll-timeline unsupported) */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(6px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.8s var(--ease-out);
    will-change: opacity, transform, filter;
}
[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Touch / no-hover fallbacks ----------------------------- */
@media (hover: none) {
    body.cursor-active .spotlight { opacity: 0; }
}

/* Reduce motion finer-grained --------------------------- */
@media (prefers-reduced-motion: reduce) {
    .grain { animation: none; }
    .curtain { animation: none; transform: translateX(-105%); }
    .curtain--right { transform: translateX(105%); }
    .hero__media img { animation: none; }
    /* The hero crossfade is opacity-only (a state transition, not
       motion) — keep it smooth instead of snapping. */
    .hero__slide { transition-duration: 1.6s !important; }
}
