/* ====================================================
   SQ STUDIO — SWISS RETRO MODERN GRAPHIC DESIGN
   Typography: Plus Jakarta Sans, Inter, IBM Plex Mono
   Border system: Refined Soft Architectural Gray (#e2e8f0)
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Plus+Jakarta+Sans:wght@500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --paper: #ffffff;
    --panel: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-light: #f1f5f9;
    --line-dark: #cbd5e1;
    
    --green: #00c853;
    --amber: #ff9e00;
    --cyan: #00b8d9;
    --violet: #7b2ff7;
    
    --accent: #ff9e00;
    --hot: #ff9e00;
    
    --font-heading: 'Plus Jakarta Sans', 'Space Grotesk', -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    
    --radius: 0px;
}

[data-theme="dark"] {
    --paper: #090d16;
    --panel: #111827;
    --ink: #f8fafc;
    --muted: #94a3b8;
    --line: #1e293b;
    --line-light: #0f172a;
    --line-dark: #334155;
    
    --green: #00e676;
    --amber: #ff9e00;
    --cyan: #00e5ff;
    --violet: #8b5cf6;
    
    --accent: #00e676;
    --hot: #ff9e00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    border-radius: 0 !important;
}

html {
    scroll-behavior: smooth;
    background: var(--paper);
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

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

/* Typography */
h1, h2, h3, h4, .brand {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 800;
    line-height: 1.05;
}

.mono {
    font-family: var(--font-mono);
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

/* CRT Accent Dots (Hero Quadrant Colors) */
.accent-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50% !important;
    margin-right: 7px;
    vertical-align: 1px;
    flex-shrink: 0;
}
.dot-green { background: var(--green); box-shadow: 0 0 6px var(--green) !important; }
.dot-amber { background: var(--amber); box-shadow: 0 0 6px var(--amber) !important; }
.dot-cyan  { background: var(--cyan);  box-shadow: 0 0 6px var(--cyan) !important; }
.dot-violet{ background: var(--violet);box-shadow: 0 0 6px var(--violet) !important; }

section {
    padding: 90px 0;
    border-bottom: 1px solid var(--line);
}

.num {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    padding: 2px 8px;
    border: 1px solid var(--line);
    margin-right: 12px;
}

/* ====================================================
   HEADER NAVIGATION (RETRO MAC BOXES)
   ==================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #ffffff;
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
    height: 52px;
}

header .brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1;
    padding: 0 0 0 1.5vw;
    align-items: center;
    border-right: 1px solid var(--line);
    font-family: var(--font-heading);
    font-size: 24px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    background: #ffffff;
    color: var(--ink);
    transition: background 0.15s, color 0.15s;
}

header .brand i {
    font-style: normal;
    color: var(--hot);
}

header .brand small {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.3em;
    color: var(--muted);
    text-transform: uppercase;
}

header .brand:hover {
    background: var(--amber);
    color: #ffffff;
}

header .brand:hover i, header .brand:hover small {
    color: #ffffff;
}

header nav {
    display: flex;
    align-items: stretch;
}

header nav a {
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    border-left: 1px solid var(--line);
    letter-spacing: 0.06em;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

header nav a:hover {
    background: var(--green);
    color: #ffffff;
}

.header-controls {
    display: flex;
    align-items: stretch;
}

.lang-switch {
    display: flex;
    align-items: center;
    padding: 0 18px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    border-left: 1px solid var(--line);
    background: #ffffff;
    color: var(--ink);
}

.lang-switch:hover {
    background: var(--cyan);
    color: #ffffff;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: none;
    border-left: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.theme-toggle:hover {
    background: var(--violet);
    color: #ffffff;
}

/* ====================================================
   MOBILE MATRIX NAV & STAGGERED CONTACT CARDS
   ==================================================== */
.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 52px;
    min-width: 52px;
    height: 52px;
    padding: 0;
    background: transparent;
    border: none;
    border-left: 1px solid var(--line);
    cursor: pointer;
    flex-shrink: 0;
    color: var(--ink);
    transition: background 0.15s ease;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:active {
    background: var(--line-light);
}

/* SVG del cuadradito con cuatro cuadraditos dentro */
.grid-cube-svg {
    width: 22px;
    height: 22px;
    display: block;
    color: var(--ink);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.mobile-nav-toggle.active .grid-cube-svg {
    transform: rotate(45deg);
    color: var(--green);
}

/* Fallback CSS para cuadradito con cuatro cuadraditos */
.grid-cube-icon {
    width: 24px;
    height: 24px;
    border: 2px solid var(--ink);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
    padding: 3px;
    box-sizing: border-box;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background 0.2s ease;
}

.cube-dot {
    background: var(--ink);
    width: 100%;
    height: 100%;
    display: block;
    transition: background 0.2s ease, transform 0.2s ease;
}

.mobile-nav-toggle.active .grid-cube-icon {
    transform: rotate(45deg);
    border-color: var(--green);
}

.mobile-nav-toggle.active .cube-dot {
    background: var(--green);
}

/* Fallback for legacy pages with hamburger icon */
.hamburger {
    width: 18px;
    height: 2px;
    background: var(--ink);
    position: relative;
    display: inline-block;
}
.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--ink);
    left: 0;
}
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

@media (max-width: 860px) {
    header {
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
    }
    header .brand {
        font-size: 19px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    header .brand small { display: none !important; }
    header nav { display: none !important; }
    .header-controls {
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: stretch !important;
    }
    .lang-switch { display: none !important; }
    .btn-header-cta { display: none !important; }
    .theme-toggle { display: none !important; }
    .mobile-nav-toggle {
        display: flex !important;
        width: 52px !important;
        min-width: 52px !important;
        height: 52px !important;
    }
}

/* Mobile Nav Overlay: Quadrant Matrix */
.mobile-menu-overlay {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paper);
    z-index: 99;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    border-top: 1px solid var(--line);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Grilla de cuadrantes móviles estilo Hero */
.mobile-quad-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(130px, 1fr) minmax(130px, 1fr) minmax(80px, auto);
    min-height: calc(100dvh - 52px);
    width: 100%;
    background: var(--paper);
}

.menu-sector {
    position: relative;
    border: 1px solid var(--line);
    margin: -1px 0 0 -1px;
    background: var(--paper);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(16px, 4vw, 24px);
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: background 2.4s ease, border-color 0.2s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(-20px);
    will-change: transform, opacity, background;
}

.menu-sector.ms5 {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

/* Breathing animation: igual a los sectores del hero */
.menu-sector.breath {
    background: #ececec;
}

[data-theme="dark"] .menu-sector.breath {
    background: #172033;
}

.menu-sector .sector-title {
    font-family: var(--font-heading);
    font-size: clamp(16px, 4.2vw, 22px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.15;
    color: var(--ink);
    transition: color 0.15s ease;
}

.menu-sector .sector-arrow {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    align-self: flex-end;
    transition: transform 0.2s ease, color 0.15s ease;
}

.menu-sector.ms5 .sector-arrow {
    align-self: center;
}

.menu-sector:hover .sector-arrow,
.menu-sector:active .sector-arrow {
    transform: translateX(5px);
}

/* CRT Color Lighting on Hover / Active */
.ms1:hover, .ms1:active {
    background: var(--green) !important;
    transition: background 0.1s ease !important;
}
.ms1:hover .sector-title, .ms1:hover .sector-arrow,
.ms1:active .sector-title, .ms1:active .sector-arrow {
    color: #000000 !important;
}

.ms2:hover, .ms2:active {
    background: var(--amber) !important;
    transition: background 0.1s ease !important;
}
.ms2:hover .sector-title, .ms2:hover .sector-arrow,
.ms2:active .sector-title, .ms2:active .sector-arrow {
    color: #000000 !important;
}

.ms3:hover, .ms3:active {
    background: var(--cyan) !important;
    transition: background 0.1s ease !important;
}
.ms3:hover .sector-title, .ms3:hover .sector-arrow,
.ms3:active .sector-title, .ms3:active .sector-arrow {
    color: #000000 !important;
}

.ms4:hover, .ms4:active {
    background: var(--violet) !important;
    transition: background 0.1s ease !important;
}
.ms4:hover .sector-title, .ms4:hover .sector-arrow,
.ms4:active .sector-title, .ms4:active .sector-arrow {
    color: #ffffff !important;
}

.ms5:hover, .ms5:active {
    background: #0f172a !important;
    transition: background 0.1s ease !important;
}
.ms5:hover .sector-title, .ms5:hover .sector-arrow,
.ms5:active .sector-title, .ms5:active .sector-arrow {
    color: #ffffff !important;
}

/* Stagger Animation */
.mobile-menu-overlay.open .menu-sector {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-overlay.open .menu-sector.ms1 { transition-delay: 0.04s; }
.mobile-menu-overlay.open .menu-sector.ms2 { transition-delay: 0.09s; }
.mobile-menu-overlay.open .menu-sector.ms3 { transition-delay: 0.14s; }
.mobile-menu-overlay.open .menu-sector.ms4 { transition-delay: 0.19s; }
.mobile-menu-overlay.open .menu-sector.ms5 { transition-delay: 0.24s; }

/* ====================================================
   HERO SECTION — 4 BREATHING QUADRANTS & SQ INTRO
   ==================================================== */
.hero {
    padding: 0;
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
    margin-top: 52px;
}

.hero-top {
    height: calc(100vh - 52px);
    min-height: 600px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    position: relative;
}

.sector {
    position: relative;
    border: 1px solid var(--line);
    cursor: pointer;
    background: var(--paper);
    transition: background 2.4s ease, border-color 0.3s ease;
    display: flex;
    overflow: hidden;
}

/* Breathing animation: subtle drift from white to soft muted gray */
.sector.breath {
    background: #ececec;
}

[data-theme="dark"] .sector.breath {
    background: #172033;
}

.sector:active {
    transition: background 0s;
}

/* CRT Color Lighting on Hover/Active */
.s1:hover, .s1.active, .s1.lit { background: var(--green); }   /* Phosphor Green */
.s2:hover, .s2.active, .s2.lit { background: var(--amber); }   /* Amber Orange */
.s3:hover, .s3.active, .s3.lit { background: var(--cyan); }    /* Retro Cyan */
.s4:hover, .s4.active, .s4.lit { background: var(--violet); }  /* Retro Violet */

/* Corner Sector Meta (Text Labels + Monospace Index) — Always Visible */
.sector-meta {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.25s ease;
    max-width: clamp(140px, 36vw, 320px);
}

.s1 .sector-meta {
    top: clamp(16px, 3.5vw, 36px);
    left: clamp(16px, 3.5vw, 36px);
    text-align: left;
    align-items: flex-start;
}

.s2 .sector-meta {
    top: clamp(16px, 3.5vw, 36px);
    right: clamp(16px, 3.5vw, 36px);
    text-align: right;
    align-items: flex-end;
}

.s3 .sector-meta {
    bottom: clamp(16px, 3.5vw, 36px);
    left: clamp(16px, 3.5vw, 36px);
    text-align: left;
    align-items: flex-start;
}

.s4 .sector-meta {
    bottom: clamp(16px, 3.5vw, 36px);
    right: clamp(16px, 3.5vw, 36px);
    text-align: right;
    align-items: flex-end;
}

.sector-idx {
    font-family: var(--font-mono);
    font-size: clamp(10px, 1.1vw, 12px);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--muted);
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.sector .label {
    font-family: var(--font-heading);
    font-size: clamp(13px, 1.5vw, 19px);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink);
    opacity: 0.9;
    line-height: 1.15;
    transition: all 0.25s ease;
}

/* Hover & Active text states */
.sector:hover .sector-meta,
.sector.active .sector-meta {
    transform: translateY(-2px);
}

.s1:hover .label, .s1.active .label,
.s2:hover .label, .s2.active .label,
.s3:hover .label, .s3.active .label {
    color: #000000;
    opacity: 1;
}

.s1:hover .sector-idx, .s1.active .sector-idx,
.s2:hover .sector-idx, .s2.active .sector-idx,
.s3:hover .sector-idx, .s3.active .sector-idx {
    color: rgba(0, 0, 0, 0.65);
}

.s4:hover .label, .s4.active .label {
    color: #ffffff;
    opacity: 1;
}

.s4:hover .sector-idx, .s4.active .sector-idx {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .sector .label {
    color: var(--ink);
    opacity: 0.92;
}

/* SQ Stage — Central Preloader / Hero Logo S Video Animation (~150% Larger & Centered) */
.sq-stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
}

.sq-anim-video-container {
    position: relative;
    width: clamp(380px, 46vw, 680px);
    height: clamp(380px, 46vw, 680px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sq-enter 1.8s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

.sq-hero-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    mix-blend-mode: multiply;
}

[data-theme="dark"] .sq-hero-video {
    mix-blend-mode: screen;
}

@keyframes sq-enter {
    0% {
        opacity: 0;
        transform: scale(2.2);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.sq-tag {
    position: relative;
    margin-top: 14px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: clamp(10px, 1.1vw, 12px);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink);
    opacity: 0.85;
    animation: fadeup 1s 1.8s both;
}

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

@media (max-width: 820px) {
    .hero-top {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        height: calc(100dvh - 52px);
        min-height: 520px;
    }

    .sq-anim-video-container {
        width: clamp(250px, 66vw, 360px);
        height: clamp(250px, 66vw, 360px);
    }

    .sq-tag {
        font-size: 10px;
        letter-spacing: 0.16em;
        margin-top: 8px;
    }

    .sector-meta {
        max-width: clamp(120px, 38vw, 180px);
    }

    .s1 .sector-meta {
        top: 14px;
        left: 14px;
    }

    .s2 .sector-meta {
        top: 14px;
        right: 14px;
    }

    .s3 .sector-meta {
        bottom: 14px;
        left: 14px;
    }

    .s4 .sector-meta {
        bottom: 14px;
        right: 14px;
    }

    .sector .label {
        font-size: clamp(11px, 3.2vw, 14px);
    }

    .sector-idx {
        font-size: 10px;
    }
}

/* ====================================================
   SECTION HEADERS
   ==================================================== */
.shead {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 20px;
}

.shead h2 {
    font-size: clamp(34px, 4.5vw, 54px);
    font-weight: 900;
}

.lede2 {
    color: var(--muted);
    font-size: 15px;
    max-width: 680px;
    margin-bottom: 40px;
}

#services .lede2,
#retainer .lede2,
#process .lede2 {
    max-width: 820px;
    line-height: 1.65;
    text-wrap: pretty;
}

/* ====================================================
   SERVICES, RETAINER & PROCESS — WORD-BY-WORD REVEAL ANIMATIONS
   ==================================================== */
.reveal-word {
    display: inline-block;
    vertical-align: baseline;
    will-change: opacity, transform, filter;
}

/* Instant reset when not in view */
#services:not(.is-visible) .reveal-word,
#retainer:not(.is-visible) .reveal-word,
#process:not(.is-visible) .reveal-word {
    transition: none !important;
}

/* Title: appears word-by-word with fade and gentle de-blur */
.reveal-words-title .reveal-word {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(6px) scale(0.96);
}

#services.is-visible .reveal-words-title .reveal-word,
#retainer.is-visible .reveal-words-title .reveal-word,
#process.is-visible .reveal-words-title .reveal-word {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--word-delay, 0s);
}

/* Description: appears word-by-word rising smoothly from below */
.reveal-words-desc .reveal-word {
    opacity: 0;
    transform: translateY(22px);
}

#services.is-visible .reveal-words-desc .reveal-word,
#retainer.is-visible .reveal-words-desc .reveal-word,
#process.is-visible .reveal-words-desc .reveal-word {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--word-delay, 0.2s);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-words-title .reveal-word,
    .reveal-words-desc .reveal-word,
    .service-overview-card,
    .pricing-card,
    .pipeline-step-cell {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }
}

/* ====================================================
   SERVICES OVERVIEW SECTION (SWISS WIDE BREATHING CARDS)
   ==================================================== */
#services {
    overflow-x: hidden;
}

.services-overview-container {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 clamp(20px, 3.5vw, 48px);
}

.services-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(20px, 2.5vw, 36px);
    width: 100%;
    align-items: stretch;
}

.service-overview-card {
    height: 100%;
    border: 1px solid var(--line);
    padding: clamp(32px, 3.2vw, 44px) clamp(24px, 2.6vw, 38px);
    display: flex;
    flex-direction: column;
    background: var(--paper);
    box-sizing: border-box;
    text-decoration: none;
    color: var(--ink);
    opacity: 0;
    transform: translateX(-70px);
    will-change: transform, opacity;
    transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                background 2.4s ease;
}

/* Breathing animation: subtle drift from paper to soft muted gray (identical to hero quadrants) */
.service-overview-card.breath:not(:hover) {
    background: #ececec;
}

[data-theme="dark"] .service-overview-card.breath:not(:hover) {
    background: #172033;
}

/* Reset instantaneously when out of view */
#services:not(.is-visible) .service-overview-card {
    transition: none !important;
}

/* Slide in from left to right when section becomes visible */
#services.is-visible .service-overview-card:first-child {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.35s, 0.35s, 0s, 0s;
}

#services.is-visible .service-overview-card:last-child {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.52s, 0.52s, 0s, 0s;
}

.service-overview-card:hover {
    border-color: var(--line-dark);
    transition-delay: 0s !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
}

.service-overview-top {
    display: flex;
    flex-direction: column;
}

.service-overview-title {
    font-family: var(--font-heading);
    font-size: clamp(26px, 2.5vw, 36px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 14px;
    color: var(--ink);
    letter-spacing: 0.01em;
}

.service-overview-desc {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 580px;
}

/* Service Capabilities Separated by Clean Lines */
.service-capabilities-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    width: 100%;
}

.capability-line-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.capability-line-item:first-child {
    border-top: 1px solid var(--line);
}

.cap-bullet {
    font-family: var(--font-mono);
    color: var(--ink);
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
}

.cap-name {
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.01em;
}

/* Overview Bottom Action Button */
.service-overview-bottom {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    width: 100%;
}

.btn-overview-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 20px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line-dark);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-overview-action .arrow {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.service-overview-card:hover .btn-overview-action {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.service-overview-card:hover .btn-overview-action .arrow {
    transform: translateX(6px);
}

/* Service Overview Unified Color Illumination (Hero-aligned) */
.overview-card-green:hover {
    background: rgba(0, 200, 83, 0.03);
}

.overview-card-green:hover .btn-overview-action,
.overview-card-green .btn-overview-action:hover {
    background: var(--green);
    color: #000000;
    border-color: var(--line-dark);
}

.overview-card-green .cap-bullet { color: var(--green); }
.overview-card-green .btn-overview-action .arrow { color: var(--green); }
.overview-card-green:hover .btn-overview-action .arrow { color: #000000; }

.overview-card-cyan:hover {
    background: rgba(0, 184, 217, 0.03);
}

.overview-card-cyan:hover .btn-overview-action,
.overview-card-cyan .btn-overview-action:hover {
    background: var(--cyan);
    color: #000000;
    border-color: var(--line-dark);
}

.overview-card-cyan .cap-bullet { color: var(--cyan); }
.overview-card-cyan .btn-overview-action .arrow { color: var(--cyan); }
.overview-card-cyan:hover .btn-overview-action .arrow { color: #000000; }

@media (max-width: 860px) {
    .services-overview-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}


/* ====================================================
   PORTFOLIO WORK SHOWCASE
   ==================================================== */
.work-filters {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 40px;
    border: 1px solid var(--line);
    width: fit-content;
}

.filter-btn {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 10px 22px;
    background: var(--paper);
    border: none;
    border-right: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:last-child {
    border-right: none;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--ink);
    color: #ffffff;
}

.filter-btn.filter-green:hover, .filter-btn.filter-green.active {
    background: var(--green);
    color: #000000;
}

.filter-btn.filter-cyan:hover, .filter-btn.filter-cyan.active {
    background: var(--cyan);
    color: #000000;
}

.filter-btn.filter-violet:hover, .filter-btn.filter-violet.active {
    background: var(--violet);
    color: #ffffff;
}

/* Project Category Badges */
.project-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    transition: all 0.2s ease;
}

.project-category-badge.badge-green {
    color: var(--green);
    background: rgba(0, 200, 83, 0.08);
}

.project-category-badge.badge-violet {
    color: var(--violet);
    background: rgba(123, 47, 247, 0.08);
}

.project-category-badge.badge-cyan {
    color: var(--cyan);
    background: rgba(0, 184, 217, 0.08);
}

.project-category-badge.badge-amber {
    color: var(--amber);
    background: rgba(255, 158, 0, 0.08);
}

.project-card:hover {
    border-color: var(--line-dark);
}

.project-card:hover .project-link-btn {
    color: var(--ink);
}

.project-card.project-card-green:hover { background: rgba(0, 200, 83, 0.02); }
.project-card.project-card-green:hover .project-category-badge { background: var(--green); color: #000000; }
.project-card.project-card-green:hover .project-link-btn { color: var(--green); }

.project-card.project-card-violet:hover { background: rgba(123, 47, 247, 0.02); }
.project-card.project-card-violet:hover .project-category-badge { background: var(--violet); color: #ffffff; }
.project-card.project-card-violet:hover .project-link-btn { color: var(--violet); }

.project-card.project-card-cyan:hover { background: rgba(0, 184, 217, 0.02); }
.project-card.project-card-cyan:hover .project-category-badge { background: var(--cyan); color: #000000; }
.project-card.project-card-cyan:hover .project-link-btn { color: var(--cyan); }

.project-card.project-card-amber:hover { background: rgba(255, 158, 0, 0.02); }
.project-card.project-card-amber:hover .project-category-badge { background: var(--amber); color: #000000; }
.project-card.project-card-amber:hover .project-link-btn { color: var(--amber); }
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 840px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
    background: var(--paper);
}

.project-card {
    background: #ffffff;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 840px;
    max-height: 840px;
    box-sizing: border-box;
    overflow: hidden;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.project-card:hover {
    background: var(--panel);
}

/* 1st Project: Full-Width Horizontal Card (Wood Vibe) - EXACT SAME 840px HEIGHT */
.portfolio-grid .project-card:nth-child(1) {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    height: 840px;
}

.portfolio-grid .project-card:nth-child(1) .project-media-wrapper {
    flex: 0 0 58%;
    width: 58%;
    height: 840px;
    aspect-ratio: auto;
    border-bottom: none;
    border-right: 1px solid var(--line);
}

.portfolio-grid .project-card:nth-child(1) .project-content {
    flex: 0 0 42%;
    width: 42%;
    height: 840px;
    padding: 54px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.portfolio-grid .project-card:nth-child(1) .project-content h3 {
    font-size: 38px;
    margin-bottom: 14px;
}

.portfolio-grid .project-card:nth-child(1) .project-content p {
    font-size: 16px;
    line-height: 1.65;
}

/* Standard Vertical Cards (Cards 2, 3, 4, 5) - EXACT SAME 840px HEIGHT */
.portfolio-grid .project-card:not(:nth-child(1)) {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    height: 840px;
}

.portfolio-grid .project-card:not(:nth-child(1)) .project-media-wrapper {
    height: 560px;
    width: 100%;
    aspect-ratio: auto;
    border-bottom: 1px solid var(--line);
}

.portfolio-grid .project-card:not(:nth-child(1)) .project-content {
    height: 280px;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-media-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
}

.project-media-wrapper video, .project-media-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.project-content h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.project-content p {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.project-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
}

.project-link-btn {
    color: var(--accent);
}

@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        border-left: none;
    }
    .portfolio-grid .project-card {
        height: auto !important;
        max-height: none !important;
    }
    .portfolio-grid .project-card:nth-child(1) {
        grid-column: span 1;
        flex-direction: column;
        height: auto !important;
    }
    .portfolio-grid .project-card:nth-child(1) .project-media-wrapper {
        width: 100%;
        height: 250px;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .portfolio-grid .project-card:nth-child(1) .project-content {
        width: 100%;
        height: auto;
        padding: 24px;
    }
    .portfolio-grid .project-card:not(:nth-child(1)) .project-media-wrapper {
        height: 250px;
    }
    .portfolio-grid .project-card:not(:nth-child(1)) .project-content {
        height: auto;
        padding: 24px;
    }
}

/* ====================================================
   RETAINER SECTION
   ==================================================== */
.retainer-full-panel {
    border: 1px solid var(--line);
    background: #ffffff;
    width: 100%;
}

.retainer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
}

.retainer-left {
    padding: 48px;
    border-right: 1px solid var(--line);
}

.retainer-right {
    padding: 48px 36px;
    background: var(--panel);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.retainer-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 900;
    margin-bottom: 16px;
}

.retainer-list {
    list-style: none;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.retainer-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    color: var(--ink);
}

.retainer-list li i {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 700;
    font-style: normal;
}

.retainer-price-amount {
    font-family: var(--font-heading);
    font-size: 56px;
    font-weight: 900;
    color: var(--ink);
    line-height: 1;
    margin: 10px 0;
}

.btn-flat-primary {
    display: inline-flex;
    align-items: center;
    padding: 16px 30px;
    background: var(--ink);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
}

.btn-flat-primary:hover {
    background: var(--accent);
    color: #ffffff;
}

.btn-flat-secondary {
    display: inline-flex;
    align-items: center;
    padding: 16px 26px;
    background: #ffffff;
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid var(--line);
}

.btn-flat-secondary:hover {
    background: var(--panel);
}

@media (max-width: 900px) {
    .retainer-grid { grid-template-columns: 1fr; }
    .retainer-left { border-right: none; border-bottom: 1px solid var(--line); padding: 36px 24px; }
    .retainer-right { padding: 36px 24px; }
}

/* ====================================================
   SERVICES PRICING GRID (SWISS WIDE SEPARATED CARDS)
   ==================================================== */
.services-pricing-container {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 clamp(20px, 3.5vw, 48px);
}

.services-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 2.5vw, 36px);
    width: 100%;
    background: transparent;
    border: none;
    align-items: start; /* Only the clicked card expands; other cards stay compact */
}

#retainer {
    overflow-x: hidden;
}

.pricing-card {
    height: auto;
    border: 1px solid var(--line);
    padding: clamp(30px, 3vw, 42px) clamp(22px, 2.4vw, 34px);
    display: flex;
    flex-direction: column;
    background: var(--paper);
    box-sizing: border-box;
    position: relative;
    opacity: 0;
    transform: translateX(-70px);
    will-change: transform, opacity;
    transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.2s ease,
                background 2.4s ease;
    cursor: default;
}

/* Breathing animation: subtle drift from paper to soft muted gray (identical to hero quadrants) */
.pricing-card.breath:not(:hover) {
    background: #ececec;
}

[data-theme="dark"] .pricing-card.breath:not(:hover) {
    background: #172033;
}

/* Reset instantaneously when out of view */
#retainer:not(.is-visible) .pricing-card {
    transition: none !important;
}

/* Slide in from left to right when section becomes visible — one by one */
#retainer.is-visible .pricing-card:nth-child(1) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.25s, 0.25s, 0s, 0s;
}

#retainer.is-visible .pricing-card:nth-child(2) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.65s, 0.65s, 0s, 0s;
}

#retainer.is-visible .pricing-card:nth-child(3) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 1.05s, 1.05s, 0s, 0s;
}

.pricing-card:hover {
    border-color: var(--line-dark);
    transition-delay: 0s !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
}

.pricing-card.is-expanded {
    border-color: var(--ink);
}

/* Header & Typography Alignment */
.pricing-card-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.pricing-title {
    font-family: var(--font-heading);
    font-size: clamp(26px, 2.2vw, 32px);
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.1;
    color: var(--ink);
    letter-spacing: 0.01em;
    min-height: 36px;
    text-wrap: balance;
}

.pricing-desc {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 0;
    min-height: 88px; /* Perfectly aligns the Specs button across all cards on desktop */
    text-wrap: pretty;
}

/* Specs Toggle Button (Strictly ABOVE the price & drawer) */
.specs-toggle-wrap {
    margin-top: 16px;
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    align-items: center;
}

.specs-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.specs-toggle-btn:hover {
    border-color: var(--line-dark);
}

.pricing-card-green .specs-toggle-btn:hover,
.pricing-card-green.is-expanded .specs-toggle-btn {
    background: var(--green);
    color: #000000 !important;
    border-color: var(--line-dark);
}

.pricing-card-green .specs-toggle-btn:hover *,
.pricing-card-green.is-expanded .specs-toggle-btn * {
    color: #000000 !important;
}

.pricing-card-cyan .specs-toggle-btn:hover,
.pricing-card-cyan.is-expanded .specs-toggle-btn {
    background: var(--cyan);
    color: #000000 !important;
    border-color: var(--line-dark);
}

.pricing-card-cyan .specs-toggle-btn:hover *,
.pricing-card-cyan.is-expanded .specs-toggle-btn * {
    color: #000000 !important;
}

.pricing-card-amber .specs-toggle-btn:hover,
.pricing-card-amber.is-expanded .specs-toggle-btn {
    background: var(--amber);
    color: #000000 !important;
    border-color: var(--line-dark);
}

.pricing-card-amber .specs-toggle-btn:hover *,
.pricing-card-amber.is-expanded .specs-toggle-btn * {
    color: #000000 !important;
}

.specs-btn-icon {
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

/* Collapsible Specs Drawer */
.pricing-card-drawer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.pricing-card.is-expanded .pricing-card-drawer {
    grid-template-rows: 1fr;
}

.drawer-inner {
    overflow: hidden;
}

/* Line-Separated Specs List (Pure Swiss Horizontal Dividers, Zero Boxes, Zero Colored Strokes) */
.specs-lines-list {
    display: flex;
    flex-direction: column;
    padding: 10px 0 18px 0;
    width: 100%;
}

.spec-line-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.spec-line-item:first-child {
    border-top: 1px solid var(--line);
}

.spec-line-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spec-bullet {
    font-family: var(--font-mono);
    color: var(--ink);
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
}

/* Pricing Card Color Accents (Hero-aligned) */
.pricing-card-green .spec-bullet { color: var(--green); }
.pricing-card-cyan .spec-bullet { color: var(--cyan); }
.pricing-card-amber .spec-bullet { color: var(--amber); }

.pricing-card-green .specs-btn-icon { color: var(--green); }
.pricing-card-cyan .specs-btn-icon { color: var(--cyan); }
.pricing-card-amber .specs-btn-icon { color: var(--amber); }

.pricing-card-green:hover .btn-pricing-action { color: var(--green); }
.pricing-card-cyan:hover .btn-pricing-action { color: var(--cyan); }
.pricing-card-amber:hover .btn-pricing-action { color: var(--amber); }

.spec-name {
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.01em;
}

.spec-detail {
    font-family: var(--font-body);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--muted);
    margin: 0;
    padding-left: 17px;
}

/* Bottom Price & CTA Block (BELOW the specs, pinned to bottom) */
.pricing-card-bottom {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.pricing-meta-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pricing-scope {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pricing-amount {
    font-family: var(--font-heading);
    font-size: clamp(32px, 2.8vw, 42px);
    font-weight: 900;
    color: var(--ink);
    line-height: 1;
}

.pricing-amount small {
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0;
}

/* Unified Swiss Brutalist Action Buttons across all 3 cards */
.btn-pricing-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line-dark);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.pricing-card:hover .btn-pricing-action,
.btn-pricing-action:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--line-dark);
}

.pricing-card-green:hover { background: rgba(0, 200, 83, 0.03); }
.pricing-card-green:hover .btn-pricing-action,
.pricing-card-green .btn-pricing-action:hover {
    background: var(--green);
    color: #000000;
    border-color: var(--line-dark);
}

.pricing-card-cyan:hover { background: rgba(0, 184, 217, 0.03); }
.pricing-card-cyan:hover .btn-pricing-action,
.pricing-card-cyan .btn-pricing-action:hover {
    background: var(--cyan);
    color: #000000;
    border-color: var(--line-dark);
}

.pricing-card-amber:hover { background: rgba(255, 158, 0, 0.03); }
.pricing-card-amber:hover .btn-pricing-action,
.pricing-card-amber .btn-pricing-action:hover {
    background: var(--amber);
    color: #000000;
    border-color: var(--line-dark);
}

@media (max-width: 1080px) {
    .services-pricing-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .pricing-desc {
        min-height: auto;
    }

    .pricing-title {
        min-height: auto;
    }
}

/* Pricing Tax & Domestic Billing Specification */
.pricing-tax-note {
    margin-top: 28px;
    padding: 16px 22px;
    border: 1px solid var(--line);
    background: var(--panel);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.pricing-tax-note .tax-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--ink);
    background: var(--paper);
    padding: 4px 8px;
    border: 1px solid var(--line);
    white-space: nowrap;
}

.pricing-tax-note .tax-text {
    flex: 1;
}

@media (max-width: 820px) {
    .pricing-tax-note {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px 16px;
        font-size: 12px;
    }
}


/* ====================================================
   PROCESS STEPS (2-COLUMN EDITORIAL + VERTICAL STACK)
   ==================================================== */
#process {
    overflow-x: hidden;
}

.process-wide-container {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 clamp(20px, 3.5vw, 48px);
    box-sizing: border-box;
}

.process-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(36px, 4.5vw, 76px);
    align-items: start;
    width: 100%;
}

.process-content-left {
    display: flex;
    flex-direction: column;
}

/* Dedicated Animation Stage Above Title */
.process-anim-slot {
    width: 100%;
    min-height: clamp(160px, 18vw, 240px);
    margin-bottom: 28px;
    border: 1px dashed var(--line);
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    transition: all 0.25s ease;
    overflow: hidden;
}

[data-theme="dark"] .process-anim-slot {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.15);
}

.anim-slot-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.12em;
    padding: 7px 16px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.process-quote {
    font-family: var(--font-heading);
    font-size: clamp(26px, 3.2vw, 42px);
    line-height: 1.12;
    margin-bottom: 20px;
    font-weight: 800;
    color: var(--ink);
    text-wrap: balance;
}

.process-desc {
    font-size: 15px;
    line-height: 1.65;
    color: var(--muted);
    text-wrap: pretty;
    margin-bottom: 0;
}

/* Right Stacked Cards */
.process-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.pipeline-step-cell {
    border: 1px solid var(--line);
    padding: clamp(24px, 2.2vw, 32px) clamp(22px, 2.2vw, 30px);
    background: var(--paper);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    cursor: default;
    opacity: 0;
    transform: translateY(-45px); /* Slide in from top to bottom */
    will-change: transform, opacity;
    transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                background 2.4s ease;
}

/* Breathing animation: subtle drift from paper to soft muted gray (identical to hero quadrants & contact cards) */
.pipeline-step-cell.breath:not(:hover) {
    background: #ececec;
}

[data-theme="dark"] .pipeline-step-cell.breath:not(:hover) {
    background: #172033;
}

/* Reset instantaneously when out of view */
#process:not(.is-visible) .pipeline-step-cell {
    transition: none !important;
}

/* Slide in from TOP to BOTTOM when section becomes visible — one by one */
#process.is-visible .pipeline-step-cell:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.25s, 0.25s, 0s, 0s;
}

#process.is-visible .pipeline-step-cell:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.65s, 0.65s, 0s, 0s;
}

#process.is-visible .pipeline-step-cell:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.05s, 1.05s, 0s, 0s;
}

/* Identical Hover as Previous Cards */
.pipeline-step-cell:hover {
    border-color: var(--line-dark);
    transition-delay: 0s !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
}

.step-theme-green:hover { background: rgba(0, 200, 83, 0.03); }
.step-theme-cyan:hover { background: rgba(0, 184, 217, 0.03); }
.step-theme-violet:hover { background: rgba(123, 47, 247, 0.03); }

.step-num-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
    display: inline-block;
    color: var(--muted);
}

.pipeline-step-cell h4 {
    font-family: var(--font-heading);
    font-size: clamp(20px, 1.8vw, 24px);
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--ink);
    letter-spacing: 0.01em;
}

.pipeline-step-cell p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
    text-wrap: pretty;
}

@media (max-width: 900px) {
    .process-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ====================================================
   05 CONTACT SECTION & 3D INTERACTIVE SHOWCASE STAGE
   ==================================================== */
.contact-wide-container {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 clamp(20px, 3.5vw, 48px);
    box-sizing: border-box;
}

.contact-header {
    margin-bottom: clamp(28px, 3.5vw, 44px);
    max-width: 1100px;
}

.contact-headline {
    font-size: clamp(32px, 3.8vw, 54px);
    line-height: 1.08;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    font-family: var(--font-heading);
    font-weight: 800;
    text-wrap: balance;
}

.contact-lede {
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 0;
    text-wrap: pretty;
}

/* Interactive Grid: Contact Cards on Left, 3D on Right (Vertically Centered at the cards) */
.contact-interactive-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(36px, 4.5vw, 68px);
    align-items: center; /* Exactly centers the 3D model with the contact cards */
    width: 100%;
}

/* Contact Channel Cards Stack */
.contact-channels {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.contact-channel-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(18px, 1.8vw, 24px) clamp(20px, 2vw, 26px);
    background: var(--paper);
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    box-sizing: border-box;
    cursor: pointer;
    opacity: 0;
    transform: translateX(-40px);
    will-change: transform, opacity;
    transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                background 2.4s ease,
                color 0.2s ease;
}

/* Breathing animation: subtle drift from paper to soft muted gray (identical to hero quadrants) */
.contact-channel-card.breath:not(:hover) {
    background: #ececec;
}

[data-theme="dark"] .contact-channel-card.breath:not(:hover) {
    background: #172033;
}

.contact-channel-card:hover {
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

/* Reset instantaneously when out of view */
#contact:not(.is-visible) .contact-channel-card {
    transition: none !important;
}

/* Slide in from LEFT to RIGHT one-by-one when visible */
#contact.is-visible .contact-channel-card:nth-child(1) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s, 0.2s, 0s, 0s, 0s;
}

#contact.is-visible .contact-channel-card:nth-child(2) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.5s, 0.5s, 0s, 0s, 0s;
}

#contact.is-visible .contact-channel-card:nth-child(3) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.8s, 0.8s, 0s, 0s, 0s;
}

.channel-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.channel-tag-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-cat-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.channel-status-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border: 1px solid var(--line);
    background: rgba(128, 128, 128, 0.06);
    color: var(--muted);
}

.channel-main-title {
    font-family: var(--font-heading);
    font-size: clamp(17px, 1.5vw, 20px);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 0.01em;
}

.channel-subtext {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.channel-action-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    margin-left: 16px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.channel-arrow {
    font-size: 20px;
    font-weight: 800;
    transition: transform 0.2s ease;
}

.contact-channel-card:hover .channel-arrow {
    transform: translateX(4px);
}

/* Selected Active States (Clean, NO thick border-left line) */
.contact-channel-card.channel-cyan.active {
    border-color: var(--line-dark);
    background: rgba(0, 240, 255, 0.04);
}

.contact-channel-card.channel-violet.active {
    border-color: var(--line-dark);
    background: rgba(123, 47, 247, 0.04);
}

.contact-channel-card.channel-green.active {
    border-color: var(--line-dark);
    background: rgba(0, 230, 118, 0.04);
}

/* Hover highlights with illumination */
.contact-channel-card.channel-cyan:hover {
    background: var(--cyan);
    color: #000000;
    border-color: var(--cyan);
    transition-delay: 0s !important;
}
.contact-channel-card.channel-cyan:hover strong,
.contact-channel-card.channel-cyan:hover span,
.contact-channel-card.channel-cyan:hover .channel-arrow {
    color: #000000 !important;
}

.contact-channel-card.channel-violet:hover {
    background: var(--violet);
    color: #ffffff;
    border-color: var(--violet);
    transition-delay: 0s !important;
}
.contact-channel-card.channel-violet:hover strong,
.contact-channel-card.channel-violet:hover span,
.contact-channel-card.channel-violet:hover .channel-arrow {
    color: #ffffff !important;
}

.contact-channel-card.channel-green:hover {
    background: var(--green);
    color: #000000;
    border-color: var(--green);
    transition-delay: 0s !important;
}
.contact-channel-card.channel-green:hover strong,
.contact-channel-card.channel-green:hover span,
.contact-channel-card.channel-green:hover .channel-arrow {
    color: #000000 !important;
}

/* ====================================================
   3D FLOATING DISPLAY (BORDERLESS, NO BOXES)
   ==================================================== */
.contact-3d-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    opacity: 0;
    transform: translateY(20px);
    will-change: transform, opacity;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#contact:not(.is-visible) .contact-3d-wrapper {
    transition: none !important;
}

#contact.is-visible .contact-3d-wrapper {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.35s;
}

.three-contact-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.three-contact-canvas:active {
    cursor: grabbing;
}

/* Responsive adjustments */
@media (max-width: 960px) {
    .contact-interactive-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .contact-3d-wrapper {
        min-height: 320px;
    }
}

.floating-whatsapp-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--ink);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid var(--line);
}

.floating-whatsapp-btn:hover {
    background: var(--amber);
    color: #ffffff;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 200;
    display: opacity;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 40px 24px;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content-wrapper {
    max-width: 1000px;
    width: 100%;
    background: #ffffff;
    border: 2px solid var(--line);
    padding: 36px;
    position: relative;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 32px;
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font-mono);
}

.lightbox-close:hover {
    color: var(--amber);
}

footer {
    padding: 30px 0;
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}

footer .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* ====================================================
   PROJECT DETAIL PAGES (CASE STUDIES)
   ==================================================== */
.project-detail-page {
    margin-top: 52px;
    padding-bottom: 90px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

.project-hero {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 28px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.back-link:hover {
    color: var(--amber);
    transform: translateX(-4px);
}

.project-category-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 4px 12px;
    border: 1px solid var(--line);
    background: var(--panel);
    margin-bottom: 16px;
}

.project-detail-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 12px;
    color: var(--ink);
}

.project-detail-subtitle {
    font-size: 18px;
    color: var(--muted);
    max-width: 720px;
    margin-bottom: 36px;
    line-height: 1.5;
}

.project-metadata-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    background: #ffffff;
}

.meta-item {
    padding: 20px 24px;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-item:last-child {
    border-right: none;
}

.meta-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
}

.meta-value {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

@media (max-width: 860px) {
    .project-metadata-grid { grid-template-columns: 1fr 1fr; }
    .meta-item:nth-child(2) { border-right: none; }
    .meta-item { border-bottom: 1px solid var(--line); }
}

.project-description-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}

.description-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.description-heading {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--ink);
}

.project-detail-desc {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--ink);
    opacity: 0.85;
}

@media (max-width: 860px) {
    .description-grid-layout { grid-template-columns: 1fr; gap: 32px; }
}

.project-gallery-section {
    padding: 50px 0 80px;
    background: var(--paper);
}

.gallery-header {
    margin-bottom: 24px;
}

.gallery-title {
    font-size: 32px;
    font-weight: 900;
}

/* ====================================================
   BENTO GRID LAYOUT (PERFECT ZERO-ORPHAN BALANCE)
   ==================================================== */
.detail-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 230px;
    gap: 16px;
    width: 100%;
}

.coins-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 240px;
    gap: 16px;
    width: 100%;
}

/* Wood Vibe Bento Spans (8 Items in 4 Columns -> 3 Full Rows, 0 Orphans) */
.detail-gallery-grid .gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.detail-gallery-grid .gallery-item:nth-child(2) {
    grid-column: span 2;
    grid-row: span 1;
}

.detail-gallery-grid .gallery-item:nth-child(3),
.detail-gallery-grid .gallery-item:nth-child(4),
.detail-gallery-grid .gallery-item:nth-child(5),
.detail-gallery-grid .gallery-item:nth-child(6),
.detail-gallery-grid .gallery-item:nth-child(7),
.detail-gallery-grid .gallery-item:nth-child(8) {
    grid-column: span 1;
    grid-row: span 1;
}

/* 3-Column Bento Spans (Olympus 15 Items & Bond Protocol 9 Items -> 0 Orphans) */
.coins-gallery-grid > *:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.coins-gallery-grid > *:nth-child(2),
.coins-gallery-grid > *:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
}

.coins-gallery-grid > *:nth-child(7) {
    grid-column: span 2;
    grid-row: span 2;
}

.coins-gallery-grid > *:nth-child(8),
.coins-gallery-grid > *:nth-child(9) {
    grid-column: span 1;
    grid-row: span 1;
}

/* Special Bento for 2-item galleries (e.g. JPEG'd) */
.detail-gallery-grid:has(> .gallery-item:nth-child(2):last-child) {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 380px;
}

.detail-gallery-grid:has(> .gallery-item:nth-child(2):last-child) .gallery-item {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
}

/* Special Bento for 1-item galleries (e.g. Inverse Finance) */
.detail-gallery-grid:has(> .gallery-item:first-child:last-child) {
    grid-template-columns: 1fr;
    grid-auto-rows: 480px;
}

.detail-gallery-grid:has(> .gallery-item:first-child:last-child) .gallery-item {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
}

/* Bento Card Frame & Media Rules */
.gallery-item,
.coin-card {
    background: #ffffff;
    border: 1px solid var(--line);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.gallery-item:hover,
.coin-card:hover {
    border-color: var(--line-dark);
    transform: translateY(-3px);
}

.gallery-media-wrapper,
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
    background: #0b0f19;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-img,
.gallery-video-player,
.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .gallery-img,
.gallery-item:hover .gallery-video-player,
.coin-card:hover .carousel-img {
    transform: scale(1.04);
}

/* Carousel controls for Coin Cards (Bond Protocol) */
.carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slides > .gallery-media-wrapper {
    flex: 0 0 100%;
    height: 100%;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.coin-card:hover .carousel-prev,
.coin-card:hover .carousel-next {
    opacity: 1;
}

.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }

.carousel-prev:hover, .carousel-next:hover {
    background: var(--amber);
    color: #ffffff;
}

.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.carousel-dots .dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-dots .dot.active {
    background: var(--amber);
    width: 14px;
    border-radius: 3px;
}

.coin-info-box {
    padding: 10px 16px;
    background: #ffffff;
    border-top: 1px solid var(--line);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
}

.gallery-item-info {
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gallery-item-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
}

.gallery-item-info span:not(.gallery-item-title) {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.45;
}

/* Responsive Bento Layouts */
@media (max-width: 960px) {
    .detail-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 210px;
    }
    .coins-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 210px;
    }
    .detail-gallery-grid:has(> .gallery-item:nth-child(2):last-child) {
        grid-template-columns: 1fr;
        grid-auto-rows: 260px;
    }
}

@media (max-width: 640px) {
    .detail-gallery-grid,
    .coins-gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }
    .detail-gallery-grid .gallery-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}


