:root {
    /* Ink palette — dark editorial, zero neon */
    --bg-void: #0a0a0a;
    --bg-raised: #111112;
    --text-main: #F3F1EA;
    --text-white: #FFFFFF;
    --text-subtle: #8A8A93;
    --text-faint: rgba(243, 241, 234, 0.35);
    --accent-glow: #E05200;
    --hairline: rgba(243, 241, 234, 0.12);
    --hairline-strong: rgba(243, 241, 234, 0.22);

    /* Type families */
    --font-main: 'Satoshi', sans-serif;
    --font-serif: 'Instrument Serif', 'Georgia', serif;
    --font-display: 'Playfair Display', 'Georgia', serif;

    /* Fluid type scale — tuned so 360px phones never break a word */
    --fs-kicker: clamp(0.6875rem, 0.6rem + 0.35vw, 0.8125rem);
    --fs-body: clamp(1rem, 0.94rem + 0.25vw, 1.125rem);
    --fs-h3: clamp(1.375rem, 1.1rem + 1.1vw, 1.75rem);
    --fs-h2: clamp(1.875rem, 1.3rem + 2.4vw, 3.25rem);
    --fs-h1: clamp(2.5rem, 1.4rem + 4.8vw, 5.5rem);
    --fs-display: clamp(2.75rem, 1rem + 8vw, 10rem);
    --fs-number: clamp(2.75rem, 1.2rem + 6.5vw, 7rem);

    /* Motion */
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-soft: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-ink: cubic-bezier(0.32, 0.72, 0, 1);
    --btn-radius: 4px;
    --btn-press: 0.15s;

    /* Aggressive, "expensive" vertical rhythm between major sections */
    --section-gap: clamp(4rem, 8vh, 10rem);
    --section-gap-lg: clamp(6rem, 16vh, 16rem);
}

html {
    background-color: var(--bg-void);
}

/* Lenis recommended helpers — required so nested modal scroll is not hijacked */
html.lenis,
html.lenis-smooth {
    height: auto;
}

html.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

html.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

html.lenis.lenis-stopped {
    overflow: hidden;
}

::selection {
    background: var(--accent-glow);
    color: #FFFFFF;
}

.hairline {
    border: none;
    border-top: 1px solid var(--hairline);
    margin: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: transparent;
    color: var(--text-main);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    position: relative;
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

.site-main {
    position: relative;
    z-index: 2;
    background-color: var(--bg-void);
    overflow-x: clip;
}

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(20px, 3vh, 32px) 6%;
    background: transparent;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
}

.brand-name {
    font-size: clamp(1.625rem, 1.35rem + 1vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: clamp(1.75rem, 3vw, 3rem);
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--text-main);
    transition: width 0.4s var(--ease-out-soft);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ─── Hero: full-bleed editorial masthead ─── */
.hero {
    min-height: 100svh;
    padding: clamp(110px, 22vh, 180px) 6% clamp(48px, 8vh, 96px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    text-align: left;
    will-change: transform, opacity;
}

.main-heading {
    font-size: var(--fs-display);
    font-weight: 700;
    line-height: 0.96;
    letter-spacing: -0.05em;
    max-width: 22ch;
    color: var(--text-white);
    opacity: 0;
    will-change: transform, opacity;
    word-break: break-word;
    hyphens: auto;
}

.main-heading .word-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
}

.main-heading .word-inner {
    display: inline-block;
    will-change: transform;
}

.hero-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px 48px;
    margin-top: clamp(32px, 6vh, 72px);
    padding-top: clamp(24px, 4vh, 40px);
    border-top: 1px solid var(--hairline);
}

.description {
    color: var(--text-subtle);
    font-size: var(--fs-body);
    line-height: 1.65;
    max-width: 34ch;
    font-weight: 400;
    opacity: 0;
    will-change: transform, opacity;
}

.hero-cta-wrap {
    opacity: 0;
    flex-shrink: 0;
    will-change: transform, opacity;
}

/* ─── System A: Ink Sweep — L→R fill, editorial corners, sticky press ─── */
.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-main);
    text-decoration: none;
    padding: 1.05rem 2.2rem;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--btn-radius);
    background-color: transparent;
    background-image: linear-gradient(var(--text-main) 0 0);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    cursor: pointer;
    will-change: transform, background-size;
    transition:
        background-size 0.55s var(--ease-ink),
        color 0.45s var(--ease-ink),
        border-color 0.35s var(--ease-out-soft),
        letter-spacing 0.45s var(--ease-ink),
        transform var(--btn-press) var(--ease-out-soft);
}

.cta-button:hover,
.cta-button:focus-visible {
    background-size: 100% 100%;
    color: var(--bg-void);
    border-color: var(--text-main);
    letter-spacing: 0.08em;
    outline: none;
}

.cta-button:active {
    transform: scale(0.97);
}

/* ─── Chi Sono: full-width statement, hairline-bounded, no glass card ─── */
.chi-sono-section {
    padding: var(--section-gap) 6%;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.chi-sono-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    position: relative;
    overflow: visible;
    opacity: 0;
    will-change: transform, opacity;
}

.chi-sono-statement {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--fs-h2);
    font-weight: 400;
    color: var(--text-main);
    line-height: 1.15;
    letter-spacing: -0.01em;
    max-width: 20ch;
    margin-bottom: clamp(1.75rem, 4vh, 2.5rem);
}

/* A3 / A4 — editorial + chi-sono share Ink Sweep language */
.editorial-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    padding: 12px 24px;
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-main);
    background-color: transparent;
    background-image: linear-gradient(var(--text-main) 0 0);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--btn-radius);
    cursor: pointer;
    text-decoration: none;
    will-change: transform, background-size;
    transition:
        background-size 0.52s var(--ease-ink),
        color 0.45s var(--ease-ink),
        border-color 0.35s var(--ease-out-soft),
        letter-spacing 0.4s var(--ease-ink),
        transform var(--btn-press) var(--ease-out-soft);
}

.editorial-link .editorial-link__arrow {
    display: inline-flex;
    align-items: center;
    transition: transform 0.4s var(--ease-ink);
}

.editorial-link:hover,
.editorial-link:focus-visible {
    background-size: 100% 100%;
    color: var(--bg-void);
    border-color: var(--text-main);
    letter-spacing: 0.12em;
    outline: none;
}

.editorial-link:hover .editorial-link__arrow,
.editorial-link:focus-visible .editorial-link__arrow {
    transform: translateX(5px);
}

.editorial-link:active {
    transform: scale(0.97);
}

.editorial-link svg {
    display: none;
}

.chi-sono-cta-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
    padding: 10px 10px 10px 22px;
    background-color: transparent;
    background-image: linear-gradient(var(--text-main) 0 0);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    border: 1px solid var(--hairline-strong);
    border-radius: 999px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    will-change: transform, background-size;
    transition:
        background-size 0.55s var(--ease-ink),
        color 0.45s var(--ease-ink),
        border-color 0.35s var(--ease-out-soft),
        gap 0.35s var(--ease-out-soft),
        transform var(--btn-press) var(--ease-out-soft);
}

.chi-sono-cta-btn__label {
    position: relative;
    z-index: 1;
    transition: color 0.45s var(--ease-ink);
}

.chi-sono-cta-btn__icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--hairline-strong);
    background: transparent;
    color: inherit;
    flex-shrink: 0;
    transition:
        transform 0.45s var(--ease-ink),
        background 0.35s var(--ease-out-soft),
        border-color 0.35s var(--ease-out-soft);
}

.chi-sono-cta-btn:hover,
.chi-sono-cta-btn:focus-visible {
    background-size: 100% 100%;
    color: var(--bg-void);
    border-color: var(--text-main);
    gap: 18px;
    outline: none;
}

.chi-sono-cta-btn:hover .chi-sono-cta-btn__icon,
.chi-sono-cta-btn:focus-visible .chi-sono-cta-btn__icon {
    transform: translateX(2px);
    background: var(--bg-void);
    border-color: var(--bg-void);
    color: var(--text-main);
}

.chi-sono-cta-btn:active {
    transform: scale(0.97);
}

.about-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    overscroll-behavior: none;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1),
        visibility 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    isolation: isolate;
}

.about-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    touch-action: auto;
}

.about-modal-box {
    position: relative;
    width: 92%;
    max-width: 680px;
    max-height: min(88vh, 900px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    -ms-overflow-style: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--bg-raised);
    border: 1px solid var(--hairline);
    border-radius: 2px;
    padding: 64px 48px 80px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
    transform: translateY(16px);
    transition: transform 0.5s var(--ease-premium);
    touch-action: pan-y;
}

.about-modal-box::-webkit-scrollbar {
    width: 4px;
}

.about-modal-box::-webkit-scrollbar-thumb {
    background: var(--hairline-strong);
}

.about-modal.active .about-modal-box {
    transform: translateY(0);
}

.about-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    background-image: linear-gradient(var(--text-main) 0 0);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    border: 1px solid var(--hairline-strong);
    border-radius: 50%;
    color: var(--text-main);
    cursor: pointer;
    z-index: 2;
    flex-shrink: 0;
    transition:
        background-size 0.45s var(--ease-ink),
        color 0.35s var(--ease-ink),
        border-color 0.3s var(--ease-out-soft),
        transform 0.45s var(--ease-premium);
}

.about-modal-close:hover,
.about-modal-close:focus-visible {
    background-size: 100% 100%;
    border-color: var(--text-main);
    color: var(--bg-void);
    transform: rotate(90deg);
    outline: none;
}

.about-modal-title {
    position: relative;
    z-index: 1;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
    font-weight: 500;
    color: var(--text-main);
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 1.75rem;
    padding-right: 48px;
}

.about-modal-body {
    position: relative;
    z-index: 1;
}

.about-modal-body p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-subtle);
    margin-bottom: 1.5rem;
}

.about-modal-body p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .about-modal {
        padding: 16px;
        align-items: center;
    }

    .about-modal-box {
        width: 92%;
        max-width: 650px;
        max-height: min(90vh, 100dvh - 32px);
        padding: 48px 24px 72px;
        border-radius: 2px;
    }

    .about-modal-close {
        top: 14px;
        right: 14px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .about-modal-title {
        padding-right: 44px;
    }
}

.section-title {
    text-align: left;
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: clamp(48px, 8vh, 96px);
    opacity: 0;
    will-change: transform, opacity;
}

/* ─── Pinned GSAP Projects Slider ─── */
/* Mobile-first: static stack (no sticky/pin — stable on all phones) */
.pinned-projects-section {
    background-color: var(--bg-void);
    position: relative;
    z-index: 2;
    height: auto;
}

.pinned-container {
    width: 100%;
    position: relative;
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: clamp(48px, 10vh, 80px);
    padding: clamp(32px, 6vh, 64px) 0;
}

.pinned-slide {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6%;
    background-color: var(--bg-void);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.slide-1 {
    z-index: 1;
}

.slide-2 {
    z-index: 2;
}

/* Desktop cinematic sticky scrub only (never with reduced-motion — keep stack) */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .pinned-projects-section {
        height: 240vh;
    }

    .pinned-container {
        height: 100svh;
        height: 100dvh;
        position: sticky;
        top: 0;
        overflow: hidden;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 0;
        contain: layout paint;
    }

    .pinned-slide {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        padding: 6% 6%;
    }

    .slide-2 {
        will-change: transform;
        transform: translateZ(0);
        -webkit-mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            #000 9%,
            #000 100%
        );
        mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            #000 9%,
            #000 100%
        );
    }
}

.slide-inner-frame {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@media (min-width: 900px) {
    .slide-inner-frame {
        grid-template-columns: 1.2fr 0.8fr;
        gap: clamp(60px, 8vw, 120px);
    }
}

.slide-media {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--hairline-strong);
    background: var(--bg-raised);
    transform: translateZ(0);
}

.slide-media img {
    width: 100%;
    height: auto;
    display: block;
    transform: translateZ(0);
}

@media (min-width: 768px) {
    .slide-media {
        aspect-ratio: 16 / 10;
    }

    .slide-media img {
        height: 100%;
        object-fit: cover;
    }
}

.slide-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.project-title {
    position: relative;
    display: inline-block;
    max-width: 100%;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15; /* room for Playfair descenders (g, y) */
    margin-bottom: clamp(16px, 3vh, 28px);
    padding: 0.08em 0.06em 0.16em 0;
    color: transparent;
    -webkit-text-stroke: 1.25px rgba(255, 255, 255, 0.4);
    overflow: visible;
    --title-reveal: 100%;
    word-break: break-word;
    hyphens: auto;
}

/* Solid fill layer — revealed L→R; must wrap identically to base text */
.project-title::after {
    content: attr(data-fill);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: inherit;
    box-sizing: border-box;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    color: var(--text-white);
    -webkit-text-stroke: 0;
    white-space: normal;
    pointer-events: none;
    clip-path: inset(0 var(--title-reveal) 0 0);
    will-change: clip-path;
}

.project-desc {
    color: var(--text-subtle);
    font-size: var(--fs-body);
    line-height: 1.6;
    max-width: 40ch;
    margin-bottom: 32px;
}

.slide-content .editorial-link {
    margin-top: 0;
    flex-shrink: 0;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 10040;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    isolation: isolate;
}

.modal::-webkit-scrollbar {
    display: none;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 32px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10002;
    pointer-events: none;
}

.modal-counter {
    font-size: var(--fs-kicker);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-subtle);
}

.modal-close-btn {
    background-color: transparent;
    background-image: linear-gradient(var(--text-main) 0 0);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    border: 1px solid var(--hairline-strong);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    pointer-events: auto;
    transition:
        background-size 0.45s var(--ease-ink),
        color 0.35s var(--ease-ink),
        border-color 0.3s var(--ease-out-soft),
        transform 0.45s var(--ease-premium);
}

.modal-close-btn:hover,
.modal-close-btn:focus-visible {
    background-size: 100% 100%;
    border-color: var(--text-main);
    color: var(--bg-void);
    transform: rotate(90deg);
    outline: none;
}

.modal-cta-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-nav-inline {
    background-color: transparent;
    background-image: linear-gradient(var(--text-main) 0 0);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    border: 1px solid var(--hairline-strong);
    color: var(--text-main);
    width: 48px;
    height: 48px;
    border-radius: var(--btn-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition:
        background-size 0.45s var(--ease-ink),
        color 0.4s var(--ease-ink),
        border-color 0.35s var(--ease-out-soft),
        transform var(--btn-press) var(--ease-out-soft);
    flex-shrink: 0;
}

.modal-nav-inline:hover,
.modal-nav-inline:focus-visible {
    background-size: 100% 100%;
    color: var(--bg-void);
    border-color: var(--text-main);
    outline: none;
}

.modal-nav-inline:active {
    transform: scale(0.94);
}

.modal-content-wrapper {
    position: relative;
    max-width: 900px;
    margin: 100px auto 120px auto;
    padding: 0 24px;
    height: auto;
    overflow: visible;
}

/* ─── Modal hero: browser chrome mockup frame ─── */
.modal-hero-frame {
    width: 100%;
    margin-bottom: 48px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 24px 64px rgba(0, 0, 0, 0.65),
        0 8px 24px rgba(0, 0, 0, 0.4);
    background: #18181a;
}

.modal-hero-frame__chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 14px;
    background: #1e1e20;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.chrome-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chrome-dot--red    { background: #FF5F56; }
.chrome-dot--yellow { background: #FFBD2E; }
.chrome-dot--green  { background: #27C93F; }

.modal-main-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: top center;
    border-radius: 0;
    border: none;
    margin: 0;
    box-shadow: none;
}

.modal-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: clamp(32px, 6vh, 56px);
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: clamp(24px, 4vh, 40px);
    border-bottom: 1px solid var(--hairline);
}

.modal-project-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 1.1rem + 4vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-white);
    padding-bottom: 0.08em;
    word-break: break-word;
    hyphens: auto;
}

.modal-cta,
.cta-button.modal-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1.05rem 2.2rem;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--bg-void);
    background-color: var(--text-main);
    background-image: linear-gradient(var(--accent-glow) 0 0);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    border: 1px solid var(--text-main);
    border-radius: var(--btn-radius);
    text-decoration: none;
    cursor: pointer;
    will-change: transform, background-size;
    transition:
        background-size 0.55s var(--ease-ink),
        color 0.45s var(--ease-ink),
        border-color 0.35s var(--ease-out-soft),
        letter-spacing 0.4s var(--ease-ink),
        transform var(--btn-press) var(--ease-out-soft);
}

.modal-cta:hover,
.cta-button.modal-cta:hover,
.modal-cta:focus-visible,
.cta-button.modal-cta:focus-visible {
    background-size: 100% 100%;
    color: #fff;
    border-color: var(--accent-glow);
    letter-spacing: 0.08em;
    outline: none;
}

.modal-cta:active,
.cta-button.modal-cta:active {
    transform: scale(0.97);
}

.modal-heading {
    font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 48px 0 24px 0;
}

.modal-text {
    font-size: var(--fs-body);
    line-height: 1.8;
    color: var(--text-subtle);
    margin-bottom: 32px;
    max-width: 800px;
}

.modal-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .modal-text-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* ─── Mobile modal: clean screenshots, no 3D distortion ─── */
    .modal-hero-frame {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        margin-bottom: 32px;
        border-radius: 12px;
        transform: none;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow:
            0 2px 8px rgba(0, 0, 0, 0.3),
            0 12px 40px rgba(0, 0, 0, 0.6),
            0 24px 64px rgba(0, 0, 0, 0.4);
    }

    .modal-hero-frame__chrome {
        padding: 8px 12px;
        gap: 5px;
    }

    .chrome-dot {
        width: 9px;
        height: 9px;
    }

    .modal-main-img {
        max-height: 260px;
        object-fit: cover;
        object-position: top center;
        border-radius: 0;
    }

    /* ─── Mobile inline screenshots: clean, readable ─── */
    .modal-picture {
        width: 100%;
        margin: 36px 0;
        overflow: hidden;
        perspective: none;
    }

    .modal-picture img,
    .modal-inline-img {
        width: 100%;
        height: auto;
        border-radius: 12px;
        transform: none;
        display: block;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow:
            0 2px 8px rgba(0, 0, 0, 0.25),
            0 10px 32px rgba(0, 0, 0, 0.5),
            0 24px 56px rgba(0, 0, 0, 0.35);
    }

    /* --- Mobile Performance Fixes for Pinned Slider --- */
    .project-title {
        /* Remove expensive stroke on mobile */
        -webkit-text-stroke: 0 !important;
        color: var(--text-white) !important;
        padding: 0 !important;
    }

    .project-title::after {
        /* Disable the fill layer entirely on mobile */
        display: none !important;
    }

    .slide-content .project-title .italic-serif {
        color: var(--accent-glow) !important;
        margin-top: 0px !important;
    }

    .pinned-slide:hover .project-title,
    .pinned-slide:focus-visible .project-title {
        color: var(--text-white) !important;
        -webkit-text-stroke: 0 !important;
    }
}

.modal-main-picture,
.modal-picture {
    display: block;
    width: 100%;
}

.modal-picture {
    margin: 56px 0;
    padding: 0 0;
    overflow: visible;
}

.modal-picture img,
.modal-inline-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin: 0;
    display: block;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.25),
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 32px 80px rgba(0, 0, 0, 0.35);
    transition: transform 0.5s var(--ease-out-soft),
                box-shadow 0.5s var(--ease-out-soft);
}

@media (hover: hover) and (pointer: fine) {
    .modal-picture img:hover,
    .modal-inline-img:hover {
        transform: translateY(-4px);
        box-shadow:
            0 4px 10px rgba(0, 0, 0, 0.3),
            0 20px 56px rgba(0, 0, 0, 0.65),
            0 48px 100px rgba(0, 0, 0, 0.4);
    }
}



.modal-hero-img {
    width: 100%;
    height: auto;
    border-radius: 2px;
    margin-bottom: 48px;
    border: 1px solid var(--hairline);
}

.modal-cta-section {
    margin-top: 64px;
    padding: clamp(56px, 10vh, 96px) 24px 40px 24px;
    text-align: left;
    border-top: 1px solid var(--hairline);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-soft), transform 0.8s var(--ease-out-soft);
}

.modal-cta-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.modal-cta-section h2 {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--fs-h2);
    color: var(--text-main);
    font-weight: 400;
    max-width: 16ch;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.modal-cta-section p {
    color: var(--text-subtle);
    font-size: var(--fs-body);
    margin-bottom: 40px;
}

.modal-content-inner {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.modal-content-inner.fade {
    opacity: 0;
    transform: translateY(20px);
}

.back-to-top {
    position: fixed;
    bottom: clamp(24px, 4vh, 32px);
    right: 5%;
    z-index: 10002;
    width: 50px;
    height: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(10, 10, 12, 0.72);
    background-image: linear-gradient(var(--text-main) 0 0);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    color: var(--text-main);
    border: 1px solid var(--hairline-strong);
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    cursor: pointer;
    transition:
        transform 0.4s var(--ease-out-soft),
        opacity 0.4s var(--ease-out-soft),
        visibility 0.4s var(--ease-out-soft),
        background-size 0.45s var(--ease-ink),
        color 0.35s var(--ease-ink),
        border-color 0.3s var(--ease-out-soft);
}

.back-to-top:hover,
.back-to-top:focus-visible {
    background-size: 100% 100%;
    border-color: var(--text-main);
    color: var(--bg-void);
    outline: none;
}

.back-to-top:active {
    transform: translateY(0) scale(0.94);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top.active:active {
    transform: translateY(0) scale(0.94);
}

/* ─── Competenze: vertical editorial manifesto, oversized numerals ─── */
.competenze {
    padding: var(--section-gap-lg) 6%;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--hairline);
}

.comp-section-header {
    text-align: left;
    margin-bottom: clamp(48px, 8vh, 96px);
    opacity: 0;
    will-change: transform, opacity;
}

.comp-section-heading {
    font-size: var(--fs-h1);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.04em;
    line-height: 1.05;
    max-width: 16ch;
}

/* ─── Editorial Services Menu (Anti-Template) ─── */
.editorial-services {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--hairline);
    max-width: 1400px;
    margin: 0 auto;
}

.service-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: clamp(32px, 5vh, 48px) 0;
    border-bottom: 1px solid var(--hairline);
    align-items: start;
    opacity: 0;
    will-change: transform, opacity;
    transition: padding-left 0.4s var(--ease-out-soft), background 0.4s var(--ease-out-soft);
}

@media (min-width: 768px) {
    .service-row {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: center;
    }
}

.service-title {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    color: var(--text-white);
    letter-spacing: -0.01em;
    transition: color 0.4s var(--ease-out-soft), transform 0.4s var(--ease-out-soft);
}

.service-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-subtle);
    max-width: 42ch;
}

@media (hover: hover) and (pointer: fine) {
    .service-row:hover {
        background: rgba(255, 255, 255, 0.02);
        padding-left: 24px;
    }
    .service-row:hover .service-title {
        color: var(--accent-glow);
        transform: translateX(12px);
    }
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    background: var(--bg-void);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: var(--section-gap) 6% clamp(60px, 10vh, 100px);
    overflow: hidden;
}

.footer-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: auto 0;
}

.footer-gallery {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: clamp(48px, 7vw, 104px);
}

.footer-manifesto {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-manifesto-quote {
    font-family: var(--font-serif);
    font-size: var(--fs-h1);
    font-weight: 400;
    font-style: italic;
    color: var(--text-main);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    max-width: 13ch;
}

.footer-manifesto-attribution {
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-subtle);
}

.footer-manifesto-attribution::before {
    content: '— ';
}

.footer-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* A2 — footer contact rows: wider hit, ink sweep, sticky arrow swap */
.footer-link-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 32px 20px;
    margin: 0 -20px;
    text-decoration: none;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
    border-radius: var(--btn-radius);
    will-change: transform;
    transition: transform var(--btn-press) var(--ease-out-soft);
}

.footer-link-row::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--text-main);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.55s var(--ease-ink);
    z-index: 0;
}

.footer-link-row:hover::before,
.footer-link-row:focus-visible::before {
    transform: scaleX(1);
}

.footer-link-row:focus-visible {
    outline: none;
}

.footer-link-row > * {
    position: relative;
    z-index: 1;
    transition: color 0.35s var(--ease-ink);
}

.footer-link-row:hover .footer-link-label,
.footer-link-row:hover .footer-link-arrow-wrap,
.footer-link-row:focus-visible .footer-link-label,
.footer-link-row:focus-visible .footer-link-arrow-wrap {
    color: var(--bg-void);
}

.footer-link-row:active {
    transform: scale(0.985);
}

.footer-link-label {
    font-size: clamp(15px, 1.4vw, 18px);
    font-weight: 600;
    letter-spacing: 0.04em;
    flex: 1;
}

.footer-link-arrow-wrap {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    overflow: hidden;
    color: var(--text-main);
}

.footer-link-arrow {
    width: 16px;
    height: 16px;
}

@keyframes footer-arrow-swap {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }

    40% {
        transform: translate(12px, -12px);
        opacity: 0;
    }

    41% {
        transform: translate(-12px, 12px);
        opacity: 0;
    }

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

.footer-link-row:hover .footer-link-arrow,
.footer-link-row:focus-visible .footer-link-arrow {
    animation: footer-arrow-swap 0.55s var(--ease-ink) forwards;
}

.footer-status-bar {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: clamp(48px, 8vh, 88px);
    margin-top: auto;
    font-size: 13px;
    color: var(--text-subtle);
}

.footer-status-bar a {
    color: var(--text-subtle);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-status-bar a:hover {
    color: var(--accent-glow);
}

.footer-status-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-availability {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-avail-dot {
    width: 8px;
    height: 8px;
    background: #34D399;
    border-radius: 50%;
    animation: availPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes availPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.3);
        box-shadow: 0 0 12px 4px rgba(52, 211, 153, 0.2);
    }
}

.mobile-menu-btn {
    display: none;
    background-color: rgba(10, 10, 12, 0.72);
    background-image: linear-gradient(var(--text-main) 0 0);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    color: var(--text-main);
    cursor: pointer;
    z-index: 10002;
    padding: 8px;
    position: fixed;
    top: 25px;
    right: 5%;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--hairline-strong);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition:
        background-size 0.45s var(--ease-ink),
        color 0.35s var(--ease-ink),
        border-color 0.3s var(--ease-out-soft),
        transform var(--btn-press) var(--ease-out-soft);
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus-visible {
    background-size: 100% 100%;
    border-color: var(--text-main);
    color: var(--bg-void);
    outline: none;
}

.mobile-menu-btn:active {
    transform: scale(0.94);
}

.mobile-menu-btn svg {
    display: block;
    overflow: visible;
}

.mobile-menu-btn line {
    transition: transform 0.2s var(--ease-out-soft), opacity 0.15s var(--ease-out-soft);
    transform-box: fill-box;
    transform-origin: center;
}

.mobile-menu-btn.active {
    background-size: 100% 100%;
    background-color: var(--text-main);
    border-color: var(--text-main);
    color: var(--bg-void);
}

.mobile-menu-btn.active line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-btn.active line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(10, 10, 12, 0.98);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s var(--ease-out-soft), visibility 0.18s var(--ease-out-soft);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 1;
    transform: none;
    transition: color 0.2s var(--ease-out-soft);
    will-change: auto;
}

.mobile-nav-overlay.active .mobile-nav-links a {
    opacity: 1;
    transform: none;
    transition-delay: 0s;
}

.mobile-nav-overlay.active .mobile-nav-links a:nth-child(1),
.mobile-nav-overlay.active .mobile-nav-links a:nth-child(2),
.mobile-nav-overlay.active .mobile-nav-links a:nth-child(3) {
    transition-delay: 0s;
}

.mobile-nav-links a:hover {
    color: var(--accent-glow);
}

.mobile-nav-footer {
    margin-top: 4rem;
    width: min(100%, 420px);
    padding: 0 6%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    opacity: 1;
    transform: none;
    transition: none;
}

.mobile-nav-overlay.active .mobile-nav-footer {
    opacity: 1;
    transform: none;
}

/* Burger contact CTA — full-width Ink Sweep (A1) */
.mobile-nav-footer .cta-button {
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 1.2rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-main);
    border-color: var(--hairline-strong);
    background-color: transparent;
    background-image: linear-gradient(var(--text-main) 0 0);
    background-size: 0% 100%;
}

.mobile-nav-overlay.active .mobile-nav-footer .cta-button {
    background-color: transparent;
    background-image: linear-gradient(var(--text-main) 0 0);
    background-size: 0% 100%;
    color: var(--text-main);
    border-color: var(--text-main);
}

.mobile-nav-footer .cta-button:hover,
.mobile-nav-footer .cta-button:focus-visible,
.mobile-nav-overlay.active .mobile-nav-footer .cta-button:hover,
.mobile-nav-overlay.active .mobile-nav-footer .cta-button:focus-visible {
    background-size: 100% 100%;
    color: var(--bg-void);
    border-color: var(--text-main);
}

.scroll-indicator {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(24px, 4vh, 48px);
    width: fit-content;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    z-index: 10;
    will-change: transform, opacity;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--text-main);
    animation: scrollLineDrop 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollLineDrop {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(200%);
    }
}

/* ─── FAQ: hairline-divided list, no boxed accordion items ─── */
.faq-section {
    padding: var(--section-gap) 6%;
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    border-bottom: 1px solid var(--hairline);
}

.faq-header {
    text-align: left;
    margin-bottom: clamp(48px, 8vh, 80px);
    opacity: 0;
    will-change: transform, opacity;
}

.faq-heading {
    font-size: var(--fs-h1);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 16px;
    max-width: 14ch;
}

.faq-subtitle {
    font-size: var(--fs-body);
    color: var(--text-subtle);
}

.faq-accordion {
    display: block;
    border-top: 1px solid var(--hairline);
}

.faq-item {
    background: none;
    border: none;
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
    overflow: hidden;
    backdrop-filter: none;
    opacity: 0;
    transition: none;
    will-change: transform, opacity;
}

.faq-item.active {
    background: none;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: clamp(32px, 5vh, 48px) 0;
    background: transparent;
    border: none;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    transition:
        padding-left 0.45s var(--ease-ink),
        color 0.4s var(--ease-ink);
}

.faq-question-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.2;
    transition: transform 0.45s var(--ease-ink), color 0.4s var(--ease-ink);
}

@media (hover: hover) and (pointer: fine) {
    .faq-item:hover .faq-question {
        padding-left: 24px;
    }
    .faq-item:hover .faq-question-text {
        color: var(--text-main);
        transform: translateX(8px);
    }
}

.faq-icon {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-left: 20px;
}

.faq-icon-h,
.faq-icon-v {
    position: absolute;
    top: 50%;
    left: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
    transition: transform 0.4s var(--ease-ink);
}

.faq-icon-h {
    width: 100%;
    height: 2px;
}

.faq-icon-v {
    width: 2px;
    height: 100%;
}

.faq-item.active .faq-icon-v {
    transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item.active .faq-question {
    color: var(--accent-glow);
}

.faq-answer-wrapper {
    height: 0;
    overflow: hidden;
}

.faq-answer {
    overflow: hidden;
    min-height: 0;
}

.faq-answer p {
    padding: 0 0 32px 0;
    max-width: 65ch;
    color: var(--text-subtle);
    font-size: var(--fs-body);
    line-height: 1.7;
}

/* ─── Testimonials: typography-driven quote list, hairlines instead of boxes ─── */
.testimonials-section {
    padding: var(--section-gap) 6%;
    max-width: 1100px;
    margin: 0 auto;
    border-bottom: 1px solid var(--hairline);
}

.testimonials-grid {
    display: block;
    margin-top: clamp(32px, 6vh, 64px);
    border-top: 1px solid var(--hairline);
}

.testimonial-card {
    background: none;
    border: none;
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
    padding: clamp(40px, 7vh, 64px) 0;
    backdrop-filter: none;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transition: none;
    overflow: visible;
    will-change: transform, opacity;
}

.testimonial-card::before {
    content: '\201C';
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 8vw, 6rem);
    line-height: 1;
    color: var(--text-faint);
    pointer-events: none;
}

.testimonial-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--fs-h3);
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-main);
    max-width: 46ch;
    margin-top: -0.5em;
    margin-bottom: clamp(20px, 3vh, 32px);
    transition: color 0.3s var(--ease-out-soft);
}

@media (hover: hover) and (pointer: fine) {
    .testimonial-card:hover .testimonial-text {
        color: var(--accent-glow);
    }
}

.testimonial-author {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.author-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.author-role {
    font-size: 13px;
    color: var(--text-subtle);
    font-weight: 500;
}

.author-role::before {
    content: '\00b7';
    margin-right: 10px;
    color: var(--hairline-strong);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        transition: opacity 0.3s ease;
    }

    body.modal-open .mobile-menu-btn {
        opacity: 0;
        pointer-events: none;
    }

    .modal-header-section {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 20px;
    }

    .modal-nav {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .modal-top-bar {
        padding: 20px;
    }

    .modal-header-section {
        flex-direction: column;
    }

    .site-footer {
        min-height: auto;
        padding: 64px 5% 32px;
    }

    .faq-section {
        padding-bottom: clamp(72px, 14vh, 120px);
    }

    .faq-accordion {
        padding-bottom: 24px;
    }

    .footer-gallery {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-manifesto-quote {
        max-width: none;
    }

    .footer-link-row {
        padding: 22px 16px;
        margin: 0 -16px;
    }

    .footer-status-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding-top: 40px;
    }

    .footer-status-left {
        flex-direction: column;
        gap: 8px;
    }

    .section-title {
        margin-bottom: clamp(32px, 5vh, 56px);
    }

    /* ─── Mobile modal: navigation & layout ─── */
    .modal-content-wrapper {
        margin: 80px auto 100px;
        padding: 0 20px;
    }

    .modal-nav-inline {
        width: 52px;
        height: 52px;
    }

    .modal-cta-wrapper {
        gap: 12px;
    }

    .modal-project-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }
}

/* No ambient orbs / neon glow in the editorial system — flat ink background only.
   [data-theme] on <body> stays wired (IntersectionObserver in the script) but no
   longer drives any visual — kept as a future hook, not used for color right now. */

@media (prefers-reduced-motion: reduce) {

    .main-heading,
    .description,
    .hero-cta-wrap,
    .scroll-indicator,
    .section-title,
    .chi-sono-content,
    .comp-section-header,
    .faq-header,
    .comp-card,
    .testimonial-card,
    .faq-item {
        opacity: 1 !important;
        transform: none !important;
    }
}
/* ─── Mobile modal: final overrides — flat, clean, premium ─── */
@media (max-width: 768px) {
    /* Ensure no stale 3D transforms survive */
    .modal-hero-frame,
    .modal-picture,
    .modal-picture img,
    .modal-inline-img {
        transform: none !important;
        transform-origin: unset !important;
        perspective: none !important;
    }

    /* Keep hero frame contained and styled */
    .modal-hero-frame {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow: hidden !important;
    }

    .modal-main-img {
        border-radius: 0 !important;
    }

    /* Keep inline pictures contained */
    .modal-picture {
        width: 100% !important;
        overflow: hidden !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .modal-picture img,
    .modal-inline-img {
        width: 100% !important;
        display: block !important;
        border-radius: 12px !important;
    }
}

/* ─── Mobile performance pass: beauty kept, GPU thrash cut ─── */
@media (max-width: 899px) {
    /* Drop permanent layer promotion — frees memory on mid phones */
    .hero-content,
    .main-heading,
    .description,
    .hero-cta-wrap,
    .scroll-indicator,
    .section-title,
    .chi-sono-content,
    .comp-section-header,
    .service-row,
    .testimonial-card,
    .faq-header,
    .faq-item,
    .footer-manifesto,
    .footer-links,
    .mobile-nav-links a,
    .cta-button,
    .editorial-link,
    .chi-sono-cta-btn,
    .modal-cta,
    .footer-link-row {
        will-change: auto;
    }

    .project-title {
        will-change: auto;
    }

    /* Modal blur is expensive on iOS Safari — solid veil keeps the look */
    .modal,
    .about-modal {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(10, 10, 12, 0.97);
    }

    .about-modal {
        background: rgba(0, 0, 0, 0.92);
    }

    /* Skip paint of far-below sections — NOT faq (accordion height fights content-visibility) */
    .testimonials-section,
    .competenze {
        content-visibility: auto;
        contain-intrinsic-size: 1px 800px;
    }

    .faq-section {
        content-visibility: visible;
    }

    .faq-question {
        transition: color 0.2s var(--ease-out-soft) !important;
    }

    .faq-question-text {
        transition: color 0.2s var(--ease-out-soft) !important;
    }

    .faq-item,
    .faq-header {
        will-change: auto !important;
        opacity: 1;
    }

    .slide-media img {
        content-visibility: visible;
        transform: none;
    }
}
 
