/* =========================================
   MidDesign — Portfolio Website
   Dark & Edgy Aesthetic
   ========================================= */

/* --- Custom Font: BauhausKijsDisplay (9 weights) --- */
@font-face {
    font-family: 'BauhausKijsDisplay';
    src: url('fonts/BauhausKijsDisplay-Thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'BauhausKijsDisplay';
    src: url('fonts/BauhausKijsDisplay-ExtraLight.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'BauhausKijsDisplay';
    src: url('fonts/BauhausKijsDisplay-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'BauhausKijsDisplay';
    src: url('fonts/BauhausKijsDisplay-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'BauhausKijsDisplay';
    src: url('fonts/BauhausKijsDisplay-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'BauhausKijsDisplay';
    src: url('fonts/BauhausKijsDisplay-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'BauhausKijsDisplay';
    src: url('fonts/BauhausKijsDisplay-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'BauhausKijsDisplay';
    src: url('fonts/BauhausKijsDisplay-ExtraBold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'BauhausKijsDisplay';
    src: url('fonts/BauhausKijsDisplay-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:         #0D0D0D;
    --bg-alt:     #111111;
    --bg-card:    #161616;
    --text:       #F0F0F0;
    --text-muted: #888888;
    --accent:     #FF4D00;
    --accent-h:   #FF2800;
    --border:     #222222;
    --font-display: 'BauhausKijsDisplay', sans-serif;
    --font-bg-text: 'Jacquard 12', sans-serif;
    --font-body:    'Inter', sans-serif;
    --nav-h:      80px;
    --max-w:      1200px;
    --pad-section: 120px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9997;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }


/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 100;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

em {
    font-style: italic;
    color: var(--accent);
}

a, button {

    color: inherit;
    text-decoration: none;
}

/* --- Container --- */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 40px;
}

/* =========================================
   NAVIGATION
   ========================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
    transition: background 0.35s ease, border-color 0.35s ease;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(13, 13, 13, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--border);
}

.nav__logo {
    font-family: var(--font-display);
    font-weight: 100;
    font-size: 1.35rem;
    letter-spacing: -0.04em;
    color: var(--text);
    transition: color 0.2s;
}
.nav__logo:hover { color: var(--accent); }

.nav__links {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
}

.nav__links a {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text);
    transition: color 0.2s;
    position: relative;
}

/* Once scrolled, drop back to muted so the full-bg nav doesn't feel too loud */
.nav.scrolled .nav__links a {
    color: var(--text-muted);
}

.nav__links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }

.nav__links a:hover,
.nav__links a.active { color: var(--text); }

.nav__cta {
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    padding: 9px 20px !important;
    border-radius: 100px;
    transition: border-color 0.2s, background 0.2s !important;
}
.nav__cta::after { display: none !important; }
.nav__cta:hover {
    border-color: var(--accent) !important;
    background: var(--accent) !important;
    color: white !important;
}

/* Hamburger */
.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;

    padding: 4px;
}
.nav__hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================
   MOBILE MENU
   ========================================= */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu ul li { margin: 18px 0; }
.mobile-menu ul li a {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 100;
    color: var(--text-muted);
    transition: color 0.2s;
}
.mobile-menu ul li a:hover { color: var(--accent); }

/* =========================================
   HERO
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-h) + 60px) max(40px, calc((100vw - var(--max-w)) / 2 + 40px)) 80px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Hero photo background */
.hero__img {
    position: absolute;
    inset: 0;
    background-image: url('images/Scream_Head.webp');
    background-size: cover;
    background-position: center 18%;
    z-index: 0;
    transform: scaleX(-1);
}

.hero__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            108deg,
            rgba(13, 13, 13, 1)    0%,
            rgba(13, 13, 13, 0.92) 28%,
            rgba(13, 13, 13, 0.55) 55%,
            rgba(13, 13, 13, 0.18) 80%,
            rgba(13, 13, 13, 0.08) 100%
        ),
        linear-gradient(
            to top,
            rgba(13, 13, 13, 0.95) 0%,
            rgba(13, 13, 13, 0.4)  20%,
            transparent            50%
        );
    transform: scaleX(-1);
}

/* Large decorative background text */
.hero__bg-text {
    position: absolute;
    right: -60px;
    bottom: -0.12em;
    font-family: var(--font-bg-text);
    font-size: clamp(16rem, 28vw, 36rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 77, 0, 0.3);
    line-height: 0.85;
    letter-spacing: -0.08em;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 2;
    animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hero__content {
    position: relative;
    z-index: 3;
}

.hero__label {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.hero__label-rule {
    display: block;
    width: 36px;
    height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

/* Split-text line reveal */
.hero__headline {
    font-size: clamp(2.8rem, 7.5vw, 6.5rem);
    font-weight: 100;
    line-height: 1.04;
    letter-spacing: -0.035em;
    margin-bottom: 32px;
    max-width: 950px;
}

.hero__headline .line {
    display: block;
    overflow: hidden;
    line-height: 1.08;
    padding-bottom: 0.06em;
}

.hero__headline .line-inner {
    display: block;
    animation: heroReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__headline .line:nth-child(1) .line-inner { animation-delay: 0.18s; }
.hero__headline .line:nth-child(2) .line-inner { animation-delay: 0.3s; }
.hero__headline .line:nth-child(3) .line-inner { animation-delay: 0.42s; }

/* Outlined / ghost text for "impossible" */
.hero__headline em {
    font-style: normal;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
    paint-order: stroke fill;
}

.hero__sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 440px;
    font-weight: 300;
    line-height: 1.75;
    animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.72s both;
}

/* Scroll indicator — vertical */
.hero__scroll {
    position: absolute;
    bottom: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 3;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
}

.hero__scroll span {
    writing-mode: vertical-lr;
    font-size: 0.63rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero__scroll-line {
    width: 1px;
    height: 64px;
    background: var(--border);
    position: relative;
    overflow: hidden;
    order: -1;
}

.hero__scroll-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: scrollDrop 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
    animation-delay: 1.2s;
}

/* =========================================
   KEYFRAMES
   ========================================= */
@keyframes heroReveal {
    from {
        transform: translateY(110%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollDrop {
    0%   { top: -100%; opacity: 1; }
    75%  { top: 100%;  opacity: 1; }
    76%  { top: 100%;  opacity: 0; }
    77%  { top: -100%; opacity: 0; }
    100% { top: -100%; opacity: 1; }
}

@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* =========================================
   MARQUEE TICKER
   ========================================= */
.marquee-band {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    background: var(--bg);
    position: relative;
    z-index: 1;
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 44px;
    white-space: nowrap;
    width: max-content;
    animation: marqueeScroll 28s linear infinite;
}

.marquee-band:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-track span {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.marquee-track .sep {
    color: var(--accent);
    font-size: 0.55rem;
    line-height: 1;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 13px 26px;
    border-radius: 100px;

    border: none;
    letter-spacing: 0.01em;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn--primary {
    background: linear-gradient(to right, var(--accent-h) 50%, var(--accent) 50%);
    background-size: 200% 100%;
    background-position: right center;
    color: white;
    transition: background-position 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.2s ease;
}
.btn--primary:hover {
    background-position: left center;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255, 77, 0, 0.25);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    transition: background 0.3s ease, color 0.3s ease,
                border-color 0.3s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn--ghost:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    transform: translateY(-2px);
}

.btn--full {
    width: 100%;
    justify-content: center;
}

.arrow { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.btn:hover .arrow { transform: translateX(5px); }

/* =========================================
   SECTIONS
   ========================================= */
.section { padding: var(--pad-section) 0; }
.section--alt { background: var(--bg-alt); }

.section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 64px;
    overflow: hidden;
}

.section__title {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 100;
    letter-spacing: -0.03em;
}

.section__sub {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 300;
}


/* =========================================
   WORK GRID
   ========================================= */
.work-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.project-card            { grid-column: span 4; cursor: pointer; }
.project-card--large     { grid-column: span 8; }
.project-card--wide      { grid-column: span 8; }

.project-card__img {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card--large .project-card__img { aspect-ratio: 16/9; }
.project-card--wide  .project-card__img { aspect-ratio: 21/8; }

.project-card:hover .project-card__img { transform: scale(1.03); }

/* Placeholder gradient backgrounds */
.project-card__img--1 { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }
.project-card__img--2 { background: linear-gradient(135deg, #1a0a00 0%, #3d1c02 50%, #6b3410 100%); }
.project-card__img--3 { background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 50%, #243b5e 100%); }
.project-card__img--4 { background: linear-gradient(135deg, #100d1a 0%, #2a1f3d 50%, #3d2d5c 100%); }
.project-card__img--5 { background: linear-gradient(135deg, #1a0505 0%, #3d0f0f 50%, #6b1a1a 100%); }
.project-card__img--6 { background: linear-gradient(135deg, #0d1a0d 0%, #1a3d1a 50%, #2d5c2d 100%); }

.project-card__img--proud-source { background: url('images/ps-cover.webp') center / cover no-repeat; }
.project-card__img--dotmatics    { background: url('images/dot-cover.webp') center / cover no-repeat; }
.project-card__img--skona        { background: url('images/skona-cover.webp') center / cover no-repeat; }
.project-card__img--cartage      { background: url('images/cartage-cover.webp') center / cover no-repeat; }

/* Subtle crosshatch on placeholders */
.project-card__img::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        45deg, transparent, transparent 22px,
        rgba(255,255,255,0.018) 22px,
        rgba(255,255,255,0.018) 23px
    );
    pointer-events: none;
    z-index: 0;
}

/* Accent line sweep on hover */
.project-card__img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 3;
}
.project-card:hover .project-card__img::after { transform: scaleX(1); }

/* Overlay — gradient from bottom */
.project-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(13, 13, 13, 0.92) 0%,
        rgba(13, 13, 13, 0.4) 45%,
        transparent 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}
.project-card:hover .project-card__overlay { opacity: 1; }

.project-card__view {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.03em;
    transform: translateY(10px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .project-card__view { transform: translateY(0); }

.project-card__info { padding: 14px 0 6px; }

.project-card__tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.tag {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 100px;
}

.project-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text);
    transition: transform 0.3s ease;
}
.project-card:hover .project-card__title { transform: translateX(4px); }

/* Equal 2×2 layout — work page */
.work-grid--equal {
    grid-template-columns: repeat(2, 1fr);
}

.work-grid--equal .project-card {
    grid-column: span 1;
}

.work-grid--equal .project-card__img {
    aspect-ratio: 4 / 3;
}

/* =========================================
   WORK PAGE: ALTERNATING SHOWCASE
   ========================================= */
.work-showcase {
    border-top: 1px solid var(--border);
}

.work-showcase__item {
    display: grid;
    grid-template-columns: 58% 42%;
    align-items: stretch;
    border-bottom: 1px solid var(--border);

    overflow: hidden;
    transition: border-bottom-color 0.3s ease;
}

.work-showcase__item:hover {
    border-bottom-color: rgba(255, 77, 0, 0.35);
}

/* Flip image to right on even items — mirror both order and column widths */
.work-showcase__item:nth-child(even) {
    grid-template-columns: 42% 58%;
}
.work-showcase__item:nth-child(even) .work-showcase__img {
    order: 2;
}
.work-showcase__item:nth-child(even) .work-showcase__info {
    order: 1;
}

/* Image column */
.work-showcase__img {
    width: 100%;
    aspect-ratio: 3 / 2;
    position: relative;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-showcase__item:hover .work-showcase__img {
    transform: scale(1.03);
}

.work-showcase__item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

.work-showcase__item:hover::before {
    transform: scaleX(1);
}

/* Info column */
.work-showcase__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px 80px;
    border-left: 1px solid var(--border);
}

.work-showcase__item:nth-child(even) .work-showcase__info {
    border-left: none;
    border-right: 1px solid var(--border);
    padding: 72px 80px;
}

/* Project number */
.work-showcase__num {
    font-family: var(--font-bg-text);
    font-size: 3.5rem;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 77, 0, 0.3);
    line-height: 1;
    display: block;
    margin-bottom: 28px;
    transition: -webkit-text-stroke-color 0.3s ease;
}

.work-showcase__item:hover .work-showcase__num {
    -webkit-text-stroke-color: var(--accent);
}

.work-showcase__tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.work-showcase__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 100;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: var(--text);
    margin-bottom: 20px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-showcase__item:hover .work-showcase__title {
    transform: translateX(6px);
}

.work-showcase__desc {
    font-size: 0.925rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.75;
    margin-bottom: 40px;
    max-width: 320px;
}

.work-showcase__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    transition: gap 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-showcase__link:hover {
    gap: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .work-showcase__info {
        padding: 56px 52px;
    }
    .work-showcase__item:nth-child(even) .work-showcase__info {
        padding: 56px 52px;
    }
}

@media (max-width: 768px) {
    .work-showcase__item {
        grid-template-columns: 1fr;
    }
    /* Reset even-item column flip so all items stack image-top, info-bottom */
    .work-showcase__item:nth-child(even) {
        grid-template-columns: 1fr;
    }
    .work-showcase__item:nth-child(even) .work-showcase__img {
        order: -1;
    }
    .work-showcase__item:nth-child(even) .work-showcase__info {
        order: 0;
        border-right: none;
        border-left: none;
        padding: 40px 24px;
    }
    .work-showcase__info {
        border-left: none;
        padding: 40px 24px;
    }
    .work-showcase__desc {
        max-width: 100%;
    }
}

/* ─── Showcase Grid (More Work) ─── */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.showcase-item {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;

    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.showcase-item:hover { transform: scale(1.02); }

.showcase-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.showcase-item:hover::after { transform: scaleX(1); }

.showcase-item--1  { background: linear-gradient(135deg, #1a0f0f 0%, #3a1818 100%); }
.showcase-item--2  { background: linear-gradient(135deg, #0f1a12 0%, #1c3022 100%); }
.showcase-item--3  { background: linear-gradient(135deg, #0d0d1a 0%, #1a1a38 100%); }
.showcase-item--4  { background: linear-gradient(135deg, #1a100a 0%, #38200f 100%); }
.showcase-item--5  { background: linear-gradient(135deg, #1a1810 0%, #2e2c18 100%); }
.showcase-item--6  { background: linear-gradient(135deg, #0f161a 0%, #1a2a32 100%); }
.showcase-item--7  { background: linear-gradient(135deg, #1a0a10 0%, #360f1c 100%); }
.showcase-item--8  { background: linear-gradient(135deg, #0a1a12 0%, #122e1e 100%); }
.showcase-item--9  { background: linear-gradient(135deg, #14100a 0%, #28200e 100%); }
.showcase-item--10 { background: linear-gradient(135deg, #0f0f1a 0%, #1e1e38 100%); }
.showcase-item--11 { background: linear-gradient(135deg, #1a0f0a 0%, #361a0e 100%); }
.showcase-item--12 { background: linear-gradient(135deg, #0a1216 0%, #122028 100%); }

/* =========================================
   SERVICES
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: 1px solid var(--border);
}

.service-item {
    padding: 52px;
    border: 1px solid var(--border);
    margin: -1px;
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Left border reveal on hover */
.service-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-item:hover::before { transform: scaleY(1); }
.service-item:hover { background: rgba(255, 77, 0, 0.03); }

.service-item__dash {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 300;
    line-height: 1;
}

.service-item__title {
    font-size: 1.45rem;
    font-weight: 100;
    margin-bottom: 18px;
    letter-spacing: -0.025em;
    transition: transform 0.3s ease;
}
.service-item:hover .service-item__title { transform: translateX(6px); }

.service-item__desc {
    color: var(--text-muted);
    font-size: 0.925rem;
    line-height: 1.75;
    margin-bottom: 28px;
    font-weight: 300;
}

.service-item__link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}
.service-item__link:hover { gap: 10px; }
.service-item__link .arrow { transition: transform 0.2s; }
.service-item__link:hover .arrow { transform: translateX(4px); }

/* =========================================
   ABOUT
   ========================================= */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-img-wrap {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.about-img-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-img-inner {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #1c1c1c 0%, #0d0d0d 55%, #1a0a00 100%);
}

.about-img-label {
    position: relative;
    z-index: 1;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--border);
    font-weight: 500;
}

.about-headline {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 100;
    letter-spacing: -0.025em;
    margin-bottom: 28px;
    line-height: 1.2;
}

.about-text p {
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 18px;
    font-size: 0.975rem;
}

.about-stats {
    display: flex;
    gap: 36px;
    margin: 40px 0;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat__num {
    display: block;
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 100;
    color: var(--accent);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 6px;
}

.stat__label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 400;
}

/* =========================================
   CONTACT
   ========================================= */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 80px;
    align-items: start;
}

.contact-tagline {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 100;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 48px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-detail {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-detail__label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
}

.contact-detail__value {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text);
    transition: color 0.2s;
}
a.contact-detail__value:hover { color: var(--accent); }

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 13px 16px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.925rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.select-wrap {
    position: relative;
}

.form-group select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 13px 16px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.925rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    appearance: none;

}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.8rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #3a3a3a; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.form-success {
    display: none;
    text-align: center;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 14px;
    border: 1px solid rgba(255, 77, 0, 0.4);
    border-radius: 4px;
    background: rgba(255, 77, 0, 0.06);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    border-top: 1px solid var(--border);
    padding: 72px 0 32px;
}

.footer__top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    margin-bottom: 56px;
}

.footer__logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 100;
    letter-spacing: -0.04em;
    display: block;
    margin-bottom: 14px;
    transition: color 0.2s;
}
.footer__logo:hover { color: var(--accent); }

.footer__tagline {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 300;
}

.footer__nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer__col-title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 20px;
}

.footer__col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__col ul li a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.footer__col ul li a:hover { color: var(--text); }

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
}
.footer__bottom a {
    color: var(--accent);
    text-decoration: none;
}

/* =========================================
   SCROLL ANIMATIONS
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays in work grid */
.work-grid .fade-in:nth-child(2) { transition-delay: 0.08s; }
.work-grid .fade-in:nth-child(3) { transition-delay: 0.16s; }
.work-grid .fade-in:nth-child(4) { transition-delay: 0.08s; }
.work-grid .fade-in:nth-child(5) { transition-delay: 0.16s; }
.work-grid .fade-in:nth-child(6) { transition-delay: 0.24s; }

/* Stagger delays in services grid */
.services-grid .fade-in:nth-child(2) { transition-delay: 0.1s; }
.services-grid .fade-in:nth-child(3) { transition-delay: 0.1s; }
.services-grid .fade-in:nth-child(4) { transition-delay: 0.2s; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-card,
    .project-card--large,
    .project-card--wide { grid-column: span 1; }

    .project-card--large .project-card__img,
    .project-card--wide  .project-card__img { aspect-ratio: 4/3; }

    .showcase-grid { grid-template-columns: repeat(3, 1fr); }

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

    .about-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .about-img-placeholder {
        aspect-ratio: 16/9;
        max-width: 520px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 56px;
    }

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


}

@media (max-width: 768px) {
    :root { --pad-section: 80px; }

    .container { padding: 0 24px; }
    .nav { padding: 0 24px; }
    .nav__links { display: none; }
    .nav__hamburger { display: flex; }

    .hero { padding: calc(var(--nav-h) + 40px) 24px 60px; }
    .hero__scroll { display: none; }

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

    .showcase-grid { grid-template-columns: repeat(2, 1fr); }

    .section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .form-row { grid-template-columns: 1fr; }

    .about-stats { gap: 24px; }

    .footer__nav { grid-template-columns: repeat(2, 1fr); }

    .footer__bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero__actions { flex-direction: column; align-items: flex-start; }
    .footer__nav { grid-template-columns: 1fr; }
    .service-item { padding: 36px 28px; }
    .client-cell { padding: 28px 20px; min-height: 80px; }
    .client-logo { max-width: 110px; max-height: 28px; }
    .proj-result { padding: 32px 24px; }
    .proj-result__num { font-size: clamp(2rem, 8vw, 4rem); }
    .cta-band__headline { font-size: clamp(2.2rem, 8vw, 4rem); }
}

/* =========================================
   PAGE HERO (inner pages)
   ========================================= */
.page-hero {
    padding: calc(var(--nav-h) + 80px) 0 72px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero__label {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
    animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.page-hero__label-rule {
    display: block;
    width: 36px;
    height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

.page-hero__title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 100;
    letter-spacing: -0.045em;
    line-height: 0.94;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.page-hero__sub {
    margin-top: 28px;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 520px;
    line-height: 1.75;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.page-hero__bg-text {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-bg-text);
    font-size: clamp(8rem, 20vw, 22rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 77, 0, 0.3);
    line-height: 0.85;
    letter-spacing: -0.08em;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* =========================================
   HOME: SECTION CTA LINK
   ========================================= */
.section-cta {
    margin-top: 52px;
    display: flex;
    justify-content: flex-end;
}

/* =========================================
   HOME: SERVICES TYPOGRAPHIC LIST
   ========================================= */
.home-svc-list {
    list-style: none;
    border-top: 1px solid var(--border);
}

.home-svc-row {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: padding-left 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.home-svc-row:hover {
    padding-left: 20px;
    border-bottom-color: rgba(255, 77, 0, 0.5);
}


.home-svc-row__name {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 100;
    letter-spacing: -0.03em;
    flex: 1;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-svc-row:hover .home-svc-row__name {
    transform: translateX(8px);
}

.home-svc-row__tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.home-svc-row__arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.25s, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.home-svc-row:hover .home-svc-row__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* =========================================
   HOME: ABOUT TEASE BAND
   ========================================= */
.home-about__inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 0.8fr;
    gap: 0;
    align-items: center;
}

.home-about__quote {
    padding-right: 64px;
    border-right: 1px solid var(--border);
}

.home-about__stats {
    padding: 0 64px;
    display: flex;
    flex-direction: column;
    gap: 36px;
    border-right: 1px solid var(--border);
}

.home-about__cta {
    padding-left: 64px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}

.home-about__cta-label {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
}

/* =========================================
   CTA BAND
   ========================================= */
.cta-band {
    background: var(--accent);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-band__bg {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-bg-text);
    font-size: clamp(8rem, 18vw, 18rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.07em;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    line-height: 0.85;
}

.cta-band__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.cta-band__headline {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 100;
    letter-spacing: -0.04em;
    color: #fff;
    line-height: 1.05;
    max-width: 600px;
}

.cta-band__headline em {
    color: rgba(255, 255, 255, 0.55);
    font-style: normal;
}

.btn--inverse {
    background: linear-gradient(to right, var(--bg) 50%, #fff 50%);
    background-size: 200% 100%;
    background-position: right center;
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
    transition: background-position 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.35s ease,
                transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn--inverse:hover {
    background-position: left center;
    color: #fff;
    transform: translateY(-2px);
}

/* =========================================
   WORK PAGE: FILTER BAR
   ========================================= */
.work-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 52px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: transparent;
    color: var(--text-muted);

    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filter-btn:hover,
.filter-btn.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* =========================================
   SERVICES PAGE: PROCESS LIST + STEPS
   ========================================= */
.service-item__process {
    list-style: none;
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-item__process li {
    font-size: 0.825rem;
    color: var(--text-muted);
    font-weight: 300;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}
.service-item__process li::before {
    content: '\2014';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.75rem;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    border: none;
}

.process-step {
    padding: 48px 40px;
    border: 1px solid var(--border);
    border-top: 2px solid transparent;
    background: var(--bg-card);
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.process-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-step:hover::before {
    width: 100%;
}

.process-step:hover {
    background: rgba(255, 77, 0, 0.10);
}

.process-step__num {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 100;
    color: var(--accent);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 24px;
    opacity: 0.9;
}

.process-step__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 100;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    color: var(--text);
}

.process-step__desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.75;
}

/* =========================================
   ABOUT PAGE: PHILOSOPHY + CLIENTS
   ========================================= */
.about-philosophy {
    padding: var(--pad-section) 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-philosophy__headline {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 100;
    letter-spacing: -0.04em;
    line-height: 1.06;
    max-width: 900px;
    margin-bottom: 32px;
}

.about-philosophy__body {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    max-width: 600px;
    margin-bottom: 16px;
}

.about-philosophy__body--closing {
    font-size: 1rem;
    margin-top: 8px;
}

.about-tenets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    margin-top: 48px;
    max-width: 900px;
}

.tenet {
    padding: 40px 36px;
    border-right: 1px solid var(--border);
}

.tenet:last-child {
    border-right: none;
}

.tenet__title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 100;
    letter-spacing: -0.02em;
    color: var(--accent);
    margin-bottom: 12px;
}

.tenet__desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .about-tenets {
        grid-template-columns: 1fr;
    }
    .tenet {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .tenet:last-child {
        border-bottom: none;
    }
}

.about-clients {
    padding: var(--pad-section) 0;
    border-bottom: 1px solid var(--border);
}

.about-clients__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    margin-top: 48px;
}

.client-cell {
    padding: 48px 40px;
    border: 1px solid var(--border);
    margin: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    transition: background 0.25s;
}

.client-cell:hover { background: var(--bg-card); }

.client-logo {
    max-width: 140px;
    max-height: 36px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(1) opacity(0.35);
    transition: filter 0.3s ease;
}

.client-cell:hover .client-logo {
    filter: none;
}

/* =========================================
   RESPONSIVE: NEW COMPONENTS
   ========================================= */
@media (max-width: 1024px) {
    .home-about__inner { grid-template-columns: 1fr 1fr; }
    .home-about__cta   { display: none; }
    .about-clients__grid  { grid-template-columns: repeat(2, 1fr); }
    .process-steps     { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .home-svc-row__tags  { display: none; }
    .home-about__inner   { grid-template-columns: 1fr; }
    .home-about__quote   { padding-right: 0; border-right: none; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
    .home-about__stats   { padding: 32px 0; border-right: none; }
    .cta-band__inner     { flex-direction: column; align-items: flex-start; }
    .cta-band            { padding: 72px 0; }
    .page-hero           { padding: calc(var(--nav-h) + 48px) 0 48px; }
    .section-cta         { justify-content: flex-start; }
    .about-clients__grid { grid-template-columns: repeat(2, 1fr); }
    .process-steps       { grid-template-columns: 1fr; }
}

/* =========================================
   PROJECT PAGE
   ========================================= */

/* --- Hero --- */
.proj-hero {
    position: relative;
    padding: calc(var(--nav-h) + 80px) 0 80px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.proj-hero__bg-text {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-bg-text);
    font-size: clamp(8rem, 20vw, 22rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 77, 0, 0.3);
    line-height: 0.85;
    letter-spacing: -0.08em;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.proj-hero__label {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.proj-hero__title {
    font-family: var(--font-display);
    font-weight: 100;
    font-size: clamp(3.2rem, 11vw, 10rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    max-width: 100%;
}

/* --- Metadata Strip --- */
.proj-meta {
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
}

.proj-meta__grid {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.proj-meta__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 32px 40px;
    border-right: 1px solid var(--border);
}

.proj-meta__item--cta {
    justify-content: center;
    align-items: flex-start;
    flex: 0 0 auto;
    border-right: none;
}

.proj-meta__label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.proj-meta__value {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text);
}

/* --- Cover Image --- */
.proj-cover {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    overflow: hidden;
}

.proj-cover__img {
    width: 100%;
    height: 100%;
    background-color: var(--bg-card);
}

.proj-cover__img--1 {
    background: linear-gradient(135deg, #161616 0%, #1a1a1a 40%, #0f0f0f 100%);
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 80px, rgba(255,77,0,0.03) 80px, rgba(255,77,0,0.03) 81px),
        repeating-linear-gradient(90deg, transparent, transparent 80px, rgba(255,77,0,0.03) 80px, rgba(255,77,0,0.03) 81px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.proj-cover__img--1::after {
    content: 'PROJECT COVER';
    font-family: var(--font-bg-text);
    font-size: clamp(4rem, 12vw, 14rem);
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,77,0,0.15);
    letter-spacing: 0.05em;
    pointer-events: none;
    user-select: none;
}

/* --- Overview --- */
.proj-overview {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 80px;
    align-items: start;
}

.proj-overview__intro {
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 24px;
    font-weight: 300;
}

.proj-overview__text p + p {
    margin-top: 20px;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.8;
}

.proj-overview__details {
    padding-top: 8px;
}

.proj-detail__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.proj-detail__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.proj-detail__list li {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 300;
    padding-left: 16px;
    position: relative;
}

.proj-detail__list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.75rem;
}

/* --- Content Blocks (numbered sections) --- */
.proj-block {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 60px;
    align-items: start;
}

.proj-block__header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: calc(var(--nav-h) + 40px);
}

.proj-block__num {
    font-family: var(--font-bg-text);
    font-size: 5rem;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,77,0,0.4);
    line-height: 1;
    display: block;
}

.proj-block__title {
    font-family: var(--font-display);
    font-weight: 100;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.proj-block__body p {
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.85;
    font-size: 1rem;
}

.proj-block__body p + p {
    margin-top: 20px;
}

/* Callout hook — intro statement at the top of a numbered section */
.proj-block__body .proj-block__hook {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.75;
    padding-bottom: 24px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
}

.proj-block__body .proj-block__hook + p {
    margin-top: 24px;
}

/* --- Callout Statements --- */
.proj-callout__label {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 32px;
}

.proj-callout__label::before {
    content: '';
    width: 28px;
    height: 1px;
    background: currentColor;
    flex-shrink: 0;
}

.proj-callout__text {
    font-family: var(--font-display);
    font-weight: 100;
    font-size: clamp(1.6rem, 3.5vw, 3rem);
    letter-spacing: -0.025em;
    line-height: 1.25;
    color: var(--text);
    max-width: 900px;
}

/* Remove default top margin when results follow a callout label directly */
.proj-callout__label + .proj-results {
    margin-top: 32px;
}

/* --- Image Grids --- */
.proj-images {
    width: 100%;
    overflow: hidden;
}

.proj-img-grid {
    display: grid;
    gap: 3px;
    width: 100%;
    min-width: 0;
}

.proj-img-grid--2col {
    grid-template-columns: 1fr 1fr;
}

.proj-img-grid--3col {
    grid-template-columns: 1fr 1fr 1fr;
}

.proj-img-grid--asym {
    grid-template-columns: 2fr 1fr;
}

.proj-img {
    background-color: var(--bg-card);
    aspect-ratio: 4 / 3;
    min-width: 0;
    width: 100%;
}

.proj-img--full {
    width: 100%;
    min-width: 0;
    aspect-ratio: 21 / 9;
}

/* Placeholder tints so images are visually distinct */
.proj-img--a { background: #141414; }
.proj-img--b { background: #181818; }
.proj-img--c { background: #131313; }
.proj-img--d { background: #1c1c1c; }
.proj-img--e { background: #111111; }
.proj-img--f { background: linear-gradient(90deg, #141414 0%, #1e1e1e 50%, #141414 100%); }
.proj-img--g { background: #161616; }
.proj-img--h { background: #1a1a1a; aspect-ratio: auto; }

/* --- Pull Quote --- */
.proj-quote {
    padding: 100px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
    text-align: center;
}

.proj-quote__text {
    font-family: var(--font-display);
    font-weight: 100;
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    letter-spacing: -0.025em;
    line-height: 1.3;
    color: var(--text);
    max-width: 860px;
    margin: 0 auto 28px;
    font-style: normal;
}

.proj-quote__text::before { content: '\201C'; color: var(--accent); }
.proj-quote__text::after  { content: '\201D'; color: var(--accent); }

.proj-quote__cite {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-style: normal;
}

/* --- Results --- */
.proj-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    margin-top: 60px;
}

.proj-result {
    padding: 48px 40px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.proj-result:last-child { border-right: none; }

.proj-result__num {
    font-family: var(--font-display);
    font-weight: 100;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--accent);
    letter-spacing: -0.04em;
    line-height: 1;
}

.proj-result__label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.5;
}

/* --- Next Project --- */
.proj-next {
    padding: var(--pad-section) 0;
    border-top: 1px solid var(--border);
}

.proj-next__label {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.proj-next__card {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 60px;
    align-items: center;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.proj-next__card:hover {
    border-color: var(--accent);
}

.proj-next__img {
    height: 320px;
    background-color: var(--bg-card);
    transition: transform 0.6s ease;
}

.proj-next__card:hover .proj-next__img {
    transform: scale(1.03);
}

.proj-next__img--1          { background: linear-gradient(135deg, #1a1a1a 0%, #111 100%); }
.proj-next__img--proud-source { background: url('images/ps-cover.webp') center / cover no-repeat; }
.proj-next__img--dotmatics  { background: url('images/dot-cover.webp') center / cover no-repeat; }
.proj-next__img--skona      { background: url('images/skona-cover.webp') center / cover no-repeat; }
.proj-next__img--cartage    { background: url('images/cartage-cover.webp') center / cover no-repeat; }

.proj-next__info {
    padding: 48px 48px 48px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.proj-next__title {
    font-family: var(--font-display);
    font-weight: 100;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.proj-next__cta {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 8px;
}

/* --- Project Page Responsive --- */
@media (max-width: 1024px) {
    .proj-overview { grid-template-columns: 1fr; gap: 48px; }
    .proj-callout__text { max-width: 100%; }
    .proj-block { grid-template-columns: 1fr; gap: 32px; }
    .proj-block__header { position: static; flex-direction: row; align-items: center; }
    .proj-block__num { font-size: 3.5rem; }
    .proj-results { grid-template-columns: 1fr 1fr; }
    .proj-results .proj-result:nth-child(2) { border-right: none; }
    .proj-results .proj-result:last-child { grid-column: 1 / -1; border-right: none; border-top: 1px solid var(--border); }
    .proj-next__card { grid-template-columns: 1fr; }
    .proj-next__img { height: 260px; }
    .proj-next__info { padding: 40px; }
}

/* Mid breakpoint: 3-col eases to 2-col before fully stacking */
@media (max-width: 900px) {
    .proj-img-grid--3col { grid-template-columns: 1fr 1fr; }
    .proj-img-grid--3col .proj-img:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 7; }
}

@media (max-width: 768px) {
    .proj-meta__grid { flex-direction: column; flex-wrap: wrap; }
    .proj-meta__item { border-right: none; border-bottom: 1px solid var(--border); padding: 24px 0; }
    .proj-meta__item--cta { border-bottom: none; }
    .proj-img-grid--2col,
    .proj-img-grid--3col,
    .proj-img-grid--asym { grid-template-columns: 1fr; }
    .proj-img-grid--3col .proj-img:last-child { grid-column: auto; aspect-ratio: 4 / 3; }
    .proj-img--h { aspect-ratio: 4 / 3; }
    .proj-results { grid-template-columns: 1fr; }
    .proj-results .proj-result { border-right: none; border-bottom: 1px solid var(--border); }
    .proj-results .proj-result:last-child { border-bottom: none; border-top: none; }
    .proj-cover { height: 50vw; min-height: 280px; }
    .proj-quote { padding: 60px 0; }
    .proj-next__info { padding: 28px 24px; }
    .proj-block__header { flex-direction: column; gap: 4px; }
}

/* =========================================
   HOME: EXPANDING WORK CARDS
   ========================================= */
.work-cards {
    display: flex;
    gap: 3px;
    height: 520px;
}

.work-card {
    flex: 1;
    position: relative;
    overflow: hidden;

    transition: flex 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
}

/* Compress siblings when any card is hovered */
.work-cards:has(.work-card:hover) .work-card:not(:hover) {
    flex: 0.35;
}

.work-card:hover {
    flex: 2.95;
}

/* Background image layer */
.work-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}

.work-card:hover .work-card__bg {
    transform: scale(1.04);
}

/* Gradient overlay — deeper on hover for readability */
.work-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(13, 13, 13, 0.96) 0%,
        rgba(13, 13, 13, 0.45) 40%,
        rgba(13, 13, 13, 0.1)  70%,
        transparent 100%
    );
    z-index: 1;
}

/* Content sits over the image */
.work-card__content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px 28px 32px;
    z-index: 2;
}

/* Project number top-left */
.work-card__num {
    font-family: var(--font-bg-text);
    font-size: 2.2rem;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 77, 0, 0.3);
    line-height: 1;
    flex-shrink: 0;
    transition: -webkit-text-stroke-color 0.3s ease;
}

.work-card:hover .work-card__num {
    -webkit-text-stroke-color: var(--accent);
}

/* Bottom info block — column-reverse anchors title to bottom edge */
.work-card__body {
    display: flex;
    flex-direction: column-reverse;
}

/* Title — always visible, always at same vertical position */
.work-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 1.8vw, 1.7rem);
    font-weight: 100;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.work-card:hover .work-card__title {
    white-space: normal;
}

/* Expand block — zero height when collapsed so title never shifts */
.work-card__expand {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-bottom: 0;
    /* OUT transition */
    transition: max-height 0.4s ease, opacity 0.2s ease, margin-bottom 0.3s ease;
}

.work-card:hover .work-card__expand {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 14px;
    /* IN transition — opacity delayed so content appears after card widens */
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s,
                opacity 0.3s ease 0.3s,
                margin-bottom 0.4s ease 0s;
}

.work-card__tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.work-card__desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.65;
    max-width: 340px;
}

.work-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    transition: gap 0.2s ease;
}

.work-card__link:hover {
    gap: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .work-cards { height: 460px; }
}

@media (max-width: 768px) {
    .work-cards {
        flex-direction: column;
        height: auto;
        gap: 3px;
    }

    /* Switch to stacked layout: image on top, text below */
    .work-card {
        flex: none;
        height: auto;
        overflow: visible;
        display: flex;
        flex-direction: column;
    }

    /* Image becomes a normal flow block with fixed height */
    .work-card__bg {
        position: relative;
        inset: auto;
        height: 220px;
        flex-shrink: 0;
    }

    /* Hide the dark overlay — no longer needed */
    .work-card__overlay { display: none; }

    /* Content comes out of absolute positioning */
    .work-card__content {
        position: relative;
        inset: auto;
        background: var(--bg-card);
        padding: 20px 24px 24px;
        justify-content: flex-start;
        gap: 10px;
    }

    /* Always show the expand block */
    .work-card__expand {
        max-height: none;
        opacity: 1;
        margin-bottom: 0;
        transition: none;
        flex-direction: column;
        gap: 8px;
    }

    .work-card__num { font-size: 1.6rem; margin-bottom: 4px; }
    .work-card__title { white-space: normal; font-size: 1.3rem; }
    .work-card__desc { max-width: 100%; }

    .work-cards:has(.work-card:hover) .work-card:not(:hover) { flex: none; }
    .work-card:hover { flex: none; }
    .work-card:hover .work-card__bg { transform: none; }
}

/* =========================================
   404 ERROR PAGE
   ========================================= */
.error-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: calc(var(--nav-h) + 80px) max(40px, calc((100vw - var(--max-w)) / 2 + 40px)) 100px;
    position: relative;
    isolation: isolate;
}

/* Animated scanline sweep */
.error-hero__scan {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.error-hero__scan::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, var(--accent) 40%, var(--accent) 60%, transparent 100%);
    opacity: 0;
    top: -1px;
    box-shadow: 0 0 8px 2px rgba(255, 77, 0, 0.6);
    animation: errorScan 6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    animation-delay: 1.8s;
}

@keyframes errorScan {
    0%   { top: -1px; opacity: 0; }
    4%   { opacity: 0.85; }
    96%  { opacity: 0.85; }
    100% { top: 101%; opacity: 0; }
}

/* Decorative bg text */
.error-hero__bg-text {
    position: absolute;
    right: -60px;
    bottom: -0.1em;
    font-family: var(--font-bg-text);
    font-size: clamp(18rem, 36vw, 46rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 77, 0, 0.18);
    line-height: 0.85;
    letter-spacing: -0.08em;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 0;
    animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.error-hero__content {
    position: relative;
    z-index: 2;
}

/* Label row */
.error-hero__label {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.error-hero__label-rule {
    display: block;
    width: 36px;
    height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

/* Giant 404 number */
.error-hero__code {
    font-family: var(--font-display);
    font-size: clamp(9rem, 26vw, 24rem);
    font-weight: 100;
    line-height: 1.15;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
    paint-order: stroke fill;
    position: relative;
    display: block;
    overflow: visible;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* Glitch pseudo-layers */
.error-hero__code::before,
.error-hero__code::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    font-family: var(--font-display);
    font-size: inherit;
    font-weight: 100;
    line-height: inherit;
    letter-spacing: inherit;
    color: transparent;
    pointer-events: none;
    user-select: none;
}

.error-hero__code::before {
    -webkit-text-stroke: 1.5px rgba(255, 77, 0, 0.7);
    animation: glitchTop 9s infinite;
    animation-delay: 2.5s;
}

.error-hero__code::after {
    -webkit-text-stroke: 1.5px rgba(240, 240, 240, 0.25);
    animation: glitchBot 9s infinite;
    animation-delay: 2.5s;
}

@keyframes glitchTop {
    0%, 88%, 100% { clip-path: none; transform: none; opacity: 0; }
    89% { clip-path: polygon(0 15%, 100% 15%, 100% 38%, 0 38%); transform: translateX(-5px); opacity: 1; }
    90% { clip-path: polygon(0 10%, 100% 10%, 100% 30%, 0 30%); transform: translateX(5px); opacity: 1; }
    91% { clip-path: polygon(0 20%, 100% 20%, 100% 42%, 0 42%); transform: translateX(-3px); opacity: 1; }
    92% { opacity: 0; transform: none; clip-path: none; }
}

@keyframes glitchBot {
    0%, 88%, 100% { clip-path: none; transform: none; opacity: 0; }
    89% { clip-path: polygon(0 62%, 100% 62%, 100% 80%, 0 80%); transform: translateX(5px); opacity: 1; }
    90% { clip-path: polygon(0 55%, 100% 55%, 100% 75%, 0 75%); transform: translateX(-4px); opacity: 1; }
    91% { clip-path: polygon(0 68%, 100% 68%, 100% 85%, 0 85%); transform: translateX(3px); opacity: 1; }
    92% { opacity: 0; transform: none; clip-path: none; }
}

/* Horizontal rule between code and title */
.error-hero__divider {
    width: 80px;
    height: 1px;
    background: var(--border);
    margin: 28px 0;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.38s both;
}

/* "Page not found." headline */
.error-hero__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 100;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 20px;
    animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.46s both;
}

.error-hero__sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 440px;
    font-weight: 300;
    line-height: 1.75;
    animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.58s both;
}

.error-hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

/* Bottom-right metadata strip */
.error-hero__meta {
    position: absolute;
    bottom: 40px;
    right: max(40px, calc((100vw - var(--max-w)) / 2 + 40px));
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--border);
    font-weight: 500;
    z-index: 2;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
}

.error-hero__meta-sep {
    color: var(--accent);
    font-size: 0.5rem;
}


/* Responsive */
@media (max-width: 768px) {
    .error-hero {
        padding: calc(var(--nav-h) + 40px) 24px 60px;
    }
    .error-hero__code {
        -webkit-text-stroke-width: 1px;
    }
    .error-hero__meta { display: none; }
}
