/* PCD — Global system · Dark warm theme */
:root {
    /* Palette — dark warm with gold accent */
    --bg: #14100b;

    /* very dark warm brown */
    --bg-1: #1c1611;

    /* slightly lighter */
    --bg-2: #251d15;

    /* surface */
    --bg-3: #2d2317;

    /* deeper surface */
    --ink: #f3ead9;

    /* warm off-white */
    --ink-soft: #b8a98e;

    /* muted warm */
    --ink-faint: #6e6249;

    /* very muted */
    --gold: #d4af8a;

    /* primary accent — matches logo */
    --gold-light: #d4af8a;
    --gold-deep: #9a7748;
    --line: rgba(193, 154, 107, 0.15);
    --line-strong: rgba(193, 154, 107, 0.35);

    /* Aliases for backward compatibility */
    --wood: var(--gold);
    --wood-deep: var(--gold-deep);
    --sand: var(--gold-light);
    --bg-deep: var(--bg-1);

    /* Type */
    --sans: 'Outfit', 'DM Sans', system-ui, -apple-system, sans-serif;
    --serif: 'Playfair Display', 'Outfit', Georgia, 'Times New Roman', serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --ar-sans: 'Tajawal', 'Cairo', system-ui, sans-serif;
    --ar-serif: 'Tajawal', 'Cairo', system-ui, sans-serif;

    /* Spacing */
    --gutter: clamp(20px, 4vw, 64px);

    /* Motion */
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0;
}

/* ============ LENIS SMOOTH SCROLL ============ */
html.lenis,
html.lenis body {
    height: auto;
}

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

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

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

.lenis.lenis-smooth iframe {
    pointer-events: none;
}

/* While dragging the page (hold + move): suppress selection, show grab cursor */
html.dragging,
html.dragging * {
    user-select: none !important;
    cursor: grabbing !important;
}

html,
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

body::before {
    background-image:
        radial-gradient(circle, rgba(212, 175, 138, 0.7) 0 1px, transparent 1.8px),
        radial-gradient(circle, rgba(243, 234, 217, 0.36) 0 1px, transparent 1.6px),
        radial-gradient(circle, rgba(212, 175, 138, 0.24) 0 1.2px, transparent 2px);
    background-position: 0 0, 80px 120px, 160px 40px;
    background-size: 220px 220px, 340px 340px, 520px 520px;
    mix-blend-mode: screen;
    opacity: 0.13;
    animation: ambientDust 52s linear infinite;
}

body::after {
    background:
        radial-gradient(ellipse at 18% 22%, rgba(212, 175, 138, 0.14), transparent 34%),
        radial-gradient(ellipse at 78% 68%, rgba(154, 119, 72, 0.13), transparent 38%),
        linear-gradient(105deg, transparent 14%, rgba(212, 175, 138, 0.05) 46%, transparent 70%);
    mix-blend-mode: soft-light;
    opacity: 0.78;
    animation: ambientLight 30s ease-in-out infinite alternate;
}

.post-hero-ambient {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--bg);
}

.ambient-video-layer {
    position: absolute;
    inset: 0;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.post-hero-ambient > :not(.ambient-video-layer) {
    position: relative;
    z-index: 2;
}

.ambient-video {
    position: absolute;
    top: 0;
    left: 50%;
    display: block;
    width: max(100%, calc(100svh * 16 / 9));
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 0;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    opacity: 0.065;
    filter: none;
    mix-blend-mode: normal;
    transform: translate3d(-50%, var(--ambient-y, 0px), 0);
    will-change: transform;
}

html[data-theme="light"] .ambient-video {
    opacity: 0.035;
    mix-blend-mode: normal;
}

@keyframes ambientDust {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-90px, -140px, 0); }
}

@keyframes ambientLight {
    0% { transform: translate3d(-1.5%, 0, 0) scale(1); opacity: 0.48; }
    100% { transform: translate3d(1.5%, -1%, 0) scale(1.04); opacity: 0.82; }
}

html[dir="rtl"] body {
    font-family: var(--ar-sans);
}

html[data-theme="light"] body::before {
    mix-blend-mode: multiply;
    opacity: 0.08;
}

html[data-theme="light"] body::after {
    mix-blend-mode: normal;
    opacity: 0.32;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--sans);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.05;
    text-wrap: balance;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
    font-family: var(--ar-sans);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.6;
}

.display {
    font-size: clamp(56px, 11vw, 180px);
    line-height: 0.95;
    letter-spacing: -0.04em;
    font-weight: 600;
}

.h1 {
    font-size: clamp(44px, 7.5vw, 112px);
    font-weight: 600;
}

.h2 {
    font-size: clamp(36px, 5.2vw, 76px);
    font-weight: 600;
}

.h3 {
    font-size: clamp(26px, 3vw, 44px);
    font-weight: 500;
}

/* Gold accent emphasis (no italic) */
h1 em,
h2 em,
h3 em,
h4 em,
.hero-headline em,
.display em,
.intro-body em,
.story-pull em,
.quote em,
.bigfoot-text em {
    font-style: normal;
    color: var(--gold);
    font-weight: inherit;
}

/* Section label: a deliberate hairline-rule marker rather than the generic
   uppercase tracked kicker. Sentence case and equal restraint in both
   languages, so Arabic and English share the same hierarchy. */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--gold);
    font-weight: 500;
}

.eyebrow::before {
    content: '';
    flex: none;
    width: 28px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}

html[dir="rtl"] .eyebrow {
    font-family: var(--ar-sans);
    font-size: 14px;
    letter-spacing: 0;
    font-weight: 600;
}

.italic {
    color: var(--gold);
    font-weight: 500;
}

/* Layout */
.wrap {
    padding: 0 var(--gutter);
}

.section {
    padding: clamp(80px, 14vh, 180px) 0;
    position: relative;
}

.divider {
    height: 1px;
    background: var(--line);
    width: 100%;
}

/* ============ NAV ============ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 18px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ink);
    transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
    border-bottom: 1px solid transparent;
}

.nav.solid {
    background: rgba(20, 16, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--line);
    padding: 18px var(--gutter);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.brand img {
    height: 44px;
    width: auto;
    display: block;
    transition: transform 0.4s var(--ease);
}

.nav.solid .brand img {
    height: 44px;
}

.brand .brand-text {
    font-family: var(--ar-sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--ink);
    line-height: 1.1;
    white-space: nowrap;
}

html[dir="ltr"] .brand .brand-text {
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
}

@media (max-width: 700px) {
    .brand .brand-text {
        display: none;
    }
}

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

.nav-links a {
    text-decoration: none;
    color: var(--ink);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    position: relative;
    padding: 6px 0;
    transition: color 0.3s var(--ease);
}

html[dir="ltr"] .nav-links a {
    font-size: 13px;
    letter-spacing: 0.02em;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-links a.active {
    color: var(--gold);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    inset: auto 0 -2px 0;
    height: 2px;
    background: var(--gold);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-toggle {
    background: none;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.lang-toggle:hover {
    background: var(--gold);
    color: var(--bg);
    border-color: var(--gold);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 8px;
}

.menu-btn span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    margin: 5px 0;
}

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

    .menu-btn {
        display: block;
    }

    .nav-links.open {
        display: flex;
        position: fixed;
        /* Use the small viewport height (svh) so the panel always fits inside
           the visible area even when iOS Safari's URL bar is up. Plain 100vh
           tracks the *max* viewport (URL bar hidden), so scrolling then opening
           the menu clips the bottom items when the URL bar comes back. */
        top: 0;
        left: 0;
        right: 0;
        height: 100vh;
        height: 100svh;
        z-index: 99;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--bg);
        color: var(--ink);
        flex-direction: column;
        align-items: center;
        /* flex-start (not center): centering clips the top items whenever the
           list is taller than the screen, which forces scrolling. */
        justify-content: flex-start;
        padding: 90px var(--gutter) 40px;
        gap: clamp(14px, 2.6vh, 26px);
    }

    /* Freeze the page under the open menu so scroll gestures don't bleed
       through and shove the fixed panel out of the visible viewport. */
    html.menu-open,
    html.menu-open body {
        overflow: hidden;
        height: 100%;
    }

    /* The open menu paints its own background (var(--bg)), so its links must
       always use var(--ink) — the .nav.over-hero cream color is for links
       sitting over the dark hero photo and turns invisible on the light
       theme's menu background. !important beats that override in both themes. */
    .nav-links.open a {
        font-size: clamp(20px, 3.2vh, 26px);
        font-weight: 500;
        color: var(--ink) !important;
        /* no color transition: it can freeze mid-flight on theme switch and
           leave cream links on the cream light-theme background */
        transition: none !important;
    }

    .nav-links.open a.active {
        color: var(--gold) !important;
    }
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 30px;
    border-radius: 4px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    text-decoration: none;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
    position: relative;
    overflow: hidden;
}

html[dir="rtl"] .btn {
    font-family: var(--ar-sans);
    font-size: 15px;
    font-weight: 500;
}

.btn .arrow {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    transition: transform 0.4s var(--ease);
}

.btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* The arrow glyph in markup is "←". It should point in the reading-advance
   direction: right in English (LTR), left in Arabic (RTL). Flip in LTR only. */
html[dir="ltr"] .btn .arrow {
    transform: scaleX(-1);
}

html[dir="ltr"] .btn:hover .arrow {
    transform: translateX(4px) scaleX(-1);
}

html[dir="rtl"] .btn:hover .arrow {
    transform: translateX(-4px);
}

.btn.solid {
    background: var(--gold);
    color: #1a1410;
    border-color: var(--gold);
    font-weight: 500;
}

.btn.solid:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    color: #1a1410;
}

/* ============ CURSOR ============ */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: background 0.3s var(--ease);
    mix-blend-mode: normal;
}

.cursor.large {
    width: 56px;
    height: 56px;
    background: rgba(193, 154, 107, 0.2);
    border: 1px solid var(--gold);
}

.cursor-label {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.cursor-label.visible {
    opacity: 1;
}

@media (hover: none), (max-width: 900px) {
    .cursor,
    .cursor-label {
        display: none;
    }
}

/* ============ REVEALS ============ */
/* Reveals are a progressive enhancement: content is fully visible by default,
   and only hidden-then-animated when JS is present (html.js is set in <head>
   before paint). This prevents blank sections for no-JS, crawlers, social
   renderers, or fast scrolling, where IntersectionObserver may never fire. */
.reveal {
    transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}

html.js .reveal {
    opacity: 0;
    transform: translateY(40px);
}

html.js .reveal.in {
    opacity: 1;
    transform: none;
}

.reveal-stagger > * {
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

html.js .reveal-stagger > * {
    opacity: 0;
    transform: translateY(30px);
}

html.js .reveal-stagger.in > * {
    opacity: 1;
    transform: none;
}

.reveal-stagger.in > *:nth-child(1) {
    transition-delay: 0.0s;
}

.reveal-stagger.in > *:nth-child(2) {
    transition-delay: 0.08s;
}

.reveal-stagger.in > *:nth-child(3) {
    transition-delay: 0.16s;
}

.reveal-stagger.in > *:nth-child(4) {
    transition-delay: 0.24s;
}

.reveal-stagger.in > *:nth-child(5) {
    transition-delay: 0.32s;
}

.reveal-stagger.in > *:nth-child(6) {
    transition-delay: 0.40s;
}

/* ============ IMAGE PLACEHOLDERS ============ */
.img-slot {
    background: var(--bg-2);
    position: relative;
    overflow: hidden;
    display: block;
}

.img-slot::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(193, 154, 107, 0.15), transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(193, 154, 107, 0.08), transparent 50%);
}

.img-slot::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(20, 16, 11, 0.6));
}

.img-slot .label {
    position: absolute;
    bottom: 18px;
    left: 18px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink);
    z-index: 2;
    max-width: 80%;
    opacity: 0.9;
}

html[dir="rtl"] .img-slot .label {
    left: auto;
    right: 18px;
    font-family: var(--ar-sans);
    letter-spacing: 0.04em;
    text-transform: none;
    font-size: 11px;
}

.img-slot .index {
    position: absolute;
    top: 18px;
    right: 18px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--gold);
    z-index: 2;
}

html[dir="rtl"] .img-slot .index {
    right: auto;
    left: 18px;
}

/* Real photos sit inside the slot, behind the gradient overlays and labels */
.img-slot .shot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 0;
}

.img-slot::before,
.img-slot::after {
    z-index: 1px;
}

.img-slot.warm {
    background: linear-gradient(135deg, #3d2c1a 0%, #1c1611 100%);
}

.img-slot.deep {
    background: linear-gradient(160deg, #2d2317 0%, #0d0a07 100%);
    font-size: 1px;
}

.img-slot.gold {
    background: linear-gradient(135deg, var(--gold-deep) 0%, #4a3623 100%);
}

.img-slot.sand {
    background: linear-gradient(135deg, #5a4530 0%, #2d2317 100%);
}

.img-slot.cream {
    background: linear-gradient(135deg, #4a3a26 0%, #2d2317 100%);
}

.img-hover {
    overflow: hidden;
}

.img-hover .img-slot {
    transition: transform 1.4s var(--ease);
    width: 100%;
    height: 100%;
    line-height: 0px;
}

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

/* ============ FOOTER ============ */
.footer {
    background: #0d0a07;
    color: var(--ink);
    padding: 100px var(--gutter) 40px;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

@media (max-width: 800px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

.footer h4 {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 500;
    color: var(--gold);
}

html[dir="rtl"] .footer h4 {
    font-family: var(--ar-sans);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: none;
    font-weight: 600;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 12px;
}

.footer a {
    color: var(--ink);
    text-decoration: none;
    opacity: 0.75;
    transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
    font-size: 14px;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 15px;
}

.footer-brand img {
    height: 56px;
    width: auto;
}

.footer-tag {
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.4;
    letter-spacing: -0.01em;
    max-width: 30ch;
    color: var(--ink);
    font-weight: 400;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(243, 234, 217, 0.68);
}

html[dir="rtl"] .footer-bottom {
    font-family: var(--ar-sans);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

::selection {
    background: var(--gold);
    color: var(--bg);
}

/* ============ MARQUEE ============ */
.marquee {
    overflow: hidden;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    padding: 28px 0;
    white-space: nowrap;
    background: var(--bg-1);
    display: block;
}

.marquee-track {
    display: inline-flex;
    align-items: center;
    animation: marquee 30s linear infinite;
}

.marquee-track-alt {
    display: none;
}

/* Spacing via margins (not gap) so the -50% loop point lines up exactly
   with the duplicated content — no visible jump at the seam. */
.marquee-track > * {
    margin-inline-end: 60px;
}

.marquee-track span {
    font-size: clamp(28px, 3.5vw, 48px);
    font-weight: 500;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.marquee-track .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    display: inline-block;
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

html[dir="rtl"] .marquee-track {
    animation-direction: reverse;
}

html[dir="rtl"] .marquee-track-alt {
    animation-direction: normal;
}

/* ============ UTILITY ============ */
.muted {
    color: var(--ink-soft);
}

.gold {
    color: var(--gold);
}

.mono {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
}

html[dir="rtl"] .mono {
    font-family: var(--ar-sans);
    letter-spacing: 0;
    font-size: 13px;
}

/* Page transition */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9000;
    transform: translateY(100%);
    pointer-events: none;
}

.page-transition.active {
    animation: pageWipe 1.4s var(--ease) forwards;
}

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

    50% {
        transform: translateY(0);
    }

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

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-3);
    border-radius: 10px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-deep);
}

/* ============ THEME TOGGLE BUTTON ============ */
.theme-toggle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: none;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
    flex-shrink: 0;
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
}

.theme-toggle:hover {
    background: var(--gold);
    color: var(--bg);
    border-color: var(--gold);
}

.theme-toggle .icon-sun {
    display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
    display: block;
}

/* Nav while over the dark image hero (index): keep controls light in both themes */
.nav.over-hero {
    color: #f3ead9;
}

.nav.over-hero .nav-links a {
    color: #f3ead9;
}

.nav.over-hero .nav-links a.active {
    color: var(--gold-light);
}

.nav.over-hero .lang-toggle,
.nav.over-hero .theme-toggle {
    color: #f3ead9;
    border-color: rgba(243, 234, 217, 0.35);
}

/* ============ LIGHT THEME ============ */
html[data-theme="light"] {
    --bg: #f6f1e8;
    --bg-1: #efe8db;
    --bg-2: #e7ddcc;
    --bg-3: #ddd0bb;
    --ink: #211a13;
    --ink-soft: #6a5c47;
    --ink-faint: #a99a80;
    --gold: #9a7748;
    --gold-light: #b8916a;
    --gold-deep: #7c5f38;
    --line: rgba(122, 92, 58, 0.18);
    --line-strong: rgba(122, 92, 58, 0.40);
}

/* Solid nav on light theme */
html[data-theme="light"] .nav.solid {
    background: rgba(246, 241, 232, 0.85);
    border-bottom-color: var(--line);
}

/* Hero is an image with a dark overlay — keep its text/controls light in light theme */
html[data-theme="light"] .hero-headline,
html[data-theme="light"] .hero-sub,
html[data-theme="light"] .hero-scroll,
html[data-theme="light"] .stat-label {
    color: #f3ead9;
}

html[data-theme="light"] .hero-eyebrow,
html[data-theme="light"] .stat-num {
    color: var(--gold-light);
}

html[data-theme="light"] .hero-eyebrow .dot {
    background: var(--gold-light);
}

html[data-theme="light"] .hero .btn:not(.solid) {
    color: #f3ead9;
    border-color: rgba(243, 234, 217, 0.35);
}

html[data-theme="light"] .hero .btn:not(.solid):hover {
    color: var(--gold-light);
    border-color: var(--gold-light);
}

/* Services strip starts with a hard-coded dark gradient — flatten it on light */
html[data-theme="light"] .services-strip {
    background: var(--bg-1);
}

/* Footer stays a deep band; force its text light on light theme */
html[data-theme="light"] .footer {
    background: #16110c;
}

html[data-theme="light"] .footer .footer-tag,
html[data-theme="light"] .footer a {
    color: #f3ead9;
}

html[data-theme="light"] .footer h4 {
    color: var(--gold-light);
}

html[data-theme="light"] .footer-bottom {
    color: rgba(243, 234, 217, 0.72);
}

/* ============ DESIGN REFINEMENTS — inner pages ============
   Higher-specificity overrides (prefixed with `html`) so they win over the
   per-page inline <style> blocks without editing each file. Goal: tame the
   oversized display type and tighten vertical rhythm so pages feel composed,
   not empty. */
/* Page hero (about / services / projects / contact) */
html .page-hero {
    padding: clamp(96px, 14vh, 140px) var(--gutter) clamp(44px, 6vh, 72px);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

html .page-hero h1 {
    font-size: clamp(40px, 6vw, 80px);
    line-height: 1.05;
}

html[dir="rtl"] .page-hero h1 {
    line-height: 1.22;
}

html .page-hero .lede {
    font-size: clamp(15px, 1.2vw, 18px);
    line-height: 1.7;
}

/* Section headings across inner pages */
html .approach-head h2,
html .team-head h2,
html .service-block h2,
html .timeline h2,
html .process-strip h2 {
    font-size: clamp(30px, 4.4vw, 60px);
    line-height: 1.08;
}

html[dir="rtl"] .approach-head h2,
html[dir="rtl"] .team-head h2,
html[dir="rtl"] .service-block h2,
html[dir="rtl"] .timeline h2,
html[dir="rtl"] .process-strip h2 {
    line-height: 1.3;
}

html .faq-side h2,
html .story-side h2 {
    font-size: clamp(28px, 3.6vw, 48px);
    line-height: 1.1;
}

/* Giant decorative service number was up to 200px — rein it in */
html .service-block .num {
    font-size: clamp(48px, 6vw, 104px);
    line-height: 1;
    margin-bottom: 18px;
}

/* CTA band */
html .cta {
    padding: clamp(80px, 12vh, 128px) var(--gutter);
}

html .cta h2 {
    font-size: clamp(34px, 4.8vw, 64px);
    line-height: 1.08;
    max-width: 20ch;
}

html[dir="rtl"] .cta h2 {
    line-height: 1.3;
}

/* Contact "bigfoot" closing statement */
html .bigfoot-text {
    font-size: clamp(36px, 6vw, 88px);
}

html[dir="rtl"] .bigfoot-text {
    line-height: 1.2;
}

/* Trim the most generous section paddings so content reads denser */
html .approach,
html .team,
html .timeline,
html .faq,
html .story,
html .contact {
    padding-top: clamp(72px, 10vh, 120px);
    padding-bottom: clamp(72px, 10vh, 120px);
}

html .service-block {
    padding: clamp(64px, 9vh, 110px) 0;
}

/* Dates removed per request — only the footer copyright year remains */
.work-item .year,
.featured-item .meta > span:last-child {
    display: none;
}

/* ============ ACCESSIBILITY (skill: focus-states, reduced-motion) ============ */
/* Visible keyboard focus on all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Comfortable tap target for the round toggle buttons on mobile */
.theme-toggle {
    min-width: 40px;
    min-height: 40px;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ambient-video {
        display: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .hero-bg {
        animation: none !important;
        transform: none !important;
    }

    /* Ensure scroll-reveal content is always visible without motion */
    .reveal,
    .reveal-stagger > *,
    .text-reveal > span {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============ POLISH (skill: design-audit · phase 3) ============ */
/* Skip link for keyboard / screen-reader users */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--gold);
    color: #14100b;
    padding: 10px 18px;
    font-weight: 600;
    border-radius: 0 0 6px 0;
}

html[dir="rtl"] .skip-link {
    left: auto;
    right: -9999px;
    border-radius: 0 0 0 6px;
}

.skip-link:focus {
    left: 0;
}

html[dir="rtl"] .skip-link:focus {
    right: 0;
    left: auto;
}

/* Animated gold underline under nav links */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.35s var(--ease);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

html .faq-a {
    transition: none !important;
}
