/* ===================================================================
   Novode — Design System Tokens & Base
   Light only • Manrope + Lora • 8px spacing • WCAG AA
   =================================================================== */

/* --- 1. Fonts (preloaded in layout <head>) --- */
/* UI:      Manrope 400-800
   Reading: Lora 400/700 + italic           */

:root {
    /* — Colors --------------------------------------------------- */
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-alt: #f1f5f9;
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;

    --color-text: #0f172a;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;

    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --color-accent-soft: rgba(37, 99, 235, 0.08);

    --color-secondary: #7c3aed;
    --color-secondary-soft: rgba(124, 58, 237, 0.08);

    --color-success: #16a34a;
    --color-success-soft: rgba(22, 163, 74, 0.08);
    --color-warning: #d97706;
    --color-warning-soft: rgba(217, 119, 6, 0.08);
    --color-danger: #dc2626;
    --color-danger-soft: rgba(220, 38, 38, 0.08);

    --color-emerald: #059669;
    --color-emerald-soft: rgba(5, 150, 105, 0.08);
    --color-orange: #ea580c;
    --color-orange-soft: rgba(234, 88, 12, 0.08);

    /* — Gradients ------------------------------------------------ */
    --gradient-accent: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
    --gradient-hero-blob: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37, 99, 235, 0.06) 0%, rgba(124, 58, 237, 0.03) 50%, transparent 100%);

    /* — Typography ----------------------------------------------- */
    --font-ui: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-reading: 'Lora', 'Georgia', serif;

    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */

    --leading-tight: 1.2;
    --leading-ui: 1.4;
    --leading-body: 1.65;

    /* — Spacing (8px system) ------------------------------------- */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-12: 48px;
    --sp-16: 64px;
    --sp-20: 80px;

    /* — Radius --------------------------------------------------- */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 100px;

    /* — Shadows -------------------------------------------------- */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, .1);

    /* — Transitions ---------------------------------------------- */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 160ms;
    --duration-md: 240ms;

    /* — Layout --------------------------------------------------- */
    --container-max: 1200px;
    --header-h: 64px;
    --sidebar-w: 260px;
}

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

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

body {
    font-family: var(--font-ui);
    font-size: var(--text-base);
    line-height: var(--leading-ui);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}

a:hover {
    color: var(--color-accent-hover);
}

ul,
ol {
    list-style: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

::selection {
    background: var(--color-accent);
    color: #fff;
}

/* --- 3. Focus ring (accessibility) ------------------------------ */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* --- 4. Typography ---------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-ui);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-text);
}

h1 {
    font-size: var(--text-4xl);
    font-weight: 800;
    letter-spacing: -0.025em;
}

h2 {
    font-size: var(--text-2xl);
    letter-spacing: -0.015em;
}

h3 {
    font-size: var(--text-xl);
}

h4 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: var(--sp-4);
}

small,
.text-sm {
    font-size: var(--text-sm);
}

.text-xs {
    font-size: var(--text-xs);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-accent {
    color: var(--color-accent);
}

.text-success {
    color: var(--color-success);
}

.text-warning {
    color: var(--color-warning);
}

.text-danger {
    color: var(--color-danger);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

/* --- 5. Layout -------------------------------------------------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--sp-5);
}

.container-hub {
    max-width: 1536px;
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-content {
    flex: 1;
    padding: var(--sp-10) 0 var(--sp-8);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: var(--sp-1);
}

.gap-2 {
    gap: var(--sp-2);
}

.gap-3 {
    gap: var(--sp-3);
}

.gap-4 {
    gap: var(--sp-4);
}

.gap-6 {
    gap: var(--sp-6);
}

.gap-8 {
    gap: var(--sp-8);
}

.grid {
    display: grid;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Spacing utilities (8px multiples) */
.mt-2 {
    margin-top: var(--sp-2);
}

.mt-4 {
    margin-top: var(--sp-4);
}

.mt-6 {
    margin-top: var(--sp-6);
}

.mt-8 {
    margin-top: var(--sp-8);
}

.mb-2 {
    margin-bottom: var(--sp-2);
}

.mb-4 {
    margin-bottom: var(--sp-4);
}

.mb-6 {
    margin-bottom: var(--sp-6);
}

.mb-8 {
    margin-bottom: var(--sp-8);
}

.p-4 {
    padding: var(--sp-4);
}

.p-6 {
    padding: var(--sp-6);
}

.px-4 {
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
}

.py-2 {
    padding-top: var(--sp-2);
    padding-bottom: var(--sp-2);
}

/* 12-col grid */
.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--sp-6);
}

.col-span-1 {
    grid-column: span 1;
}

.col-span-2 {
    grid-column: span 2;
}

.col-span-3 {
    grid-column: span 3;
}

.col-span-4 {
    grid-column: span 4;
}

.col-span-6 {
    grid-column: span 6;
}

.col-span-8 {
    grid-column: span 8;
}

.col-span-9 {
    grid-column: span 9;
}

.col-span-12 {
    grid-column: span 12;
}

/* --- 6. Site Header --------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.92));
    backdrop-filter: blur(14px) saturate(1.1);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-top: none;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: var(--sp-4);
}

.site-logo {
    display: flex;
    align-items: center;
    height: 64px;
    flex-shrink: 0;
}

.site-logo-img {
    height: 64px;
    width: auto;
    display: block;
    object-fit: contain;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-6);
    margin-left: var(--sp-4);
    min-width: 0;
}

.site-nav a {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
    padding: 8px 10px;
    border-radius: var(--radius-md);
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

.nav-user-slot {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
}

.nav-user-slot:empty {
    display: none;
}

.nav-user-login,
.nav-user-link {
    white-space: nowrap;
}

.nav-user-logout {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    cursor: pointer;
    font-size: var(--text-sm);
    transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.nav-user-logout:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

.mobile-nav-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}

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

.mobile-nav-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-text-secondary);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 140;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms var(--ease);
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(340px, 88vw);
    height: 100%;
    background: var(--color-surface);
    border-left: 1px solid var(--color-border);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform 220ms var(--ease);
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.mobile-nav-overlay.active .mobile-nav-panel {
    transform: translateX(0);
}

.mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-2);
}

.mobile-nav-title {
    display: inline-flex;
    align-items: center;
}

.mobile-nav-logo {
    width: 120px;
    height: auto;
    display: block;
}

.mobile-nav-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface-alt);
    cursor: pointer;
}

.mobile-nav-search {
    width: 100%;
    margin-right: 0;
    justify-content: flex-start;
    margin-bottom: var(--sp-2);
}

.mobile-nav-link {
    display: block;
    padding: var(--sp-3) var(--sp-3);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-weight: 600;
}

.mobile-nav-link:hover {
    background: var(--color-surface-alt);
    color: var(--color-accent);
}

.mobile-nav-user-slot {
    display: grid;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
}

.mobile-nav-button {
    width: 100%;
    text-align: left;
    border: 1px solid var(--color-border);
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
    cursor: pointer;
}

body.mobile-nav-open {
    overflow: hidden;
}

/* --- 7. Site Footer --------------------------------------------- */
.site-footer {
    margin-top: auto;
    padding: var(--sp-10) 0 var(--sp-8);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.site-footer-brand {
    font-weight: 800;
    font-size: var(--text-lg);
    color: var(--color-text);
    margin-bottom: var(--sp-2);
}

.site-footer-links {
    display: flex;
    gap: var(--sp-6);
    justify-content: center;
    margin-bottom: var(--sp-4);
}

.site-footer-links a {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.site-footer-links a:hover {
    color: var(--color-accent);
}

.site-footer-copy {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* Header search trigger */
.header-search-btn {
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: 1;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    margin-right: var(--sp-2);
}

.header-search-btn:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.header-kbd {
    font-size: 11px;
    background: var(--color-surface);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    opacity: 0.75;
}

/* Command palette */
.cmd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cmd-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cmd-palette {
    background: rgba(24, 24, 27, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 640px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    color: #fff;
}

.cmd-overlay.active .cmd-palette {
    transform: scale(1);
}

.cmd-input-wrap {
    padding: var(--sp-4) var(--sp-5);
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cmd-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: var(--text-lg);
    outline: none;
    font-family: inherit;
}

.cmd-input::placeholder {
    color: #71717a;
}

.cmd-shortcut-hint {
    font-size: var(--text-xs);
    color: #71717a;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.cmd-results {
    max-height: 420px;
    overflow-y: auto;
    padding: var(--sp-2);
}

.cmd-results::-webkit-scrollbar {
    width: 6px;
}

.cmd-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.cmd-group {
    padding: var(--sp-2) var(--sp-3) 0;
}

.cmd-group-title {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a1a1aa;
    margin-bottom: var(--sp-2);
    font-weight: 700;
}

.cmd-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3);
    border-radius: var(--radius-lg);
    color: #e4e4e7;
    text-decoration: none;
    transition: background var(--duration) ease;
}

.cmd-item:hover,
.cmd-item.selected {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.cmd-item-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.cmd-item-content {
    flex: 1;
    min-width: 0;
}

.cmd-item-title {
    font-weight: 600;
    font-size: var(--text-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmd-item-meta {
    font-size: var(--text-xs);
    color: #a1a1aa;
    margin-top: 2px;
}

.cmd-empty {
    text-align: center;
    padding: var(--sp-8) var(--sp-4);
    color: #a1a1aa;
}

/* Footer layout used by shared template */
.site-footer .hub-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(120px, 0.85fr) minmax(170px, 1fr) 164px;
    gap: var(--sp-6);
    padding: var(--sp-10) 0 var(--sp-6);
    text-align: left;
    align-items: start;
}

.site-footer .hub-footer-brand-name {
    margin-bottom: var(--sp-2);
    display: inline-flex;
    align-items: center;
}

.site-footer .hub-footer-brand-logo {
    width: 164px;
    height: auto;
    display: block;
    flex-shrink: 0;
}

.site-footer .hub-footer-brand-desc {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-body);
    max-width: 320px;
}

.site-footer .hub-footer-col-title {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: var(--sp-3);
}

.site-footer .hub-footer-col a {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    padding: var(--sp-1) 0;
    transition: color var(--duration) var(--ease);
}

.site-footer .hub-footer-col a:hover {
    color: var(--color-accent);
}

.site-footer .hub-footer-feedback-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-self: end;
    gap: 0;
    width: 158px;
    min-height: 100%;
    padding: 10px 9px 11px;
    border: 1px solid rgba(37, 99, 235, 0.10);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.08), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    text-align: center;
}

.site-footer .hub-footer-feedback-art {
    width: 76px;
    height: 76px;
    display: block;
    margin-top: 0;
    margin-bottom: 1px;
}

.site-footer .hub-footer-feedback-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-text-muted);
    margin-bottom: 3px;
}

.site-footer .hub-footer-feedback-btn {
    margin-top: 0;
    border-radius: var(--radius-pill);
    width: 100%;
    padding: 7px 10px;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(226, 232, 240, 0.9);
}

.site-footer .hub-footer-feedback-btn:hover {
    color: var(--color-text-muted);
    background: rgba(248, 250, 252, 0.96);
    border-color: rgba(203, 213, 225, 0.95);
}

.site-footer .hub-footer-copy {
    border-top: 1px solid var(--color-border);
    padding-top: var(--sp-5);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-align: center;
}

body.feedback-modal-open {
    overflow: hidden;
}

.feedback-modal-overlay {
    z-index: 1100;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feedback-modal {
    max-width: 640px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    overflow: hidden;
}

.feedback-modal-header {
    align-items: flex-start;
    gap: var(--sp-4);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.feedback-modal-heading {
    display: grid;
    gap: 6px;
}

.feedback-modal-heading h3 {
    margin: 0;
}

.feedback-modal-subtitle {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-body);
}

.feedback-modal .modal-close {
    flex-shrink: 0;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.86);
}

.feedback-modal-body {
    display: grid;
    gap: var(--sp-4);
}

.feedback-form-grid {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: var(--sp-4);
}

.feedback-message-input {
    min-height: 156px;
}

.feedback-reply-toggle {
    width: fit-content;
}

.feedback-contact-wrap[hidden] {
    display: none !important;
}

.feedback-form-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

.feedback-form-meta a {
    color: var(--color-text-secondary);
}

.feedback-form-meta a:hover {
    color: var(--color-accent);
}

.feedback-modal-footer {
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
}

.feedback-modal-footer .btn-primary {
    min-width: 152px;
}

.feedback-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

[data-feedback-status] {
    display: block;
    max-width: 390px;
    line-height: var(--leading-body);
}

[data-feedback-status].is-success {
    color: var(--color-success);
}

[data-feedback-status].is-error {
    color: var(--color-danger);
}

/* --- 8. Animations ---------------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-in {
    animation: fadeIn var(--duration-md) var(--ease) both;
}

/* Staggered entrance */
[data-stagger]> :nth-child(1) {
    animation: fadeInUp 350ms 0ms var(--ease) both;
}

[data-stagger]> :nth-child(2) {
    animation: fadeInUp 350ms 60ms var(--ease) both;
}

[data-stagger]> :nth-child(3) {
    animation: fadeInUp 350ms 120ms var(--ease) both;
}

[data-stagger]> :nth-child(4) {
    animation: fadeInUp 350ms 180ms var(--ease) both;
}

[data-stagger]> :nth-child(5) {
    animation: fadeInUp 350ms 240ms var(--ease) both;
}

[data-stagger]> :nth-child(6) {
    animation: fadeInUp 350ms 300ms var(--ease) both;
}

[data-stagger]> :nth-child(7) {
    animation: fadeInUp 350ms 360ms var(--ease) both;
}

[data-stagger]> :nth-child(8) {
    animation: fadeInUp 350ms 420ms var(--ease) both;
}

[data-stagger]> :nth-child(9) {
    animation: fadeInUp 350ms 480ms var(--ease) both;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 500ms var(--ease);
}

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

/* --- 9. Responsive ---------------------------------------------- */
@media (max-width: 1024px) {
    .grid-12 {
        grid-template-columns: repeat(6, 1fr);
    }

    .col-span-3 {
        grid-column: span 3;
    }

    .col-span-4 {
        grid-column: span 6;
    }

    .col-span-8,
    .col-span-9 {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: var(--text-2xl);
    }

    h2 {
        font-size: var(--text-xl);
    }

    .grid-12 {
        grid-template-columns: 1fr;
    }

    .col-span-3,
    .col-span-4,
    .col-span-6,
    .col-span-8,
    .col-span-9 {
        grid-column: span 1;
    }

    .hide-mobile {
        display: none !important;
    }

    .site-nav {
        gap: var(--sp-2);
    }

    .nav-link-desktop,
    .nav-desktop-search {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .header-kbd {
        display: none;
    }

    .site-footer .hub-footer-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-6);
    }

    .site-footer .hub-footer-feedback-card {
        justify-self: start;
        width: 158px;
    }

    .feedback-form-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-3);
    }

    .feedback-modal-header,
    .feedback-modal-body,
    .feedback-modal-footer {
        padding-left: var(--sp-4);
        padding-right: var(--sp-4);
    }

    .feedback-modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    [data-feedback-status] {
        max-width: none;
    }

    .cmd-overlay {
        padding-top: 8vh;
        padding-left: var(--sp-3);
        padding-right: var(--sp-3);
    }

    .container {
        padding: 0 var(--sp-4);
    }
}
