/*
Theme Name: Unbound Collective
Theme URI: https://unbndcollective.com
Author: Unbound Collective
Author URI: https://unbndcollective.com
Description: Custom theme for Unbound Collective — a remote-first digital agency. Dark, modern, design-forward. Built with vanilla CSS and GSAP.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: unbound-collective
Tags: dark, agency, custom-colors, custom-menu, featured-images, translation-ready
*/

/* =============================================================
   TABLE OF CONTENTS
   01. Design tokens (CSS variables)
   02. Reset / base
   03. Typography
   04. Layout utilities & buttons
   05. Site header (sticky nav)
   06. Hero
   07. Work Without Limits
   08. Stat section ("0% top secret")
   09. Logo marquee (3 rows)
   10. Services
   11. Contact form
   12. Site footer
   13. Reveal animations
   14. Responsive
   ============================================================= */


/* ---------- 01. DESIGN TOKENS ---------- */
:root {
    --color-bg:           #0a0a0a;
    --color-bg-alt:       #141414;
    --color-bg-elevated:  #1a1a1a;
    --color-text:         #f5f5f5;
    --color-text-muted:   #a8a8a8;
    --color-accent:       #ff6b35;
    --color-accent-hover: #ff8255;
    --color-border:       #262626;
    --color-success:      #4ade80;
    --color-error:        #f87171;

    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --container-max: 1240px;
    --section-pad-y: clamp(4rem, 8vw, 7rem);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 100px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s var(--ease-out);
    --transition-base: 0.4s var(--ease-out);

    --header-height: 72px;
}


/* ---------- 02. RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent); }

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

input, textarea, select { font: inherit; color: inherit; }

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

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


/* ---------- 03. TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-weight: 700;
}

.h-display {
    font-size: clamp(3rem, 11vw, 9rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.95;
}

.h-section {
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

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


/* ---------- 04. LAYOUT UTILITIES & BUTTONS ---------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container--narrow { max-width: 880px; }

.section {
    padding-block: var(--section-pad-y);
    position: relative;
}
.section--alt { background: var(--color-bg-alt); }

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.95rem 1.75rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    border: 1px solid transparent;
    white-space: nowrap;
}
.btn--primary {
    background: var(--color-accent);
    color: #000;
}
.btn--primary:hover {
    background: var(--color-accent-hover);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(255, 107, 53, 0.5);
}
.btn--ghost {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn--ghost:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}
.btn--arrow::after {
    content: '→';
    transition: transform var(--transition-fast);
}
.btn--arrow:hover::after { transform: translateX(4px); }


/* ---------- 05. SITE HEADER ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: background var(--transition-base), border-color var(--transition-base);
}
.site-header.is-scrolled {
    background: rgba(10, 10, 10, 0.92);
    border-bottom-color: var(--color-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    min-height: var(--header-height);
}

.site-logo {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
}
.site-logo:hover { color: var(--color-text); }
.site-logo span { color: var(--color-accent); }

.primary-nav { display: flex; align-items: center; gap: 2rem; }
.primary-nav__list {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}
.primary-nav__list a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    position: relative;
}
.primary-nav__list a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--transition-fast);
}
.primary-nav__list a:not(.btn):hover::after { width: 100%; }

/* ---------- Services dropdown ---------- */
.has-dropdown {
    position: relative;
}
/* Invisible bridge that fills the gap between the trigger and the dropdown
   panel so :hover is never lost while the mouse crosses the dead zone. */
.has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -1rem;
    right: -1rem;
    height: 1rem; /* must be >= the gap set on .nav-dropdown (0.85rem) */
    pointer-events: auto;
}

.nav-dropdown__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    font-family: var(--font-sans);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    line-height: inherit;
}
.nav-dropdown__trigger::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--transition-fast);
}
.has-dropdown:hover .nav-dropdown__trigger::after,
.has-dropdown.is-open .nav-dropdown__trigger::after {
    width: 100%;
}

.nav-dropdown__chevron {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    margin-top: 1px;
}
.has-dropdown:hover .nav-dropdown__chevron,
.has-dropdown.is-open .nav-dropdown__chevron {
    transform: rotate(180deg);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 0.85rem);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 230px;
    list-style: none;
    background: rgba(18, 18, 18, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0.4rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 200;
}
.has-dropdown:hover .nav-dropdown,
.has-dropdown.is-open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
    display: block;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 9px;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown a::after { display: none; }
.nav-dropdown a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 101;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: var(--transition-fast);
}
.nav-toggle span { position: relative; }
.nav-toggle span::before,
.nav-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.is-nav-open .nav-toggle span { background: transparent; }
.is-nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.is-nav-open .nav-toggle span::after  { top: 0; transform: rotate(-45deg); }


/* ---------- 06. HERO ---------- */
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }


/* ---------- 07. WORK WITHOUT LIMITS ---------- */
.work-limits { text-align: center; }
.work-limits__title { margin-bottom: 1.5rem; }
.work-limits__body {
    max-width: 720px;
    margin: 0 auto;
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    color: var(--color-text-muted);
}


/* ---------- 08. STAT SECTION ---------- */
.stat-section {
    text-align: center;
    border-block: 1px solid var(--color-border);
}
.stat-section__number {
    font-size: clamp(5rem, 18vw, 14rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--color-accent);
    display: block;
}
.stat-section__caption {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    max-width: 760px;
    margin: 1.5rem auto 0;
    color: var(--color-text);
    line-height: 1.4;
}


/* ---------- 09. LOGO MARQUEE ---------- */
.marquee-section {
    padding-block: clamp(3rem, 6vw, 5rem);
    overflow: hidden;
}
.marquee-section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.marquee {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: #f5f1ea !important;
    padding: 2.5rem 0;
    position: relative;
    -webkit-mask-image: none;
            mask-image: none;
}
.marquee::before,
.marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}
.marquee::before {
    left: 0;
    background: linear-gradient(to right, #f5f1ea 0%, transparent 100%);
}
.marquee::after {
    right: 0;
    background: linear-gradient(to left, #f5f1ea 0%, transparent 100%);
}
.marquee__row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: nowrap;
    width: max-content;
}
.marquee__track {
    display: flex;
    gap: 1.5rem;
    flex-shrink: 0;
    will-change: transform;
}

.logo-card {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 1.5rem;
    height: 60px;
    width: auto;
    transition: var(--transition-base);
}
.logo-card:hover {
    transform: none;
}
.logo-card img {
    height: 40px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    display: block;
    filter: none !important;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}
.logo-card img:hover {
    opacity: 1;
}

/* Homepage marquee items — alias for future use */
.unbnd-marquee-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 1.5rem;
    height: 70px;
}
.unbnd-marquee-item img {
    height: 55px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
    filter: none !important;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}
.unbnd-marquee-item img:hover {
    opacity: 1;
}


/* ---------- 10. SERVICES ---------- */
.services__header {
    text-align: center;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}
.services__title { margin-bottom: 1rem; }
.services__intro {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.service-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    margin-bottom: clamp(4rem, 8vw, 7rem);
}
.service-card:last-child { margin-bottom: 0; }
.service-card--reverse .service-card__visual { order: 2; }

.service-card__number {
    font-size: 0.85rem;
    color: var(--color-accent);
    letter-spacing: 0.2em;
    font-weight: 500;
    margin-bottom: 1rem;
    display: block;
}
.service-card__title {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}
.service-card__title span {
    /* Each visual line of the title is its own <span>. display: block
       forces the break without a <br>. Edit `title_lines` in
       front-page.php to change what each line says. */
    display: block;
}
.service-card__body {
    color: var(--color-text-muted);
    margin-bottom: 1.75rem;
    font-size: 1.05rem;
}
.service-card__list-label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
}
.service-card__list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
}
.service-card__list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    color: var(--color-text);
}
.service-card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--color-accent);
}

.service-card__cta {
    margin-top: 2rem;
}

.service-card__visual {
    /* PLACEHOLDER: gradient box. Swap to real <img> or <video> later. */
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--color-bg-alt), #1f1f1f);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
    overflow: hidden;
    position: relative;
}
.service-card__visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 107, 53, 0.12), transparent 60%);
    pointer-events: none;
}


/* ---------- 11. CONTACT FORM ---------- */
.contact { background: var(--color-bg-alt); }
.contact__header {
    text-align: center;
    margin-bottom: 3rem;
}
.contact__title { margin-bottom: 1rem; }
.contact__intro { color: var(--color-text-muted); }

.contact-form {
    max-width: 720px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.contact-form__label {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}
.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.field--full { grid-column: 1 / -1; }
.field label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
}
.field input,
.field select,
.field textarea {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    font-size: 1rem;
    width: 100%;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    color: var(--color-text);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a8a8' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
.field select option { background: var(--color-bg); color: var(--color-text); }

.contact-form__submit {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 0.5rem;
}
.contact-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.form-status {
    grid-column: 1 / -1;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    display: none;
}
.form-status.is-success {
    display: block;
    background: rgba(74, 222, 128, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(74, 222, 128, 0.3);
}
.form-status.is-error {
    display: block;
    background: rgba(248, 113, 113, 0.1);
    color: var(--color-error);
    border: 1px solid rgba(248, 113, 113, 0.3);
}


/* ---------- 12. SITE FOOTER ---------- */
.site-footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--color-border);
}
.site-footer__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}
.site-footer__links {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.site-footer__links a {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}
.site-footer__bottom {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}


/* ---------- 13. REVEAL ANIMATIONS ---------- */

/* Prevent flash of content before GSAP picks up the elements. */
[data-reveal="blur-fade"],
[data-reveal="fade-up"] {
    opacity: 0;
    will-change: transform, opacity, filter;
}
[data-reveal-child] {
    opacity: 0;
    will-change: transform, opacity;
}

/* mask-up: the element clips; the inner span slides up into view. */
[data-reveal="mask-up"] {
    overflow: hidden;
}
[data-reveal="mask-up"] .reveal-inner {
    will-change: transform;
}
.reveal-inner {
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal], [data-reveal-child] { opacity: 1 !important; filter: none !important; }
    .reveal-inner { transform: none !important; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}


/* ---------- 14. RESPONSIVE ---------- */
@media (max-width: 860px) {
    .primary-nav__list {
        display: none;
    }
    .nav-toggle { display: inline-flex; }

    .is-nav-open .primary-nav {
        position: fixed;
        inset: var(--header-height) 0 0;
        background: var(--color-bg);
        padding: 2.5rem 1.5rem;
        flex-direction: column;
        align-items: stretch;
        overflow-y: auto;
    }
    .is-nav-open .primary-nav__list {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        font-size: 1.25rem;
        align-items: flex-start;
    }
    .is-nav-open body { overflow: hidden; }

    /* Dropdown — mobile accordion */
    .has-dropdown {
        width: 100%;
    }
    .nav-dropdown__trigger {
        font-size: 1.25rem;
        width: 100%;
        justify-content: space-between;
    }
    .nav-dropdown__chevron {
        width: 16px;
        height: 16px;
    }
    .nav-dropdown {
        position: static;
        transform: none;
        left: auto;
        opacity: 1;
        visibility: hidden;
        pointer-events: none;
        max-height: 0;
        overflow: hidden;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        border-radius: 0;
        padding: 0;
        transition: max-height 0.3s ease, visibility 0s linear 0.3s;
    }
    .has-dropdown.is-open .nav-dropdown {
        visibility: visible;
        pointer-events: auto;
        max-height: 300px;
        transition: max-height 0.3s ease, visibility 0s linear;
    }
    .nav-dropdown a {
        font-size: 1rem;
        padding: 0.55rem 0.5rem;
        color: rgba(255, 255, 255, 0.6);
        border-radius: 6px;
    }
    .nav-dropdown a:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.06);
    }

    .service-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .service-card--reverse .service-card__visual { order: 0; }
    .service-card__list { grid-template-columns: 1fr; }

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

    .site-footer__top {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .hero__actions .btn { flex: 1; justify-content: center; }
}


/* =============================================================
   === HERO SPLIT-SCREEN ===
   Replaces the single-column hero. Image+curved text on the LEFT
   (45%), dark content panel on the RIGHT (55%). Pinned to viewport
   on desktop via ScrollTrigger; vertical stack on mobile.
   ============================================================= */

/* Used by both the header and footer logo. */
.site-logo__img {
    display: block;
    height: 40px;
    width: auto;
}

.hero {
    /* override the earlier flex-center hero */
    height: auto;
    min-height: 100vh;
    padding: 0;
    display: block;
    overflow: visible;
    z-index: 1;
}
.hero::before,
.hero::after { display: none; }

.hero__layout {
    display: grid;
    grid-template-columns: 45% 55%;
    min-height: 100vh;
    align-items: start;
}

/* Left column — stays fixed while the right panel scrolls */
.hero__visual {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: var(--color-bg-alt);
}

/* Right column — hero text + work-limits stacked vertically */
.hero__panel {
    display: flex;
    flex-direction: column;
}
.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}


.hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(2rem, 5vw, 5rem);
    padding-top: calc(var(--header-height) + 1rem);
    background: var(--color-bg);
    position: relative;
}

/* About Us link + stacked title — visible only after first scroll */
.hero__about {
    padding: clamp(2rem, 5vw, 5rem);
    padding-top: clamp(3rem, 5vw, 4rem);
    padding-bottom: 0;
    background: var(--color-bg);
}
.hero__about .hero__link {
    display: block;
    margin-bottom: 2rem;
}
.hero__about .work-limits__title {
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
}
.hero__about .work-limits__title span {
    display: block;
    line-height: 1.05;
}

/* Work Without Limits body — left-aligned, dark bg */
.hero__panel .work-limits {
    text-align: left;
    padding: 1.5rem clamp(2rem, 5vw, 5rem) clamp(3rem, 6vw, 6rem);
    background: var(--color-bg);
}
.hero__panel .work-limits__body {
    max-width: 520px;
    margin: 0 0 1.5rem;
    font-size: 1rem;
}
.hero__content .hero__title {
    /* sized to fit comfortably inside the 55% column */
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.0;
    margin-bottom: 1.25rem;
}
.hero__content .hero__tagline {
    margin-bottom: 1.75rem;
    color: var(--color-text-muted);
    font-style: normal;
    font-size: 1rem;
}
.hero__content .hero__body {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    max-width: 520px;
}

/* "About Us" — simple white underlined text link, not a button. */
.hero__link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    font-weight: 500;
    font-size: 1rem;
    align-self: flex-start;
    transition: color var(--transition-fast);
}
.hero__link:hover { color: var(--color-accent); }

@media (max-width: 900px) {
    .hero__layout {
        grid-template-columns: 1fr;
        min-height: 0;
        align-items: stretch;
    }
    .hero__visual {
        position: relative;
        top: auto;
        height: 45vh;
    }
    .hero__content {
        min-height: 100vw;
        padding: 2.5rem 1.5rem 3rem;
    }
    .hero__about {
        padding: 2.5rem 1.5rem 3rem;
    }
    .hero__panel .work-limits {
        padding: 2.5rem 1.5rem 3rem;
    }
}


/* =============================================================
   === 99% LAYOUT REVISED ===
   Compact, left-aligned, white. Goal: digits + caption + at least
   one row of logos visible in a single 1080p viewport when the
   user lands on this section.
   ============================================================= */
.stat-section {
    text-align: left;
    height: auto;
    /* asymmetric padding: 4rem above, 1rem below — combines with the
       marquee's 1rem top padding for a ~2rem gap to the logos */
    padding: 4rem 0 1rem;
}
.stat-section > .container {
    max-width: 1200px;
    padding-left: clamp(1.5rem, 5vw, 4rem);
    padding-right: clamp(1.5rem, 5vw, 4rem);
}
.stat-section__number {
    display: block;
    text-align: left;
    /* smaller than before so the headline + caption + first row of
       logos all fit in one screenful */
    font-size: clamp(6rem, 12vw, 11rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.05em;
    line-height: 0.85;
    margin: 0;
}
.stat-section__percent {
    font-size: 0.5em;
    vertical-align: top;
    display: inline-block;
}
.stat-section__caption {
    text-align: left;
    color: #fff;
    font-weight: 700;
    font-size: clamp(1.25rem, 1.8vw, 1.75rem);
    line-height: 1.3;
    margin: 0.5rem 0 0;
    max-width: 900px;
}

/* Tight top padding so the marquee starts close to the 99% caption. */
.marquee-section {
    padding-block: 1rem;
}
.marquee-section__label {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0 0 1.5rem;
}


/* =============================================================
   15. MEDIA SERVICES LANDING PAGE  (.ms-*)
   ============================================================= */

.ms-page { background: var(--color-bg); }


/* ----- 1. Hero ------------------------------------------------ */
.ms-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + 4rem) 0 5rem;
    background: var(--color-bg);
}

.ms-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
}

.ms-hero__text {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.ms-hero__title {
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    font-weight: 900;
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--color-text);
    overflow: hidden;
}

.ms-hero__title .reveal-inner span { display: block; }

.ms-hero__body {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: var(--color-text-muted);
    max-width: 48ch;
    line-height: 1.75;
}

.ms-trust {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ms-trust li {
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 500;
    padding-left: 1.4em;
    position: relative;
}

.ms-trust li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

/* Form card */
.ms-hero__card {
    background: #f5f1ea;
    border-radius: var(--radius-lg);
    padding: 3rem;
    color: #0a0a0a;
    max-width: 520px;
    width: 100%;
    justify-self: end;
}

.ms-hero__card-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    color: #555;
}

.ms-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ms-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.ms-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ms-field label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #666;
}

.ms-field input,
.ms-field select {
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: var(--radius-sm);
    padding: 0.9rem 0.9rem;
    font-size: 1.05rem;
    color: #0a0a0a;
    font-family: var(--font-sans);
    transition: border-color var(--transition-fast);
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.ms-field input:focus,
.ms-field select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.ms-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.4rem;
}

.ms-form__status {
    font-size: 0.9rem;
    min-height: 1.2em;
    font-weight: 500;
}

.ms-form__status.is-success { color: var(--color-success); }
.ms-form__status.is-error   { color: var(--color-error); }

.ms-form__submit {
    width: 100%;
    justify-content: center;
    margin-top: 0.25rem;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
    padding-left: 2rem;
    padding-right: 2rem;
}


/* ----- 2. Proof section (sliders + badges + logos) ------------ */
.ms-proof {
    background: var(--color-bg-alt);
}

.ms-proof__header {
    margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.ms-proof__heading {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.ms-proof__subheading {
    font-size: clamp(1rem, 1.4vw, 1.1rem);
    color: var(--color-text-muted);
}

/* Slider cards row */
.ms-sliders {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 3rem;
}

.ms-slider-card {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(140px, 38%) 1fr;
    gap: 1.5rem;
    align-items: center;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
}

.ms-slider-card__stat {
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-accent);
    letter-spacing: -0.03em;
    text-align: left;
    overflow: visible;
    word-break: keep-all;
    white-space: normal;
}

.ms-slider-card__text {
    min-width: 0;
}

.ms-slider-card__line1 {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.ms-slider-card__line2 {
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
}

/* Trust badges row */
.ms-badges {
    display: flex;
    justify-content: center;
    gap: clamp(2rem, 5vw, 5rem);
    flex-wrap: wrap;
    padding: 3rem 0;
}

.ms-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ms-badge__icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.ms-badge__label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Logo strip */
.ms-logos__label {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0 0 2rem;
}

.ms-logos__strip {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1rem;
}

.ms-logo-card {
    width: 130px;
    height: 70px;
    border-radius: 12px;
    background: #f5f1ea;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    flex-shrink: 0;
}

.ms-logo-card img {
    max-width: 90%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
}


/* Logo marquee — caption on dark bg, cream strip only behind rows */
.logo-strip-caption {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0 0 1.5rem;
}

.media-marquee-wrap {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
    overflow: hidden;
    background: #f5f1ea !important;
    padding: 2.5rem 0;
    -webkit-mask-image: none;
    mask-image: none;
}
.media-marquee-wrap::before,
.media-marquee-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}
.media-marquee-wrap::before {
    left: 0;
    background: linear-gradient(to right, #f5f1ea 0%, transparent 100%);
}
.media-marquee-wrap::after {
    right: 0;
    background: linear-gradient(to left, #f5f1ea 0%, transparent 100%);
}

.media-marquee-track {
    display: flex;
    width: max-content;
    align-items: center;
    gap: 1.25rem;
    animation: mediaScroll 50s linear infinite;
    will-change: transform;
}

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

.media-marquee-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 1.5rem;
    height: 70px;
    width: auto !important;
}

.media-marquee-item img {
    height: 55px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
    filter: none !important;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.media-marquee-item img:hover {
    opacity: 1;
}

/* Remove any lingering card styles */
.unbnd-marquee-item,
.media-marquee-item {
    background-color: transparent !important;
}

@keyframes mediaScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Homepage marquee wrap alias — transparent, cream is on .marquee itself */
.unbnd-marquee-wrap {
    background: transparent;
    padding: 0;
    width: 100%;
}

/* Homepage marquee row cream strip */
.unbnd-marquee-row {
    background: #f5f1ea !important;
    padding: 2.5rem 0;
    position: relative;
    overflow: hidden;
}
.unbnd-marquee-row::before,
.unbnd-marquee-row::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}
.unbnd-marquee-row::before {
    left: 0;
    background: linear-gradient(to right, #f5f1ea 0%, transparent 100%);
}
.unbnd-marquee-row::after {
    right: 0;
    background: linear-gradient(to left, #f5f1ea 0%, transparent 100%);
}

/* Image opacity on cream bg */
.unbnd-marquee-item img,
.media-marquee-item img,
.logo-card img {
    opacity: 0.85;
}
.unbnd-marquee-item img:hover,
.media-marquee-item img:hover,
.logo-card img:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .unbnd-marquee-item,
    .media-marquee-item {
        height: 52px;
        padding: 0 1rem;
    }
    .unbnd-marquee-item img,
    .media-marquee-item img {
        height: 40px;
        max-width: 110px;
    }
    .media-marquee-wrap {
        padding: 1.5rem 0;
    }
}

/* ----- 4. Mid-page CTA banner --------------------------------- */
.ms-midcta {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8255 100%);
    padding: 3.5rem 0;
}

.ms-midcta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.ms-midcta__text {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: #fff;
}

.ms-midcta .btn--primary {
    background: #fff;
    color: #0a0a0a;
    border-color: #fff;
    flex-shrink: 0;
}

.ms-midcta .btn--primary:hover {
    background: #f5f1ea;
    border-color: #f5f1ea;
}


/* ----- 5. Core Expertise -------------------------------------- */
.ms-expertise {
    background: var(--color-bg);
}

.ms-expertise__header {
    text-align: center;
    margin-bottom: clamp(3rem, 5vw, 4.5rem);
}

.ms-expertise__title {
    margin-top: 0.75rem;
}

.ms-expertise__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.ms-exp-card {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.75rem;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.ms-exp-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.ms-exp-card[aria-expanded="true"] {
    border-color: rgba(255, 122, 58, 0.3);
    transform: none;
}

/* Bottom fade-out gradient hints there's more content */
.ms-exp-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(to bottom, transparent, #141414);
    pointer-events: none;
    transition: opacity 0.3s;
}

.ms-exp-card[aria-expanded="true"]::after {
    opacity: 0;
}

.ms-exp-card__top {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.ms-exp-card__num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.08em;
    flex-shrink: 0;
    padding-top: 0.2rem;
}

.ms-exp-card__title {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
}

.ms-exp-card__icon {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: transform 0.3s, color 0.2s;
    line-height: 1;
    display: inline-block;
    margin-top: 0.05rem;
}

.ms-exp-card[aria-expanded="true"] .ms-exp-card__icon {
    transform: rotate(45deg);
    color: var(--color-accent);
}

.ms-exp-card__body {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}


/* ----- 6. Touchpoints + Why UNBND ----------------------------- */
.ms-why {
    background: var(--color-bg-alt);
}

.ms-why__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
}

.ms-why__touchpoints { display: flex; flex-direction: column; gap: 1.5rem; }

.ms-why__touchpoints-heading {
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.35;
}

.ms-why__reasons-heading {
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 900;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.ms-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.ms-pill {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.ms-pill:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.ms-why__reasons { display: flex; flex-direction: column; gap: 1.5rem; }

.ms-why__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ms-why__list li {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.55;
    font-weight: 500;
    padding-left: 1.25rem;
    border-left: 2px solid var(--color-accent);
}


/* ----- 7. Final CTA ------------------------------------------- */
.ms-finalcta {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--color-bg);
    text-align: center;
}

.ms-finalcta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.ms-finalcta__body {
    font-size: clamp(1rem, 1.4vw, 1.1rem);
    color: var(--color-text-muted);
    max-width: 48ch;
    line-height: 1.65;
    text-align: center;
}

.ms-finalcta__title {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
    overflow: hidden;
    max-width: 18ch;
}


/* ----- Website Design additions (shared .ms-* namespace) ------ */

/* Hero trust badges — small inline row in the left column */
.ms-hero-badges {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ms-hero-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ms-hero-badge__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.ms-hero-badge span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.01em;
}

/* Form card heading + subheading (website design only) */
.ms-hero__card-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.ms-hero__card-subheading {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

/* Mid-CTA left text block */
.ms-midcta__left {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ms-midcta__subtext {
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* Why UNBND body paragraph (website design page) */
.ms-why__body {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}


/* ----- Responsive --------------------------------------------- */
@media (max-width: 900px) {
    .ms-hero__inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .ms-hero {
        padding-top: calc(var(--header-height) + 2rem);
    }
    .ms-hero__card {
        justify-self: stretch;
        max-width: none;
    }
    .ms-sliders {
        flex-direction: column;
    }
    .ms-slider-card {
        grid-template-columns: minmax(110px, 38%) 1fr;
    }
    .ms-badges {
        gap: 2rem;
        flex-direction: column;
        align-items: flex-start;
        padding: 2.5rem 0;
    }
    .ms-logos__strip {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .ms-logo-card {
        width: 100px;
        height: 55px;
        padding: 0.75rem;
    }
    .media-marquee-track {
        gap: 2rem;
        animation-duration: 35s;
    }
    .ms-expertise__grid {
        grid-template-columns: 1fr 1fr;
    }
    .ms-why__grid {
        grid-template-columns: 1fr;
    }
    .ms-midcta__inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .ms-form__row {
        grid-template-columns: 1fr;
    }
    .ms-slider-card {
        grid-template-columns: 1fr;
    }
    .ms-expertise__grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   16. AD FILMS LANDING PAGE  (template-ad-films.php)
   ========================================================================== */

/* ---------- Portfolio section ---------- */
.af-portfolio {
    padding: clamp(4rem, 8vw, 8rem) 0;
}
.af-portfolio__header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.af-portfolio__heading {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    overflow: hidden;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 0.75rem;
}
.af-portfolio__subheading {
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* === PORTFOLIO GALLERY === */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: #111;
}

.portfolio-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.portfolio-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-thumb-img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-play-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

.portfolio-play-btn:hover {
    transform: scale(1.1);
}

.portfolio-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
}

.portfolio-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ff7a3a;
    background: rgba(255, 122, 58, 0.15);
    border: 1px solid rgba(255, 122, 58, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.portfolio-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

/* Behance gradient placeholder */
.portfolio-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: #ff7a3a;
    letter-spacing: 0.05em;
}

/* --- Portfolio Modal --- */
.portfolio-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.portfolio-modal.is-open {
    opacity: 1;
    pointer-events: all;
}

.portfolio-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.portfolio-modal-content {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 1100px;
}

.portfolio-modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.portfolio-modal-close:hover { opacity: 1; }

.portfolio-modal-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.portfolio-modal-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .af-portfolio__header {
        text-align: left;
    }
}

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


/* ==========================================================================
   17. SOCIAL MEDIA LANDING PAGE  (template-social-media.php)
   — Case study grid only. All other sections reuse ms-* classes.
   ========================================================================== */

/* ---------- Section header ---------- */
.sm-cases {
    padding: clamp(4rem, 8vw, 8rem) 0;
}
.sm-cases__header {
    text-align: center;
    margin-bottom: 3rem;
}
.sm-cases__heading {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.sm-cases__subheading {
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    color: var(--color-text-muted);
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Case study grid ---------- */
.sm-cs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ---------- Case study card ---------- */
.sm-cs-card {
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.sm-cs-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 122, 58, 0.25);
    box-shadow: 0 12px 40px rgba(255, 122, 58, 0.08);
}

/* Card top: logo / name + industry tag */
.sm-cs-card__top {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sm-cs-card__logo-wrap {
    display: inline-flex;
    align-items: center;
    background: #f5f1ea;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    width: fit-content;
}
.sm-cs-card__logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    display: block;
}
.sm-cs-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.sm-cs-card__industry {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* Stats list */
.sm-cs-card__stats {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    flex: 1;
}
.sm-cs-card__stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.sm-cs-card__stat-num {
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}
.sm-cs-card__stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.3;
}

/* Takeaway */
.sm-cs-card__takeaway {
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 1rem;
    margin-top: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .sm-cs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .sm-cs-grid {
        grid-template-columns: 1fr;
    }
    .sm-cases__header {
        text-align: left;
    }
}


/* ==========================================================================
   18. LEGAL PAGES  (template-terms.php / template-privacy.php / template-cookies.php)
   ========================================================================== */

.lp-page {
    padding: calc(var(--header-height) + 4rem) 0 6rem;
}

.lp-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.lp-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.lp-effective {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    display: block;
}

.lp-section {
    margin-bottom: 2.5rem;
}

.lp-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.lp-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}
.lp-text:last-child { margin-bottom: 0; }

.lp-text strong {
    color: #fff;
    font-weight: 600;
}

.lp-text a,
.lp-list a {
    color: var(--color-accent);
    text-decoration: none;
    word-break: break-all;
}
.lp-text a:hover,
.lp-list a:hover {
    text-decoration: underline;
}

.lp-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}
.lp-list li {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
    margin-bottom: 0.2rem;
}

/* Cookie table */
.lp-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.lp-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    background: var(--color-bg-elevated);
}
.lp-table th {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.lp-table td {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    line-height: 1.55;
    vertical-align: top;
}
.lp-table tr:last-child td {
    border-bottom: none;
}


/* ==========================================================================
   19. MOBILE RESPONSIVE  (max-width: 768px)
   All rules below are mobile-only overrides — desktop layout unchanged.
   ========================================================================== */
@media (max-width: 768px) {

    /* ---- General spacing ---- */
    :root {
        --section-pad-y: 3rem;
    }
    .container {
        padding: 0 1.25rem;
    }


    /* ---- 1. Homepage hero stack ---- */
    .hero__layout {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    .hero__visual {
        position: relative;
        top: auto;
        width: 100%;
        height: 40vh;
        min-height: 220px;
        order: -1;
    }
    .hero__panel {
        order: 1;
    }
    .hero__content {
        min-height: 0;
        padding: 2rem 1.25rem 2.5rem;
    }
    .hero__about {
        padding: 2rem 1.25rem 2.5rem;
    }
    .hero__title {
        font-size: clamp(2.5rem, 10vw, 3.75rem);
    }
    .hero__panel .work-limits {
        padding: 2rem 1.25rem 2.5rem;
    }


    /* ---- 2. Mobile nav overlay tweaks ---- */
    .is-nav-open .primary-nav {
        padding: 2rem 1.25rem;
    }
    .is-nav-open .primary-nav__list {
        font-size: 1.4rem;
        gap: 1.75rem;
    }
    .is-nav-open .primary-nav__list .btn--primary {
        width: 100%;
        justify-content: center;
        margin-top: auto;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }


    /* ---- 3. 99% stat section ---- */
    .stat-section {
        padding: 2.5rem 0 1rem;
    }
    .stat-section__number {
        font-size: clamp(4.5rem, 22vw, 7rem);
    }
    .stat-section__caption {
        font-size: 1rem;
        line-height: 1.4;
    }


    /* ---- 4. Logo marquee — preserve animation ---- */
    .logo-card {
        height: 44px;
        padding: 0 1rem;
    }
    .logo-card img {
        height: 30px;
        max-width: 90px;
    }


    /* ---- 5. Services section — visual on top ---- */
    .service-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .service-card__visual {
        order: -1;
        aspect-ratio: unset;
        height: 200px;
    }
    .service-card--reverse .service-card__visual {
        order: -1;
    }
    .service-card__list {
        grid-template-columns: 1fr;
    }


    /* ---- 6. Landing page hero ---- */
    .ms-hero {
        min-height: 0;
        padding: calc(var(--header-height) + 1.5rem) 0 2.5rem;
    }
    .ms-hero__inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .ms-hero__title {
        font-size: clamp(2rem, 9vw, 3rem);
    }
    .ms-hero__card {
        width: 100%;
        max-width: none;
        justify-self: stretch;
        padding: 1.75rem 1.25rem;
        border-radius: var(--radius-md);
    }


    /* ---- 7. Form fields ---- */
    .ms-field input,
    .ms-field select {
        padding: 0.75rem 0.8rem;
        font-size: 0.95rem;
    }
    .ms-form__row {
        grid-template-columns: 1fr;
    }
    .field input,
    .field select,
    .field textarea {
        padding: 0.75rem 0.8rem;
        font-size: 0.95rem;
    }
    .contact-form {
        grid-template-columns: 1fr;
    }


    /* ---- 8. Slider cards — horizontal swipe carousel ---- */
    .ms-sliders {
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding-bottom: 1rem;
        /* hide scrollbar but keep functionality */
        scrollbar-width: none;
        margin-left: -1.25rem;
        margin-right: -1.25rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .ms-sliders::-webkit-scrollbar {
        display: none;
    }
    .ms-slider-card {
        flex: 0 0 82vw;
        scroll-snap-align: start;
        grid-template-columns: minmax(100px, 38%) 1fr;
    }


    /* ---- 9. Landing page section padding ---- */
    .ms-proof,
    .ms-expertise,
    .ms-why,
    .ms-midcta,
    .ms-form-section,
    .af-portfolio,
    .sm-cases {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    .ms-expertise__grid {
        grid-template-columns: 1fr;
    }
    .ms-logos__strip {
        gap: 0.5rem;
    }
    .ms-logo-card {
        width: 90px;
        height: 50px;
    }


    /* ---- 10. Case study grid — single column ---- */
    .sm-cs-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .af-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   20. SERVICE CARD PHOTOGRAPHY
   ========================================================================== */

/* Remove placeholder padding so the image fills edge-to-edge */
.service-card__visual {
    padding: 0;
}

/* Image wrapper — contains the photo + both overlay layers */
.service-img-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
}

/* picture element inherits wrapper sizing */
picture {
    display: block;
    width: 100%;
    height: 100%;
}

/* The photo */
.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    will-change: transform;
    transition: transform 0.6s ease;
}

/* Subtle hover zoom — fires from the service-card hover state */
.service-card:hover .service-img {
    transform: scale(1.04);
}

/* Dark gradient overlay — keeps text readable, darkens the bottom */
.service-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.05)  0%,
        rgba(0, 0, 0, 0.10)  40%,
        rgba(10, 5, 0, 0.55) 75%,
        rgba(15, 6, 0, 0.85) 100%
    );
    pointer-events: none;
}

/* Orange tint at bottom — bleeds into the dark card background */
.service-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(
        to bottom,
        transparent              0%,
        rgba(255, 122, 58, 0.08) 60%,
        rgba(255, 122, 58, 0.14) 100%
    );
    pointer-events: none;
}

/* Mobile: full-width landscape banner above text */
@media (max-width: 768px) {
    /* Reset visual container — strip all desktop styles, bleed past container padding */
    .service-card__visual {
        display: block !important;
        height: auto !important;
        aspect-ratio: unset !important;
        border-radius: 0 !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        /* Bleed past the container's 1.25rem padding on each side */
        margin-left: -1.25rem !important;
        margin-right: -1.25rem !important;
        width: calc(100% + 2.5rem) !important;
        order: -1 !important;
        overflow: visible !important;
    }

    /* Landscape banner dimensions — no border-radius, fills full width */
    .service-img-wrap {
        width: 100% !important;
        height: 56vw !important;
        min-height: 220px !important;
        max-height: 300px !important;
        border-radius: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        display: block !important;
        flex-shrink: 0;
    }

    /* picture element fills wrapper on mobile */
    picture {
        display: block;
        width: 100%;
        height: 100%;
    }

    /* Mobile crop is already correctly framed — center/center is correct */
    .service-img,
    picture .service-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center center !important;
        border-radius: 0 !important;
        transform: none !important;
    }

    /* Reduce orange bleed height on mobile */
    .service-img-wrap::after {
        height: 80px;
    }

    /* Stack card as column — visual on top via order:-1 above */
    .service-card {
        display: flex;
        flex-direction: column;
    }
}


/* ─────────────────────────────────────────────────────────────
   MOBILE NAV OVERLAY — precise overrides using actual selectors
   Breakpoint matches existing nav: max-width 860px
   ───────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    /* A) Hide the desktop "Let's Talk" btn inside the mobile overlay
          (it lives in .primary-nav__list; .mobile-cta-btn in the bar is kept) */
    .primary-nav__list .btn--primary {
        display: none !important;
    }

    /* B) Smaller top-level nav link font */
    .is-nav-open .primary-nav__list {
        font-size: 1.1rem;
    }
    .is-nav-open .primary-nav__list > li > a:not(.btn) {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        padding: 0.75rem 0 !important;
    }
    .nav-dropdown__trigger {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        padding: 0.75rem 0 !important;
    }

    /* C) Services submenu always expanded — no tap needed */
    .nav-dropdown {
        visibility: visible !important;
        pointer-events: all !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        transition: none !important;
    }

    /* D) Hide the Services chevron on mobile */
    .nav-dropdown__chevron {
        display: none !important;
    }

    /* E) Sub-menu link styling — smaller, indented */
    .nav-dropdown a {
        font-size: 0.9rem !important;
        font-weight: 400 !important;
        padding: 0.4rem 0 0.4rem 1rem !important;
        border-bottom: none !important;
        color: rgba(255, 255, 255, 0.65) !important;
    }

    /* F) Ensure overlay scrolls */
    .is-nav-open .primary-nav {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   MOBILE FIXES — nav CTA, nav overlay, landing page forms
   ───────────────────────────────────────────────────────────── */

/* FIX 1 — Let's Talk button in mobile nav bar */
.mobile-cta-btn {
    display: none; /* hidden by default; shown only on mobile below */
}

@media (max-width: 768px) {
    .mobile-cta-btn {
        display: inline-flex;
        align-items: center;
        background: #ff7a3a;
        color: #fff;
        font-size: 0.8rem;
        font-weight: 700;
        padding: 0.45rem 1rem;
        border-radius: 999px;
        text-decoration: none;
        white-space: nowrap;
        margin-left: auto;
        margin-right: 1rem;
    }
}

/* FIX 2 — Mobile nav overlay: smaller fonts, Services submenu always expanded */
@media (max-width: 768px) {
    .nav-overlay,
    .mobile-nav,
    [class*="mobile-menu"],
    [class*="nav-overlay"] {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        overflow-y: auto !important;
        z-index: 9999 !important;
        background: #0a0a0a !important;
        padding: 5rem 2rem 3rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .nav-overlay a,
    .mobile-nav a,
    [class*="mobile-menu"] a,
    [class*="nav-overlay"] a {
        font-size: 1.4rem !important;
        font-weight: 600 !important;
        padding: 0.9rem 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        display: block !important;
        color: #fff !important;
        text-decoration: none !important;
    }

    .nav-overlay .sub-menu,
    .mobile-nav .sub-menu,
    [class*="mobile-menu"] .sub-menu,
    [class*="nav-overlay"] .sub-menu,
    [class*="dropdown"] ul,
    [class*="services-dropdown"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        opacity: 1 !important;
        transform: none !important;
        position: static !important;
        background: transparent !important;
        padding-left: 1.25rem !important;
        border-left: 2px solid #ff7a3a !important;
        margin: 0.5rem 0 0.5rem 0.5rem !important;
    }

    .nav-overlay .sub-menu a,
    .mobile-nav .sub-menu a,
    [class*="nav-overlay"] .sub-menu a,
    [class*="dropdown"] ul a {
        font-size: 1rem !important;
        font-weight: 400 !important;
        padding: 0.5rem 0 !important;
        border-bottom: none !important;
        color: rgba(255, 255, 255, 0.7) !important;
    }

    .nav-overlay .dropdown-toggle,
    [class*="menu-item-has-children"] > a > svg,
    [class*="menu-item-has-children"] > a::after {
        display: none !important;
    }
}

/* FIX 3 — Landing page forms: compact on mobile */
@media (max-width: 768px) {
    .contact-card,
    [class*="form-card"],
    [class*="hero-form"],
    [class*="form-wrap"] {
        padding: 1.25rem !important;
        border-radius: 16px !important;
        margin-top: 1.5rem !important;
    }

    .contact-card h2,
    .contact-card h3,
    [class*="form-card"] h2,
    [class*="form-card"] h3 {
        font-size: 1.3rem !important;
        margin-bottom: 0.75rem !important;
    }

    .contact-card label,
    [class*="form-card"] label {
        font-size: 0.75rem !important;
        margin-bottom: 0.25rem !important;
    }

    .contact-card input,
    .contact-card select,
    .contact-card textarea,
    [class*="form-card"] input,
    [class*="form-card"] select,
    [class*="form-card"] textarea,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select {
        padding: 0.6rem 0.85rem !important;
        font-size: 0.9rem !important;
        min-height: unset !important;
        height: auto !important;
        border-radius: 8px !important;
    }

    textarea {
        min-height: 80px !important;
        font-size: 0.9rem !important;
        padding: 0.6rem 0.85rem !important;
    }

    button[type="submit"],
    input[type="submit"],
    [class*="submit"],
    [class*="form-btn"] {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.9rem !important;
        width: 100% !important;
        border-radius: 999px !important;
    }

    [class*="form-row"],
    [class*="form-grid"],
    [class*="two-col"] {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    [class*="form"] .field,
    [class*="form-field"],
    [class*="contact-field"] {
        margin-bottom: 0.75rem !important;
    }

    [class*="card-label"],
    [class*="form-label-top"] {
        font-size: 0.7rem !important;
        margin-bottom: 0.75rem !important;
    }
}


/* ═══════════════════════════════════════════════════════════════
   MOBILE NAV — definitive fullscreen overlay fix
   JS toggles class "is-nav-open" on <body>.
   Overlay selector: body.is-nav-open .primary-nav
   Header z-index: 100 → overlay z-index: 99 so hamburger stays tappable.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {

    /* Prevent body scroll while nav is open */
    body.is-nav-open {
        overflow: hidden !important;
    }

    /* Full-viewport overlay — below header (z:100) so hamburger stays accessible */
    body.is-nav-open .primary-nav {
        position: fixed !important;
        top: var(--header-height, 72px) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: calc(100vh - var(--header-height, 72px)) !important;
        height: calc(100dvh - var(--header-height, 72px)) !important;
        z-index: 99 !important;
        background: #0a0a0a !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 2rem 1.5rem 3rem !important;
    }

    /* Nav list container */
    body.is-nav-open .primary-nav__list {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    /* Top-level list items — bottom divider */
    body.is-nav-open .primary-nav__list > li {
        width: 100% !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        list-style: none !important;
    }

    /* Top-level links (Home, About) */
    body.is-nav-open .primary-nav__list > li > a:not(.btn) {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        color: #fff !important;
        padding: 0.85rem 0 !important;
        display: block !important;
        text-decoration: none !important;
    }

    /* Services trigger button */
    body.is-nav-open .nav-dropdown__trigger {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        color: #fff !important;
        padding: 0.85rem 0 !important;
        width: 100% !important;
        justify-content: flex-start !important;
        background: transparent !important;
        border: none !important;
    }

    /* Hide chevron — submenu is always visible */
    .nav-dropdown__chevron {
        display: none !important;
    }

    /* Services submenu — always expanded, no tap needed */
    body.is-nav-open .nav-dropdown {
        display: block !important;
        visibility: visible !important;
        pointer-events: all !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        transition: none !important;
        background: transparent !important;
        padding: 0 0 0.5rem 1rem !important;
        border-left: 2px solid #ff7a3a !important;
        margin: 0 0 0.5rem 0.25rem !important;
    }

    /* Sub-menu links */
    body.is-nav-open .nav-dropdown a {
        font-size: 0.9rem !important;
        font-weight: 400 !important;
        color: rgba(255, 255, 255, 0.65) !important;
        padding: 0.4rem 0 !important;
        border-bottom: none !important;
        display: block !important;
        background: transparent !important;
    }

    /* Hide the desktop "Let's Talk" btn from mobile overlay
       (.mobile-cta-btn in the header bar handles CTA on mobile) */
    body.is-nav-open .primary-nav__list .btn--primary {
        display: none !important;
    }
}
