/* =========================================================
   FLUID — interactive landing page
   Built on top of Pavel Dobryakov's WebGL Fluid Simulation
   ========================================================= */

:root {
    --bg: #030407;
    --ink: #f2f7f6;
    --muted: rgba(226, 240, 238, 0.62);
    --muted-strong: rgba(226, 240, 238, 0.78);
    --line: rgba(255, 255, 255, 0.11);
    --line-strong: rgba(255, 255, 255, 0.2);
    --mint: #9dffdc;
    --mint-soft: rgba(157, 255, 220, 0.16);
    --violet: #c9b6ff;
    --glass: rgba(8, 13, 17, 0.55);
    --font-sans: "Inter", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
    --font-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    background: var(--bg);
}

html.menu-open {
    overflow: hidden;
}

body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body ::selection {
    background: rgba(157, 255, 220, 0.28);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 4px;
}

/* ---------- Fluid background ---------- */

.fluid-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--bg);
}

#fluid {
    display: block;
    width: 100%;
    height: 100%;
}

.fluid-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(115% 85% at 50% 46%, rgba(3, 4, 7, 0) 38%, rgba(3, 4, 7, 0.28) 72%, rgba(3, 4, 7, 0.8) 100%),
        linear-gradient(180deg, rgba(3, 4, 7, 0.55) 0%, rgba(3, 4, 7, 0) 26%, rgba(3, 4, 7, 0) 62%, rgba(3, 4, 7, 0.7) 100%);
}

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px clamp(20px, 4vw, 48px);
    pointer-events: none;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0 0 -34px;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(3, 4, 7, 0.82) 0%, rgba(3, 4, 7, 0.46) 55%, rgba(3, 4, 7, 0) 100%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    letter-spacing: 0.02em;
}

.brand-mark {
    position: relative;
    display: block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #d9fff3 0%, #8ef0d4 28%, #6fb9ff 62%, #7d55ff 100%);
    box-shadow: 0 0 18px rgba(130, 236, 255, 0.55), 0 0 42px rgba(125, 120, 255, 0.35);
    animation: mark-pulse 4.5s ease-in-out infinite;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.brand-sub {
    padding-left: 9px;
    border-left: 1px solid var(--line-strong);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.28em;
}

@keyframes mark-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 28px);
    pointer-events: auto;
}

.header-link {
    position: relative;
    color: var(--muted-strong);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.header-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 1px;
    background: var(--mint);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out);
}

.header-link:hover {
    color: var(--ink);
}

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

.menu-button {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    padding: 11px 17px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(9, 14, 18, 0.42);
    color: var(--ink);
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}

.menu-button:hover {
    border-color: rgba(157, 255, 220, 0.55);
    background: rgba(13, 24, 26, 0.6);
    box-shadow: 0 0 0 4px rgba(157, 255, 220, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.menu-button:active {
    transform: translateY(0) scale(0.985);
}

.menu-button-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
}

.hamburger {
    position: relative;
    display: block;
    width: 18px;
    height: 12px;
}

.hamburger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.35s var(--ease-out), width 0.35s var(--ease-out);
}

.hamburger span:first-child {
    top: 0;
}

.hamburger span:last-child {
    bottom: 0;
    width: 68%;
}

.menu-button:hover .hamburger span:last-child {
    width: 100%;
}

.menu-button[aria-expanded="true"] .hamburger span:first-child {
    transform: translateY(5px) rotate(45deg);
}

.menu-button[aria-expanded="true"] .hamburger span:last-child {
    width: 100%;
    transform: translateY(-5px) rotate(-45deg);
}

/* ---------- Hero ---------- */

main {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.hero {
    position: relative;
    display: grid;
    align-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 130px clamp(20px, 6vw, 96px) 120px;
    pointer-events: none;
}

/* Soft scrim keeps hero copy legible over bright fluid bursts. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(78% 68% at 26% 56%, rgba(3, 4, 7, 0.68) 0%, rgba(3, 4, 7, 0.42) 46%, rgba(3, 4, 7, 0) 100%);
}

.hero-inner,
.hero-hint,
.scroll-cue {
    position: relative;
    z-index: 1;
}

.hero-inner {
    width: min(1100px, 100%);
    margin: 0 auto;
    pointer-events: none;
}

.hero-inner > * {
    pointer-events: none;
}

.hero-actions,
.hero-actions * {
    pointer-events: auto;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 30px;
    color: var(--muted-strong);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.pulse-dot {
    position: relative;
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 12px rgba(157, 255, 220, 0.9);
}

.pulse-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px solid rgba(157, 255, 220, 0.55);
    border-radius: 50%;
    animation: pulse-ring 2.4s ease-out infinite;
}

@keyframes pulse-ring {
    0% { opacity: 0.9; transform: scale(0.5); }
    70%, 100% { opacity: 0; transform: scale(1.7); }
}

.hero h1 {
    margin: 0;
    max-width: 14ch;
    font-size: clamp(3.1rem, 8.6vw, 7.6rem);
    font-weight: 650;
    line-height: 0.98;
    letter-spacing: -0.055em;
    text-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.hero h1 em {
    font-style: normal;
    background: linear-gradient(112deg, #e8fff8 4%, var(--mint) 34%, #8fd7ff 64%, #cdb4ff 96%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 34px rgba(150, 245, 255, 0.24));
}

.hero-copy {
    max-width: 46ch;
    margin: 30px 0 0;
    color: var(--muted-strong);
    font-size: clamp(0.95rem, 1.4vw, 1.15rem);
    line-height: 1.75;
    word-break: keep-all;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform 0.35s var(--ease-out), background 0.3s ease, border-color 0.3s ease, box-shadow 0.35s ease, color 0.3s ease;
}

.button--primary {
    background: var(--ink);
    color: #05080a;
    box-shadow: 0 12px 40px rgba(180, 255, 240, 0.14), inset 0 -2px 0 rgba(0, 0, 0, 0.14);
}

.button--primary:hover {
    background: #d7fff2;
    box-shadow: 0 16px 50px rgba(157, 255, 220, 0.28), inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.button--primary:active {
    transform: translateY(0) scale(0.98);
}

.button--ghost {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.button--ghost:hover {
    border-color: rgba(157, 255, 220, 0.5);
    background: rgba(157, 255, 220, 0.08);
    transform: translateY(-2px);
}

.button--small {
    padding: 10px 18px;
    font-size: 12px;
}

.button-arrow {
    display: inline-block;
    font-size: 15px;
    line-height: 1;
    transition: transform 0.35s var(--ease-out);
}

.button--primary:hover .button-arrow {
    transform: translate(3px, -3px);
}

#play-button.is-splashing {
    animation: splash-pop 0.55s var(--ease-out);
}

@keyframes splash-pop {
    0% { transform: scale(1); }
    35% { transform: scale(1.045); }
    100% { transform: scale(1); }
}

.hero-hint {
    position: absolute;
    left: clamp(20px, 6vw, 96px);
    bottom: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.hero-hint.is-hidden {
    opacity: 0;
}

.mouse-icon {
    position: relative;
    display: block;
    width: 15px;
    height: 22px;
    border: 1px solid rgba(226, 240, 238, 0.5);
    border-radius: 9px;
}

.mouse-icon span {
    position: absolute;
    top: 4px;
    left: 50%;
    width: 2px;
    height: 4px;
    margin-left: -1px;
    border-radius: 2px;
    background: var(--mint);
    animation: mouse-scroll 2s ease-in-out infinite;
}

@keyframes mouse-scroll {
    0%, 100% { opacity: 0; transform: translateY(0); }
    35% { opacity: 1; }
    75% { opacity: 0; transform: translateY(8px); }
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    transform: translateX(-50%);
    color: rgba(226, 240, 238, 0.42);
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.3em;
    pointer-events: auto;
}

.scroll-line {
    width: 1px;
    height: 38px;
    background: linear-gradient(180deg, rgba(157, 255, 220, 0.8), rgba(157, 255, 220, 0));
    animation: scroll-line 2.2s ease-in-out infinite;
    transform-origin: top;
}

@keyframes scroll-line {
    0% { transform: scaleY(0.25); opacity: 0.2; }
    45% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Shared sections ---------- */

.section {
    position: relative;
    padding: clamp(90px, 13vw, 170px) clamp(20px, 6vw, 96px);
    pointer-events: none;
}

.section-inner {
    width: min(1100px, 100%);
    margin: 0 auto;
}

.features {
    background: linear-gradient(180deg, rgba(3, 4, 7, 0) 0%, rgba(3, 4, 7, 0.55) 12%, rgba(3, 4, 7, 0.78) 46%, rgba(3, 4, 7, 0.62) 100%);
}

.about {
    background: linear-gradient(180deg, rgba(3, 4, 7, 0.62) 0%, rgba(3, 4, 7, 0.82) 40%, rgba(3, 4, 7, 0.9) 100%);
}

.section-heading {
    max-width: 760px;
}

.section-heading .eyebrow,
.about-copy .eyebrow {
    margin-bottom: 24px;
}

h2 {
    margin: 0;
    font-size: clamp(2rem, 4.6vw, 3.9rem);
    font-weight: 620;
    line-height: 1.08;
    letter-spacing: -0.045em;
    word-break: keep-all;
}

.section-copy {
    max-width: 52ch;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: clamp(0.94rem, 1.2vw, 1.05rem);
    line-height: 1.8;
    word-break: keep-all;
}

/* ---------- Cards ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: clamp(48px, 6vw, 76px);
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 248px;
    padding: 28px 26px 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(158deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: auto;
    overflow: hidden;
    transition: transform 0.45s var(--ease-out), border-color 0.35s ease, background 0.35s ease, box-shadow 0.45s ease;
}

.card::before {
    content: "";
    position: absolute;
    top: -40%;
    left: -20%;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(157, 255, 220, 0.13), rgba(157, 255, 220, 0) 68%);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(157, 255, 220, 0.32);
    background: linear-gradient(158deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 26px;
    height: 26px;
    margin-bottom: 42px;
    fill: none;
    stroke: var(--mint);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 10px rgba(157, 255, 220, 0.35));
}

.card-index {
    position: absolute;
    top: 30px;
    right: 26px;
    color: rgba(226, 240, 238, 0.28);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.72;
    word-break: keep-all;
}

.card-tag {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 22px;
    color: rgba(157, 255, 220, 0.72);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.2em;
}

/* ---------- About ---------- */

.about-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: clamp(48px, 7vw, 110px);
    align-items: end;
}

.about-copy .section-copy {
    max-width: 54ch;
}

.about-copy h2 {
    font-size: clamp(1.9rem, 4vw, 3.4rem);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 34px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(157, 255, 220, 0.45);
    color: var(--mint);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    pointer-events: auto;
    transition: gap 0.3s var(--ease-out), border-color 0.3s ease;
}

.text-link:hover {
    gap: 13px;
    border-color: var(--mint);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.stat {
    padding: 20px 16px;
    border-top: 1px solid var(--line-strong);
    pointer-events: auto;
}

.stat dt {
    margin-bottom: 14px;
    color: rgba(226, 240, 238, 0.4);
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.16em;
    line-height: 1.5;
}

.stat dd {
    margin: 0;
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
}

.stat dd small {
    margin-left: 3px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.08em;
}

/* ---------- Footer ---------- */

.site-footer {
    position: relative;
    padding: 0 clamp(20px, 6vw, 96px) 46px;
    background: linear-gradient(180deg, rgba(3, 4, 7, 0.9) 0%, rgba(3, 4, 7, 0.98) 100%);
    pointer-events: none;
}

.footer-inner {
    width: min(1100px, 100%);
    margin: 0 auto;
    padding-top: 46px;
    border-top: 1px solid var(--line);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand .brand-mark {
    width: 11px;
    height: 11px;
}

.footer-brand .brand-name {
    font-size: 13px;
    letter-spacing: 0.18em;
}

.footer-copy {
    margin: 14px 0 22px;
    color: var(--muted);
    font-size: 0.92rem;
    pointer-events: auto;
}

.footer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 46px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(226, 240, 238, 0.38);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.footer-meta a {
    pointer-events: auto;
    transition: color 0.25s ease;
}

.footer-meta a:hover {
    color: var(--mint);
}

.site-footer .button {
    pointer-events: auto;
}

/* ---------- Menu ---------- */

.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(2, 4, 8, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.menu-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.site-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    width: min(430px, 92vw);
    padding: 26px clamp(24px, 4vw, 40px) 30px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(90% 50% at 100% 0%, rgba(84, 232, 198, 0.1), rgba(6, 10, 14, 0) 60%),
        rgba(6, 10, 14, 0.93);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: -30px 0 90px rgba(0, 0, 0, 0.5);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 0.6s var(--ease-out), visibility 0.6s var(--ease-out);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.site-menu.is-open {
    transform: translateX(0);
    visibility: visible;
}

.menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: clamp(34px, 7vh, 64px);
}

.menu-eyebrow {
    color: rgba(226, 240, 238, 0.4);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.28em;
}

.menu-close {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease-out);
}

.menu-close:hover {
    border-color: rgba(157, 255, 220, 0.5);
    background: rgba(157, 255, 220, 0.08);
    transform: rotate(90deg);
}

.menu-close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 1.5px;
    margin: -0.75px 0 0 -7.5px;
    border-radius: 2px;
    background: var(--ink);
}

.menu-close span:first-child {
    transform: rotate(45deg);
}

.menu-close span:last-child {
    transform: rotate(-45deg);
}

.menu-nav {
    display: flex;
    flex-direction: column;
}

.menu-link {
    display: flex;
    align-items: baseline;
    gap: 16px;
    width: 100%;
    padding: 18px 4px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: none;
    text-align: left;
    cursor: pointer;
    transition: padding 0.35s var(--ease-out), color 0.3s ease, border-color 0.3s ease;
}

.menu-link:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-index {
    color: rgba(157, 255, 220, 0.45);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    transition: color 0.3s ease;
}

.menu-text {
    font-size: clamp(1.35rem, 2.2vw, 1.65rem);
    font-weight: 550;
    letter-spacing: -0.035em;
    transition: transform 0.35s var(--ease-out);
}

.menu-arrow {
    margin-left: auto;
    color: rgba(226, 240, 238, 0.24);
    font-size: 16px;
    transition: color 0.3s ease, transform 0.35s var(--ease-out);
}

.menu-link:hover {
    padding-left: 10px;
    color: var(--mint);
    border-color: rgba(157, 255, 220, 0.3);
}

.menu-link:hover .menu-index {
    color: var(--mint);
}

.menu-link:hover .menu-arrow {
    color: var(--mint);
    transform: translate(3px, -3px);
}

.menu-foot {
    margin-top: auto;
    padding-top: 46px;
    color: rgba(226, 240, 238, 0.34);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
}

.menu-foot p {
    margin: 0 0 7px;
    color: rgba(226, 240, 238, 0.58);
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 0;
}

/* ---------- dat.GUI shell ---------- */

.gui-shell {
    position: fixed;
    top: 92px;
    right: clamp(16px, 3vw, 32px);
    z-index: 80;
    display: flex;
    flex-direction: column;
    width: 320px;
    max-width: calc(100vw - 32px);
    max-height: calc(100svh - 116px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(8, 13, 17, 0.92);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.45s var(--ease-out);
}

.gui-shell.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.gui-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(226, 240, 238, 0.55);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.18em;
}

.gui-close {
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: none;
    color: var(--muted-strong);
    font-family: var(--font-sans);
    font-size: 10px;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.gui-close:hover {
    color: var(--mint);
    border-color: rgba(157, 255, 220, 0.45);
}

.gui-shell .dg.main {
    width: 100% !important;
    max-height: calc(100svh - 190px);
    overflow-y: auto;
    background: transparent;
}

.gui-shell .dg .cr {
    border-left-color: transparent !important;
}

.gui-shell .dg .c input[type="text"] {
    background: rgba(255, 255, 255, 0.06);
}

.gui-shell .dg .title {
    background-color: rgba(255, 255, 255, 0.04);
}

/* ---------- Reveal ---------- */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

.card-grid .card:nth-child(2) {
    transition-delay: 0.08s;
}

.card-grid .card:nth-child(3) {
    transition-delay: 0.16s;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .about-inner {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 52px;
    }

    .stats {
        max-width: 560px;
    }
}

@media (max-width: 780px) {
    .header-link {
        display: none;
    }

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

    .card {
        min-height: 220px;
    }

    .card-icon {
        margin-bottom: 34px;
    }

    .hero-hint {
        display: none;
    }

    .hero {
        padding-top: 120px;
    }

    .desktop-br {
        display: none;
    }
}

@media (max-width: 520px) {
    .site-header {
        padding: 16px 18px;
    }

    .brand-sub {
        display: none;
    }

    .menu-button {
        padding: 10px 14px;
        gap: 11px;
    }

    .hero {
        padding-left: 22px;
        padding-right: 22px;
    }

    .hero h1 {
        font-size: clamp(3rem, 15vw, 4.6rem);
    }

    .hero-copy {
        margin-top: 24px;
    }

    .hero-actions {
        margin-top: 32px;
    }

    .button {
        padding: 14px 20px;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .stat {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 16px;
        padding: 16px 0;
    }

    .stat dt {
        margin: 0;
    }

    .scroll-cue {
        bottom: 20px;
    }

    .gui-shell {
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        max-height: 72svh;
    }

    .gui-shell .dg.main {
        max-height: calc(72svh - 58px);
    }

    .menu-link {
        padding: 16px 4px;
    }
}

@media (max-height: 640px) and (min-width: 520px) {
    .site-menu {
        padding-top: 20px;
    }

    .menu-head {
        margin-bottom: 18px;
    }

    .menu-link {
        padding: 12px 4px;
    }

    .menu-foot {
        padding-top: 24px;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .js [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
