/* HasH-Arch — shared design system (cyber / Material 3, matches NextLVLHasH style) */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Material 3 dark tokens */
    --md-sys-color-primary: #00ff41;
    --md-sys-color-on-primary: #03110a;
    --md-sys-color-surface: #0a0a0f;
    --md-sys-color-on-surface: #e6f0e8;
    --md-sys-color-on-surface-variant: #a8c2b4;  /* muted text — bumped for contrast (AAA on cards) */
    --md-sys-color-outline: #1c2a22;

    /* HasH cyber palette */
    --cyber-green: #00ff41;
    --cyber-purple: #bb86fc;
    --cyber-blue: #64b5f6;
    --cyber-magenta: #d300dc;
    --cyber-violet: #8700ff;
    --cyber-dark: #0a0a0f;
    --cyber-surface: #121218;
    --cyber-surface-2: #171723;

    --nav-height: 80px;
    --content-padding: 24px;
    --maxw: 1180px;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--cyber-dark) 0%, #160a26 50%, var(--cyber-dark) 100%);
    color: var(--md-sys-color-on-surface);
    min-height: 100vh; display: flex; flex-direction: column; line-height: 1.6;
    overflow-x: hidden;
}
a { color: var(--cyber-green); text-decoration: none; }

/* Matrix rain background */
.matrix-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.13; pointer-events: none; }

/* Buttons (Material 3) */
md-filled-button, md-filled-tonal-button, md-outlined-button {
    --md-filled-button-container-shape: 12px;
    --md-filled-tonal-button-container-shape: 12px;
    --md-outlined-button-container-shape: 12px;
    --md-filled-button-container-color: var(--cyber-green);
    --md-filled-button-label-text-color: var(--cyber-dark);
    --md-filled-tonal-button-container-color: rgba(0,255,65,.15);
    --md-filled-tonal-button-label-text-color: var(--cyber-green);
    --md-outlined-button-outline-color: var(--cyber-green);
    --md-outlined-button-label-text-color: var(--cyber-green);
    font-weight: 600;
    /* the global `* { padding:0 }` reset zeroes the host padding Material Web
       relies on for button spacing — restore it so labels aren't crushed
       against the edge (document rule beats the component's own :host) */
    padding-inline: 24px;
}
md-text-button { padding-inline: 12px; }
/* keep icon buttons compact — they center their glyph and need no inline padding */
md-icon-button { padding-inline: 0; }
md-filled-button:hover, md-filled-tonal-button:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,255,65,.3); }
md-text-button { --md-text-button-label-text-color: var(--md-sys-color-on-surface); --md-text-button-container-shape: 8px; }

/* Top nav (glassmorphism) */
.top-nav {
    position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height);
    background: linear-gradient(90deg, rgba(10,10,15,.95) 0%, rgba(26,10,46,.85) 35%, rgba(135,0,255,.12) 50%, rgba(26,10,46,.85) 65%, rgba(10,10,15,.95) 100%);
    backdrop-filter: blur(40px) saturate(1.8); -webkit-backdrop-filter: blur(40px) saturate(1.8);
    display: flex; align-items: center; justify-content: space-between; padding: 0 32px; z-index: 1000;
    box-shadow: 0 8px 32px rgba(0,255,65,.08), 0 2px 8px rgba(0,0,0,.4); border-bottom: 1px solid rgba(0,255,65,.12);
}
.nav-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.nav-logo { width: 40px; height: 40px; border-radius: 10px; display: block;
    filter: drop-shadow(0 2px 7px rgba(0,0,0,.55)); transition: transform .2s ease, filter .2s ease; }
.nav-brand:hover .nav-logo { transform: translateY(-1px) scale(1.05);
    filter: drop-shadow(0 0 13px rgba(199,14,210,.55)); }
.nav-word { font-weight: 800; font-size: 1.2rem; letter-spacing: .3px;
    color: var(--md-sys-color-on-surface); white-space: nowrap; }
.nav-word b { font-weight: 800; color: var(--cyber-green); }
.footer-logo-svg { width: 34px; height: 34px; border-radius: 9px; display: block; }
.nav-title { font-weight: 700; font-size: 1.25rem; letter-spacing: .5px;
    background: linear-gradient(90deg, var(--cyber-green), var(--cyber-purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 8px; }
/* nav icons: muted by default, brighten on hover, green for the current page */
.nav-links md-icon-button { --md-icon-button-icon-color: var(--md-sys-color-on-surface-variant);
    --md-icon-button-icon-size: 22px;
    --md-icon-button-state-layer-width: 44px; --md-icon-button-state-layer-height: 44px; }
.nav-links md-icon-button:hover { --md-icon-button-icon-color: var(--md-sys-color-on-surface); }
.nav-links md-icon-button[data-active] { --md-icon-button-icon-color: var(--cyber-green); }
/* keep the CTA from crowding the icon row: a thin divider + breathing room.
   the divider is a separate element so we never touch the md-filled-button host */
.nav-sep { width: 1px; height: 26px; margin: 0 8px;
    background: rgba(255,255,255,.14); border-radius: 1px; }
.menu-toggle { display: none; }

/* Layout */
main { flex: 1; padding-top: calc(var(--nav-height) + 24px); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--content-padding); }
.section { padding: 56px 0; text-align: center; }
/* centre-aligned site: keep section content centred, and auto-centre the
   flex header rows (icon + title + chips) inside cards */
.section .card > div[style*="display:flex"] { justify-content: center; }
.section .role-tags, .section .socials,
.section .hero-cta, .section .modal-actions { justify-content: center; }
/* code / terminal blocks stay left-aligned even on the centred site */
.section pre, .section code, .verify-box { text-align: left; }
.eyebrow { color: var(--cyber-green); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: .8rem; }
h1,h2,h3 { line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; margin-bottom: 8px; }
.muted { color: var(--md-sys-color-on-surface-variant); }
.gradient-text { background: linear-gradient(90deg, var(--cyber-green), var(--cyber-purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Cards */
.card {
    background: linear-gradient(160deg, var(--cyber-surface) 0%, var(--cyber-surface-2) 100%);
    border: 1px solid rgba(0,255,65,.14); border-radius: 18px; padding: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(0,255,65,.4); box-shadow: 0 16px 40px rgba(0,255,65,.12); }
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
    background: rgba(0,255,65,.1); border: 1px solid rgba(0,255,65,.25); color: var(--cyber-green); font-size: .8rem; font-weight: 600; }
.icon { font-family: 'Material Symbols Outlined'; font-size: 28px; color: var(--cyber-green); }

/* Footer */
footer { border-top: 1px solid rgba(0,255,65,.12); padding: 36px 0; margin-top: 40px; background: rgba(10,10,15,.6); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.footer-links a { color: var(--md-sys-color-on-surface-variant); margin-right: 18px; }
.footer-links a:hover { color: var(--cyber-green); }

/* ── Live OS roadmap ───────────────────────────────────────────────── */
.rm-now {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
    padding: 8px 16px; border-radius: 999px; font-size: .95rem;
    background: rgba(0,255,65,.1); border: 1px solid rgba(0,255,65,.3); color: var(--cyber-green);
}
.rm-now .material-symbols-outlined { font-size: 20px; }
.rm-updated { display: block; margin-top: 10px; font-size: .8rem; }

.rm-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; align-items: start; }
.rm-col {
    background: linear-gradient(160deg, var(--cyber-surface) 0%, var(--cyber-surface-2) 100%);
    border: 1px solid rgba(255,255,255,.06); border-radius: 18px; padding: 16px;
    border-top: 3px solid var(--rm-accent, var(--cyber-green));
}
/* a busy column (8+ cards) caps its height and scrolls its cards, so it
   doesn't tower over (and squash) the shorter columns */
.rm-col.rm-scroll .rm-cards { max-height: 620px; overflow-y: auto; padding-right: 6px;
    scrollbar-width: thin; scrollbar-color: var(--rm-accent, var(--cyber-green)) transparent; }
.rm-col.rm-scroll .rm-cards::-webkit-scrollbar { width: 8px; }
.rm-col.rm-scroll .rm-cards::-webkit-scrollbar-thumb {
    background: var(--rm-accent, var(--cyber-green)); border-radius: 999px; opacity: .6; }
.rm-col.rm-scroll .rm-cards::-webkit-scrollbar-track { background: transparent; }
.rm-col.rm-progress { --rm-accent: var(--cyber-green); }
.rm-col.rm-planned  { --rm-accent: var(--cyber-blue); }
.rm-col.rm-shipped  { --rm-accent: var(--cyber-purple); }
.rm-colhead {
    display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 6px 6px 14px;
    color: var(--md-sys-color-on-surface);
}
.rm-colhead .material-symbols-outlined { color: var(--rm-accent); font-size: 22px; }
.rm-count { margin-left: auto; background: rgba(255,255,255,.07); color: var(--md-sys-color-on-surface-variant);
    border-radius: 999px; padding: 1px 10px; font-size: .8rem; }
.rm-card {
    background: rgba(10,10,15,.5); border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px; padding: 16px; margin-bottom: 12px; transition: border-color .2s, transform .2s;
}
.rm-card:hover { transform: translateY(-2px); border-color: var(--rm-accent, rgba(0,255,65,.4)); }
.rm-card h4 { margin: 8px 0 6px; font-size: 1.02rem; line-height: 1.25; }
.rm-card p { font-size: .88rem; }
.rm-area { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: var(--md-sys-color-on-surface-variant); }
.rm-empty { padding: 8px 6px; font-size: .85rem; }

/* in-progress = "live" pulse */
.rm-card.rm-live { border-color: rgba(0,255,65,.45); box-shadow: 0 0 0 0 rgba(0,255,65,.35); animation: rm-pulse 2.6s infinite; }
@keyframes rm-pulse { 0% { box-shadow: 0 0 0 0 rgba(0,255,65,.28); } 70% { box-shadow: 0 0 0 8px rgba(0,255,65,0); } 100% { box-shadow: 0 0 0 0 rgba(0,255,65,0); } }

/* homepage featured strip */
.rm-feat-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rm-livechip { background: rgba(0,255,65,.12); border-color: rgba(0,255,65,.4); }
.rm-livechip .material-symbols-outlined { font-size: 16px; }
.rm-feat-now { font-weight: 600; color: var(--md-sys-color-on-surface); }
.rm-feat-stats { margin-top: 18px; font-size: .9rem; letter-spacing: .3px; }

/* ── Modal (alpha "not built yet" popup, reusable) ───────────────────── */
.modal { position: fixed; inset: 0; z-index: 2000; display: none;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(5,5,10,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal.open { display: flex; animation: modal-fade .2s ease; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card { max-width: 440px; width: 100%; text-align: center;
    background: linear-gradient(160deg, var(--cyber-surface) 0%, var(--cyber-surface-2) 100%);
    border: 1px solid rgba(0,255,65,.25); border-radius: 20px; padding: 32px 28px;
    box-shadow: 0 24px 60px rgba(0,0,0,.6), 0 0 40px rgba(0,255,65,.08);
    animation: modal-pop .25s cubic-bezier(.2,.9,.3,1.2); }
@keyframes modal-pop { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-card .modal-emoji { font-size: 2.6rem; line-height: 1; }
.modal-card h3 { font-size: 1.4rem; margin: 14px 0 8px; }
.modal-card p { color: var(--md-sys-color-on-surface-variant); margin-bottom: 8px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.modal-countdown { font-size: .82rem; color: var(--md-sys-color-on-surface-variant); margin-top: 14px; }
.modal-x { position: absolute; top: 16px; right: 18px; cursor: pointer; color: var(--md-sys-color-on-surface-variant);
    background: none; border: none; font-size: 1.4rem; line-height: 1; }
.modal-x:hover { color: var(--cyber-green); }

/* ── Mobile drawer (generated by site.js from the nav) ───────────────── */
.drawer-overlay { position: fixed; inset: 0; z-index: 1500; background: rgba(5,5,10,.6);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1600;
    width: min(80vw, 300px); transform: translateX(105%);
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    background: linear-gradient(160deg, var(--cyber-surface) 0%, #14141f 100%);
    border-left: 1px solid rgba(0,255,65,.18); box-shadow: -20px 0 50px rgba(0,0,0,.5);
    padding: calc(var(--nav-height) - 16px) 16px 24px; display: flex; flex-direction: column; gap: 4px; }
.mobile-drawer.open { transform: none; }
/* drawer rows: icon + label (built by site.js — labelled even though the top nav is icon-only) */
.mobile-drawer .drawer-link { display: flex; align-items: center; gap: 13px; padding: 12px 14px;
    border-radius: 11px; color: var(--md-sys-color-on-surface); text-decoration: none; font-weight: 600; }
.mobile-drawer .drawer-link:hover { background: rgba(255,255,255,.05); }
.mobile-drawer .drawer-link[data-active] { color: var(--cyber-green); background: rgba(0,255,65,.08); }
.mobile-drawer .drawer-link .material-symbols-outlined { font-size: 22px; }
.mobile-drawer .drawer-link.cta { background: var(--cyber-green); color: var(--cyber-dark); justify-content: center; margin-top: 8px; }

/* Mobile */
@media (max-width: 900px) {
    .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
    .rm-board { grid-template-columns: 1fr; }
    /* on mobile the columns already stack full-width — let busy ones scroll too */
    .rm-col.rm-scroll .rm-cards { max-height: 70vh; }
    .nav-links { display: none; }
    .menu-toggle { display: inline-flex; }
}
@media (min-width: 901px) { .mobile-drawer, .drawer-overlay { display: none; } }

/* ── Accessibility: skip link, focus rings, reduced motion ───────────── */
.skip-link { position: fixed; top: -64px; left: 12px; z-index: 3000;
    background: var(--cyber-green); color: var(--cyber-dark); padding: 10px 16px;
    border-radius: 10px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.4);
    transition: top .2s ease; }
.skip-link:focus { top: 12px; outline: none; }
:focus-visible { outline: 2px solid var(--cyber-green); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
.card:focus-visible, .rm-card:focus-visible, .edition:focus-visible { outline-offset: 5px; }

/* Respect users who ask for less motion: stop the rain + UI animations. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important; animation-iteration-count: 1 !important;
        transition-duration: .001ms !important; scroll-behavior: auto !important;
    }
    .matrix-bg { opacity: .05; }
    .rm-card.rm-live { animation: none; box-shadow: 0 0 0 1px rgba(0,255,65,.4); }
    md-filled-button:hover, md-filled-tonal-button:hover { transform: none; }
}
