/* Work Page Statement Text Sizing */
.work-statement {
    font-size: 40px;
    line-height: 1.25;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* 
    ARQ MARKETING - Design System
    Color Palette:
    - Bg White: #f5f5f5
    - Main Text: #141414
    - Main Accent: #feb777
    - Soft Bg: #f7f5f4
*/

/* Work Description Modern Style */
.work-description {
    text-align: center;
    margin: 2rem auto 1.5rem auto;
    max-width: 700px;
}

.work-description .highlight-white {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: block;
    line-height: 1.2;
}

.work-description .highlight-red {
    color: #ff3c3c;
    font-size: 2rem;
    font-weight: 700;
    display: block;
    line-height: 1.2;
}

.work-description-sub {
    display: block;
    color: #aaa;
    font-size: 1rem;
    margin-top: 1rem;
}

:root {
    /* Colors */
    --bg-white: #f5f5f5;
    --text-main: #141414;
    --accent: #feb777;
    --bg-soft: #f7f5f4;
    --accent-glow: rgba(254, 183, 119, 0.3);

    /* Dark Mode Defaults (Light Theme Base) */
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.05);
    --text-muted: #666;
    --text-subtext: #555;
    --text-label: rgba(0, 0, 0, 0.4);
    --nav-arrow-bg: #f8f8f8;
    --floating-bg: rgba(255, 255, 255, 0.8);
    --mobile-nav-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: white;
    --btn-primary-text: white;
    --progress-bg: rgba(0, 0, 0, 0.1);
    --bg-subtle: #efedeb;

    /* Journey Theme (Light Mode Default) */
    --journey-bg: #f5f5f5;
    --journey-text: #141414;
    --journey-node-bg: #f5f5f5;
    --journey-node-border: rgba(0, 0, 0, 0.2);
    --journey-path-base: rgba(0, 0, 0, 0.08);
    --journey-list-text: #666;

    /* Typography */
    --font-sans: 'Outfit', system-ui, sans-serif;
    --font-serif: 'Instrument Serif', serif;
    --font-accent: 'Instrument Serif', serif;

    /* Spacing */
    --unit: clamp(1rem, 2vw, 2rem);
    --container-max: 1400px;

    /* Transitions */
    --ease-premium: cubic-bezier(0.23, 1, 0.32, 1);
    --transition-slow: 0.8s var(--ease-premium);
    --transition-med: 0.4s var(--ease-premium);
}

body.dark-mode {
    --bg-white: #141414;
    --text-main: #f5f5f5;
    --bg-soft: #1f1f1f;
    --accent-glow: rgba(254, 183, 119, 0.1);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.05);
    --text-muted: #aaa;
    --text-subtext: #aaa;
    --text-label: rgba(255, 255, 255, 0.4);
    --nav-arrow-bg: #222;
    --floating-bg: rgba(20, 20, 20, 0.8);
    --mobile-nav-bg: rgba(20, 20, 20, 0.95);
    --footer-bg: #141414;
    --btn-primary-text: #141414;
    --progress-bg: rgba(255, 255, 255, 0.1);
    --bg-subtle: #1c1c1c;

    /* Journey Theme (Dark Mode) */
    --journey-bg: #050505;
    --journey-text: white;
    --journey-node-bg: #050505;
    --journey-node-border: rgba(255, 255, 255, 0.3);
    --journey-path-base: rgba(255, 255, 255, 0.1);
    --journey-list-text: #aaa;
}

::selection {
    background-color: var(--accent);
    color: var(--text-main);
}

/* --- Base Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 50px;
}

body {
    background-color: var(--bg-white);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    visibility: hidden;
    /* Hide until Handlebars compiles */
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.ready {
    visibility: visible;
}

section p {
    font-size: 1.1rem;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-med);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 5vw;
}

.centered {
    text-align: center;
}

/* --- Typography System --- */
h1 {
    font-size: clamp(2.5rem, 8vw, 6.5rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
}

.accent-font {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}

.title-large {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.title-huge {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 500;
    line-height: 0.9;
}

.text-large {
    font-size: clamp(1.5rem, 4vw, 3.5rem);
    font-weight: 600;
    line-height: 1.2;
}

.label {
    display: inline-block;
    text-transform: none;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* --- GSAP Split Text Styles --- */
.split-done {
    visibility: visible !important;
}

.word-wrapper {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-right: 0.1em;
    /* Prevent right-side clipping of italic characters and punctuation */
    margin-right: -0.1em;
    padding-bottom: 0.4em;
    /* Increased significantly for large serif descenders like 'J', 'y', and 'q' */
    margin-bottom: -0.4em;
}

.word-inner {
    display: inline-block;
    will-change: auto;
}


/* --- Navigation & Logos --- */
.nav-logo {
    width: 100%;
    max-width: 100px;
    height: auto;
    display: block;
}

.footer-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
}

/* --- Sections --- */
section {
    padding: calc(var(--unit) * 6) 0;
    position: relative;
    overflow: hidden;
}

.section-white {
    background-color: var(--bg-white);
}

.section-soft {
    background-color: var(--bg-soft);
}

/* Ensure smooth transitions for dark mode */
section,
main,
.footer,
.container,
.accordion-item,
.nav-ui,
.menu-wrapper,
.dark-mode-toggle {
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.section-dark {
    background-color: #0a0a0a;
    color: white;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0;
}

.prices-hero {
    height: 90vh;
}

.prices-hero .hero-subtext {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

@media (max-width: 768px) {
    .prices-hero {
        height: auto;
        padding-top: 160px;
        padding-bottom: 60px;
    }

    .prices-hero .reveal-text {
        min-height: auto;
    }

    .prices-hero .hero-subtext {
        margin-top: 1rem;
        margin-bottom: 2rem;
    }
}

.hero-visual {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.arc-beam {
    position: absolute;
    top: 50%;
    right: 10%;
    width: 120%;
    height: 120%;
    border: 2px solid transparent;
    border-top: 40px solid var(--accent);
    border-right: 10px solid var(--accent);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    transform: translate(10%, -50%) rotate(-15deg);
    animation: beamFlow 15s infinite ease-in-out;
}

.glow-orb {
    position: absolute;
    top: 45%;
    right: 25%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    filter: blur(100px);
    opacity: 0.2;
    animation: floating 12s infinite ease-in-out;
}

/* Secondary Sharp Beam */
.arc-beam::after {
    content: '';
    position: absolute;
    top: -40px;
    left: 10%;
    width: 80%;
    height: 100%;
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.6;
    animation: shineFlow 8s infinite linear;
}

.glow-line-bottom {
    position: absolute;
    bottom: -10%;
    right: 5%;
    width: 60%;
    height: 40%;
    background: radial-gradient(ellipse at center, var(--accent) 0%, transparent 80%);
    filter: blur(120px);
    opacity: 0.1;
    transform: rotate(20deg);
}

/* Sharp Animated Arc Line */
.hero-curve-svg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: 2;
    pointer-events: none;
    overflow: visible;
    /* Keep the fine strokes stationary; the light pulses provide the motion. */
}

#hero.hero-animations-paused .hero-visual *,
#hero.hero-animations-paused .hero-visual *::after {
    animation-play-state: paused;
}

.hero-curve-path {
    stroke-dasharray: 2500;
    stroke-dashoffset: 2500;
    animation: drawPath 4s var(--ease-premium) forwards;
}

.hero-curve-base {
    stroke-dasharray: 2500;
    stroke-dashoffset: 2500;
    animation: drawPath 4s var(--ease-premium) 0.5s forwards;
}

.hero-curve-wisp {
    stroke-dasharray: 2500;
    stroke-dashoffset: 2500;
    animation: drawPath 5s var(--ease-premium) 1s forwards;
}

.hero-energy-pulse {
    stroke-dasharray: 600 2400;
    stroke-dashoffset: 3000;
    animation: energyFlow 4s infinite linear 2s;
    opacity: 0;
}

.pulse-fast {
    animation-duration: 2.5s;
    animation-delay: 1s;
}

.pulse-slow {
    animation-duration: 6s;
    animation-delay: 3s;
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes energyFlow {
    0% {
        stroke-dashoffset: 3000;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

@keyframes journeyEnergyFlow {
    0% {
        stroke-dashoffset: 6000;
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    95% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-subtext {
    max-width: 550px;
    font-size: 1.2rem;
    margin: 2.5rem 0;
    color: var(--text-subtext);
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

/* --- Buttons --- */
@property --beam-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate-beam {
    0% {
        --beam-angle: 0deg;
    }

    100% {
        --beam-angle: 360deg;
    }
}

@keyframes line-beam {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.btn {
    display: inline-block;
    padding: 1.25rem 3rem;
    border-radius: 100px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition-med);
}

.btn-primary {
    position: relative;
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-main);
    z-index: 1;
}

.btn-primary:hover {
    background-color: transparent;
    border-color: transparent;
    transform: translateY(-8px);
    box-shadow: 0 10px 30px var(--accent-glow);
    color: var(--text-main);
}

.btn-primary::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(from var(--beam-angle), transparent 60%, var(--accent) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover::before {
    opacity: 1;
    animation: rotate-beam 1.5s linear infinite;
}

.btn-link {
    position: relative;
    font-weight: 500;
    border: none;
    border-radius: 0;
    padding: 0.5rem 0;
    background: transparent;
    color: var(--text-main);
}

.btn-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text-main);
    transition: var(--transition-med);
}

.btn-link:hover {
    opacity: 1;
    padding-bottom: 0.8rem;
    color: var(--accent);
}

.btn-link:hover::after {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: line-beam 1.5s linear infinite;
    box-shadow: 0 0 10px var(--accent);
    border-radius: 2px;
}

.section-subtle {
    background-color: var(--bg-subtle);
}

/* --- Brand Statement --- */
.statement {
    padding: calc(var(--unit) * 8) 0;
}

.statement-text {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 600;
    line-height: 1.15;
    max-width: 1100px;
    margin: 0 auto;
    letter-spacing: -0.02em;
    text-align: left;
}

.statement-text span {
    display: inline-block;
}

.underlined {
    position: relative;
    display: inline-block;
}

.underlined::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
}

.highlight {
    background: linear-gradient(to top, var(--accent) 20%, transparent 20%);
    padding: 0 12px;
}

/* --- Accordion --- */
.accordion {
    margin-top: 4rem;
    border-top: 1px solid var(--border-subtle);
}

.accordion-item {
    border-bottom: 1px solid var(--border-subtle);
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 3rem 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
}

.accordion-header .number {
    font-size: 0.9rem;
    font-weight: 800;
    margin-right: 3rem;
    color: var(--accent);
}

.accordion-header .service-name {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 500;
    flex-grow: 1;
    transition: var(--transition-med);
}

.plus-icon {
    width: 24px;
    height: 24px;
    position: relative;
}

.plus-icon::before,
.plus-icon::after {
    content: '';
    position: absolute;
    background: var(--text-main);
    transition: var(--transition-med);
}

.plus-icon::before {
    width: 100%;
    height: 2px;
    top: 11px;
    left: 0;
}

.plus-icon::after {
    width: 2px;
    height: 100%;
    top: 0;
    left: 11px;
}

.accordion-item.active .plus-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

.accordion-item.active .plus-icon::before {
    background: var(--accent);
}

.accordion-item.active .service-name {
    color: var(--accent);
    transform: translateX(20px);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s var(--ease-premium);
}

.accordion-content p {
    padding-bottom: 3rem;
    padding-left: 5rem;
    max-width: 650px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- The Shape of Growth Journey Section --- */
.journey-section {
    background-color: var(--journey-bg);
    color: var(--journey-text);
    padding-top: 8rem;
    position: relative;
    transition: background-color var(--transition-med), color var(--transition-med);
}

.journey-header-wrapper {
    text-align: center;
    margin-bottom: 4rem;
}

.journey-header-wrapper .title-huge {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.journey-header-wrapper .subtitle {
    font-size: 1.1rem;
    color: var(--accent);
    text-transform: none;
    letter-spacing: 0.25em;
    font-weight: 500;
}

.journey-track {
    position: relative;
    width: 100%;
    height: 350vh;
    max-height: 4000px;
    min-height: 2500px;
}

.journey-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}

.journey-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.journey-energy-pulse {
    stroke-dasharray: 1000 5000;
    stroke-dashoffset: 6000;
    animation: journeyEnergyFlow 8s infinite linear;
    opacity: 0;
}

.journey-energy-pulse.pulse-fast {
    animation-duration: 5s;
    animation-delay: 0s;
}

.journey-energy-pulse.pulse-slow {
    animation-duration: 9s;
    animation-delay: 2s;
}

.journey-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.journey-node-wrapper {
    position: absolute;
    transform: translate(-50%, -50%);
}

.journey-node-ring {
    width: 16px;
    height: 16px;
    border: 2px solid var(--journey-node-border);
    border-radius: 50%;
    background: var(--journey-node-bg);
    position: relative;
    transition: all 0.6s var(--ease-premium);
}

.journey-node-wrapper.active .journey-node-ring {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 15px rgba(254, 183, 119, 0.6), 0 0 30px rgba(254, 183, 119, 0.3);
    transform: scale(1.2);
}

.journey-node-wrapper.passed .journey-node-ring {
    border-color: var(--accent);
    background: transparent;
    box-shadow: none;
    transform: scale(1);
    opacity: 0.5;
}

.journey-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    opacity: 0.2;
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    filter: blur(2px);
}

.journey-text.text-right {
    left: 160px;
}

.journey-text.text-left {
    right: 160px;
    text-align: right;
}

.journey-node-wrapper.active .journey-text {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(-50%) scale(1.05);
}

.journey-node-wrapper.passed .journey-text {
    opacity: 0.4;
    filter: blur(0px);
}

.j-label {
    display: block;
    color: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    font-weight: 500;
    margin-bottom: 0.8rem;
    font-family: var(--font-sans);
}

.j-title {
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--journey-text);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.j-desc {
    font-size: 1.1rem;
    color: var(--journey-list-text);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}



.journey-energy-pulse {
    stroke-dasharray: 1000 4000;
    stroke-dashoffset: 5000;
    animation: journeyEnergyFlow 6s infinite linear;
    opacity: 0;
}

@keyframes journeyEnergyFlow {
    0% {
        stroke-dashoffset: 5000;
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    95% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .journey-text {
        width: 180px;
    }

    .journey-text.text-right {
        left: 60px;
    }

    .journey-text.text-left {
        right: 60px;
    }

    .j-title {
        font-size: 1.5rem;
    }

    .j-list li {
        font-size: 0.8rem;
    }
}


/* --- Carousel --- */
.work-section.section-white {
    padding-right: 0;
    background-color: var(--bg-white);
}

.floating-controls {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--floating-bg);
    backdrop-filter: blur(20px);
    padding: 8px 10px 8px 10px;
    border-radius: 100px;
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.6s cubic-bezier(0.2, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
}

.floating-controls.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.category-toggles {
    display: flex;
    gap: 5px;
    margin: 0;
    background: transparent;
    padding: 0;
    border: none;
}

.toggle-btn {
    padding: 0.8rem 1.8rem;
    border-radius: 100px;
    border: none;
    background: transparent;
    color: var(--text-label);
    font-size: 0.7rem;
    text-transform: none;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-med);
}

.toggle-btn.active {
    background: var(--text-main);
    color: var(--btn-primary-text);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.carousel-container {
    position: relative;
    padding: 3rem 0;
    perspective: 800px;
    overflow: visible;
    width: 100%;
    cursor: none;
}

.carousel-3d {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 650px;
    transform-style: preserve-3d;
    transition: transform 0.8s var(--ease-premium);
}

.carousel-card {
    display: block;
    position: absolute;
    width: 320px;
    height: 600px;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    pointer-events: none;
    opacity: 0;
    cursor: none;
    transform-origin: center;
    backface-visibility: hidden;
}

.carousel-card.active {
    pointer-events: auto;
    opacity: 1;
    z-index: 10;
    transform: translate3d(0, 0, 150px);
}

.carousel-card.prev {
    pointer-events: auto;
    opacity: 0.6;
    z-index: 5;
    transform: translate3d(-100%, 0, -150px) rotateY(70deg) scale(0.85);
    filter: brightness(0.5) blur(1px);
}

.carousel-card.next {
    pointer-events: auto;
    opacity: 0.6;
    z-index: 5;
    transform: translate3d(100%, 0, -150px) rotateY(-70deg) scale(0.85);
    filter: brightness(0.5) blur(1px);
}

.carousel-card.far-prev {
    transform: translate3d(-180%, 0, -400px) rotateY(85deg) scale(0.7);
    opacity: 0.2;
    z-index: 2;
    filter: brightness(0.2) blur(3px);
}

.carousel-card.far-next {
    transform: translate3d(180%, 0, -400px) rotateY(-85deg) scale(0.7);
    opacity: 0.2;
    z-index: 2;
    filter: brightness(0.2) blur(3px);
}

.carousel-nav {
    display: flex;
    gap: 8px;
}

.nav-arrow {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--nav-arrow-bg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-med);
}

.nav-arrow:hover {
    background: var(--text-main);
    color: var(--btn-primary-text);
}

.card-visual {
    height: 400px;
    width: 100%;
    transition: var(--transition-slow);
    border-radius: 4px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.card-visual img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.8s var(--ease-premium);
}

.card-visual img.img-left-align {
    object-position: left center;
}

.carousel-card:hover .card-visual img {
    transform: scale(1.04);
}

.card-info {
    padding: 0 0 1.5rem 0;
    color: var(--text-main);
    text-align: left;
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.card-label {
    font-size: 0.7rem;
    text-transform: none;
    color: var(--text-label);
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0;
    color: var(--text-main);
}

.card-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s var(--ease-premium);
    color: var(--accent);
}

.carousel-card.active .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* --- Work Detail Pages --- */
.work-detail-main {
    background: var(--bg-white);
}

.work-hero {
    padding-top: 7.5rem;
    padding-bottom: 2.5rem;
    overflow: visible;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.35rem;
        color: var(--text-main);
        font-size: 0.9rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        border: 1px solid var(--accent);
        border-radius: 999px;
        padding: 0.75rem 1rem;
        background-color: transparent;
        transition: background-color var(--transition-med), color var(--transition-med), transform 0.3s var(--ease-premium);
    }

    .back-link svg {
        width: 1rem;
        height: 1rem;
        min-width: 2rem;
        min-height: 2rem;
        padding: 0.5rem;
        border-radius: 999px;
        background-color: var(--accent);
        color: var(--text-main);
        stroke: currentColor;
        transition: transform 0.4s var(--ease-premium), color var(--transition-med), background-color var(--transition-med);
    }

    .back-link:hover {
        background-color: var(--accent);
        color: var(--text-main);
    }


.work-hero-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.55));
    z-index: 1;
}

.work-hero-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.work-hero-banner {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 320px;
    max-height: 65vh;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
}

.work-hero-banner figcaption {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(2rem, 5vw, 5rem);
    text-align: center;
    z-index: 2;
}

.work-hero-banner h1 {
    max-width: 900px;
    color: #fff;
    font-size: clamp(2.8rem, 7vw, 6.5rem);
    font-weight: 500;
    line-height: 0.96;
    letter-spacing: 0;
    text-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
}

.hero-visit-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    height: 44px;
    min-width: 44px;
    padding: 0 10px;
    border-radius: 22px;
    background-color: #ffffff;
    color: #000000;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-visit-text {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    max-width: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                margin-right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    margin-right: 0;
}

.hero-visit-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.hero-visit-btn:hover {
    padding: 0 16px 0 18px;
    background-color: #ffffff;
    color: #000000;
}

.hero-visit-btn:hover .hero-visit-text {
    max-width: 120px;
    opacity: 1;
    transform: translateX(0);
    margin-right: 8px;
}

.work-about {
    padding-top: 2.5rem;
    padding-bottom: calc(var(--unit) * 5);
}

.work-about-grid {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    flex-direction: column;
}

.work-year {
    display: inline-block;
    margin-bottom: 0;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-align: right;
}

.work-kicker {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.work-summary {
    color: var(--text-subtext);
    font-size: clamp(1.05rem, 1.55vw, 1.35rem);
    font-weight: 400;
    line-height: 1.55;
    max-width: 680px;
    margin: 0 auto;
    text-align: left;
}

.work-showcase {
    padding-top: 0;
    padding-bottom: calc(var(--unit) * 6);
}

.work-gallery {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    grid-auto-flow: dense;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    width: 100%;
}

.instagram-item {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: #000;
}

.instagram-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.instagram-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.instagram-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.instagram-item img,
.instagram-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.6s var(--ease-premium);
}

.instagram-item:hover img,
.instagram-item:hover video {
    transform: scale(1.03);
}

/* Instagram Carousel Nav Buttons */
.instagram-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.instagram-item:hover .instagram-nav {
    opacity: 0.9;
}

.instagram-nav:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) scale(1.1);
}

.instagram-prev {
    left: 8px;
}

.instagram-next {
    right: 8px;
}

/* Pagination Dots */
.instagram-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 4px;
    pointer-events: none;
}

.instagram-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.2s ease, transform 0.2s ease;
}

.instagram-dot.active {
    background: #ffffff;
    transform: scale(1.2);
}

/* Instagram Tile Icon Badge (Bottom Right) */
.instagram-tile-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 6;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.instagram-item:hover .instagram-tile-badge {
    transform: scale(1.05);
}

/* ===== MOBILE / TOUCH DEVICE OVERRIDES ===== */
/* On touch devices :hover never fires — hide inline arrows (use lightbox instead) */
@media (hover: none) {
    .instagram-nav {
        display: none; /* Hidden on touch — tap tile to open lightbox with arrows */
    }

    .instagram-item:hover img,
    .instagram-item:hover video {
        transform: none;
    }
}

.gallery-item {
    height: auto;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    transition: transform 0.8s var(--ease-premium);
}

.gallery-item:hover img {
    transform: scale(1.035);
}

.gallery-lgw .gallery-item:hover img {
    transform: none;
}

.gallery-lgw .gallery-item {
    cursor: pointer;
}

.gallery-large {
    grid-column: span 4;
}

.gallery-portrait {
    grid-column: span 2;
}

.gallery-full {
    grid-column: span 6;
}

.gallery-square {
    grid-column: span 2;
}

.gallery-wide {
    grid-column: span 4;
}

.gallery-portrait img,
.gallery-square img {
    object-position: center;
}

.gallery-wide img {
    object-position: 50% 42%;
}

/* LGW Custom Layout */
.gallery-lgw {
    grid-template-columns: 1fr 1.4fr 1fr !important;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 14px !important;
    width: 100%;
    padding: 0 32px;
    box-sizing: border-box;
}

.gallery-lgw .gallery-item {
    display: block;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.gallery-lgw .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: top !important;
    max-height: none !important;
    border-radius: 10px;
}

.lgw-sq-1 {
    grid-column: 1;
    grid-row: 1;
    aspect-ratio: 1/1;
    transition-delay: 0ms;
}

.lgw-sq-2 {
    grid-column: 1;
    grid-row: 2;
    aspect-ratio: 1/1;
    transition-delay: 200ms;
}

.lgw-tall {
    grid-column: 2;
    grid-row: 1 / span 2;
    transition-delay: 100ms;
}

.lgw-sq-3 {
    grid-column: 3;
    grid-row: 1;
    aspect-ratio: 1/1;
    transition-delay: 200ms;
}

.lgw-sq-4 {
    grid-column: 3;
    grid-row: 2;
    aspect-ratio: 1/1;
    transition-delay: 350ms;
}

/* Subtler slide-in for gallery items */
.gallery-lgw .gallery-item[data-reveal="up"] {
    transform: translateY(40px);
}

@media (max-width: 1024px) {
    .gallery-lgw {
        grid-template-columns: 1fr 1.3fr 1fr !important;
        padding: 0 20px;
        gap: 12px !important;
    }
}

@media (max-width: 768px) {
    .gallery-lgw {
        grid-template-columns: 1fr !important;
        padding: 0 10px;
        max-width: 400px;
        margin: 0 auto;
        gap: 16px !important;
    }

    .lgw-sq-1,
    .lgw-sq-2,
    .lgw-tall,
    .lgw-sq-3,
    .lgw-sq-4 {
        grid-column: span 1 !important;
        grid-row: auto !important;
        aspect-ratio: auto !important;
    }
}

/* --- Image Lightbox --- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-image-wrapper {
    position: relative;
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-wrapper img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.4s ease;
}

.lightbox-overlay.active .lightbox-image-wrapper img {
    transform: scale(1);
    opacity: 1;
}

.lightbox-close {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.3s ease, transform 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.3s ease, transform 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-counter {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    z-index: 10001;
}

@media (max-width: 768px) {
    .lightbox-image-wrapper img {
        max-width: 95vw;
        max-height: 80vh;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .lightbox-close {
        top: 16px;
        right: 16px;
    }
}

@media (max-width: 980px) {
    .work-about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .work-year {
        text-align: center;
        order: -1;
    }

    .work-summary {
        max-width: 720px;
    }

    .work-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-large,
    .gallery-portrait,
    .gallery-square,
    .gallery-wide {
        grid-column: span 1;
    }

    .gallery-full {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .work-hero {
        padding-top: 6.5rem;
        padding-bottom: 1.5rem;
    }

    .back-link {
        margin-bottom: 1rem;
    }

    .work-hero-banner {
        height: auto;
    }

    .work-about {
        padding-top: 1.75rem;
        padding-bottom: 3rem;
    }

    .work-gallery {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-large,
    .gallery-portrait,
    .gallery-full,
    .gallery-square,
    .gallery-wide {
        grid-column: span 1;
        min-height: 340px;
    }
}

/* --- CTA Contact Section --- */
.cta-section {
    background: #eeebe8;
    padding: calc(var(--unit) * 8) 0;
    position: relative;
    overflow: hidden;
    transition: background-color var(--transition-med), color var(--transition-med);
}

body.dark-mode .cta-section {
    background: #1a1a1a;
}

/* --- Glow Orbs --- */
.contact-glow-orb {
    position: absolute;
    width: 1200px;
    height: 1200px;
    background: radial-gradient(circle, rgba(254, 183, 119, 0.3) 0%, rgba(254, 183, 119, 0.06) 45%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

body.dark-mode .contact-glow-orb {
    background: radial-gradient(circle, rgba(254, 183, 119, 0.15) 0%, rgba(254, 183, 119, 0.03) 45%, transparent 70%);
}

.contact-glow-orb.orb-1 {
    top: -400px;
    left: -300px;
    animation: orbDrift1 12s ease-in-out infinite;
}

.contact-glow-orb.orb-2 {
    bottom: -400px;
    right: -300px;
    animation: orbDrift2 15s ease-in-out infinite;
}

@keyframes orbDrift1 {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(250px, 180px);
    }

    50% {
        transform: translate(100px, 300px);
    }

    75% {
        transform: translate(-120px, 150px);
    }

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

@keyframes orbDrift2 {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-200px, -160px);
    }

    50% {
        transform: translate(-80px, -280px);
    }

    75% {
        transform: translate(150px, -120px);
    }

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

.cta-text {
    max-width: 650px;
    margin: 2.5rem auto;
    font-size: 1.3rem;
    opacity: 0.8;
}

/* --- Contact Form --- */
.contact-form {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-label);
    margin-bottom: 0.6rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-white);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: var(--text-label);
    opacity: 0.6;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.form-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 200px;
}

.btn-loading,
.btn-success {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.form-actions .btn-primary.loading .btn-text {
    display: none;
}

.form-actions .btn-primary.loading .btn-loading {
    display: inline-flex;
}

.form-actions .btn-primary.success .btn-text {
    display: none;
}

.form-actions .btn-primary.success .btn-loading {
    display: none;
}

.form-actions .btn-primary.success .btn-success {
    display: inline-flex;
}

.spinner {
    animation: spinRotate 0.8s linear infinite;
}

@keyframes spinRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.form-status {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.4em;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.recaptcha-inline {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    min-height: 60px;
    /* Space for the badge */
}

/* Ensure the inline badge matches the site theme */
.grecaptcha-badge {
    box-shadow: none !important;
}

.form-status.success {
    color: #4caf50;
}

.form-status.error {
    color: #e74c3c;
}

@media (max-width: 768px) {
    .contact-form {
        padding: 0 1rem;
    }

    .contact-glow-orb {
        width: 800px;
        height: 800px;
    }
}


/* --- Footer --- */
.footer {
    padding: 80px 0 40px;
    background: var(--footer-bg);
    border-top: none;
    position: relative;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.footer-tagline {
    opacity: 0.5;
    font-size: 0.95rem;
    font-weight: 400;
}

.footer-cta {
    font-size: 0.8rem;
    padding: 0.9rem 2.2rem;
}

.footer-mid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.35;
    margin-bottom: 24px;
}

.footer-bottom {
    text-align: center;
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-nav a {
    font-size: 0.85rem;
    opacity: 0.5;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--accent);
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.social-icon:hover {
    opacity: 1;
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(254, 183, 119, 0.15);
}

.footer-copy {
    font-size: 0.8rem;
    opacity: 0.35;
    font-weight: 400;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.footer-legal a {
    font-size: 0.75rem;
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

.footer-legal a:hover {
    opacity: 0.8;
}

/* --- Legal Page Content --- */
.legal-section {
    padding: 160px 0 100px;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.legal-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
}

.legal-content p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

/* --- Custom Cursor --- */
.carousel-cursor {
    position: fixed;
    width: 70px;
    height: 70px;
    border: 2px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.55rem;
    line-height: 1.3;
    text-align: center;
    padding: 10px;
    color: #000;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s var(--ease-premium);
    background: transparent;
}

body.dark-mode .carousel-cursor {
    border-color: #fff;
    color: #fff;
}

.carousel-cursor.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.work-section {
    cursor: none;
    /* Hide default cursor when in the work section */
}

.work-section a,
.work-section button,
.work-section .floating-controls {
    cursor: pointer;
}

.work-section a.carousel-card {
    cursor: none;
}

@media (max-width: 1024px) {
    .carousel-cursor {
        display: none !important;
        /* Hide custom cursor on mobile/tablet */
    }

    .work-section {
        cursor: auto;
    }

    .work-section a.carousel-card {
        cursor: pointer;
    }
}

/* --- Animations --- */
@keyframes beamFlow {

    0%,
    100% {
        transform: translate(10%, -50%) rotate(-15deg) scale(1);
        opacity: 0.15;
    }

    50% {
        transform: translate(5%, -45%) rotate(-10deg) scale(1.05);
        opacity: 0.25;
    }
}

@keyframes shineFlow {
    0% {
        transform: rotate(-5deg);
        opacity: 0;
    }

    20% {
        opacity: 0.6;
    }

    80% {
        opacity: 0.6;
    }

    100% {
        transform: rotate(5deg);
        opacity: 0;
    }
}

@keyframes floating {

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

    50% {
        transform: translate(-30px, 60px);
    }
}

[data-reveal] {
    opacity: 0;
    transition: all 1.2s var(--ease-premium);
}

[data-reveal="up"] {
    transform: translateY(80px);
}

[data-reveal="scale"] {
    transform: scale(0.85);
}

.revealed {
    opacity: 1 !important;
    transform: translate(0) scale(1) !important;
}

.reveal-text {
    overflow: hidden;
    animation: revealText 1.8s var(--ease-premium) forwards;
    min-height: 230px;
}

.reveal-text.split-done {
    animation: none;
    transform: none;
    opacity: 1;
}

@media (max-width: 768px) {
    .reveal-text {
        min-height: 140px;
    }
}

@keyframes revealText {
    from {
        transform: translateY(120px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.reveal-fade {
    opacity: 0;
    animation: fadeIn 2s var(--ease-premium) 0.6s forwards;
}

/* GSAP owns the hero entrance; completed content has no animation or clipping. */
#hero .reveal-fade.gsap-reveal {
    animation: none;
}

#hero .reveal-complete {
    animation: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    overflow: visible;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .carousel-card {
        width: 380px;
        height: 480px;
    }
}

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

    .mobile-nav {
        display: flex;
    }

    .container {
        padding: 0 8vw;
    }

    .hero-visual {
        width: 100%;
        opacity: 0.5;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .footer-brand {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .footer-mid {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    section {
        padding: calc(var(--unit) * 5) 0;
    }
}

@media (max-width: 768px) {
    .footer-nav {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .statement-line {
        flex-direction: column;
        text-align: center !important;
    }

    .accordion-header .service-name {
        font-size: 1.4rem;
        max-width: 246px;
    }

    .title-huge {
        font-size: 4rem;
    }

    .carousel-card {
        width: 85vw;
        max-width: 320px;
        height: 480px;
    }

    .carousel-3d {
        height: 520px;
        perspective: 1000px;
    }

    .carousel-card.prev {
        transform: translate3d(-75%, 0, -150px) rotateY(45deg) scale(0.8);
        opacity: 0.3;
    }

    .carousel-card.next {
        transform: translate3d(75%, 0, -150px) rotateY(-45deg) scale(0.8);
        opacity: 0.3;
    }

    .carousel-card.active {
        transform: translate3d(0, 0, 0);
    }

    .floating-controls {
        width: 100vw;
        bottom: 0;
        padding: 10px 5px;
        gap: 0;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border-light);
        justify-content: center;
    }

    .carousel-nav {
        display: none;
    }

    .category-toggles {
        gap: 2px;
        width: 100%;
        justify-content: center;
    }

    .toggle-btn {
        padding: 0.6rem 1rem;
        font-size: 0.65rem;
    }

    .nav-arrow {
        width: 35px;
        height: 35px;
    }
}

/* --- Unified Navigation UI --- */
.nav-ui {
    position: fixed;
    top: 30px;
    right: 40px;
    z-index: 2100;
    display: flex;
    align-items: center;
    gap: 12px;
}

.global-logo {
    position: fixed;
    top: 30px;
    left: 40px;
    z-index: 2100;
    transition: var(--transition-med);
}

.global-logo:hover {
    transform: translateY(-2px);
}

/* --- Expanding Menu --- */
.menu-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 45px;
    width: 45px;
    background: var(--bg-white);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    overflow: hidden;
    transition: width 0.6s var(--ease-premium), height 0.6s var(--ease-premium), box-shadow 0.3s ease, border-radius 0.4s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.menu-wrapper.open {
    width: 317px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.menu-links {
    display: flex;
    gap: 5px;
    padding-right: 50px;
    padding-left: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease 0.2s, visibility 0.3s;
    white-space: nowrap;
}

.menu-wrapper.open .menu-links {
    opacity: 1;
    visibility: visible;
}

.menu-links a {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.menu-links a:hover {
    background: var(--bg-soft);
    color: var(--accent);
}

.menu-toggle {
    position: absolute;
    right: 0;
    width: 45px;
    height: 45px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
}

.hamburger-icon {
    width: 18px;
    height: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform 0.4s var(--ease-premium), opacity 0.3s ease, top 0.4s ease, bottom 0.4s ease;
    position: absolute;
}

.line-1 {
    top: 0;
}

.line-2 {
    bottom: 0;
}

/* Hamburger to X Animation */
.menu-wrapper.open .line-1 {
    top: 6px;
    transform: rotate(45deg);
}

.menu-wrapper.open .line-2 {
    bottom: 6px;
    transform: rotate(-45deg);
}

/* --- Dark Mode Toggle --- */
.dark-mode-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--bg-white);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-med);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.dark-mode-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.dark-mode-toggle .moon-icon {
    display: none;
}

body.dark-mode .dark-mode-toggle .sun-icon {
    display: none;
}

body.dark-mode .dark-mode-toggle .moon-icon {
    display: block;
}

body.dark-mode .dark-mode-toggle {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1024px) {
    .nav-ui {
        top: 20px;
        right: 20px;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-end;
        gap: 15px;
    }

    .menu-wrapper {
        align-items: flex-start;
    }

    .menu-wrapper.open {
        width: 140px;
        height: 210px;
        border-radius: 24px;
    }

    .menu-links {
        flex-direction: column;
        align-items: flex-end;
        padding: 60px 20px 20px 20px;
        gap: 12px;
    }

    .global-logo {
        top: 20px;
        left: 20px;
    }

    .global-logo .nav-logo {
        max-width: 75px;
    }
}

/* --- About Us Page Specific Styles --- */



.about-hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    z-index: 1;
    pointer-events: none;
}

body.dark-mode .hero-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.graph-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.72;
}

.graph-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.grid-line {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1;
    stroke-dasharray: 5, 5;
}

body:not(.dark-mode) .grid-line {
    stroke: rgba(0, 0, 0, 0.05);
}

.graph-line {
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.base-line {
    stroke: var(--accent);
    opacity: 0.8;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawGraph 3s var(--ease-premium) forwards 0.5s;
}

.glow-line {
    stroke: var(--accent);
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawGraph 3s var(--ease-premium) forwards 0.5s;
}

.graph-fill {
    opacity: 0;
    animation: fadeFill 2s var(--ease-premium) forwards 2.5s;
}

.graph-riser {
    stroke: #feb777;
    stroke-width: 1.2;
    stroke-linecap: butt;
    fill: none;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    opacity: 0;
    animation: drawGraphRiser 1.5s var(--ease-premium) forwards;
}

.riser-1 {
    animation-delay: 0.75s;
}

.riser-2 {
    animation-delay: 1s;
}

.riser-3 {
    animation-delay: 1.25s;
}

.riser-4 {
    animation-delay: 1.5s;
}

.riser-5 {
    animation-delay: 1.75s;
}

.riser-6 {
    animation-delay: 2s;
}

.riser-7 {
    animation-delay: 2.25s;
}

.riser-8 {
    animation-delay: 2.5s;
}

.graph-point {
    fill: var(--accent);
    opacity: 0;
    animation: popPoint 0.5s var(--ease-premium) forwards;
}

.point-1 {
    animation-delay: 0.5s;
}

.point-2 {
    animation-delay: 2s;
}

.point-3 {
    animation-delay: 3s;
}

@keyframes drawGraph {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeFill {
    to {
        opacity: 1;
    }
}

@keyframes drawGraphRiser {
    to {
        opacity: 0.14;
        stroke-dashoffset: 0;
    }
}

@keyframes popPoint {
    0% {
        opacity: 0;
        transform: scale(0);
        transform-origin: center;
    }

    100% {
        opacity: 1;
        transform: scale(1);
        transform-origin: center;
    }
}

/* Split Section */
.split-section {
    padding: calc(var(--unit) * 6) 0;
}

.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.split-image {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-premium);
}

.split-image:hover img {
    transform: scale(1.05);
}

/* What We Are Not Section */
.contrarian-section {
    background-color: var(--bg-white);
    padding: calc(var(--unit) * 8) 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

body.dark-mode .contrarian-section {
    background-color: #0d0d0d;
}

.not-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.not-grid::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0.5px;
    background: var(--accent);
    transition: width 1.5s var(--ease-premium);
    z-index: 1;
}

.not-grid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5px;
    height: 0;
    background: var(--accent);
    transition: height 1.5s var(--ease-premium);
    z-index: 1;
}

.not-grid.revealed::before {
    width: 100%;
}

.not-grid.revealed::after {
    height: 100%;
}

.not-card {
    background: transparent;
    padding: 3rem;
    border: none;
    border-radius: 0;
}

body.dark-mode .not-card {
    background: transparent;
}

.not-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

/* Help Section */
.help-section {
    padding: calc(var(--unit) * 8) 0;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.help-card {
    position: relative;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    transition: border-color 0.4s var(--ease-premium);
}

.help-card:hover {
    border-color: var(--accent);
}

.help-number {
    position: absolute;
    top: -30px;
    left: 0;
    font-size: 4rem;
    font-weight: 800;
    color: var(--border-subtle);
    z-index: -1;
    transition: color 0.4s var(--ease-premium);
}

.help-card:hover .help-number {
    color: rgba(254, 183, 119, 0.2);
}

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

    .split-image {
        height: 400px;
    }

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

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

    .not-grid::before,
    .not-grid::after {
        display: none;
    }

    .not-card:nth-child(1),
    .not-card:nth-child(2),
    .not-card:nth-child(3) {
        border-right: none;
        border-bottom: 0.5px solid var(--accent);
    }

    .not-card:nth-child(4) {
        border: none;
    }

    .not-card {
        padding: 2rem 1rem;
    }
}

/* ═══════════════════════════════════════════════
   Email Portfolio Page
   ═══════════════════════════════════════════════ */

.container-wide {
    max-width: 1750px;
    width: 94%;
    margin: 0 auto;
    padding: 0 3vw;
}

@media (max-width: 1024px) {
    .container-wide {
        width: 100%;
        padding: 0 4vw;
    }
}

.email-portfolio {
    position: relative;
    overflow: hidden;
    padding-block: 7.5rem;
    min-height: 100vh;
    isolation: isolate;
}

.email-portfolio>.container,
.email-portfolio>.container-wide {
    position: relative;
    z-index: 1;
}

.email-portfolio .contact-glow-orb {
    width: 1450px;
    height: 1450px;
    z-index: -1;
    background: radial-gradient(circle, rgba(254, 183, 119, 0.34) 0%, rgba(254, 183, 119, 0.11) 42%, transparent 72%);
    animation: epOrbFloat 48s ease-in-out infinite;
}

body.dark-mode .email-portfolio .contact-glow-orb {
    background: radial-gradient(circle, rgba(254, 183, 119, 0.2) 0%, rgba(254, 183, 119, 0.06) 42%, transparent 72%);
}

.email-portfolio .contact-glow-orb.orb-1 {
    top: -620px;
    left: -520px;
}

.email-portfolio .contact-glow-orb.orb-2 {
    right: -560px;
    bottom: -620px;
    animation-duration: 56s;
    animation-delay: -14s;
}

.ep-page-header {
    margin-bottom: 2.5rem;
}

.ep-page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Third glow orb — positioned center-right */
.ep-orb-3 {
    position: absolute;
    width: 1600px;
    height: 1600px;
    background: radial-gradient(circle, rgba(254, 183, 119, 0.26) 0%, rgba(254, 183, 119, 0.08) 44%, transparent 74%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    top: 4%;
    left: 24%;
    animation: epOrbFloatAlt 64s ease-in-out infinite;
}

body.dark-mode .ep-orb-3 {
    background: radial-gradient(circle, rgba(254, 183, 119, 0.14) 0%, rgba(254, 183, 119, 0.045) 44%, transparent 74%);
}

@keyframes epOrbFloat {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(70px, 45px) scale(1.04);
    }

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

@keyframes epOrbFloatAlt {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-80px, 55px) scale(1.03);
    }

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

@keyframes orbDrift3 {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-180px, 120px);
    }

    50% {
        transform: translate(60px, -200px);
    }

    75% {
        transform: translate(200px, 80px);
    }

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

/* ── Three-Column Grid ─────────────────────── */
.email-portfolio-grid {
    display: grid;
    grid-template-columns: 240px 1fr 1.6fr;
    gap: 1px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(34px) saturate(1.18);
    -webkit-backdrop-filter: blur(34px) saturate(1.18);
    box-shadow: 0 24px 70px rgba(20, 20, 20, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.75);
    position: relative;
    z-index: 1;
    height: clamp(500px, 75vh, 820px);
    min-height: 0;
}

body.dark-mode .email-portfolio-grid {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Glass Panels ──────────────────────────── */
.ep-panel {
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(26px) saturate(1.12);
    -webkit-backdrop-filter: blur(26px) saturate(1.12);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

body.dark-mode .ep-panel {
    background: rgba(20, 20, 20, 0.36);
}

.ep-panel-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-label);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.54);
    flex-shrink: 0;
}

/* ── Column 1: Brands ──────────────────────── */
.ep-brands-col {
    border-right: 1px solid rgba(255, 255, 255, 0.46);
}

.ep-brand-list {
    list-style: none;
    padding: 16px;
    margin: 0;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ep-brand-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
    border-radius: 100px;
    position: relative;
}

.ep-brand-item:hover {
    background: rgba(255, 255, 255, 0.36);
}

.ep-brand-item.active {
    background: rgba(254, 183, 119, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 14px 30px rgba(254, 183, 119, 0.12);
}

body.dark-mode .ep-brand-item.active {
    background: rgba(254, 183, 119, 0.1);
    box-shadow: inset 0 0 25px rgba(254, 183, 119, 0.04), 0 0 20px rgba(254, 183, 119, 0.03);
}

.ep-brand-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    transition: color 0.3s ease;
    opacity: 50%;
}

.ep-brand-item.active .ep-brand-name {
    color: var(--text-main);
    opacity: 100%;
}

.ep-brand-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-label);
    background: rgba(255, 255, 255, 0.5);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    min-width: 22px;
    text-align: center;
    transition: all 0.3s ease;
}

.ep-brand-item.active .ep-brand-count {
    background: var(--accent);
    color: #141414;
}

/* ── Column 2: Email List ──────────────────── */
.ep-list-col {
    border-right: 1px solid rgba(255, 255, 255, 0.46);
}

.ep-email-list {
    overflow-y: auto;
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ep-email-tile {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem 1.75rem;
    cursor: pointer;
    border-bottom: none;
    border-radius: 12px;
    transition: all 0.3s var(--ease-premium);
    position: relative;
}

.ep-email-tile:last-child {
    border-bottom: none;
}

.ep-email-tile:hover {
    background: rgba(255, 255, 255, 0.36);
}

body.dark-mode .ep-email-tile:hover {
    background: rgba(255, 255, 255, 0.04);
}

.ep-email-tile.active {
    background: rgba(254, 183, 119, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 16px 34px rgba(254, 183, 119, 0.12);
}

body.dark-mode .ep-email-tile.active {
    background: rgba(254, 183, 119, 0.1);
    box-shadow: inset 0 0 25px rgba(254, 183, 119, 0.04), 0 0 20px rgba(254, 183, 119, 0.03);
}

/* Logo placeholder */
.ep-email-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.ep-email-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-email-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #f0a060);
    color: #141414;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ep-email-text {
    flex: 1;
    min-width: 0;
}

.ep-email-subject {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.3rem;
    color: var(--text-main);
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-email-tile.active .ep-email-subject,
.ep-email-tile:hover .ep-email-subject {
    color: var(--accent);
}

.ep-email-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Column 3: Preview ─────────────────────── */
.ep-preview-col {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ep-preview-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(254, 183, 119, 0.8);
    flex-shrink: 0;
}

.ep-preview-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-preview-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-preview-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #f0a060);
    color: #141414;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ep-preview-meta {
    flex: 1;
    min-width: 0;
}

.ep-preview-subject {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.ep-preview-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Email creative image area */
.ep-preview-image {
    flex: 1;
    min-height: 0;
    padding: 1.5rem 2rem 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-color: var(--accent) transparent;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    display: flex;
    flex-direction: column;
}

.ep-preview-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(20, 20, 20, 0.1);
}

.ep-preview-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-subtle);
    border-radius: 12px;
    background: var(--bg-soft);
    color: var(--text-label);
    gap: 1rem;
    min-height: 300px;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.ep-preview-placeholder span {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* ── Responsive: Tablet (≤ 1024px) ─────────── */
@media (max-width: 1024px) {
    .email-portfolio {
        padding-block: 6.5rem;
    }

    .email-portfolio-grid {
        grid-template-columns: 200px 1fr 1.2fr;
        height: clamp(480px, 70vh, 650px);
    }

    .ep-brand-item {
        padding: 0.75rem 1.5rem;
    }

    .ep-brand-name {
        font-size: 0.82rem;
    }

    .ep-email-tile {
        padding: 1rem 1.5rem;
    }

    .ep-preview-header {
        padding: 1.25rem 1.5rem;
    }

    .ep-preview-image {
        padding: 1.25rem 1.5rem 1.5rem;
    }
}

/* ── Responsive: Mobile (≤ 768px) ──────────── */
@media (max-width: 768px) {
    .email-portfolio {
        padding-block: 6.5rem;
    }

    .email-portfolio-grid {
        grid-template-columns: 1fr;
        height: auto;
        border-radius: 12px;
    }

    .ep-brands-col {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    .ep-brand-list {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.75rem 1rem;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ep-brand-list::-webkit-scrollbar {
        display: none;
    }

    .ep-brand-item {
        white-space: nowrap;
        border: none;
        padding: 0.6rem 1.25rem;
        border-radius: 100px;
        flex-shrink: 0;
    }

    .ep-brand-item.active {
        background: rgba(254, 183, 119, 0.12);
        color: var(--accent);
        border: none;
        border-radius: 100px;
    }

    .ep-list-col {
        border-right: none;
        border-bottom: 1px solid var(--accent);
        max-height: 280px;
    }

    .ep-preview-col {
        height: clamp(400px, 70vh, 650px);
        min-height: 0;
    }

    .ep-preview-header {
        padding: 1.15rem 1.25rem;
    }

    .ep-preview-image {
        padding: 1rem 1.25rem 1.25rem;
    }

    .ep-preview-subject {
        font-size: 1.05rem;
    }
}

/* ── Scrollbar Styling ─────────────────────── */
.ep-brand-list::-webkit-scrollbar,
.ep-email-list::-webkit-scrollbar,
.ep-preview-image::-webkit-scrollbar {
    width: 4px;
}

.ep-brand-list::-webkit-scrollbar-track,
.ep-email-list::-webkit-scrollbar-track,
.ep-preview-image::-webkit-scrollbar-track {
    background: transparent;
}

.ep-brand-list::-webkit-scrollbar-thumb,
.ep-email-list::-webkit-scrollbar-thumb,
.ep-preview-image::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 4px;
}

.ep-brand-list::-webkit-scrollbar-thumb:hover,
.ep-email-list::-webkit-scrollbar-thumb:hover,
.ep-preview-image::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Keep the long email creative's scrollbar visible in the brand orange. */
.ep-preview-image::-webkit-scrollbar {
    width: 7px;
}

.ep-preview-image::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 999px;
}
