/*
Theme Name: Mallen Blog
Theme URI: https://blog.mallen.com.au
Author: Mallen Services
Author URI: https://mallen.com.au
Description: Editorial blog theme for blog.mallen.com.au, derived from the Mallen Services App theme used on calculator.mallen.com.au. Same design language as the static marketing site (Fraunces / Inter Tight / JetBrains Mono, indigo + orange palette) but adds a content-led top nav and full blog templates: post lists, single posts, archives, search, comments.
Version: 0.8.1
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: mallen-blog
Tags: business, custom-colors, custom-logo, blog, editorial, threaded-comments
*/

/* ============================================================
   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);
}

.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 (v0.5.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.
   On the blog theme this targets "Blog"; on calc theme, "Calculator". */
.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;
    }
}

/* ============================================================
   BLOG-SPECIFIC STYLES (added for blog.mallen.com.au)
   Everything above is shared with calculator.mallen.com.au.
   ============================================================ */

/* Override: blog uses content-led nav (more items), so spacing tweaks */
.app-header-nav .nav-current {
    color: var(--indigo);
    font-weight: 600;
    border-bottom: 2px solid var(--orange);
    padding-bottom: 4px;
}
.app-header-nav .nav-current:hover {
    color: var(--indigo);
    border-bottom-color: var(--orange);
}

/* Reading column for blog content */
.blog-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 60px 32px 80px;
}

@media (max-width: 720px) {
    .blog-content { padding: 40px 22px 60px; }
}

/* Post list (blog home + archives) */
.blog-list-eyebrow {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 8px;
}

.blog-list-title {
    font-family: var(--f-display);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 500;
    color: var(--charcoal);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 60px;
}

.archive-description {
    color: var(--charcoal-soft);
    margin-bottom: 50px;
    max-width: 600px;
}

.post-card {
    padding: 36px 0;
    border-bottom: 1px solid var(--line);
}
.post-card:last-child { border-bottom: none; }

.post-card-meta {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--charcoal-soft);
    opacity: 0.7;
    margin-bottom: 12px;
}

.post-card-title {
    font-family: var(--f-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 500;
    margin: 0 0 14px;
    line-height: 1.2;
    letter-spacing: -0.015em;
}
.post-card-title a {
    color: var(--charcoal);
    text-decoration: none;
}
.post-card-title a:hover { color: var(--indigo); }

.post-card-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--charcoal-soft);
    margin-bottom: 16px;
}

.post-card-readmore {
    font-family: var(--f-mono);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--indigo);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.post-card-readmore::after {
    content: '→';
    transition: transform 0.18s ease;
}
.post-card-readmore:hover { color: var(--orange); }
.post-card-readmore:hover::after { transform: translateX(3px); }

/* Single post */
.post-header { margin-bottom: 40px; }

/* Back-to-index nav. Shown above and below the article body on single
   posts so the reader always has an obvious return path to the blog
   listing. Styled with the same mono-uppercase micro-typography as
   .post-eyebrow / .post-meta. */
.post-back-nav {
    font-family: var(--f-mono);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.post-back-nav a {
    color: var(--charcoal-soft);
    text-decoration: none;
    transition: color 0.15s ease;
}
.post-back-nav a:hover { color: var(--orange); }
.post-back-nav-top { margin-bottom: 30px; }
.post-back-nav-bottom {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.post-eyebrow {
    font-family: var(--f-mono);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 16px;
}

.post-title {
    font-family: var(--f-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 18px;
    color: var(--charcoal);
}

.post-meta {
    font-family: var(--f-mono);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--charcoal-soft);
    opacity: 0.75;
}
.post-meta a { color: inherit; }
.post-meta a:hover { color: var(--orange); }

.post-thumbnail {
    margin: 30px 0 40px;
}
.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--charcoal);
}

.post-content h2 {
    font-family: var(--f-display);
    font-size: 1.7rem;
    margin: 1.8em 0 0.6em;
    letter-spacing: -0.015em;
}
.post-content h3 {
    font-family: var(--f-display);
    font-size: 1.3rem;
    margin: 1.5em 0 0.5em;
}
.post-content p { margin: 0 0 1.1em; }
.post-content ul, .post-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.post-content li { margin-bottom: 0.4em; }

.post-content a {
    color: var(--indigo);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.post-content a:hover { color: var(--orange); }

.post-content blockquote {
    border-left: 3px solid var(--orange);
    padding: 4px 0 4px 24px;
    margin: 1.6em 0;
    font-family: var(--f-display);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--charcoal-soft);
}

.post-content code, .post-content kbd, .post-content samp {
    font-family: var(--f-mono);
    font-size: 0.9em;
    background: var(--cream-warm);
    padding: 1px 6px;
    border-radius: 3px;
}

.post-content pre {
    background: var(--cream-warm);
    padding: 16px 20px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 1.4em 0;
}
.post-content pre code { background: none; padding: 0; }

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.4em 0;
}
.post-content figure { margin: 1.4em 0; }
.post-content figcaption {
    font-family: var(--f-mono);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    color: var(--charcoal-soft);
    opacity: 0.7;
    margin-top: 8px;
    text-align: center;
}

.post-tags {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-family: var(--f-mono);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.post-tags a {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 100px;
    margin-right: 6px;
    margin-bottom: 6px;
    text-decoration: none;
    color: var(--charcoal);
    transition: all 0.15s ease;
}
.post-tags a:hover {
    background: var(--indigo);
    color: var(--cream);
    border-color: var(--indigo);
}

/* Pagination (post list + comments) */
.pagination, .nav-links {
    margin: 50px 0 0;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    font-family: var(--f-mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.pagination a, .pagination .current,
.nav-links a, .nav-links .current {
    padding: 8px 14px;
    text-decoration: none;
    color: var(--charcoal);
    border: 1px solid var(--line);
    border-radius: 3px;
    transition: all 0.15s ease;
}
.pagination a:hover,
.nav-links a:hover {
    border-color: var(--orange);
    color: var(--orange);
}
.pagination .current,
.nav-links .current {
    background: var(--indigo);
    color: var(--cream);
    border-color: var(--indigo);
}

/* Comments */
.comments-area { margin-top: 60px; }
.comments-title {
    font-family: var(--f-display);
    font-size: 1.6rem;
    margin-bottom: 24px;
}
.comment-list { list-style: none; padding: 0; }
.comment-body {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}
.comment-meta {
    font-family: var(--f-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--charcoal-soft);
    margin-bottom: 8px;
}

/* Search form */
.search-form {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}
.search-form .search-field {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: var(--f-body);
    font-size: 1rem;
    background: var(--cream);
    color: var(--charcoal);
}
.search-form .search-field:focus {
    outline: none;
    border-color: var(--indigo);
}
.search-form .search-submit {
    padding: 12px 24px;
    background: var(--indigo);
    color: var(--cream);
    border: 0;
    border-radius: 4px;
    font-family: var(--f-mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease;
}
.search-form .search-submit:hover { background: var(--orange); }

/* WP alignment classes (for post content) */
.alignleft  { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide  { width: 100%; }

/* Responsive blog tweaks */
@media (max-width: 720px) {
    .post-card { padding: 28px 0; }
    .post-content { font-size: 1rem; line-height: 1.7; }
}

/* ============================================================
   v0.8.0 — STATIC-SITE NAV + FOOTER PARITY
   ============================================================
   Replaces the pre-v0.8.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+). One-way copy of the relevant
   rules — kept in this block so it's clear what came from where.
   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.
   Static site uses body.support-page main { padding: 96px 0 80px } etc;
   blog is always a "subpage" so we apply unconditionally. */
.blog-main { padding: 96px 0 80px; min-height: calc(100vh - 200px); }
@media (max-width: 720px) { .blog-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. */
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;
}

@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; }
}
