/* =====================================================
   ZHL Technologieintegration — Apple-inspired Design
   ===================================================== */

/* ── Variables ── */
:root {
    --color-text:        #1d1d1f;
    --color-text-muted:  #6e6e73;
    --color-bg:          #ffffff;
    --color-bg-alt:      #f5f5f7;
    --color-bg-card:     #ffffff;
    --color-accent:      #0071e3;
    --color-accent-dark: #0051a2;
    --color-green:       #2d7a3a;
    --color-border:      #d2d2d7;
    --color-shadow:      rgba(0, 0, 0, 0.08);

    --radius-sm:   8px;
    --radius-md:   14px;
    --radius-lg:   20px;

    --nav-height:  60px;
    --max-width:   1120px;
    --max-narrow:  760px;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
            "Helvetica Neue", Arial, sans-serif;

    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
address { font-style: normal; }

/* ── Typography ── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ── Navigation ── */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: background 0.3s var(--ease-out);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-decoration: none;
}

.zhl-logo { height: 28px; width: auto; }

.nav-logo-sub {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 400;
    letter-spacing: 0;
    white-space: nowrap;
}

@media (max-width: 680px) { .nav-logo-sub { display: none; } }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.nav-link {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-muted);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}
.nav-link:hover { color: var(--color-text); background: rgba(0,0,0,0.04); }
.nav-link.active { color: var(--color-text); font-weight: 500; }

/* Language switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--color-border);
}

.lang-btn {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    padding: 4px 7px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.lang-btn:hover { color: var(--color-text); background: rgba(0,0,0,0.05); }
.lang-btn.lang-active {
    color: var(--color-accent);
    background: rgba(0, 113, 227, 0.08);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0; right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 24px 24px;
        gap: 4px;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }
    .nav-links.open { display: flex; }
    .nav-link { font-size: 16px; padding: 10px 12px; width: 100%; }

    .lang-switcher {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        padding-top: 12px;
        border-top: 1px solid var(--color-border);
        width: 100%;
    }
    .lang-btn { font-size: 14px; padding: 6px 10px; }
}

/* ── Hero ── */
.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + 60px) 24px 80px;
    background: linear-gradient(160deg,
        #f5f5f7 0%,
        #edf4ee 40%,
        #f0f7f1 60%,
        #f5f5f7 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(45, 122, 58, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 70%, rgba(0, 113, 227, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.hero-inner {
    max-width: 860px;
    position: relative;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--color-green);
    text-transform: uppercase;
    margin-bottom: 24px;
    padding: 6px 14px;
    background: rgba(45, 122, 58, 0.08);
    border-radius: 100px;
}

.hero-title {
    margin-bottom: 28px;
    color: var(--color-text);
    max-width: 820px;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--color-text-muted);
    max-width: 620px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: 100px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(0, 113, 227, 0.3);
}
.hero-cta:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.4);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-text-muted);
    animation: bounce 2s infinite;
    opacity: 0.5;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ── Section Cards (Homepage) ── */
.sections {
    padding: 80px 24px 100px;
    background: var(--color-bg);
}

.sections-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.section-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    text-decoration: none;
    color: var(--color-text);
    border: 1px solid transparent;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s;
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--color-border);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    flex-shrink: 0;
}
.card-icon-1 { background: rgba(45, 122, 58, 0.1); color: var(--color-green); }
.card-icon-2 { background: rgba(0, 113, 227, 0.1); color: var(--color-accent); }
.card-icon-3 { background: rgba(255, 149, 0, 0.1); color: #c75d00; }

.card-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.card-desc {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 24px;
}

.card-link-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-accent);
    margin-top: auto;
    transition: gap 0.2s;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
    background: linear-gradient(160deg, #f5f5f7 0%, #edf4ee 60%, #f5f5f7 100%);
    padding: calc(var(--nav-height) + 48px) 24px 52px;
    border-bottom: 1px solid var(--color-border);
}

.page-hero--small { padding-top: calc(var(--nav-height) + 40px); padding-bottom: 44px; }

.page-hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.breadcrumb {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}
.breadcrumb a { color: var(--color-accent); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 4px; }

.page-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--color-text);
    max-width: 800px;
}

/* ── Content Pages ── */
.content-page {
    padding: 64px 24px 100px;
}

.content-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.content-narrow {
    max-width: var(--max-narrow);
}

.lead-text {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 56px;
    max-width: 760px;
}

/* ── Intro note ── */
.intro-note {
    font-size: 14px;
    color: var(--color-text-muted);
    font-style: italic;
    margin: -36px 0 40px;
}

/* ── Accordion (Einführung) ── */
.accordion {
    margin-bottom: 56px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--color-border);
}
.accordion-item:last-child { border-bottom: none; }

.accordion-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
    background: var(--color-bg);
    transition: background 0.15s;
    user-select: none;
}
.accordion-header::-webkit-details-marker { display: none; }
.accordion-header::marker { display: none; }
.accordion-header:hover { background: var(--color-bg-alt); }

.accordion-item[open] .accordion-header {
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
}

.accordion-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
    min-width: 26px;
    flex-shrink: 0;
}

.accordion-title {
    flex: 1;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
}

.accordion-chevron {
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: transform 0.25s ease;
}
.accordion-item[open] .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 24px 22px 28px 62px;
    background: var(--color-bg);
}
.accordion-body p { font-size: 15px; line-height: 1.75; color: var(--color-text-muted); margin: 0 0 14px; }
.accordion-body p:last-child { margin-bottom: 0; }
.accordion-body h4 { font-size: 14.5px; font-weight: 700; color: var(--color-text); margin: 20px 0 10px; }
.accordion-body ul { margin: 0 0 14px; padding-left: 18px; }
.accordion-body li { font-size: 15px; line-height: 1.7; color: var(--color-text-muted); margin-bottom: 8px; }
.accordion-body li:last-child { margin-bottom: 0; }
.accordion-body strong { color: var(--color-text); font-weight: 600; }
.accordion-body a { color: var(--color-accent); text-decoration: none; }
.accordion-body a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .accordion-body { padding-left: 22px; }
    .accordion-header { padding: 14px 16px; gap: 10px; }
    .accordion-title { font-size: 14px; }
}

/* ── Finder Screen (Software page — screen only) ── */
.finder-screen {
    max-width: 900px;
    margin: 0 auto 40px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.16), 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.13);
    height: clamp(440px, 52vw, 560px);
}
.finder-screen .macos-desktop {
    height: 100%;
}

/* ── Topics Grid (Einführung) ── */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 56px;
}

.topic-card {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: 28px 28px 32px;
    border: 1px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.topic-card:hover {
    border-color: var(--color-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    transform: translateY(-2px);
}

.topic-icon {
    width: 48px;
    height: 48px;
    background: rgba(45, 122, 58, 0.08);
    color: var(--color-green);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.topic-card h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.topic-card p {
    font-size: 14.5px;
    color: var(--color-text-muted);
    line-height: 1.65;
    margin: 0;
}

/* ── Highlight Box ── */
.highlight-box {
    background: linear-gradient(135deg, rgba(45, 122, 58, 0.05) 0%, rgba(0, 113, 227, 0.04) 100%);
    border: 1px solid rgba(45, 122, 58, 0.15);
    border-radius: var(--radius-lg);
    padding: 40px 44px;
}

.highlight-box h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--color-text);
}

.highlight-box p {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.source-note {
    margin-top: 20px;
    font-size: 13px;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ══════════════════════════════════════════
   MacBook + Finder (Software page)
   ══════════════════════════════════════════ */

/* ── Outer wrapper — 3D perspective ── */
.macbook-wrap {
    display: flex;
    justify-content: center;
    padding: 24px 0 80px;
    perspective: 960px;
    perspective-origin: 50% -10%;
    position: relative;
}

/* Ground shadow cast by 3D MacBook */
.macbook-wrap::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
    height: 30px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.28) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(12px);
}

.macbook {
    width: 100%;
    max-width: 860px;
    transform: rotateX(26deg) rotateY(-3deg);
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.7s ease;
    filter: drop-shadow(0 48px 90px rgba(0,0,0,0.4))
            drop-shadow(0 16px 32px rgba(0,0,0,0.22));
}

.macbook:hover {
    transform: rotateX(20deg) rotateY(-1deg);
    filter: drop-shadow(0 56px 100px rgba(0,0,0,0.32))
            drop-shadow(0 20px 40px rgba(0,0,0,0.16));
}

/* ── Screen lid ── */
.macbook-lid {
    background: linear-gradient(180deg, #2a2a2c 0%, #1c1c1e 100%);
    border-radius: 14px 14px 0 0;
    padding: 10px 10px 0;
    position: relative;
    border: 1px solid rgba(255,255,255,0.07);
    border-bottom: none;
}

/* Notch */
.macbook-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 12px;
    background: #0a0a0a;
    border-radius: 0 0 10px 10px;
    z-index: 5;
}
.macbook-notch::before {          /* camera dot */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #1c1c1e;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Screen display */
.macbook-display {
    aspect-ratio: 16 / 11;
    background: #000;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

/* ── macOS desktop background ── */
.macos-desktop {
    width: 100%;
    height: 100%;
    background: #ececec;
    display: flex;
    align-items: stretch;
    padding: 2.5%;
}

/* ── Finder window ── */
.finder-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.15);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.14);
}

/* Titlebar */
.finder-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: rgba(236,236,236,0.98);
    border-bottom: 1px solid rgba(0,0,0,0.10);
    flex-shrink: 0;
    min-height: 0;
}

.traffic-lights { display: flex; gap: 5px; flex-shrink: 0; }
.tl {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tl-red    { background: #ff5f57; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.3) inset; }
.tl-yellow { background: #febc2e; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.2) inset; }
.tl-green  { background: #28c840; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.2) inset; }

.finder-win-title {
    flex: 1;
    text-align: center;
    font-size: clamp(7px, 1.1vw, 11px);
    font-weight: 500;
    color: rgba(0,0,0,0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.finder-toolbar-icons {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.toolbar-icon {
    font-size: 9px;
    color: rgba(0,0,0,0.3);
}

/* Finder body */
.finder-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Sidebar */
.finder-sidebar {
    width: clamp(70px, 14%, 120px);
    background: rgba(230,230,230,0.85);
    border-right: 1px solid rgba(0,0,0,0.08);
    padding: 8px 0;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-heading {
    font-size: clamp(6px, 0.9vw, 9px);
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.35);
    padding: 4px 8px 2px;
    margin: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    font-size: clamp(7px, 1vw, 10px);
    color: rgba(0,0,0,0.55);
    cursor: default;
    border-radius: 4px;
    margin: 1px 4px;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-item--active {
    background: rgba(0, 100, 220, 0.18);
    color: rgba(0,80,200,0.9);
}

/* Main content / folder grid area */
.finder-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: clamp(6px, 1.5%, 12px);
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}
.finder-main::-webkit-scrollbar { width: 4px; }
.finder-main::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 2px; }

/* ── Folder grid ── */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(6px, 2%, 14px);
}

/* ── Folder item (button) ── */
.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 0.8%, 7px);
    padding: clamp(5px, 1.2%, 10px) 2px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
    text-align: center;
}
.folder-item:hover    { background: rgba(0,0,0,0.05); }
.folder-item--active  { background: rgba(0, 100, 220, 0.12) !important; }
.folder-item:focus-visible {
    outline: 2px solid rgba(0,132,255,0.8);
    outline-offset: 2px;
}

.folder-svg {
    width: clamp(44px, 8.5vw, 72px);
    height: auto;
    flex-shrink: 0;
    transition: transform 0.18s var(--ease-out), filter 0.18s;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.18));
}
.folder-item:hover .folder-svg    { transform: translateY(-3px) scale(1.08); filter: drop-shadow(0 5px 10px rgba(0,0,0,0.22)); }
.folder-item--active .folder-svg  { transform: scale(0.93); }

.folder-label {
    font-size: clamp(9px, 1.35vw, 13px);
    font-weight: 500;
    color: rgba(0,0,0,0.75);
    line-height: 1.25;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* ── MacBook hinge ── */
.macbook-hinge {
    height: 4px;
    background: linear-gradient(to bottom, #8a8a8e, #aeaeb2);
    position: relative;
}
.macbook-hinge::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: rgba(0,0,0,0.3);
}

/* ── MacBook base (keyboard) ── */
.macbook-base {
    background: linear-gradient(180deg, #d1d1d6 0%, #c7c7cc 60%, #b8b8be 100%);
    border-radius: 0 0 12px 12px;
    padding: 10px 10% 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.6);
    border-top: none;
    position: relative;
}
.macbook-base::before {   /* subtle top edge highlight */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

/* Keyboard */
.macbook-keyboard {
    width: 80%;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.kb-row {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.kb-key {
    flex: 1;
    height: clamp(7px, 1.5vw, 12px);
    background: linear-gradient(180deg, #c8c8ce 0%, #b8b8be 100%);
    border-radius: 2px;
    box-shadow:
        0 1px 0 rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.4);
    max-width: clamp(12px, 2.5vw, 24px);
}
.kb-key--space {
    flex: 5;
    max-width: none;
}

/* Trackpad */
.macbook-trackpad {
    width: 28%;
    height: clamp(14px, 3vw, 24px);
    background: linear-gradient(180deg, #c0c0c6 0%, #b4b4ba 100%);
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}

/* ── Tool panel (below MacBook) ── */
.tool-panel {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    overflow: hidden;
    animation: panelIn 0.25s var(--ease-out);
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tool-panel-inner { padding: 24px 28px 20px; }

.tool-panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.tool-panel-folder {
    width: 48px;
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

.tool-panel-title {
    flex: 1;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.tool-panel-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.tool-panel-close:hover { background: var(--color-border); color: var(--color-text); }

.tool-panel-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
}

/* tool-link and tool-link-arrow shared with older rule — keep these: */
.tool-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
    gap: 8px;
}
.tool-link:hover {
    background: var(--color-bg);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.tool-link-name { flex: 1; font-weight: 500; }

.tool-link-arrow {
    flex-shrink: 0;
    color: var(--color-border);
    transition: color 0.15s, transform 0.15s;
}
.tool-link:hover .tool-link-arrow {
    color: var(--color-accent);
    transform: translate(2px, -2px);
}

/* Community note */
.community-note {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    font-size: 14.5px;
    color: var(--color-text-muted);
    border-left: 3px solid var(--color-accent);
    margin-top: 4px;
}

/* ── Responsive: hide MacBook shell on small screens ── */
@media (max-width: 600px) {
    .macbook-lid { border-radius: 10px; }
    .macbook-notch { display: none; }
    .macbook-base { display: none; }
    .macbook-hinge { display: none; }
    .folder-grid { grid-template-columns: repeat(4, 1fr); }
    .macbook { filter: drop-shadow(0 8px 20px rgba(0,0,0,0.18)); }
}

/* ── Materials Page ── */
.mat-section {
    margin-bottom: 72px;
}

.section-heading {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-note {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 32px;
    font-style: italic;
}

/* Publications list */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.pub-item {
    display: flex;
    gap: 24px;
    padding: 24px 28px;
    background: var(--color-bg);
    transition: background 0.2s;
}
.pub-item:hover { background: var(--color-bg-alt); }

.pub-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-border);
    flex-shrink: 0;
    width: 32px;
    line-height: 1;
    padding-top: 2px;
    font-variant-numeric: tabular-nums;
}

.pub-author {
    font-size: 15px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    color: var(--color-text);
}

.pub-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0 0 6px;
    line-height: 1.5;
}

.pub-link {
    font-size: 12px;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
}
.pub-link:hover { text-decoration: underline; }

/* Resource grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.resource-card {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.resource-card:hover {
    border-color: var(--color-border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    transform: translateY(-2px);
}

.resource-icon {
    color: var(--color-accent);
    margin-bottom: 12px;
}

.resource-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-text);
}

.resource-desc {
    font-size: 13.5px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0 0 8px;
}

.resource-card--link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    color: inherit;
}
.resource-card--link:hover {
    border-color: var(--color-accent);
    color: inherit;
}
.resource-card--link:hover .resource-title { color: var(--color-accent); }

.resource-url {
    font-size: 12px;
    color: var(--color-accent);
    margin-top: auto;
    font-weight: 500;
}

/* ── About / Legal ── */
.contact-box {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: 32px 36px;
    margin: 40px 0;
}

.contact-box h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.contact-list {
    list-style: none;
    margin-top: 16px;
}
.contact-list li {
    padding: 4px 0;
    font-size: 15px;
    color: var(--color-text-muted);
}
.contact-list li strong { color: var(--color-text); }
.contact-list a { color: var(--color-accent); }
.contact-list a:hover { text-decoration: underline; }

.text-link { color: var(--color-accent); }
.text-link:hover { text-decoration: underline; }

.legal-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
}
.legal-section:last-child { border-bottom: none; }
.legal-section h2 { font-size: 1.2rem; margin-bottom: 12px; }
.legal-section p, .legal-section address { font-size: 15px; color: var(--color-text-muted); line-height: 1.7; }

/* ── Footer ── */
.site-footer {
    background: var(--color-text);
    color: rgba(255,255,255,0.6);
    padding-top: 56px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 48px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}

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

.footer-brand .zhl-logo-footer { height: 28px; margin-bottom: 16px; }

.footer-org {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
}

.footer-rights {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

.footer-links-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 16px;
}

.footer-link {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    padding: 4px 0;
    transition: color 0.2s;
}
.footer-link:hover { color: rgba(255,255,255,0.9); }
.footer-link.footer-link-active { color: rgba(255,255,255,0.9); font-weight: 500; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 24px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    max-width: 100%;
}

/* ── Animations ── */
@media (prefers-reduced-motion: no-preference) {
    .section-card,
    .topic-card,
    .tool-card,
    .resource-card {
        opacity: 0;
        transform: translateY(16px);
        animation: fadeUp 0.5s var(--ease-out) forwards;
    }

    .section-card:nth-child(1) { animation-delay: 0.05s; }
    .section-card:nth-child(2) { animation-delay: 0.12s; }
    .section-card:nth-child(3) { animation-delay: 0.19s; }

    .topic-card:nth-child(1) { animation-delay: 0.03s; }
    .topic-card:nth-child(2) { animation-delay: 0.07s; }
    .topic-card:nth-child(3) { animation-delay: 0.11s; }
    .topic-card:nth-child(4) { animation-delay: 0.15s; }
    .topic-card:nth-child(5) { animation-delay: 0.19s; }
    .topic-card:nth-child(6) { animation-delay: 0.23s; }
    .topic-card:nth-child(7) { animation-delay: 0.27s; }
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ── Comments ── */
.comments-section {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: 64px 24px 80px;
}

.comments-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.comments-title {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 100px;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
}

.comments-empty {
    color: var(--color-text-muted);
    font-size: 15px;
    margin-bottom: 40px;
}

/* Comment list */
.comments-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 48px;
}

.comment-item {
    background: var(--color-bg);
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    transition: background 0.15s;
}
.comment-item:hover { background: #fafafa; }

.comment-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-green), var(--color-accent));
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    user-select: none;
}

.comment-body { flex: 1; min-width: 0; }

.comment-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.comment-time {
    font-size: 12px;
    color: var(--color-text-muted);
}

.comment-text {
    font-size: 14.5px;
    color: var(--color-text);
    line-height: 1.65;
    margin: 0;
    word-break: break-word;
}

/* Comment form */
.comment-form-wrap {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 32px 36px;
    border: 1px solid var(--color-border);
}

.comment-form-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-text);
}

.form-row {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.form-input,
.form-textarea {
    width: 100%;
    font-family: var(--font);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
    background: var(--color-bg);
}

.form-textarea { min-height: 110px; }

.comment-submit {
    display: inline-flex;
    align-items: center;
    background: var(--color-accent);
    color: #fff;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
    margin-top: 8px;
}
.comment-submit:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.35);
}
.comment-submit:active { transform: none; }

/* Notices */
.comment-notice {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
}
.comment-notice--success {
    background: rgba(45, 122, 58, 0.1);
    color: var(--color-green);
    border: 1px solid rgba(45, 122, 58, 0.2);
}
.comment-notice--error {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

@media (max-width: 600px) {
    .comment-form-wrap { padding: 24px 20px; }
    .comment-item { padding: 16px; }
}

/* ── Utilities ── */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
