/*
Theme Name: Mallen Services App
Theme URI: https://mallen.com.au
Author: Mallen Services
Author URI: https://mallen.com.au
Description: Minimal app-style theme for the Mallen Services calculator subdomain. Strips default WordPress chrome and provides only the essential brand frame: logo header linking back to the marketing site, and a slim footer with legal info and cross-links. Designed to host the Mallen Rate Calculator plugin's shortcodes.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: mallen-app
Tags: business, custom-colors, custom-logo, minimal, one-column
*/

/* ============================================================
   Design tokens — match v6.2.8 of the static site exactly
   ============================================================ */
:root {
    --indigo:        #4B0082;
    --indigo-deep:   #2A0049;
    --orange:        #FF4500;
    --orange-warm:   #E63E00;
    --charcoal:      #2B2B2B;
    --charcoal-soft: #3A3A3A;
    --cream:         #FBFAF7;
    --cream-warm:    #F4EFE6;
    --line:          rgba(43, 43, 43, 0.12);
    --line-dark:     rgba(251, 250, 247, 0.14);

    --f-display: 'Fraunces', Georgia, serif;
    --f-body:    'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
    --f-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

    --logo-outline:  #F1F1F1;
    --logo-mallen:   var(--indigo);
    --logo-services: var(--orange);
    --logo-cursor:   #FFFFFF;
}

/* ============================================================
   Reset and base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--charcoal);
    font-family: var(--f-body);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a { color: var(--indigo); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--orange); }

h1, h2, h3, h4 {
    font-family: var(--f-display);
    color: var(--charcoal);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 0.5em;
}

/* ============================================================
   Header — logo bar
   ============================================================ */
.app-header {
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 18px 32px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(251, 250, 247, 0.92);
}

.app-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.app-header-logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.app-header-logo svg {
    height: 40px;
    width: auto;
    display: block;
}

.app-header-logo:hover { color: inherit; }

/* Visual tweak: the SVG logo's outline pieces (M, S strokes) are very pale on light bg.
   Hide outline strokes on the header to make logo cleaner against cream. */
.app-header-logo .logo-outline { fill: transparent !important; }

.app-header-nav {
    display: flex;
    gap: 28px;
    align-items: center;
    font-family: var(--f-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.app-header-nav a {
    color: var(--charcoal-soft);
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.app-header-nav a:hover {
    color: var(--indigo);
    border-bottom-color: var(--indigo);
}

/* Current site — non-link span identifying which property the visitor is on.
   Same treatment used in mallen-blog and mallen-learn: indigo text, slight
   weight, 2px orange underline. Inherits font-family / size / letter-spacing
   from .app-header-nav so it sits naturally with sibling links. */
.app-header-nav .nav-current {
    color: var(--indigo);
    font-weight: 600;
    border-bottom: 2px solid var(--orange);
    padding-bottom: 4px;
}

.app-header-nav .ext-arrow {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    transform: translateY(-1px);
}

/* ============================================================
   Main content area
   ============================================================ */
.app-main {
    flex: 1 0 auto;
    padding: 0;
}

.app-main-inner {
    max-width: 1280px;
    margin: 0 auto;
}

/* When a page has no content yet (e.g. just a shortcode), the .app-main-inner
   shouldn't add stray padding — let the shortcode own its layout. */
.app-page-content {
    padding: 0;
}

/* For pages that DO have prose content (privacy text, etc), give them
   a sensible reading column. */
.app-page-prose {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 32px;
}

.app-page-prose h1 {
    font-size: 2.4rem;
    color: var(--indigo);
    margin-bottom: 0.3em;
}

.app-page-prose h2 {
    font-size: 1.6rem;
    color: var(--indigo);
    margin-top: 2em;
}

.app-page-prose p {
    margin: 0 0 1.2em;
}

/* ============================================================
   Footer
   ============================================================ */
.app-footer {
    background: var(--charcoal);
    color: var(--cream);
    padding: 32px;
    margin-top: auto;
}

.app-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

.app-footer-legal {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(251, 250, 247, 0.78);
}

.app-footer-legal .legal-line {
    display: block;
}

.app-footer-legal .legal-creds {
    display: block;
    color: rgba(251, 250, 247, 0.55);
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

.app-footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 13px;
}

.app-footer-links a {
    color: rgba(251, 250, 247, 0.78);
    transition: color 0.2s ease;
}

.app-footer-links a:hover {
    color: var(--orange);
}

/* ============================================================
   Mobile hamburger + drawer (v1.1.0)
   Pattern matches the static site's v6.7.x mobile menu. The desktop
   nav hides at <=900px; the hamburger button appears in its place
   and opens a full-screen overlay drawer with the same cross-property
   menu items + a "Get in touch" CTA.
   ============================================================ */

/* Hamburger button — hidden on desktop, shown at <=900px */
.app-header-hamburger {
    display: none;
    background: var(--charcoal);
    color: var(--cream);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}
.app-header-hamburger:hover { background: var(--indigo); }
.app-header-hamburger svg { width: 18px; height: 18px; }

/* Hide desktop nav, show hamburger at <=900px */
@media (max-width: 900px) {
    .app-header-nav { display: none; }
    .app-header-hamburger { display: inline-flex; }
}

/* Full-screen overlay drawer */
.app-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--charcoal);
    color: var(--cream);
    display: none;
    flex-direction: column;
    padding: 80px 32px 40px;
    overflow-y: auto;
}
.app-mobile-menu.open { display: flex; }

.app-mobile-menu-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: rgba(251, 250, 247, 0.08);
    color: var(--cream);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}
.app-mobile-menu-close:hover { background: rgba(251, 250, 247, 0.15); }
.app-mobile-menu-close svg { width: 18px; height: 18px; }

.app-mobile-menu-title {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(251, 250, 247, 0.5);
    margin-bottom: 24px;
}

.app-mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}
.app-mobile-menu-list li { margin: 0; padding: 0; }
.app-mobile-menu-list a {
    display: flex;
    align-items: baseline;
    gap: 16px;
    color: var(--cream);
    text-decoration: none;
    font-family: var(--f-display);
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    padding: 14px 0;
    border-bottom: 1px solid rgba(251, 250, 247, 0.12);
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.app-mobile-menu-list a:hover { color: var(--orange); padding-left: 8px; }
.app-mobile-menu-list a .num,
.app-mobile-menu-list .nav-current .num {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    opacity: 0.5;
    width: 28px;
    flex-shrink: 0;
}

/* Current page indicator: same shape as a link, but orange and not clickable. */
.app-mobile-menu-list .nav-current {
    display: flex;
    align-items: baseline;
    gap: 16px;
    color: var(--orange);
    font-family: var(--f-display);
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    padding: 14px 0;
    border-bottom: 1px solid rgba(251, 250, 247, 0.12);
    cursor: default;
}
.app-mobile-menu-list .nav-current .num {
    opacity: 0.7;
    color: var(--orange);
}

/* CTA below the menu list */
.app-mobile-menu-cta {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.app-mobile-menu-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--orange);
    color: var(--cream);
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 4px;
    font-family: var(--f-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background 0.2s ease;
}
.app-mobile-menu-cta .btn-primary:hover { background: var(--indigo); }

/* Lock body scroll when drawer is open */
body.app-mobile-menu-open { overflow: hidden; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
    .app-header { padding: 14px 18px; }
    .app-header-logo svg { height: 32px; }
    .app-header-nav {
        gap: 14px;
        font-size: 11px;
    }
    .app-footer { padding: 24px 18px; }
    .app-footer-inner {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .app-footer-links {
        gap: 14px 18px;
    }
}

@media (max-width: 480px) {
    .app-header-nav .ext-label-long {
        display: none;
    }
}

/* ============================================================
   WordPress admin bar offset (only for logged-in users)
   ============================================================ */
.admin-bar .app-header { top: 32px; }
@media (max-width: 782px) {
    .admin-bar .app-header { top: 46px; }
}

/* ============================================================
   Accessibility
   ============================================================ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--indigo);
    color: var(--cream);
    padding: 8px 16px;
    text-decoration: none;
    font-family: var(--f-mono);
    font-size: 12px;
    z-index: 1000;
}

.skip-link:focus {
    left: 8px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =============================================================
   Calculator gate (anonymous) — styles for the rich CTA shown
   when an unauthenticated visitor lands on a page containing
   [mallen_calculator]. Markup lives in the plugin shortcode
   (Mallen_RC_Shortcodes::render_unauth_gate); these styles
   make it match the design language of mallen.com.au's
   homepage `.calc-cta` section.
   ============================================================= */
.mallen-rc-gate {
    padding: 60px 24px 80px;
    background: var(--mallen-cream-warm, #F4EFE6);
    border-radius: 12px;
    margin: 24px 0 40px;
}

.mallen-rc-gate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px;
}

@media (max-width: 820px) {
    .mallen-rc-gate { padding: 36px 16px 50px; }
    .mallen-rc-gate-grid { grid-template-columns: 1fr; gap: 32px; padding: 0; }
}

/* --- Left column: copy + CTA --------------------------------- */
.mallen-rc-gate-eyebrow {
    display: inline-block;
    font-family: var(--mallen-f-mono, ui-monospace, monospace);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mallen-orange, #FF4500);
    margin-bottom: 12px;
}

.mallen-rc-gate-title {
    font-family: var(--mallen-f-display, Georgia, serif);
    font-weight: 400;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--mallen-charcoal, #2B2B2B);
    margin: 0 0 20px;
    max-width: 16ch;
}
.mallen-rc-gate-title em {
    font-style: italic;
    color: var(--mallen-indigo, #4B0082);
}

.mallen-rc-gate-lede,
.mallen-rc-gate-body {
    font-family: var(--mallen-f-body, sans-serif);
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--mallen-charcoal-soft, #3A3A3A);
    max-width: 44ch;
    margin: 0 0 18px;
}

.mallen-rc-gate-body code {
    font-family: var(--mallen-f-mono, ui-monospace, monospace);
    font-size: 0.92em;
    background: rgba(75, 0, 130, 0.07);
    color: var(--mallen-indigo, #4B0082);
    padding: 1px 6px;
    border-radius: 3px;
}

.mallen-rc-gate-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 13px 22px;
    font-family: var(--mallen-f-body, sans-serif);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--mallen-cream, #FBFAF7);
    background: var(--mallen-indigo, #4B0082);
    text-decoration: none;
    border-radius: 100px;
    transition: background 0.15s ease, transform 0.18s ease;
}

.mallen-rc-gate-cta:hover,
.mallen-rc-gate-cta:focus {
    background: var(--mallen-orange, #FF4500);
    color: var(--mallen-cream, #FBFAF7);
    transform: translateY(-1px);
}

.mallen-rc-gate-cta .arrow {
    transition: transform 0.18s ease;
}
.mallen-rc-gate-cta:hover .arrow {
    transform: translateX(3px);
}

/* --- Right column: dark mockup with lock overlay ------------- */
.mallen-rc-gate-visual {
    position: relative;
    background: var(--mallen-charcoal, #2B2B2B);
    color: var(--mallen-cream, #FBFAF7);
    border-radius: 14px;
    padding: 30px 32px;
    font-family: var(--mallen-f-mono, ui-monospace, monospace);
    font-size: 0.82rem;
    box-shadow: 0 26px 50px -18px rgba(43, 43, 43, 0.32);
    transform: rotate(-1deg);
    transition: transform 0.5s ease;
}

.mallen-rc-gate-visual:hover {
    transform: rotate(0deg);
}

.mallen-rc-gate-visual-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(251, 250, 247, 0.14);
    opacity: 0.78;
}

.mallen-rc-gate-visual-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--mallen-orange, #FF4500);
}
.mallen-rc-gate-visual-live::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mallen-orange, #FF4500);
    animation: mallen-rc-gate-pulse 1.8s infinite;
}
@keyframes mallen-rc-gate-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* Lock overlay button — sits centred over the mockup */
.mallen-rc-gate-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background: rgba(43, 43, 43, 0.92);
    border: 1px solid var(--mallen-orange, #FF4500);
    border-radius: 100px;
    font-family: var(--mallen-f-body, sans-serif);
    font-size: 0.78rem;
    color: var(--mallen-orange, #FF4500);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    box-shadow: 0 0 0 6px rgba(43, 43, 43, 0.4);
    transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease;
}

.mallen-rc-gate-lock:hover,
.mallen-rc-gate-lock:focus {
    background: var(--mallen-orange, #FF4500);
    color: var(--mallen-cream, #FBFAF7);
    transform: translate(-50%, -50%) scale(1.04);
}

.mallen-rc-gate-lock svg {
    width: 14px;
    height: 14px;
}

/* Skeleton rows below the lock */
.mallen-rc-gate-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(251, 250, 247, 0.10);
}
.mallen-rc-gate-row:last-of-type {
    border-bottom: none;
}
.mallen-rc-gate-row .label {
    opacity: 0.85;
}

/* Animated shimmer placeholder */
.mallen-rc-gate-visual .skel {
    display: inline-block;
    height: 10px;
    background: linear-gradient(90deg,
        rgba(255, 69, 0, 0.30) 0%,
        rgba(255, 69, 0, 0.60) 50%,
        rgba(255, 69, 0, 0.30) 100%);
    background-size: 200% 100%;
    border-radius: 3px;
    opacity: 0.7;
    animation: mallen-rc-gate-shimmer 2.2s linear infinite;
}
.mallen-rc-gate-visual .skel.w-sm { width: 48px; }
.mallen-rc-gate-visual .skel.w-md { width: 60px; }
.mallen-rc-gate-visual .skel.w-lg { width: 72px; }
.mallen-rc-gate-visual .skel.w-xl { width: 120px; height: 22px; }
@keyframes mallen-rc-gate-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.mallen-rc-gate-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 2px solid var(--mallen-orange, #FF4500);
}
.mallen-rc-gate-total .t-label {
    font-size: 0.95rem;
    opacity: 0.85;
}

.mallen-rc-gate-note {
    margin-top: 16px;
    font-size: 0.7rem;
    text-align: center;
    letter-spacing: 0.08em;
    opacity: 0.55;
}

/* Reduced-motion users get a static version */
@media (prefers-reduced-motion: reduce) {
    .mallen-rc-gate-visual { transform: none; }
    .mallen-rc-gate-visual-live::before { animation: none; }
    .mallen-rc-gate-visual .skel { animation: none; }
}

/* ============================================================
   v1.2.0 — STATIC-SITE NAV + FOOTER PARITY
   ============================================================
   Replaces the pre-v1.2.0 `.app-header` + `.app-footer` markup with the
   `nav.top` / `<footer class="on-dark">` patterns from the static site
   (mallen.com.au styles.css v6.7.18+). Same self-contained block as the
   blog theme's v0.8.x copy. The legacy `.app-header*` / `.app-mobile-menu*`
   rules above are now dormant (no corresponding markup in header.php /
   footer.php) and can be pruned in a future release.
   ============================================================ */

/* Skip link for keyboard / screen-reader users */
.skip-link.screen-reader-text {
    position: absolute;
    left: -9999px;
    top: -9999px;
    overflow: hidden;
}
.skip-link.screen-reader-text:focus {
    left: 16px;
    top: 16px;
    z-index: 100;
    background: var(--charcoal);
    color: var(--cream);
    padding: 10px 14px;
    border-radius: 4px;
}

/* Logo colour overrides on dark surfaces (the footer) */
.on-dark {
    --logo-outline: rgba(251, 250, 247, 0.25);
    --logo-mallen: var(--cream);
    --logo-services: var(--orange);
    --logo-cursor: var(--cream);
}

/* Standard horizontal container — matches static-site .wrap */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .wrap { padding: 0 22px; } }

/* Main content wrapper — padding-top clears the fixed nav. */
.calc-main { padding: 96px 0 80px; min-height: calc(100vh - 200px); }
@media (max-width: 720px) { .calc-main { padding: 110px 0 60px; } }

/* ===== Top nav — transparent over content, cream blur on scroll ===== */
nav.top {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    padding: 18px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.3s ease;
}
nav.top.scrolled {
    background: rgba(251, 250, 247, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 12px 32px;
}
nav.top .brand { text-decoration: none; display: flex; align-items: center; }
/* width:auto overrides the explicit width="737.28px" attribute on
   mallen_logo.svg so the SVG scales proportionally from height. Without
   this, the logo renders at its 737px native width and dominates the
   flex container, pushing the hamburger off-screen on mobile. (Same
   defensive rule as mallen-blog v0.8.1.) */
nav.top .brand svg.mallen-logo { height: 36px; width: auto; display: block; transition: height 0.3s ease; }
nav.top.scrolled .brand svg.mallen-logo { height: 30px; }

nav.top .nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
nav.top .nav-menu li { margin: 0; padding: 0; }
nav.top .nav-menu a,
nav.top .nav-menu .nav-current {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--charcoal);
    font-family: var(--f-mono);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 10px 14px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}
nav.top .nav-menu a:hover { color: var(--orange); }
nav.top .nav-menu a:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}
nav.top .nav-menu .nav-current {
    color: var(--indigo);
    cursor: default;
    position: relative;
}
nav.top .nav-menu .nav-current::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 4px;
    height: 1.5px;
    background: var(--orange);
    border-radius: 2px;
}

/* The calc nav has 8 items vs the static site's 7. Tighten horizontal
   padding slightly so it fits at common laptop widths (1280-1366px). */
@media (max-width: 1280px) {
    nav.top .nav-menu a,
    nav.top .nav-menu .nav-current { padding: 10px 10px; letter-spacing: 0.12em; }
}
@media (max-width: 900px) {
    nav.top .nav-menu { display: none; }
}
@media (max-width: 720px) {
    nav.top { padding: 14px 20px; }
    nav.top.scrolled { padding: 10px 20px; }
    nav.top .brand svg.mallen-logo { height: 30px; width: auto; }
    nav.top.scrolled .brand svg.mallen-logo { height: 26px; width: auto; }
}

/* ===== Hamburger button ===== */
.hamburger {
    width: 44px; height: 44px;
    background: var(--charcoal);
    color: var(--cream);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    place-items: center;
    transition: background 0.2s, transform 0.2s;
}
.hamburger:hover { background: var(--indigo); }
.hamburger svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
    .hamburger { display: grid; }
}

/* ===== Mobile full-screen overlay menu ===== */
.mobile-menu {
    position: fixed; inset: 0; z-index: 60;
    background: var(--charcoal);
    color: var(--cream);
    display: none;
    flex-direction: column;
    padding: 80px 32px 40px;
    overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu .mobile-menu-close {
    position: absolute;
    top: 18px; right: 22px;
    width: 44px; height: 44px;
    background: rgba(251, 250, 247, 0.08);
    color: var(--cream);
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    cursor: pointer;
    display: grid; place-items: center;
    transition: background 0.2s;
}
.mobile-menu .mobile-menu-close:hover { background: rgba(251, 250, 247, 0.15); }
.mobile-menu .mobile-menu-close svg { width: 18px; height: 18px; }

.mobile-menu-title {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 24px;
}
.mobile-menu-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column;
    gap: 4px;
    flex: 1;
}
.mobile-menu-list a {
    display: flex; align-items: baseline; gap: 16px;
    color: var(--cream);
    text-decoration: none;
    font-family: var(--f-display);
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-dark);
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.mobile-menu-list a:hover { color: var(--orange); padding-left: 8px; }
.mobile-menu-list a .num {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    opacity: 0.5;
    width: 28px;
    flex-shrink: 0;
}
.mobile-menu-list .nav-current {
    display: flex; align-items: baseline; gap: 16px;
    color: var(--orange);
    font-family: var(--f-display);
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-dark);
    cursor: default;
}
.mobile-menu-list .nav-current .num {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    opacity: 0.7;
    width: 28px;
    flex-shrink: 0;
    color: var(--orange);
}
@media (min-width: 901px) {
    .mobile-menu { display: none !important; }
}
body.mobile-menu-open { overflow: hidden; }

/* ===== Footer — dark, 3-col top + 2-col bottom ===== */
footer {
    background: #141414;
    padding: 56px 0 40px;
}
footer .footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 32px;
    align-items: center;
}
footer .footer-col { display: flex; align-items: center; justify-content: center; }
footer .footer-col--menu { flex-direction: column; gap: 12px; }
footer .footer-logo {
    display: block;
    height: 56px;
    width: auto;
    max-width: 100%;
}
footer .footer-menu-row {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    justify-content: center;
}
footer .footer-menu-row li { margin: 0; padding: 0; }
footer .footer-menu-row a {
    color: rgba(251, 250, 247, 0.6);
    text-decoration: none;
    font-family: var(--f-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.2s ease;
    white-space: nowrap;
}
footer .footer-menu-row a:hover { color: var(--orange); }
footer .footer-divider {
    height: 1px;
    background: rgba(251, 250, 247, 0.08);
    margin: 36px 0 24px;
}
footer .footer-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}
footer .footer-bottom-col {
    font-family: var(--f-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: rgba(251, 250, 247, 0.5);
    line-height: 1.5;
    text-align: center;
}
@media (max-width: 900px) {
    footer .footer-top { grid-template-columns: 1fr; gap: 36px; }
    footer .footer-bottom { grid-template-columns: 1fr; gap: 8px; }
    footer .footer-divider { margin: 28px 0 18px; }
}

.footer-cred-card {
    background: var(--cream);
    border-radius: 6px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-cred-card img {
    display: block;
    height: 56px;
    width: auto;
    max-width: 100%;
}
.footer-cred-card--asial img { height: 68px; }
@media (max-width: 540px) {
    .footer-cred-card { padding: 12px 18px; }
    .footer-cred-card img { height: 44px; }
    .footer-cred-card--asial img { height: 54px; }
}
