/* =============================================================
   layout.css — header, footer, section utility
   ============================================================= */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

.section {
    padding: 100px 0;
    position: relative;
}
.section-alt { background: var(--color-bg-alt); }

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.2;
    color: var(--color-text);
    letter-spacing: -0.03em;
}

.section-subtitle {
    font-size: 1.05rem;
    text-align: center;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 56px;
    line-height: 1.7;
}

/* ======== Header ======== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(30, 30, 30, 0.92);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
}

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 32px;
}

.header-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.05rem; font-weight: 700;
    color: var(--color-text); text-decoration: none;
    font-family: var(--font-body);
}
.header-logo:hover { color: var(--color-text); }

.header-logo-mark {
    width: 36px; height: 36px;
    background: var(--color-primary);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1rem; font-weight: 700;
    position: relative;
}

.header-logo-mark::after {
    content: ''; position: absolute; inset: -2px; border-radius: inherit;
    border: 1px solid var(--color-primary-glow);
    animation: signalRing 2.5s ease-in-out infinite;
}

@keyframes signalRing {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.2; }
}

.header-nav { display: flex; align-items: center; gap: 4px; }

.header-nav > a,
.dropdown-trigger {
    padding: 10px 18px; border-radius: var(--radius-sm);
    font-size: 0.88rem; font-weight: 500; color: var(--color-text-secondary);
    transition: all 0.2s; cursor: pointer; border: none; background: none;
    font-family: var(--font-body); display: inline-flex; align-items: center; gap: 4px;
}

.header-nav > a:hover,
.dropdown-trigger:hover { color: var(--color-text); background: var(--color-bg-elevated); }

.header-nav .btn { margin-left: 12px; padding: 10px 22px; font-size: 0.85rem; }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }

.dropdown-trigger::after {
    content: ''; display: inline-block; width: 5px; height: 5px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); margin-left: 4px; margin-top: -2px; transition: transform 0.2s;
}

.dropdown:hover .dropdown-trigger::after { transform: rotate(-135deg); margin-top: 2px; }

.dropdown-menu {
    position: absolute; top: 100%; left: 0; margin-top: 6px; min-width: 240px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 50; overflow: hidden;
}

.dropdown:hover .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}

.dropdown-menu a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px; color: var(--color-text);
    font-size: 0.85rem; border-radius: 0;
    border-bottom: 1px solid var(--color-border);
    transition: all 0.15s;
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: var(--color-primary-light); color: var(--color-primary); padding-left: 24px; }

.dropdown-menu a .dropdown-icon { font-size: 1rem; width: 24px; text-align: center; opacity: 0.6; }
.dropdown-menu a .dropdown-icon svg { color: var(--color-text-secondary); stroke: var(--color-text-secondary); }

/* ======== Footer ======== */
.footer {
    background: var(--color-bg-dark);
    color: var(--color-text);
    padding: 56px 0 32px;
    position: relative;
    border-top: 1px solid var(--color-border);
}

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

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text);
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.65;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-light);
    margin-bottom: 18px;
}

.footer-col a {
    display: block;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    padding: 5px 0;
    transition: all 0.2s;
}
.footer-col a:hover { color: var(--color-text); padding-left: 4px; }

.footer-bottom {
    border-top: 1px solid var(--color-border);
    margin-top: 40px; padding: 24px 32px 0;
    text-align: center; font-size: 0.8rem;
    color: var(--color-text-light);
    max-width: var(--max-width); margin-left: auto; margin-right: auto;
}

/* ======== Scroll Reveal ======== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
