/* ══════════════════════════════════════════
   LIGHT THEME  (default / [data-theme="light"])
   Architecture-engineering: cold, bright, precise
   ══════════════════════════════════════════ */
:root,
[data-theme="light"] {
    --btn-switch:   #d5b120;
    --btn-disabled: #64200b;
    --bg:           #f4f6f8;
    --bg-surface:   #ffffff;
    --bg-raised:    #edf0f4;
    --border:       #d0d8e2;
    --border-fine:  #b8c4d4;

    --text-primary:   #1a2232;
    --text-secondary: #4a5a72;
    --text-muted:     #8a9ab5;

    --accent:       #2a5fa5;
    --accent-light: #4a7ec9;
    --accent-dim:   #2286b1a4;

    --green:        #2c5ca4;
    --green-stroke: #2c5ca4;

    --header-top-rule: 3px solid var(--accent);
    --header-border:   2px solid var(--accent);
    --shadow:          0 2px 16px rgba(42, 95, 165, 0.08);

    --logo-filter:     none;
    --logo40-filter:   none;

    --main-bg:          #b6bfc535;

    --movingtext-static: #4a5a72;  /* = --text-secondary; read by movingtextbox.refreshColor() */
    --h6color:          #747e8e;

    /* ── Glow (herowind.js title highlight) ──────────────────────
       Light-blue core + pale-blue outer so the halo reads clearly
       against the light grey background (#f4f6f8).               */
    --glow:             #66aaff;
    --glow-outer:       #aad4ff;

    /* ── Firewall / ember colours (firewall.js) ───────────────── */
    --fw-core:          #ffffff;
    --fw-mid:           #f4faff;
    --fw-warm:          #eaf4ff;
    --fw-ember-a:       #339df5;
    --fw-ember-b:       #508cdc;
    --fw-ember-c:       #78b4ff;
    --fw-ember-d:       #0fefde;
    --fw-veil-core:     0.20;
    --fw-veil-mid:      0.05;
    --logo-image: url("./img/STZlogo.png");
}

/* ══════════════════════════════════════════
   DARK THEME  ([data-theme="dark"])
   Fire safety: warm embers on near-black
   ══════════════════════════════════════════ */
[data-theme="dark"] {
    --btn-switch:   #1c0e53;
    --btn-disabled: #939cb7;
    --bg:           #0e0e0f;
    --bg-surface:   #161618;
    --bg-raised:    #1e1e21;
    --border:       #2a2a2e;
    --border-fine:  #3a3a3f;

    --text-primary:   #f0ebe3;
    --text-secondary: #9b9186;
    --text-muted:     #5a5750;

    --accent:       #e8511adc;
    --accent-light: #ff6b2b;
    --accent-dim:   #af6d1664;

    --green:        #e8511a;
    --green-stroke: #e8511a;

    --header-top-rule: 3px solid var(--accent-dim);
    --header-border:   1px solid var(--border);
    --shadow:          0 2px 20px rgba(0, 0, 0, 0.6);

    --logo-filter:     brightness(0.92) sepia(0.15);
    --logo40-filter:   brightness(0.85) sepia(0.2);

    --main-bg:          #45332833;

    --movingtext-static: #9b9186;  /* = --text-secondary; read by movingtextbox.refreshColor() */
    --h6color:          #474238;

    /* ── Glow (herowind.js title highlight) ── */
    --glow:             #e8521a;
    --glow-outer:       #ff9632;

    /* ── Firewall / ember colours (firewall.js) ── */
    --fw-core:          #e8521a;
    --fw-mid:           #c83c0a;
    --fw-warm:          #ff9632;
    --fw-ember-a:       #dc5014;
    --fw-ember-b:       #c83c0a;
    --fw-ember-c:       #f06e28;
    --fw-ember-d:       #ff9632;
    --fw-veil-core:     0.12;
    --fw-veil-mid:      0.06;
    --logo-image: url("./img/STZlogo.png");
}

/* ── RESET ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Blueprint grid — light only */
[data-theme="light"] body {
    background-image:
        linear-gradient(rgba(42, 95, 165, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 95, 165, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

[data-theme="dark"] body {
    background-image:
        linear-gradient(rgba(191, 95, 17, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(191, 95, 17, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}
/* ── CUSTOM CURSOR: suppress all native cursors while active ── */
.custom-cursor-active,
.custom-cursor-active * {
    cursor: none !important;
}

/* ── HEADER ── */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--bg-surface);
    border-bottom: var(--header-border);
    z-index: 1000;
    box-shadow: var(--shadow);
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.35s ease, opacity 0.3s ease,
                background-color 0.3s ease, border-color 0.3s ease;
}

.topbar.hidden {
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
}

/* ── BACK TO TOP ── */
.back-to-top {
    position: fixed;
    bottom: 10rem;
    right: 3rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg-surface);
    border: 1px solid var(--border-fine);
    font-size: 22px;
    line-height: 1;
    z-index: 900;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
    pointer-events: none;
    box-shadow: var(--shadow);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
}

/* ── BACK TO WORKS ── */
.back-to-works {
    position: fixed;
    top: 12rem;   /* overridden by JS on both desktop and mobile */
    left: 1.5rem;
    z-index: 1100;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--bg-surface);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: top 0.35s ease, background-color 0.2s ease, transform 0.2s ease;
}

.back-to-works:hover {
    background-color: var(--accent-light);
    transform: translateX(-2px);
}

.maincontainer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 100px;
    width: 100%;
    padding: 0px;
    background-color: var(--bg-surface);
    border-top: var(--header-top-rule);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.subheader {
    width: 100%;
    text-align: center;
    background-color: var(--bg-surface);
    color: var(--text-muted);
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 4px 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0px;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 48px;
    background-color: var(--bg-surface);
    transition: background-color 0.3s ease;
}

/* ── LOGO ── */
.logo-abs-wrap {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 10;
}

.logo-abs-wrap .logo {
    height: 100%;
    width: auto;
    display: block;
    padding: 10px;
    filter: var(--logo-filter);
    transition: filter 0.3s ease;
}

.logo-spacer {
    width: 0;   /* default: no space; header-inner overrides below */
}

/* Mobile-only logo40 in header — hidden on desktop (logo40 is shown via header-inner there) */
.logo40-abs-wrap {
    display: none;
}

/* In the nav row, spacer and logo-wrap each flex:1 → nav is perfectly centred */
.header-inner .logo-spacer {
    flex: 1;
}

.logo-wrap {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    margin: 0rem 2rem;
}
.logo-wrap-left {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin: 0rem 2rem;
}


.logo {
    height: 100px;
    padding-top: 10px;
    display: block;
    transition: transform 0.3s ease;
}


.logo-placeholder{
    width: 150px;
    height: 150px;
    margin-top: 1rem;
    margin-left: 1rem;
    background-image: var(--logo-image);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.logo-placeholder:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px var(--glow));
}

.logo40 {
    height: 48px;
    display: block;
    filter: var(--logo40-filter);
    transition: transform 0.3s ease, filter 0.3s ease;
}
.left-logo {
    justify-content: flex-start;
    height: 48px;
    display: block;
    filter: var(--logo40-filter);
    transition: transform 0.3s ease, filter 0.3s ease;
}
.left-logo:hover {
    transform: scale(1.5);
    filter: drop-shadow(0 0 8px var(--glow));
}

.left-logo-placeholder {
    width: 48px;
    height: 48px;
        background-image: var(--logo-image);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    transition: transform 0.3s ease, filter 0.3s ease;
}

.left-logo-placeholder:hover {
    transform: scale(1.5);
    filter: drop-shadow(0 0 8px var(--glow));
}

/* Clone of left-logo-placeholder injected into .topbar by components.js —
   hidden on desktop, shown/positioned in the mobile @media block. */
.left-logo-mobile {
    display: none;
}
.logo40:hover {
    transform: scale(1.5);
    filter: drop-shadow(0 0 8px var(--glow));
}

/* ── TITLE ── */
h1.STZ {
    font-family: "Raleway", sans-serif;
    font-size: 60px;
    padding-top: 10px;
    padding-bottom: 5px;
    color: var(--green);
    -webkit-text-stroke: 1px var(--green-stroke);
    text-align: center;
    transition: color 0.3s ease;
}

h1:not(.STZ) {
    font-family: "Raleway", sans-serif;
    color: var(--accent);
    font-style: normal;
    transition: color 0.3s ease;
}

/* ── NAV ── */
.nav { 
    flex: none; 
    margin:0rem 2rem;
}  

.menu {
    list-style: none;
    display: inline-flex;
    align-items: normal;
    gap: 32px;
}

.menu li a {
    display: inline-block;
    text-decoration: none;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s, transform 0.05s ease;
}

.menu li a:hover {
    color: var(--accent-light);
    border-bottom-color: var(--accent-light);
    transform: scale(1.1);
}

.menu li a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── LANGUAGE SWITCHER ── */
.lang-switcher {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 2px 4px;
    transition: color 0.2s;
}

.lang-btn:hover { color: var(--text-primary); }
.lang-btn.active { color: var(--accent); }

/* ── THEME SWITCHER — same formatting as lang switcher ── */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;          /* slightly larger for icons */
    line-height: 1;
    color: var(--btn-disabled);
    padding: 2px 4px;
    transition: color 0.2s, transform 0.15s ease;
}

.theme-btn:hover {
    color: var(--btn-switch);
    transform: scale(1.2);
}

.theme-btn.active { color: var(--accent); }

.lang-sep {
    font-size: 11px;
    color: var(--border-fine);
}

h6{
    padding-top: 50px;
    letter-spacing: 0.02em;
    color: var(--h6color);
}


/* ── INTRO BANNER ── */
.intro {
    background-image: url("./img/scala.png");
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
}

[data-theme="light"] .intro::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 34, 50, 0.10) 0%,
        rgba(42, 95, 165, 0.30) 100%
    );
    mix-blend-mode: multiply;
}

[data-theme="dark"] .intro::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(14, 14, 15, 0.15) 0%,
        rgba(14, 14, 15, 0.65) 100%
    );
}

/* ── HERO ── */
.hero {
    margin: 50px 80px 20px 80px;
    padding: 50px 50px;
    text-align: center;
    min-height: 0px;
    height: auto;
    overflow: hidden;
    background-color: var(--main-bg);
}

/* ── FLASHCARD (hero variant with tighter margins for list pages) ── */
.flashcard {
    margin: 100px 220px;
    padding: 20px 20px;
    text-align: center;
    min-height: 0px;
    height: auto;
    overflow: hidden;
    background-color: var(--main-bg);
}

/* Compact hero used for standalone page titles (no textimg layout inside) */
.hero.hero-title-only {
    padding: 10px 50px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.work-subtitle {
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-top: 8px;
}

/* --- STATS GRID --- */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-surface);
    gap: 8px;
    flex: 0 0 calc(25% - 15px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.1;
}

.stat-label {
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 10px  color-mix(in srgb, var(--glow) 25%, transparent),
        0 0 25px  color-mix(in srgb, var(--glow-outer) 15%, transparent);
}

/* Glow on the number (same logic as titles) */
.stat-card:hover .stat-value {
    text-shadow:
        0 0 8px   color-mix(in srgb, var(--glow) 85%, transparent),
        0 0 25px  color-mix(in srgb, var(--glow) 45%, transparent),
        0 0 60px  color-mix(in srgb, var(--glow-outer) 20%, transparent),
        0 0 100px color-mix(in srgb, var(--glow-outer) 10%, transparent);
}

/* ── PHOTO GALLERY ── */
.pg-gallery {
    width: 80%;
    margin: 0 auto;
    user-select: none;
}

/* Main viewer */
.pg-main {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
    border-radius: 4px;
    background: var(--bg-surface);
}

/* Slider track — absolutely-positioned slides sit inside it */
.pg-track {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
    will-change: transform;
}

/* Each full-size slide */
.pg-slide {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
}

.pg-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Navigation arrows */
.pg-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.pg-arrow:hover { background: rgba(0, 0, 0, 0.75); }
.pg-arrow--prev { left: 16px; }
.pg-arrow--next { right: 16px; }

/* Thumbnail strip — evenly distributed, scrollable when overflow */
.pg-thumbs {
    display: flex;
    height: 138px;
    margin-top: 9px;
    justify-content: space-evenly;
    align-items: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pg-thumbs::-webkit-scrollbar { display: none; }

/* Individual thumbnail — background-image set by JS */
.pg-thumb {
    flex: 1 1 0;
    max-width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid transparent;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

.pg-thumb:hover { opacity: 0.85; }

.pg-thumb.active {
    opacity: 1;
    border-color: var(--accent);
}

.hero h1,
.flashcard h1 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}
.hero h2,
.flashcard h2 {
    font-family: 'Playfair Display', serif;
    text-align: left;
    font-size: 32px;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
    padding-bottom: 20px;
}
.hero h2 span,
.hero h1 span,
.flashcard h2 span,
.flashcard h1 span {
    color: var(--accent);
    font-style: italic;
}

/* ── MOVING TEXT BOX (global default — hero, centred) ── */
.movingtextbox {
    position: relative;
    font-family: 'Raleway', sans-serif;
    padding: 0px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    color: var(--text-secondary);
    text-align: center;
    height: auto;
    width: 100%;
    user-select: none;
    --speed-max: 30;
    transition: color 0.3s ease;
    box-sizing: border-box;
}
.left {
    text-align: left !important;
    padding-bottom: 50px !important;
    margin-left: 20px;
    width: calc(100% - 20px);
}

/* ── JOIN US CTA ── */
.joinus-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.joinus-cta .movingtextbox {
    margin: 30px;

}

.joinus-email {
    font-family: 'Raleway', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.joinus-email:hover {
    transform: scale(1.2);
    text-shadow:
        0 0 8px   color-mix(in srgb, var(--glow) 85%, transparent),
        0 0 25px  color-mix(in srgb, var(--glow) 45%, transparent),
        0 0 60px  color-mix(in srgb, var(--glow-outer) 20%, transparent),
        0 0 100px color-mix(in srgb, var(--glow-outer) 10%, transparent);
}

/* ── CONTACT FORM ── */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-family: 'Raleway', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.form-field input,
.form-field textarea {
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 14px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-muted);
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.form-submit {
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--bg);
    background: var(--accent);
    border: none;
    border-radius: 4px;
    padding: 12px 40px;
    cursor: pointer;
    align-self: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.form-submit:hover {
    opacity: 0.85;
    transform: scale(1.04);
}

.form-success {
    text-align: center;
    font-family: 'Raleway', sans-serif;
    font-size: 18px;
    color: var(--text-secondary);
    padding: 20px 0;
}

.form-error {
    text-align: center;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    color: var(--accent);
    padding: 8px 0;
}

/* ══════════════════════════════════════════
   TEXTIMG LAYOUT
   macrodivision  → .textimg
   text column    → .divtext
   image column   → .divimg
   ══════════════════════════════════════════ */

/* Outer flex row — text left, image right (HTML source order) */
.textimg {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    padding: 10px 80px;
    width: 100%;
    box-sizing: border-box;
}

/* Image left, text right — specificity 0,2,0 overrides .textimg's flex-direction */
.textimg.textimg--reverse {
    flex-direction: row-reverse;
    padding: 10px 80px;
}

.textimg.textimg--reverse .divtext {
    align-items: flex-end;
}

.textimg.textimg--reverse .divtext .section-btn {
    align-self: flex-end;
}

.textimg.textimg--reverse .divtext .movingtextbox {
    text-align: right;
}

.textimg.textimg--reverse .divtext h2 {
    text-align: right;
}
/* Text starts at 2/3, image left */
.textimg-centerghost {
    display: flex;
    flex-direction: row;       /* image left, text right */
    align-items: flex-start;
    gap: 48px;
    padding: 20px 50px 20px 50px;
    width: 20%;
}


/* Text column */
.divtext {
    flex: 1 1 0;
    min-width: 0;       /* prevent flex child from blowing past its track */
    display: flex;
    margin: 10px 0;
    flex-direction: column;
    justify-content: center;
    align-self: center;
}

/* Image column */
.divimg {
    flex: 1 1 0;
    min-width: 0;
    max-width: 500px;
    margin: 10px 0;
    align-self: center;
    --divimg-min-height: 400px;
    --divimg-min-width:  400px;
}

.divimg img {
    width: 100%;
    height: var(--divimg-height, auto);
    min-height: var(--divimg-min-height, 200px);
    min-width:  var(--divimg-min-width,  120px);
    max-height: 700px;
    max-width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 4px;
}

.flashcard .divimg img {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* h1 inside text column: left-aligned */
.divtext h1 {
    text-align: left;
    font-size: clamp(22px, 3vw, 42px);
    margin-bottom: 20px;
}

/* h2 inside text column */
.divtext h2 {
    text-align: left;
    font-size: clamp(18px, 2.2vw, 32px);
    margin-bottom: 16px;
}
.section-btn-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

/* Placeholder shown in category flashcards that have no project image yet */
.img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 220px;
    background: linear-gradient(135deg, var(--bg-raised) 0%, var(--bg-surface) 100%);
    border-radius: 8px;
    border: 1px dashed var(--border);
}
.section-btn-wrap .section-btn{
    padding: 2rem 3rem;
    font-size: 20px;
}
/* Section CTA button */
.section-btn {
    display: inline-block;
    margin-top: 24px;
    align-self: flex-start;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 8px 20px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.section-btn:hover {
    background-color: var(--accent);
    color: var(--bg);
}

/* movingtextbox inside text column: left-aligned, width-safe */
.divtext .movingtextbox {
    text-align: left;
    width: 100%;
    padding-bottom: 20px;
    --overflow-pad: 150;  /* canvas has room for repelled words to escape */
}

/* Ghost overlay in text column: no padding so its content width matches the
   canvas layout width (getBoundingClientRect = full border-box). Adding any
   horizontal padding here would narrow the ghost's text area and cause it to
   wrap before the canvas does. */
.divtext p.movingtextbox .mtb-ghost {
    padding: 0;
    margin: 0;
    box-sizing: content-box;
}

/* List movingtextboxes: indented and spaced from preceding content */
.divtext .movingtextbox.lista {
    margin-left: 18px;
    margin-top: 10px;
    width: calc(100% - 18px);
}













/* ── FOOTER ── */
footer {
    padding: 20px;
    margin-top: 50px;
    background-color: var(--bg-surface);
    border-top: var(--header-border);
    font-family: Arial, Helvetica, sans-serif;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left,
.footer-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.footer-left  { justify-content: flex-start; }
.footer-right { justify-content: flex-end; }

.footer-center {
    flex: 2;
    text-align: center;
}

.logo-footer,
.logo40-footer {
    height: 100%;
    max-height: 150px;
    width: auto;
    filter: var(--logo-filter);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-footer:hover,
.logo40-footer:hover {
    filter: drop-shadow(0 0 5px var(--accent-dim));
    transform: scale(1.05);
}
.logo-footer-placeholder {
    width: 150px;
    height: 150px;

    background-image: var(--logo-image);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    transition: transform 0.3s ease, filter 0.3s ease;
}
.logo-footer-placeholder:hover {
    filter: drop-shadow(0 0 5px var(--accent-dim));
    transform: scale(1.05);
}
footer h4 {
    font-family: "Raleway", sans-serif;
    font-size: 30px;
    color: var(--accent);
    -webkit-text-stroke: 0.5px var(--accent-dim);
    padding-bottom: 10px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    text-shadow: 0 0 18px var(--glow), 0 0 40px var(--accent-dim);
}

footer h5 {
    padding-bottom: 10px;
    color: var(--text-secondary);
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    transition: color 0.3s ease;
}

/* ══════════════════════════════════════════
   SIDE NAV (gw-nav) — used on greatworks and category pages
   ══════════════════════════════════════════ */
.gw-nav {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.gw-nav-toggle {
    width: 28px;
    min-height: 56px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 6px 6px 0;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    padding: 0;
    writing-mode: vertical-lr;
    letter-spacing: 0.08em;
}

.gw-nav-toggle:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.gw-nav-panel {
    max-width: 0;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 6px 6px 0;
    transition: max-width 0.3s ease;
    display: flex;
    align-items: center;
}

.gw-nav.open .gw-nav-panel {
    max-width: 400px;  /* wide enough for any project name */
}

.gw-nav-list {
    list-style: none;
    margin: 0;
    padding: 12px 0;
    min-width: 200px;
    flex-shrink: 0;
    white-space: nowrap;
}

.gw-nav-list li a {
    display: block;
    padding: 10px 20px;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s, padding-left 0.2s;
    letter-spacing: 0.04em;
}

.gw-nav-list li a:hover,
.gw-nav-list li a.active {
    color: var(--accent);
    padding-left: 28px;
}

.gw-nav-list li + li {
    border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════
   WORKS SEARCH BAR
   Fixed below the topbar; appears on category and greatworks pages.
   ══════════════════════════════════════════ */
.works-searchbar {
    position: fixed;
    top: var(--topbar-h, 90px); /* updated by JS on header show/hide */
    left: 50%;
    transform: translateX(-50%);
    z-index: 190;
    width: 480px;
    max-width: calc(100vw - 4rem);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: top 0.35s ease;
}

.works-searchbar input[type="search"] {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a9ab5' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 14px center;
    border: none;
    outline: none;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.works-searchbar input[type="search"]::-webkit-search-cancel-button { display: none; }

.works-search-results {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
}

.works-search-results.visible {
    max-height: 260px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}

.works-search-results li a {
    display: block;
    padding: 9px 16px 9px 40px;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.works-search-results li a:hover {
    background: var(--bg-raised);
    color: var(--accent);
}

.works-search-results li + li {
    border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════
   MOBILE SEARCH – floating button + overlay
   Hidden on desktop; shown only in mobile @media.
   ══════════════════════════════════════════ */
.works-search-btn {
    display: none; /* shown in mobile @media */
    position: fixed;
    bottom: 24px;
    left: 16px;
    z-index: 300;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.works-search-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}
.works-search-btn svg { pointer-events: none; }

.works-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}
.works-search-overlay.active {
    display: flex;
}

.works-search-modal {
    width: calc(100% - 3rem);
    max-width: 480px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.works-search-modal-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.works-search-modal-input-wrap svg {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    flex-shrink: 0;
    pointer-events: none;
}
.works-search-modal-input-wrap input[type="search"] {
    width: 100%;
    padding: 14px 16px 14px 40px;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.works-search-modal-input-wrap input[type="search"]::-webkit-search-cancel-button { display: none; }

.works-search-modal .works-search-results.visible {
    max-height: 320px;
    border-top: 1px solid var(--border);
}
.works-search-modal .works-search-results li a {
    padding: 11px 16px 11px 40px;
    font-size: 14px;
}

/* ══════════════════════════════════════════
   GLOBAL OVERFLOW GUARD
   ══════════════════════════════════════════ */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ══════════════════════════════════════════
   MOBILE-ONLY ELEMENTS — hidden on desktop
   ══════════════════════════════════════════ */
.mobile-nav-row,
.hamburger,
.mobile-drawer,
.drawer-overlay {
    display: none;
}

/* ══════════════════════════════════════════
   RESPONSIVE — portrait (width < height)
   ══════════════════════════════════════════ */
@media (max-aspect-ratio: 1/1) {
@media (hover: none), (pointer: coarse) {
    #cursor-canvas, .cursor, .cursor-dot { display: none !important; }
}
    /* Header: keep fixed on mobile, same behaviour as desktop.
       scroll.js already handles hide-on-scroll-down and
       reappear-on-scroll-up, so no overrides needed here. */

    /* Back-to-top is a desktop-only control */
    .back-to-top { display: none; }

    /* Hard stop on overflow */
    *, *::before, *::after {
        box-sizing: border-box;
        max-width: 100%;
    }

    /* ── DESKTOP NAV ROW: hide ── */
    .header-inner {
        display: none;
    }

    /* ── SUBHEADER: compact strip below title row ── */
    .subheader {
        display: block;
        font-size: 9px;
        letter-spacing: 0.14em;
        padding: 3px 0;
    }

    /* ── TITLE ROW ── */
    .maincontainer {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 6px 12% 4px;   /* % keeps it proportional, leaves room for abs logo */
        gap: 4px;
        overflow: hidden;
    }

    /* Hide theme/lang switchers in the title row — they live in the hamburger drawer on mobile */
    .maincontainer .theme-switcher,
    .maincontainer .lang-switcher {
        display: none;
    }

    h1.STZ {
        order: 1;
        font-size: clamp(14px, 5vw, 26px);
        width: 100%;
        text-align: center;
        padding: 6px 0 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Shrink absolute logo */
    .logo-abs-wrap .logo {
        max-height: 6vh;
        min-height: 32px;
    }
    
    .logo40-abs-wrap { pointer-events: none; }
    .logo40-abs-wrap .logo40,
    .logo40-abs-wrap a { pointer-events: auto; }

    /* Show logo40 on the right side of the header, mirroring the STZ logo on the left */
    .logo40-abs-wrap {
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        z-index: 10;
    }
    .logo40-abs-wrap .logo40 {
        height: 100%;
        width: auto;
        display: block;
        padding: 10px;
        max-height: 6vh;
        min-height: 32px;
    }


    /* Replace the big logo-placeholder with the compact left-logo version
       (the .left-logo-mobile div inside .logo-abs-wrap in header.html).
       !important defends against inline styles / later overrides. */
    .logo-placeholder { display: none !important; }

    .left-logo-mobile {
        display: block;
        width:  max(32px, 6vh);
        height: max(32px, 6vh);
        margin: 10px;
    }

    /* Both absolute logo anchors span the topbar's full height, stealing
       taps from the menu row beneath — make the wrappers tap-transparent,
       keep only the visible logos clickable. */
    .logo-abs-wrap,
    .logo40-abs-wrap { pointer-events: none; }
    .logo-abs-wrap .left-logo-mobile,
    .logo40-abs-wrap .logo40 { pointer-events: auto; }

    .logo-spacer {
        display: none;
    }

    /* ── MOBILE NAV ROW ── */
    .mobile-nav-row {
        display: block;
        width: 100%;
        overflow: hidden;
        background-color: var(--bg-surface);
        border-top: 1px solid var(--border);
    }

    .mobile-menu-inline {
        list-style: none;
        display: flex;
        flex-direction: row;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .mobile-menu-inline li {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        /* overflow: hidden;   /* removed to allow text wrapping */
    }

    .mobile-menu-inline li a {
        display: block;     /* block required for text-overflow: ellipsis */
        text-decoration: none;
        font-family: 'Raleway', sans-serif;
        font-size: 6px;
        font-weight: 600;
        letter-spacing: 0;
        text-transform: uppercase;
        color: var(--text-secondary);
        padding: 9px 0px; 
        border-bottom: 2px solid transparent;
        white-space: normal;  /* allow wrapping */
        /* overflow: hidden; */
        /* text-overflow: ellipsis; */
        text-align: center;
        transition: color 0.2s, border-color 0.2s;
    }

    .mobile-menu-inline li a:hover,
    .mobile-menu-inline li a.active {
        color: var(--accent);
        border-bottom-color: var(--accent);
    }

    /* ── INTRO ── */
    .intro {
        height: 30vw;
        min-height: 120px;
        max-height: 220px;
    }

    /* ── HERO ── */
    .hero {
        margin: 4% 0;
        padding: 5% 5%;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* ── FLASHCARD (same reset as hero on mobile) ── */
    .flashcard {
        margin: 10px 0;
        padding: 5% 5%;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .hero h1,
    .flashcard h1 {
        font-size: clamp(18px, 5.5vw, 32px);
        word-break: break-word;
        letter-spacing: 0.02em;
    }

    .hero h2,
    .flashcard h2 {
        font-size: clamp(15px, 4.5vw, 26px);
        padding-bottom: 12px;
        word-break: break-word;
        letter-spacing: 0.02em;
    }

    .left {
        margin-left: 0;
        width: 100%;
        padding-bottom: 24px !important;
    }

    /* ── MOVINGTEXTBOX ──
       Must have explicit width so canvas layout matches visible area.
       position:relative on the element is set by JS — we only need
       to ensure it fills its container correctly.
       --overflow-pad: 0 on mobile: no mouse-repel means words never leave
       the element bounds, so zero canvas bleed is safe and avoids the
       canvas overflowing past the viewport edge (which, combined with
       overflow-x:hidden on body, caused asymmetric clipping and a
       visible left-shift of the rendered text). */
    .movingtextbox {
        font-size: clamp(12px, 3.5vw, 16px);
        line-height: 1.5;
        width: 100%;
        text-align: center;
        padding-bottom: 5%;
        --overflow-pad: 0;
    }

    /* Inside .divtext the movingtextbox must stay left-aligned even on mobile */
    .divtext .movingtextbox {
        text-align: left;
        padding-bottom: 20px;
        --overflow-pad: 0;
    }

    /* List movingtextboxes: remove asymmetric margins in mobile */
    .divtext .movingtextbox.lista {
        margin-left: 0;
        width: 100%;
    }

    /* Homepage sections: centre the movingtextbox inside textimg columns */
    .textimg .divtext .movingtextbox {
        text-align: center;
    }

    /* ── TEXTIMG LAYOUT (mobile: stack vertically, image on top) ── */
    .textimg,
    .textimg.textimg--reverse {
        flex-direction: column;
        padding: 20px 0;
        gap: 16px;
    }

    /* Reset reverse-specific alignment overrides on mobile */
    .textimg.textimg--reverse .divtext {
        align-items: center;
    }

    .textimg.textimg--reverse .divtext h2,
    .textimg.textimg--reverse .divtext .movingtextbox {
        text-align: center;
    }

    .textimg.textimg--reverse .divtext .section-btn {
        align-self: center;
    }

    /* Put image first regardless of HTML source order */
    .divimg {
        order: -1;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    /* Override JS-driven height sync — 4:3 crop at 80% width on mobile */
    .divimg img {
        width: 80%;
        max-width: 80%;
        min-width: 0;
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        display: block;
        margin: 0 auto;
    }

    .divtext h2 {
        text-align: center;
    }

    /* Only show the first image when a section has multiple .divimg blocks */
    .textimg .divimg ~ .divimg {
        display: none;
    }

    /* Centre the CTA button in stacked layout */
    .section-btn {
        align-self: center;
    }

    /* Stack back-buttons vertically, equal width, centred */
    .section-btn-wrap {
        flex-direction: column;
        align-items: center;
        width: fit-content;
        max-width: 90vw;
        margin-left: auto;
        margin-right: auto;
    }
    .section-btn-wrap .section-btn {
        padding: 0.75rem 1.5rem;
        font-size: 15px;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .divtext {
        width: 100%;
        order: 0;
        margin: 10px 30px;
    }

    .divtext h1 {
        font-size: clamp(18px, 5.5vw, 28px);
        letter-spacing: 0.02em;
        margin-bottom: 12px;
        text-align: center;
    }

    .divtext h2 {
        font-size: clamp(15px, 4.5vw, 24px);
        letter-spacing: 0.02em;
        padding-bottom: 10px;
        text-align: center;
    }

    /* Stats grid: 2 columns on mobile */
    .stats-grid {
        gap: 12px;
    }

    .stat-card {
        flex: 0 0 calc(50% - 6px);
    }

    /* Gallery: full width on mobile, smaller thumbs */
    .pg-gallery {
        width: 100%;
    }

    .pg-thumb {
        max-width: 80px;
        height: 80px;
    }

    .pg-thumbs {
        height: 98px;
    }

    .stat-card {
        padding: 20px 10px;
    }

    .stat-value {
        font-size: 22px;
    }

    .work-subtitle {
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    /* ── FOOTER ── */
    .footer-inner {
        flex-direction: column;
        align-items: center;
        gap: 4%;
        text-align: center;
    }

    .footer-left,
    .footer-right {
        justify-content: center;
        flex: none;
        width: 100%;
    }

    .footer-center {
        flex: none;
        width: 100%;
    }

    .logo-footer  { max-height: 10vw; min-height: 48px; }
    .logo40-footer { max-height: 8vw; min-height: 40px; }

    footer h4 { font-size: clamp(16px, 4.5vw, 24px); }
    footer h5 { font-size: clamp(11px, 3vw, 14px); }

    /* ══════════════════════════════════════
       HAMBURGER BUTTON
       Fixed top-right, always on top
       ══════════════════════════════════════ */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: stretch;
        position: fixed;
        top: calc(var(--topbar-h, 90px) + 6px);
        right: 12px;
        width: 38px;
        height: 30px;
        padding: 6px 5px;
        background-color: var(--bg-surface);
        border: 1px solid var(--border);
        border-radius: 6px;
        cursor: pointer;
        z-index: 9999;
        box-shadow: 0 2px 8px rgba(0,0,0,0.25);
        transition: top 0.35s ease, background-color 0.2s, border-color 0.2s;
    }
    .hamburger:hover {
        transform: background-color var(--btn-switch), border-color var(--accent);
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: transform 0.25s ease, opacity 0.2s ease;
        transform-origin: center;
    }

    .hamburger.active {
        opacity: 0;
        pointer-events: none;
        transition: top 0.35s ease, background-color 0.2s, border-color 0.2s, opacity 0.15s ease;
    }

    .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* ══════════════════════════════════════
       OVERLAY
       ══════════════════════════════════════ */
    .drawer-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 10000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .drawer-overlay.open {
        opacity: 1;
        pointer-events: all;
    }

    /* ══════════════════════════════════════
       DRAWER
       ══════════════════════════════════════ */
    .mobile-drawer {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        width: min(80%, 280px);
        height: 100dvh;
        background: var(--bg-surface);
        border-left: 1px solid var(--border);
        z-index: 10001;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -4px 0 24px rgba(0,0,0,0.35);
    }

    .mobile-drawer.open {
        transform: translateX(0);
    }

    .mobile-drawer-inner {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        padding: 4%;
        gap: 5%;
        overflow-y: auto;
        box-sizing: border-box;
    }

    /* Drawer top: switchers + close */
    .mobile-drawer-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 4%;
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
    }

    .mobile-switchers {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-wrap: wrap;
    }

    .drawer-close {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 18px;
        color: var(--text-muted);
        padding: 4px 6px;
        transition: color 0.2s;
        line-height: 1;
        flex-shrink: 0;
    }
    .drawer-close:hover { color: var(--accent); }

    /* Drawer nav links */
    .mobile-menu-drawer {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 0;
        margin: 0;
    }

    .mobile-menu-drawer li a {
        display: block;
        text-decoration: none;
        font-family: 'Raleway', sans-serif;
        font-size: clamp(11px, 3.5vw, 14px);
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--text-secondary);
        padding: 3% 3%;
        border-bottom: 1px solid var(--border);
        border-radius: 4px;
        transition: color 0.2s, background-color 0.2s, padding-left 0.15s;
    }

    .mobile-menu-drawer li a:hover,
    .mobile-menu-drawer li a.active {
        color: var(--accent);
        background-color: var(--bg-raised);
        padding-left: 6%;
    }

    /* logos pinned to drawer bottom */
    .mobile-logo40-wrap {
        margin-top: auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 16px;
        padding-top: 4%;
        border-top: 1px solid var(--border);
        flex-shrink: 0;
    }

    .mobile-stzlogo {
        height: 10vw;
        min-height: 36px;
        max-height: 56px;
        width: auto;
        transition: transform 0.3s;
    }

    .mobile-stzlogo:hover {
        transform: scale(1.1);
    }

    .mobile-logo40 {
        height: 10vw;
        min-height: 36px;
        max-height: 56px;
        width: auto;
        filter: var(--logo40-filter);
        transition: filter 0.3s, transform 0.3s;
    }

    .mobile-logo40:hover {
        transform: scale(1.1);
        filter: drop-shadow(0 0 6px var(--glow));
    }

    /* ── GW-NAV: mobile bottom-left below header ── */
    .gw-nav {
        display: flex;
        position: fixed;
        top: calc(var(--topbar-h, 90px) + 6px);
        left: 12px;
        right: auto;
        bottom: auto;
        transform: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        z-index: 200;
        transition: top 0.35s ease;
    }
    .gw-nav-toggle {
        width: auto;
        min-height: 32px;
        height: 32px;
        padding: 0 14px;
        border-radius: 20px;
        border: 1px solid var(--border);
        background: var(--bg-surface);
        color: var(--text-primary);
        font-family: 'Raleway', sans-serif;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.08em;
        writing-mode: horizontal-tb;
        white-space: nowrap;
        box-shadow: 0 2px 8px rgba(0,0,0,0.25);
        transition: top 0.35s ease, background-color 0.2s, border-color 0.2s;
    }
    .gw-nav-toggle:hover,
    .gw-nav.open .gw-nav-toggle {
        background: var(--accent);
        color: var(--bg);
        border-color: var(--accent);
    }
    .gw-nav-panel {
        width: max-content;
        min-width: 200px;
        max-width: calc(100vw - 2rem);
        max-height: 0;
        overflow: hidden;
        border-radius: 8px;
        border: 1px solid var(--border);
        transition: max-height 0.3s ease;
    }
    .gw-nav.open .gw-nav-panel {
        max-height: 400px;
    }

    /* ── Search: hide desktop bar, show floating button on mobile ── */
    .works-searchbar {
        display: none;
    }

    .works-search-btn {
        display: flex;
    }

    /* ── Extra top padding on first section to clear floating buttons ── */
    body.has-back-btn > main.page-title-hero {
        margin-top: calc(8% + 56px);
    }

    /* ── Hide back-to-works when drawer is open ── */
    body.drawer-open .back-to-works {
        display: none;
    }

}
