/* ============================================================
   IMMILEARN — SINGLE-PAGE WEBSITE
   Futuristic OS / command-centre interface
   Palette: deep black · smoke white · snow white · grays  (unchanged)
   Fonts: Space Grotesk (display) · Manrope (body) · JetBrains Mono (system)
   ============================================================ */

/* ------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------ */
:root {
    /* Backgrounds — deep blacks, never flat #000 */
    --bg-deep: #050505;
    --bg-base: #0b0b0b;
    --bg-raised: #101010;
    --bg-card: #151515;
    --bg-card-hover: #1a1a1a;

    /* Text — soft whites, never pure #fff */
    --text-primary: #f5f5f5;
    --text-snow: #f8f8f8;
    --text-secondary: #d6d6d6;
    --text-tertiary: #c8c8c8;
    --text-quiet: #b8b8b8;
    --text-muted: #999999;

    /* Borders */
    --border-soft: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);

    /* Type */
    --font-display: "Space Grotesk", sans-serif;
    --font-body: "Manrope", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Fluid type scale */
    --fs-hero: clamp(2.25rem, 5vw, 4rem);
    --fs-h2: clamp(1.8rem, 4vw, 2.9rem);
    --fs-h3: clamp(1.25rem, 2.2vw, 1.6rem);
    --fs-body: clamp(0.98rem, 1.1vw, 1.06rem);
    --fs-small: 0.875rem;
    --fs-mono: 0.7rem;

    /* Layout */
    --max-width: 1280px;
    --section-pad: clamp(4.5rem, 9vw, 8rem);
    --titlebar-h: 30px;
    --menubar-h: 62px;
    --header-h: calc(var(--titlebar-h) + var(--menubar-h));
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --dur: 0.55s;

    /* Shadows */
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.45);
    --shadow-lift: 0 18px 50px rgba(0, 0, 0, 0.6);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

/* Lock scroll while the boot overlay is on screen */
html.is-booting,
html.is-booting body {
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.7;
    color: var(--text-quiet);
    background-color: var(--bg-deep);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.25s var(--ease-out);
}

a:hover {
    color: var(--text-secondary);
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

button {
    font: inherit;
}

/* Visible keyboard focus */
:focus-visible {
    outline: 2px solid var(--text-snow);
    outline-offset: 3px;
    border-radius: 3px;
}

::selection {
    background: rgba(245, 245, 245, 0.9);
    color: #0b0b0b;
}

.skip-link {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%, -140%);
    z-index: 2000;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding: 0.6rem 1.2rem;
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    color: var(--text-primary);
    transition: transform 0.25s var(--ease-out);
}

.skip-link:focus-visible {
    transform: translate(-50%, 0);
}

/* Layout container */
.container {
    width: min(100% - 3rem, var(--max-width));
    margin-inline: auto;
}

/* Shared monospace system labels */
.mono-label,
.panel-label {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.panel-label {
    display: block;
    margin-bottom: 0.9rem;
}

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

/* Status LED — monochrome, slow soft pulse */
.led {
    display: inline-block;
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--text-secondary);
    margin-right: 0.5rem;
    box-shadow: 0 0 0 0 rgba(245, 245, 245, 0.35);
    animation: ledPulse 2.8s ease-in-out infinite;
}

@keyframes ledPulse {

    0%,
    100% {
        opacity: 0.45;
        box-shadow: 0 0 0 0 rgba(245, 245, 245, 0.28);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 0 4px rgba(245, 245, 245, 0);
    }
}

/* Window traffic-light dots (monochrome) */
.win-dots {
    display: inline-flex;
    gap: 6px;
    flex: 0 0 auto;
}

.win-dots i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s var(--ease-out);
}

.win-dots i:nth-child(1) {
    background: rgba(255, 255, 255, 0.28);
}

.win-dots i:nth-child(2) {
    background: rgba(255, 255, 255, 0.2);
}

/* ------------------------------------------------------------
   3. BOOT OVERLAY
   ------------------------------------------------------------ */
/* Hidden unless the inline head script flagged a boot (no JS / reduced
   motion therefore never shows it); removing the flag tears it down. */
.boot {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: var(--bg-deep);
    place-items: center;
    transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}

html.is-booting .boot {
    display: grid;
}

.boot::after {
    /* faint scan overlay on the boot screen */
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to bottom,
            rgba(255, 255, 255, 0.018) 0 1px,
            transparent 1px 3px);
    pointer-events: none;
}

.boot.done {
    opacity: 0;
    visibility: hidden;
}

.boot-inner {
    width: min(340px, 78vw);
    text-align: left;
}

.boot-mark {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.14em;
    color: var(--text-primary);
    margin-bottom: 1.4rem;
}

.boot-mark img {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.boot-log {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.06em;
    color: var(--text-muted);
    min-height: 5.4em;
    margin-bottom: 1rem;
}

.boot-log li {
    opacity: 0;
    transform: translateY(3px);
    transition: opacity 0.25s linear, transform 0.25s var(--ease-out);
    line-height: 1.35;
}

.boot-log li.on {
    opacity: 1;
    transform: none;
    color: var(--text-tertiary);
}

.boot-bar {
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.boot-bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--text-muted), var(--text-snow));
    transition: width 0.12s linear;
}

.boot-pct {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    color: var(--text-muted);
    margin-top: 0.55rem;
    letter-spacing: 0.14em;
}

/* ------------------------------------------------------------
   4. AMBIENT OS ENVIRONMENT
   ------------------------------------------------------------ */
.os-env {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Fine technical grid, slowly drifting */
.os-grid {
    position: absolute;
    inset: -80px;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 64px 64px;
    animation: gridDrift 46s linear infinite;
}

@keyframes gridDrift {
    to {
        transform: translate3d(64px, 64px, 0);
    }
}

/* Very subtle scan lines */
.os-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to bottom,
            rgba(255, 255, 255, 0.014) 0 1px,
            transparent 1px 4px);
    mix-blend-mode: screen;
}

/* Soft film noise */
.os-noise {
    position: absolute;
    inset: -100%;
    opacity: 0.035;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.5'/></svg>");
    animation: noiseShift 1.1s steps(4) infinite;
}

@keyframes noiseShift {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-3%, 2%);
    }

    50% {
        transform: translate(2%, -3%);
    }

    75% {
        transform: translate(-2%, -2%);
    }

    100% {
        transform: translate(0, 0);
    }
}

.os-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 70% at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

/* Pointer decor */
.mouse-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
    /* Held back until the pointer first moves, so it never parks in a corner */
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s var(--ease-out);
}

.mouse-glow.on {
    opacity: 1;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2500;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
        opacity 0.3s, border-color 0.25s, background 0.25s;
}

.cursor-ring.on {
    opacity: 1;
}

.cursor-ring.hot {
    width: 44px;
    height: 44px;
    border-color: rgba(245, 245, 245, 0.5);
    background: rgba(255, 255, 255, 0.04);
}

.scroll-progress {
    position: fixed;
    inset: 0 auto auto 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #999999, var(--text-snow));
    z-index: 1600;
}

/* ------------------------------------------------------------
   5. HEADER — OS TITLE BAR + MENU BAR
   ------------------------------------------------------------ */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1500;
    background: rgba(5, 5, 5, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid transparent;
    transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out),
        backdrop-filter 0.35s var(--ease-out);
}

.header.scrolled {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-bottom-color: var(--border-soft);
}

/* Title bar */
.titlebar {
    height: var(--titlebar-h);
    border-bottom: 1px solid var(--border-soft);
    background: rgba(11, 11, 11, 0.5);
}

.titlebar-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.titlebar-path,
.titlebar-status {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.16em;
    color: var(--text-muted);
    white-space: nowrap;
}

.titlebar-path {
    margin-left: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.titlebar-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.titlebar-status .stat {
    display: inline-flex;
    align-items: center;
    color: var(--text-tertiary);
}

.titlebar-status .dim-only {
    color: var(--text-muted);
}

.clock {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 7.2ch;
    text-align: right;
}

/* Menu bar */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--menubar-h);
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.brand-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    background: var(--bg-raised);
    padding: 2px;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.nav-list {
    display: flex;
    gap: 0.35rem;
}

/* Nav items read like OS menu entries */
.nav-link {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-quiet);
    padding: 0.45rem 0.85rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: color 0.25s var(--ease-out), background 0.25s, border-color 0.25s;
}

.nav-idx {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    opacity: 0.7;
    transition: opacity 0.25s, color 0.25s;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.15rem;
    height: 1px;
    background: var(--text-snow);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-snow);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-soft);
}

.nav-link:hover .nav-idx,
.nav-link.active .nav-idx {
    opacity: 1;
    color: var(--text-quiet);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.hamburger span {
    width: 18px;
    height: 1.5px;
    background: var(--text-primary);
    transition: transform 0.3s var(--ease-out), opacity 0.3s;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ------------------------------------------------------------
   6. MOBILE SYSTEM MENU
   ------------------------------------------------------------ */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.35s var(--ease-out);
    z-index: 1700;
}

.mobile-overlay.open {
    opacity: 1;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(330px, 88vw);
    background: var(--bg-raised);
    border-left: 1px solid var(--border-strong);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    z-index: 1701;
    display: flex;
    flex-direction: column;
    box-shadow: -30px 0 60px rgba(0, 0, 0, 0.6);
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 46px;
    padding-inline: 1rem;
    border-bottom: 1px solid var(--border-soft);
    background: var(--bg-base);
}

.mobile-menu-head .mono-label {
    margin-left: 0.25rem;
}

.mobile-close {
    margin-left: auto;
    background: none;
    border: 0;
    color: var(--text-primary);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    padding: 1rem 0.85rem;
    gap: 0.3rem;
}

.mobile-link {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    padding: 0.95rem 0.9rem;
    min-height: 48px;
    font-family: var(--font-display);
    font-size: 1.02rem;
    color: var(--text-quiet);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: background 0.25s, color 0.25s, border-color 0.25s, padding-left 0.25s var(--ease-out);
}

.mobile-link:hover,
.mobile-link.active {
    background: var(--bg-card);
    border-color: var(--border-soft);
    color: var(--text-snow);
    padding-left: 1.2rem;
}

.mobile-menu-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    border-top: 1px solid var(--border-soft);
    background: var(--bg-base);
}

.mobile-menu-foot span {
    display: inline-flex;
    align-items: center;
}

/* ------------------------------------------------------------
   7. SECTION RAIL (desktop active-section indicator)
   ------------------------------------------------------------ */
.rail {
    position: fixed;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: flex-end;
}

.rail a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.15rem 0;
}

.rail-tick {
    display: block;
    width: 18px;
    height: 1px;
    background: rgba(255, 255, 255, 0.22);
    transition: width 0.35s var(--ease-out), background 0.35s;
}

.rail-name {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
    order: -1;
}

.rail a:hover .rail-name,
.rail a.active .rail-name {
    opacity: 1;
    transform: none;
}

.rail a:hover .rail-tick,
.rail a.active .rail-tick {
    width: 30px;
    background: var(--text-snow);
}

/* ------------------------------------------------------------
   8. WINDOW / PANEL COMPONENT
   ------------------------------------------------------------ */
.win {
    position: relative;
    background: rgba(21, 21, 21, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out),
        transform 0.4s var(--ease-out);
}

.win:hover {
    border-color: var(--border-strong);
}

/* Window chrome */
.win-bar {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    height: 38px;
    padding-inline: 0.9rem;
    background: rgba(11, 11, 11, 0.75);
    border-bottom: 1px solid var(--border-soft);
}

.win-title {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.14em;
    text-transform: lowercase;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.win-meta {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.16em;
    color: var(--text-muted);
    white-space: nowrap;
}

.app-id {
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    padding: 0.15rem 0.4rem;
    color: var(--text-quiet);
    letter-spacing: 0.1em;
}

.win-body {
    position: relative;
    padding: clamp(1.4rem, 3vw, 2.4rem);
}

/* Corner ticks — subtle technical framing */
.win::before,
.win::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}

.win::before {
    left: 6px;
    bottom: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.win::after {
    right: 6px;
    bottom: 6px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.win:hover::before,
.win:hover::after {
    opacity: 1;
}

/* ------------------------------------------------------------
   9. HERO — workstation view
   ------------------------------------------------------------ */
.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    padding-top: var(--header-h);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 11s ease-in-out infinite alternate;
}

.hero-orb-1 {
    width: 440px;
    height: 440px;
    top: 8%;
    left: 4%;
    background: rgba(255, 255, 255, 0.045);
}

.hero-orb-2 {
    width: 360px;
    height: 360px;
    bottom: 8%;
    right: 6%;
    background: rgba(255, 255, 255, 0.035);
    animation-delay: -5s;
}

@keyframes float {
    from {
        transform: translateY(-16px);
    }

    to {
        transform: translateY(16px);
    }
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem);
    padding-block: clamp(3rem, 7vw, 5.5rem) clamp(4rem, 8vw, 6rem);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    margin-bottom: 1.6rem;
    background: rgba(255, 255, 255, 0.02);
}

.hero-title {
    font-size: var(--fs-hero);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.4rem;
}

.hero-title-accent {
    background: linear-gradient(120deg, var(--text-snow) 20%, #999999 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    max-width: 40rem;
    color: var(--text-quiet);
    margin-bottom: 1.6rem;
}

/* Terminal prompt line under the copy */
.hero-prompt {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    padding-block: 0.7rem;
    margin-bottom: 2rem;
    min-height: 2.9em;
}

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

.caret {
    display: inline-block;
    width: 7px;
    height: 1em;
    background: var(--text-secondary);
    animation: blink 1.1s steps(2, start) infinite;
    translate: 0 0.14em;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero system panel */
.hero-panel .win {
    background: rgba(16, 16, 16, 0.72);
}

.term-head {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.22em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.term-list {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    line-height: 2;
    color: var(--text-quiet);
}

.term-line {
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.3s linear, transform 0.3s var(--ease-out);
}

.term-line.on {
    opacity: 1;
    transform: none;
}

.ok {
    color: var(--text-snow);
    margin-right: 0.5rem;
}

.term-divider {
    height: 1px;
    background: var(--border-soft);
    margin-block: 1.2rem;
}

/* Readout grid */
.readout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-soft);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.readout>div {
    background: rgba(11, 11, 11, 0.65);
    padding: 0.8rem 0.9rem;
}

.readout dt {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.readout dd {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-snow);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 40px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 7px;
}

.scroll-indicator-line {
    width: 2px;
    height: 9px;
    background: var(--text-quiet);
    border-radius: 2px;
    animation: scrollNudge 1.8s ease-in-out infinite;
}

@keyframes scrollNudge {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    70% {
        transform: translateY(11px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 0;
    }
}

/* ------------------------------------------------------------
   10. BUTTONS
   ------------------------------------------------------------ */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 46px;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
        background 0.3s, color 0.3s, border-color 0.3s;
}

/* Bracket framing reads as a console command */
.btn::before {
    content: "[";
    margin-right: 0.15rem;
    opacity: 0.45;
    transition: opacity 0.3s, transform 0.3s var(--ease-out);
}

.btn::after {
    content: "]";
    margin-left: 0.15rem;
    opacity: 0.45;
    transition: opacity 0.3s, transform 0.3s var(--ease-out);
}

.btn:hover::before {
    opacity: 1;
    transform: translateX(-2px);
}

.btn:hover::after {
    opacity: 1;
    transform: translateX(2px);
}

.btn-primary {
    background: var(--text-snow);
    color: #0b0b0b;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(245, 245, 245, 0.14);
    color: #050505;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    border-color: var(--border-strong);
}

.btn-ghost:hover {
    border-color: var(--text-quiet);
    color: var(--text-snow);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn-arrow {
    transition: transform 0.3s var(--ease-out);
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* JS-injected ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    transform: scale(0);
    animation: ripple 0.6s ease-out forwards;
    pointer-events: none;
}

.btn-ghost .ripple {
    background: rgba(255, 255, 255, 0.12);
}

@keyframes ripple {
    to {
        transform: scale(3);
        opacity: 0;
    }
}

/* ------------------------------------------------------------
   11. SECTIONS — shared scaffolding
   ------------------------------------------------------------ */
.section {
    position: relative;
    z-index: 1;
    padding-block: var(--section-pad);
}

.section-alt {
    background: rgba(11, 11, 11, 0.6);
    border-block: 1px solid var(--border-soft);
}

.section-head {
    max-width: 46rem;
    margin: 0 auto 3rem;
    text-align: center;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.section-title {
    font-size: var(--fs-h2);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-sub {
    color: var(--text-quiet);
}

/* ------------------------------------------------------------
   12. ABOUT
   ------------------------------------------------------------ */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3.5vw, 2.5rem);
    align-items: start;
}

.about-story p {
    margin-bottom: 1.2rem;
}

.about-story p:last-child {
    margin-bottom: 0;
}

.about-achievements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.achieve-card {
    position: relative;
    background: rgba(21, 21, 21, 0.7);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.3rem 1.4rem;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.35s var(--ease-out), border-color 0.35s, background 0.35s;
}

/* Sweeping highlight on hover */
.achieve-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.05) 50%, transparent 65%);
    transform: translateX(-100%);
    transition: transform 0.7s var(--ease-out);
    pointer-events: none;
}

.achieve-card:hover::after {
    transform: translateX(100%);
}

.achieve-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
    background: rgba(26, 26, 26, 0.8);
}

.mod-id {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-bottom: 0.7rem;
}

.achieve-icon {
    font-size: 1.4rem;
    display: inline-block;
    margin-bottom: 0.55rem;
    filter: grayscale(100%);
    opacity: 0.9;
    transition: filter 0.4s, opacity 0.4s;
}

.achieve-card:hover .achieve-icon {
    filter: grayscale(0%);
    opacity: 1;
}

.achieve-card h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.achieve-card p {
    font-size: 0.9rem;
    color: var(--text-quiet);
}

/* Global presence */
.global-presence {
    margin-top: 1.5rem;
}

.global-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.global-copy {
    max-width: 46rem;
}

.global-copy h3 {
    font-size: var(--fs-h3);
    margin-bottom: 0.6rem;
}

.global-copy p {
    color: var(--text-quiet);
}

.global-flags {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.flag-chip {
    display: inline-flex;
    align-items: center;
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    white-space: nowrap;
}

/* ------------------------------------------------------------
   13. PRODUCTS
   ------------------------------------------------------------ */
.product-card {
    margin-bottom: 2rem;
}

.product-card:last-child {
    margin-bottom: 0;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.product-badge {
    display: inline-block;
    background: var(--text-snow);
    color: #0b0b0b;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 3px;
    margin-bottom: 1.1rem;
}

.product-head {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    margin-bottom: 1.4rem;
}

.product-icon {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--bg-raised);
    border: 1px solid var(--border-soft);
    padding: 8px;
    transition: transform 0.4s var(--ease-out), border-color 0.4s;
}

.product-card:hover .product-icon {
    transform: scale(1.05);
    border-color: var(--border-strong);
}

.product-name {
    font-size: var(--fs-h3);
    margin-bottom: 0.2rem;
}

.product-tag {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.product-desc {
    margin-bottom: 1.15rem;
    color: var(--text-secondary);
    max-width: 68rem;
}

.product-subhead {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-soft);
}

/* Feature lists */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 0.6rem 1.75rem;
    margin-bottom: 1.6rem;
}

.feature-grid li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-quiet);
    font-size: 0.94rem;
    transition: color 0.25s;
}

.feature-grid li::before {
    content: "▸";
    position: absolute;
    left: 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color 0.25s, transform 0.25s var(--ease-out);
}

.feature-grid li:hover {
    color: var(--text-secondary);
}

.feature-grid li:hover::before {
    color: var(--text-snow);
    transform: translateX(2px);
}

/* Nested sub-module */
.studio-block {
    background: rgba(11, 11, 11, 0.6);
    border: 1px solid var(--border-soft);
    border-left: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: clamp(1.2rem, 3vw, 1.9rem);
    margin-block: 0.5rem 1.6rem;
}

.product-note {
    color: var(--text-quiet);
    font-size: 0.93rem;
    border-top: 1px solid var(--border-soft);
    padding-top: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-soft);
}

/* ------------------------------------------------------------
   14. TEAM — user directory
   ------------------------------------------------------------ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.15rem;
}

.team-card {
    position: relative;
    background: rgba(11, 11, 11, 0.6);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out),
        border-color 0.4s, background 0.4s;
}

.team-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    background: rgba(21, 21, 21, 0.8);
    box-shadow: var(--shadow-lift), 0 0 32px rgba(255, 255, 255, 0.045);
}

/* Profile header strip */
.team-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 28px;
    padding-inline: 0.7rem;
    background: rgba(5, 5, 5, 0.6);
    border-bottom: 1px solid var(--border-soft);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    color: var(--text-muted);
}

.team-head .uid {
    color: var(--text-quiet);
}

.team-head .led {
    margin-left: auto;
    margin-right: 0;
}

.team-photo {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-raised);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.02);
    transition: transform 0.6s var(--ease-out), filter 0.6s;
}

.team-card:hover .team-photo img {
    transform: scale(1.05);
    filter: grayscale(20%);
}

/* Scan overlay across the portrait */
.team-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(to bottom,
            rgba(0, 0, 0, 0.16) 0 1px,
            transparent 1px 3px);
    opacity: 0.5;
    transition: opacity 0.4s;
    pointer-events: none;
}

.team-card:hover .team-photo::after {
    opacity: 0.18;
}

.team-info {
    padding: 1rem 1rem 1.15rem;
}

.team-name {
    font-size: 1.02rem;
    margin-bottom: 0.2rem;
}

.team-role {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

.team-exrole {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    margin-top: 0.3rem;
}

.team-social {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.team-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-quiet);
    transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out);
}

.team-social a:hover {
    background: var(--text-snow);
    color: #0b0b0b;
    border-color: var(--text-snow);
    transform: translateY(-2px);
}

.team-social svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ------------------------------------------------------------
   15. CONTACT — command console
   ------------------------------------------------------------ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3.5vw, 2.5rem);
    align-items: start;
}

.contact-company {
    font-size: var(--fs-h3);
    margin-bottom: 1.6rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-soft);
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.contact-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--bg-raised);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    filter: grayscale(100%);
    opacity: 0.95;
}

.contact-item h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.contact-item p,
.contact-item a {
    color: var(--text-quiet);
    font-size: 0.94rem;
}

.contact-item a:hover {
    color: var(--text-snow);
}

/* Live map, framed as a nested OS module */
.map-module {
    margin-top: 1.4rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-base);
    transition: border-color 0.35s var(--ease-out);
}

.map-module:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.8rem;
    background: rgba(5, 5, 5, 0.7);
    border-bottom: 1px solid var(--border-soft);
}

.map-coords {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.1em;
    color: var(--text-quiet);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.map-frame {
    position: relative;
    height: clamp(200px, 28vw, 280px);
    background: var(--bg-raised);
}

.map-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    /* Google's tiles ship in full colour — invert + desaturate so the map
       reads as a dark monochrome plate like the rest of the interface.
       Delete this one line to show the map in its original colours. */
    filter: grayscale(1) invert(0.92) contrast(0.9) brightness(0.96);
}

/* Scan overlay + corner ticks; never blocks panning or zooming */
.map-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(to bottom,
            rgba(255, 255, 255, 0.02) 0 1px,
            transparent 1px 3px),
        radial-gradient(ellipse 80% 70% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.4) 100%);
}

.map-open {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 0.8rem;
    border-top: 1px solid var(--border-soft);
    background: rgba(5, 5, 5, 0.7);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-quiet);
    transition: background 0.3s, color 0.3s;
}

.map-open:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-snow);
}

.map-open:hover .btn-arrow {
    transform: translateX(4px);
}

/* Console form */
.form-field {
    margin-bottom: 1.25rem;
}

.form-field label {
    display: block;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-quiet);
    margin-bottom: 0.45rem;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(5, 5, 5, 0.6);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding-left: 0.85rem;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.input-wrap-area {
    align-items: flex-start;
    padding-top: 0.85rem;
}

.input-sign {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1;
    transition: color 0.3s;
}

.input-wrap:focus-within {
    border-color: var(--text-quiet);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
    background: rgba(11, 11, 11, 0.75);
}

.input-wrap:focus-within .input-sign {
    color: var(--text-snow);
}

.form-field input,
.form-field textarea {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    padding: 0.8rem 0.9rem 0.8rem 0;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--text-primary);
    resize: vertical;
    line-height: 1.6;
}

.form-field textarea {
    padding-top: 0;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(153, 153, 153, 0.72);
}

.input-wrap:has(.invalid),
.form-field input.invalid,
.form-field textarea.invalid {
    border-color: var(--text-secondary);
}

.input-wrap:has(.invalid) {
    box-shadow: inset 2px 0 0 var(--text-secondary);
}

.form-error {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    margin-top: 0.45rem;
}

.form-error::before {
    content: "[ ! ] ";
    color: var(--text-snow);
}

.form-success {
    margin-top: 1rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    line-height: 1.7;
    text-align: center;
}

/* ------------------------------------------------------------
   16. FOOTER — OS status bar
   ------------------------------------------------------------ */
.footer {
    position: relative;
    z-index: 1;
    background: rgba(11, 11, 11, 0.75);
    border-top: 1px solid var(--border-soft);
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-block: 0.75rem;
    border-bottom: 1px solid var(--border-soft);
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

.footer-status span {
    display: inline-flex;
    align-items: center;
}

.footer-status span:last-child {
    margin-left: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem;
    padding-block: 3rem;
}

.footer-tagline {
    color: var(--text-muted);
    margin-top: 0.9rem;
    font-size: 0.92rem;
}

.footer h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.05rem;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.55rem;
    color: var(--text-quiet);
    font-size: 0.93rem;
}

.footer-links a,
.footer-contact a {
    color: var(--text-quiet);
    position: relative;
}

.footer-links a::before {
    content: "› ";
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.25s;
}

.footer-links a:hover::before {
    opacity: 1;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--text-snow);
}

.footer-bottom {
    border-top: 1px solid var(--border-soft);
    padding-block: 1.35rem;
    text-align: center;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

/* ------------------------------------------------------------
   17. BACK TO TOP
   ------------------------------------------------------------ */
.back-to-top {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: rgba(21, 21, 21, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out),
        visibility 0.35s, background 0.3s, color 0.3s;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--text-snow);
    color: #0b0b0b;
}

/* ------------------------------------------------------------
   18. SCROLL REVEAL
   ------------------------------------------------------------ */
/* Reveals drive the independent `translate`/`scale` properties rather than
   `transform`, so card hover lifts (which do use `transform`) still compose
   instead of being overridden by the more specific `.reveal.in-view` rule. */
.reveal {
    opacity: 0;
    translate: 0 24px;
    transition: opacity var(--dur) var(--ease-out), translate var(--dur) var(--ease-out),
        scale var(--dur) var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.in-view {
    opacity: 1;
    translate: 0 0;
}

/* Window panels reveal with a slight scale, like an app opening */
.win.reveal {
    scale: 0.99;
}

.win.reveal.in-view {
    scale: 1;
}

/* ------------------------------------------------------------
   19. RESPONSIVE BREAKPOINTS
   ------------------------------------------------------------ */

/* ≤1200px — collapse the hero into a single column, drop the rail */
@media (max-width: 1200px) {
    .rail {
        display: none;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-panel {
        max-width: 460px;
    }

    .hero-sub {
        max-width: 46rem;
    }

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

    .about-achievements {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

/* ≤992px — mobile navigation takes over */
@media (max-width: 992px) {
    .nav-desktop {
        display: none;
    }

    .hamburger {
        display: flex;
    }

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

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

    .titlebar-status .dim-only {
        display: none;
    }
}

/* ≤768px — trim decorative layers, stack panels */
@media (max-width: 768px) {
    :root {
        --menubar-h: 58px;
    }

    .os-noise,
    .mouse-glow,
    .cursor-ring {
        display: none;
    }

    .os-grid {
        background-size: 48px 48px;
        animation: none;
    }

    .hero {
        min-height: auto;
    }

    .hero-panel {
        max-width: none;
    }

    .scroll-indicator {
        display: none;
    }

    .about-achievements {
        grid-template-columns: 1fr 1fr;
    }

    .global-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.85rem;
    }

    .footer-status span:last-child {
        margin-left: 0;
    }
}

/* ≤576px */
@media (max-width: 576px) {
    .titlebar-path {
        font-size: 0.6rem;
    }

    .titlebar-status .stat {
        display: none;
    }

    .about-achievements {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-cta .btn,
    .product-actions .btn {
        width: 100%;
    }

    .win-body {
        padding: 1.15rem 1rem 1.35rem;
    }

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

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

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

/* ≤360px */
@media (max-width: 360px) {
    .container {
        width: calc(100% - 1.75rem);
    }

    .brand-name {
        font-size: 0.98rem;
    }

    .win-meta .app-id {
        display: none;
    }

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

/* ≥1440px — a touch more breathing room */
@media (min-width: 1440px) {
    :root {
        --section-pad: clamp(6rem, 8vw, 9rem);
    }
}

/* Coarse pointers: no hover decor, larger touch targets */
@media (pointer: coarse) {

    .cursor-ring,
    .mouse-glow {
        display: none;
    }

    .win::before,
    .win::after {
        display: none;
    }
}

/* ------------------------------------------------------------
   20. REDUCED MOTION
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal,
    .win.reveal {
        opacity: 1;
        translate: none;
        scale: none;
    }

    .boot {
        display: none;
    }

    .term-line,
    .boot-log li {
        opacity: 1;
        transform: none;
    }

    .os-noise,
    .os-scan,
    .mouse-glow,
    .cursor-ring,
    .scroll-indicator,
    .caret {
        display: none;
    }

    .os-grid {
        animation: none;
    }
}
