:root {
    --accent-cyan: #56e6ff;
    --accent-lime: #b7ff64;
    --accent-amber: #ffb74a;
    --surface-glass: rgba(9, 12, 13, 0.72);
    --line-strong: rgba(255, 255, 255, 0.16);
    --mx: 50vw;
    --my: 50vh;
}

html { scroll-behavior: smooth; }

body {
    background: #070909;
    letter-spacing: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(86, 230, 255, 0.045), transparent 70%);
    mix-blend-mode: screen;
}

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

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 11000;
    background: rgba(255, 255, 255, 0.04);
}

.scroll-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-lime));
    transform: scaleX(0);
    transform-origin: left;
    will-change: transform;
}

.arch-grid-bg {
    background-size: 56px 56px;
    opacity: 0.55;
    mask-image: linear-gradient(to bottom, black, transparent 90%);
}

nav {
    min-height: 58px;
    padding: 0.55rem 2rem;
    background: rgba(7, 9, 9, 0.76);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    transition: background 0.35s ease, min-height 0.35s ease;
}

nav.is-scrolled {
    min-height: 50px;
    background: rgba(7, 9, 9, 0.94);
}

footer .footer-nav {
    position: static;
    width: auto;
    min-height: 0;
    padding: 0;
    display: flex;
    grid-template-columns: none;
    gap: 1rem;
    background: transparent;
    border: 0;
    backdrop-filter: none;
    z-index: auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    overflow: visible;
}

.nav-brand::before { display: none; content: none; }
.nav-brand::after {
    content: "LinSpace AI";
    display: block;
    color: transparent;
    background: linear-gradient(90deg, #79b7ff 0%, #8fa6ff 52%, #b58cff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font: 500 1.35rem/1 Inter, sans-serif;
    letter-spacing: -0.025em;
    white-space: nowrap;
}
.logo-img { display: none; }

.nav-group { gap: 0.7rem; }

.nav-group a {
    position: relative;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.55);
}

.nav-group a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -0.45rem;
    height: 1px;
    background: var(--accent-cyan);
    transition: right 0.25s ease;
}

.nav-group a:hover::after { right: 0; }
.nav-group .nav-sep { opacity: 0.35; }

.nav-cta {
    position: relative;
    overflow: hidden;
    border: 1px solid #fff;
    border-radius: 0;
}

.nav-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent-cyan);
    transform: translateX(-102%);
    transition: transform 0.3s ease;
}

.nav-cta:hover::before { transform: translateX(0); }
.nav-cta span { position: relative; z-index: 1; }

.lang-toggle {
    top: 0.8rem !important;
    right: 9rem !important;
    border-radius: 0;
    background: rgba(7, 9, 9, 0.8);
}

section {
    max-width: 1500px;
    padding-left: clamp(2rem, 5vw, 5rem);
    padding-right: clamp(2rem, 5vw, 5rem);
}

.section-label {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2.25rem;
    color: rgba(255, 255, 255, 0.48);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.67rem;
    letter-spacing: 0.16em;
}

.section-label::before {
    content: "";
    width: 7px;
    height: 7px;
    border: 1px solid var(--accent-cyan);
    transform: rotate(45deg);
}

.section-label::after {
    content: "";
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, rgba(86, 230, 255, 0.8), transparent);
}

h1, h2 { letter-spacing: 0; }

#hero {
    min-height: max(780px, calc(100svh - 48px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
    align-items: center;
    gap: clamp(2rem, 5vw, 6rem);
    padding-top: 6.5rem;
    padding-bottom: 1.75rem;
    isolation: isolate;
}

#hero::before {
    content: "";
    position: absolute;
    inset: 0 50% auto;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(255,255,255,0.012) 4px);
}

.hero-bg img {
    opacity: 0.68;
    filter: grayscale(0.55) contrast(1.18) brightness(0.82);
    transform: scale(1.025);
    animation: hero-breathe 16s ease-in-out infinite alternate;
}

.hero-bg::after {
    background:
        linear-gradient(90deg, rgba(7,9,9,0.98) 0%, rgba(7,9,9,0.78) 36%, rgba(7,9,9,0.25) 72%, rgba(7,9,9,0.62) 100%),
        linear-gradient(180deg, rgba(7,9,9,0.65) 0%, transparent 24%, transparent 67%, #070909 100%);
}

@keyframes hero-breathe {
    from { transform: scale(1.025); }
    to { transform: scale(1.075); }
}

.hero-copy {
    position: relative;
    z-index: 3;
    max-width: 850px;
}

#hero .section-label {
    max-width: 680px;
    color: rgba(255,255,255,0.48);
}

#hero h1 {
    max-width: 780px;
    margin-bottom: 1.5rem;
    font-size: clamp(3.25rem, 5.3vw, 5.6rem);
    line-height: 0.98;
    font-weight: 300;
    text-wrap: balance;
}

#hero .hero-title-lead,
#hero .hero-title-focus {
    display: block;
}

#hero .hero-title-lead {
    margin-bottom: 0.18em;
    color: rgba(255,255,255,0.72);
    font-size: 0.7em;
    line-height: 1.12;
}

#hero .hero-title-focus {
    color: rgba(255,255,255,0.98);
    line-height: 1;
}

#hero h1 [data-lang="en"] .hero-title-lead {
    font-size: 0.58em;
}

#hero h1 [data-lang="en"] .hero-title-focus {
    font-size: 0.68em;
}

.hero-divider {
    width: 92px;
    margin: 2.35rem 0;
    background: linear-gradient(90deg, var(--accent-cyan), transparent);
    box-shadow: 0 0 12px rgba(86, 230, 255, 0.5);
}

#hero .large-text {
    max-width: 760px;
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
    line-height: 1.7;
    color: rgba(255,255,255,0.72);
}

#hero .hero-brand-line {
    max-width: 700px;
    margin-top: 1.55rem;
    color: rgba(255,255,255,0.48);
    font-size: 0.9rem;
    letter-spacing: 0.035em;
}

#hero .hero-actions {
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-container { gap: 0.8rem; }

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.9rem 1.45rem;
    border-radius: 0;
    overflow: hidden;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.btn::after {
    content: "↗";
    margin-left: 1.2rem;
    font-size: 1rem;
    transition: transform 0.25s ease;
}

.btn:hover::after { transform: translate(3px, -3px); }

.btn-primary { background: #f4f7f5; }
.btn-primary:hover { background: var(--accent-cyan); }
.btn-secondary { border-color: rgba(255,255,255,0.28); backdrop-filter: blur(12px); }

.hero-console {
    position: relative;
    z-index: 4;
    align-self: center;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.18);
    background: linear-gradient(145deg, rgba(14,18,19,0.88), rgba(5,7,7,0.7));
    box-shadow: 0 30px 90px rgba(0,0,0,0.45), inset 0 0 50px rgba(86,230,255,0.025);
    backdrop-filter: blur(18px);
}

.hero-console::before,
.hero-console::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--accent-cyan);
}

.hero-console::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.hero-console::after { right: -1px; bottom: -1px; border-right: 2px solid; border-bottom: 2px solid; }

.console-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
    font: 0.64rem/1 "SFMono-Regular", Consolas, monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.live-indicator { color: var(--accent-lime); }
.live-indicator i { display: inline-block; width: 6px; height: 6px; margin-right: 0.4rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: pulse 1.7s ease-in-out infinite; }

@keyframes pulse { 50% { opacity: 0.3; transform: scale(0.75); } }

.site-diagram {
    position: relative;
    height: 290px;
    overflow: hidden;
    background-image: linear-gradient(rgba(86,230,255,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(86,230,255,0.07) 1px, transparent 1px);
    background-size: 24px 24px;
}

.site-diagram::before {
    content: "SITE / 31.2304 N / 121.4737 E";
    position: absolute;
    top: 12px;
    left: 14px;
    color: rgba(255,255,255,0.34);
    font: 0.55rem/1 Consolas, monospace;
}

.site-boundary {
    position: absolute;
    inset: 58px 66px 44px 54px;
    border: 1px solid rgba(86,230,255,0.65);
    transform: skewY(-8deg) rotate(-4deg);
    box-shadow: inset 0 0 45px rgba(86,230,255,0.06), 0 0 20px rgba(86,230,255,0.06);
}

.site-boundary::before,
.site-boundary::after,
.site-boundary span {
    content: "";
    position: absolute;
    border: 1px solid rgba(183,255,100,0.42);
    background: rgba(183,255,100,0.025);
}

.site-boundary::before { inset: 18% 52% 48% 12%; }
.site-boundary::after { inset: 52% 10% 12% 46%; }
.site-boundary span:nth-child(1) { inset: 24% 16% 22% 53%; }
.site-boundary span:nth-child(2) { inset: 61% 59% 8% 13%; }
.site-boundary span:nth-child(3) { inset: 17% 43% 56% 39%; border-color: rgba(255,183,74,0.58); }

.site-axis { position: absolute; background: rgba(255,255,255,0.16); }
.axis-x { left: 30px; right: 30px; top: 55%; height: 1px; }
.axis-y { top: 30px; bottom: 30px; left: 57%; width: 1px; }

.site-node { position: absolute; width: 7px; height: 7px; border: 1px solid var(--accent-cyan); background: #080b0b; transform: rotate(45deg); box-shadow: 0 0 10px rgba(86,230,255,0.65); }
.node-a { left: 26%; top: 36%; }
.node-b { right: 22%; top: 29%; }
.node-c { right: 31%; bottom: 23%; border-color: var(--accent-amber); }

.scan-beam {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    top: 10%;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    box-shadow: 0 0 14px rgba(86,230,255,0.8);
    animation: scan 4.8s ease-in-out infinite;
}

@keyframes scan { 0%, 100% { top: 10%; opacity: 0.2; } 50% { top: 88%; opacity: 0.9; } }

.console-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(255,255,255,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.console-metrics div { padding: 0.85rem; }
.console-metrics div + div { border-left: 1px solid rgba(255,255,255,0.12); }
.console-metrics span, .console-metrics small { display: block; color: rgba(255,255,255,0.36); font: 0.5rem/1.2 Consolas, monospace; }
.console-metrics strong { display: block; margin: 0.3rem 0; color: #fff; font: 400 1.25rem/1 Consolas, monospace; }
.console-metrics small { color: var(--accent-lime); }

.console-log { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1rem; color: rgba(255,255,255,0.38); font: 0.55rem/1 Consolas, monospace; }
.console-log b { display: flex; gap: 3px; }
.console-log i { width: 16px; height: 2px; background: var(--accent-cyan); animation: load 1.2s ease-in-out infinite alternate; }
.console-log i:nth-child(2) { animation-delay: .12s; }
.console-log i:nth-child(3) { animation-delay: .24s; }
.console-log i:nth-child(4) { animation-delay: .36s; }
.console-log i:nth-child(5) { animation-delay: .48s; }
@keyframes load { from { opacity: .12; } to { opacity: 1; } }

#hero .hero-index {
    position: absolute;
    right: 1.2rem;
    bottom: 4rem;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    color: rgba(255,255,255,0.35);
    font: 0.55rem/1 Consolas, monospace;
}

.hero-index i { width: 1px; height: 70px; background: linear-gradient(var(--accent-cyan), rgba(255,255,255,0.1)); }

.bg-section::before {
    filter: saturate(0.55) contrast(1.05);
    background-image: linear-gradient(180deg, rgba(7,9,9,0.96) 0%, rgba(7,9,9,0.79) 45%, rgba(7,9,9,0.97) 100%), var(--section-bg);
}

#manifesto, #intelligence-stack, #product-stage, #cta { background: transparent; }

#manifesto {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: 5vw;
    padding-top: 11rem;
    padding-bottom: 11rem;
}

#manifesto .section-label { grid-column: 1 / -1; margin-bottom: 0; }
#manifesto h2 { font-size: clamp(2.6rem, 4vw, 4.8rem); line-height: 1.05; }
#manifesto .large-text { font-size: clamp(1.1rem, 1.5vw, 1.45rem); border-left: 1px solid var(--accent-cyan); padding-left: 2rem; }

.paradigm-grid { gap: 1px; background: rgba(255,255,255,0.12); }
.paradigm-column { padding: clamp(2rem, 4vw, 4rem); background: rgba(7,9,9,0.83); backdrop-filter: blur(12px); }
.paradigm-column:first-child::after { display: none; }
.paradigm-column:last-child { background: rgba(13,23,22,0.82); }
.paradigm-label { font-family: Consolas, monospace; color: var(--accent-cyan); }
.paradigm-title { font-size: 2.1rem; }
.paradigm-items li { position: relative; padding-left: 1.2rem; }
.paradigm-items li::before { content: ""; position: absolute; left: 0; top: 1.55rem; width: 5px; height: 5px; background: rgba(255,255,255,0.22); }
.paradigm-column:last-child .paradigm-items li::before { background: var(--accent-lime); box-shadow: 0 0 8px rgba(183,255,100,0.5); }

.stack-grid { grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,0.12); }
.stack-item { position: relative; min-height: 255px; background: rgba(8,11,11,0.86); overflow: hidden; transition: background 0.35s ease, transform 0.35s ease; }
.stack-item::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--accent-cyan), var(--accent-lime)); transition: right 0.35s ease; }
.stack-item:hover { z-index: 2; background: rgba(18,29,28,0.96); transform: translateY(-5px); }
.stack-item:hover::after { right: 0; }
.stack-number { font-family: Consolas, monospace; }

#human-ai { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
#human-ai h2 { font-size: clamp(3rem, 7vw, 7.5rem); line-height: 0.95; }
#human-ai .large-text { color: var(--accent-cyan); font: 0.9rem/1.5 Consolas, monospace; letter-spacing: 0.12em; text-transform: uppercase; }

.product-viewport {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 8.6;
    background-color: rgba(4,6,6,0.92);
    background-size: 92%;
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 40px 100px rgba(0,0,0,0.42);
}
.product-viewport::after { content: "AI DESIGN WORKSPACE / ONLINE"; position: absolute; right: 2rem; bottom: 1.5rem; color: var(--accent-lime); font: 0.58rem/1 Consolas, monospace; letter-spacing: .08em; }
.viewport-label { color: var(--accent-cyan); font-family: Consolas, monospace; }

.roadmap-grid { position: relative; gap: 0; background: transparent; }
.roadmap-grid::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 1px; background: linear-gradient(90deg, var(--accent-cyan), var(--accent-lime), rgba(255,255,255,0.15)); }
.roadmap-item { padding: 3.5rem 2rem 2rem; background: transparent; border-left: 1px solid rgba(255,255,255,0.12); }
.roadmap-item::before { left: -4px; top: 18px; width: 8px; height: 8px; background: #080a0a; border: 1px solid var(--accent-cyan); transform: rotate(45deg); transition: box-shadow .3s ease, background .3s ease; }
.roadmap-item:hover::before { height: 8px; background: var(--accent-cyan); box-shadow: 0 0 18px rgba(86,230,255,.75); }

.cta-note { background: rgba(7,9,9,0.58); backdrop-filter: blur(16px); border-color: rgba(255,255,255,0.18); }
#cta .btn-container { justify-content: center; }

.reveal-ready {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1);
}
.reveal-ready.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
    #hero { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 2rem; }
    #hero h1 { font-size: clamp(3rem, 5.7vw, 4.6rem); }
    .site-diagram { height: 245px; }
    .nav-group-gap, .nav-group .nav-sep-dot, .nav-group li:has(.nav-sep-dot) { display: none; }
}

@media (max-width: 860px) {
    body::before { display: none; }
    nav { grid-template-columns: auto 1fr auto; padding: .65rem 1rem; }
    .nav-links-wrap { display: none; }
    .nav-actions { grid-column: 3; }
    .lang-toggle { top: .8rem !important; right: 6.8rem !important; }
    #hero { display: flex; min-height: auto; padding-top: 8.2rem; padding-bottom: 4rem; }
    .hero-copy { width: 100%; }
    #hero h1 { max-width: 650px; font-size: clamp(2.75rem, 10vw, 4.6rem); }
    .hero-console { width: min(100%, 540px); margin-top: 3.5rem; }
    .hero-index { display: none; }
    #manifesto { grid-template-columns: 1fr; gap: 2rem; }
    #manifesto .section-label { grid-column: auto; }
    .stack-grid { grid-template-columns: repeat(2, 1fr); }
    .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
    .roadmap-grid::before { display: none; }
    .roadmap-item { padding-top: 2.5rem; }
    .roadmap-item::before { top: 0; }
}

@media (max-width: 560px) {
    section { padding-left: 1.2rem; padding-right: 1.2rem; }
    .logo-img { max-width: 72px; height: 28px; }
    .nav-brand::after { font-size: 1.08rem; }
    .nav-cta { padding: .48rem .58rem; font-size: .55rem; }
    .lang-toggle { right: 5.65rem !important; top: .72rem !important; }
    .lang-btn { min-width: 2.2rem; padding: .4rem .48rem; font-size: .62rem; }
    #hero { min-height: calc(100svh - 110px); padding-top: 5.8rem; padding-bottom: 1.2rem; }
    #hero .section-label { gap: .65rem; font-size: .58rem; line-height: 1.55; letter-spacing: .12em; }
    #hero .section-label::before { flex: 0 0 7px; }
    #hero .section-label::after { display: none; }
    #hero h1 { font-size: clamp(2.2rem, 10.5vw, 2.75rem); line-height: 1.01; }
    #hero .large-text { font-size: .92rem; line-height: 1.55; }
    #hero .hero-divider { margin: 1.5rem 0; }
    #hero .hero-copy > p:not(.large-text) { display: none; }
    #hero .hero-copy > .hero-brand-line { display: block; margin-top: 1rem; font-size: .78rem; line-height: 1.55; }
    #hero .hero-actions { margin-top: 1.35rem; }
    .btn-container { width: 100%; }
    .btn { width: 100%; }
    .hero-console { display: none; }
    .site-diagram { height: 230px; }
    .site-boundary { inset: 55px 45px 42px 40px; }
    .console-metrics strong { font-size: 1.05rem; }
    #manifesto, #paradigm, #intelligence-stack, #human-ai, #product-stage, #roadmap, #cta { padding-top: 5rem; padding-bottom: 7rem; }
    #manifesto .large-text { padding-left: 1.2rem; }
    .paradigm-grid, .stack-grid, .roadmap-grid { grid-template-columns: 1fr; }
    .stack-item { min-height: 220px; }
    #human-ai { min-height: 64vh; }
    .product-viewport { aspect-ratio: 4 / 3; background-size: 150%; }
    .product-viewport::after { right: 1rem; bottom: 1rem; font-size: .48rem; }
    footer { padding: 3rem 1.2rem; }
}

@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; }
    .reveal-ready { opacity: 1; transform: none; }
}
