:root {
    --bg: #050807;
    --panel: rgba(8, 13, 11, .88);
    --text: #f0f5f1;
    --muted: #9aa79f;
    --line: rgba(240, 245, 241, .72);
    --green: #74f0a7;
    --green-dark: #102e1d;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    min-height: 100vh;
    margin: 0;
    padding: clamp(18px, 5vw, 64px);
    display: grid;
    place-items: center;
    overflow-x: hidden;
    color: var(--text);
    background: var(--bg);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
        radial-gradient(circle at 78% 22%, rgba(62, 238, 126, .08), transparent 27%),
        radial-gradient(circle at 12% 85%, rgba(62, 238, 126, .04), transparent 30%);
    background-size: 36px 36px, 36px 36px, auto, auto;
}

.network {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .9;
}

.matrix {
    position: fixed;
    inset: 0;
    opacity: .18;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.35) 4px);
}

.terminal {
    position: relative;
    width: min(1120px, 100%);
    min-height: min(760px, calc(100vh - 64px));
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    background: rgba(8, 13, 11, .82);
    border: 3px solid var(--text);
    border-radius: 22px;
    box-shadow: 0 35px 90px rgba(0,0,0,.6), 0 0 70px rgba(75, 255, 145, .06);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.terminal > * { position: relative; z-index: 1; }

.terminal__bar,
.terminal__footer {
    min-height: 54px;
    padding: 0 clamp(18px, 3vw, 34px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 2px solid var(--line);
    font-size: .84rem;
}

.terminal__title::before { content: "●"; color: var(--green); margin-right: 12px; }
.terminal__status { color: var(--muted); font-size: .76rem; letter-spacing: .12em; }
.terminal__status i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }

.terminal__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(210px, 23vw, 260px);
    gap: clamp(28px, 4vw, 50px);
    align-items: center;
    padding: clamp(42px, 7vw, 86px) clamp(24px, 7vw, 76px);
}

.intro { min-width: 0; max-width: 820px; }

p { margin: 0; }
.boot { margin-bottom: 17px; }
.muted { color: var(--muted); font-size: .82rem; letter-spacing: .06em; }
.prompt, .accent, .role span { color: var(--green); }
.company { margin-top: 24px; color: var(--green); font-size: clamp(.78rem, 1.2vw, .95rem); letter-spacing: .08em; text-transform: uppercase; }

h1 {
    max-width: 700px;
    margin: 14px 0 18px;
    font-size: clamp(2.45rem, 4.6vw, 3.4rem);
    line-height: .96;
    letter-spacing: -.075em;
    overflow-wrap: break-word;
}

.role { color: var(--muted); font-size: clamp(.78rem, 1.35vw, 1rem); line-height: 1.8; }
.description { max-width: 620px; margin-top: 25px; color: #c4cdc7; font-family: "Segoe UI", Arial, sans-serif; font-size: 1rem; line-height: 1.75; }

.links { display: flex; flex-wrap: wrap; gap: 11px 26px; margin-top: 30px; }
.links a { color: var(--text); text-underline-offset: 5px; text-decoration-color: var(--green); transition: color .2s, transform .2s; }
.links a:hover, .links a:focus-visible { color: var(--green); transform: translateY(-2px); }

.r0-emblem {
    width: min(100%, 310px);
    justify-self: center;
    color: var(--green);
    filter: drop-shadow(0 0 18px rgba(116, 240, 167, .18));
}
.r0-emblem svg { display: block; width: 100%; overflow: visible; }
.chip-body, .chip-core, .chip-pins, .emblem-circuit, .core-detail {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chip-body { stroke-width: 2; opacity: .62; stroke-dasharray: 680; stroke-dashoffset: 680; animation: trace 1s .1s ease forwards; }
.chip-core { stroke-width: 1.4; opacity: .38; stroke-dasharray: 430; stroke-dashoffset: 430; animation: trace .8s .45s ease forwards, core-breathe 4.8s 2s ease-in-out infinite; }
.chip-pins { stroke-width: 3; opacity: .55; stroke-dasharray: 620; stroke-dashoffset: 620; animation: trace 1.1s .25s ease forwards; }
.emblem-circuit { opacity: .65; stroke-width: 1.15; stroke-dasharray: 1800; stroke-dashoffset: 1800; animation: trace 1.45s .4s ease forwards, circuit-idle 7s 2.1s ease-in-out infinite; }
.core-detail { opacity: .45; stroke-width: 1; stroke-dasharray: 110; stroke-dashoffset: 110; animation: trace .65s .9s ease forwards; }
.emblem-nodes { fill: currentColor; opacity: 0; animation: node-in .35s 1.15s forwards; }
.emblem-nodes circle { animation: node-pulse 5.6s 2.2s ease-in-out infinite; }
.emblem-nodes circle:nth-child(2n) { animation-delay: 3.6s; }
.emblem-nodes circle:nth-child(3n) { animation-delay: 4.8s; }
.emblem-text { fill: currentColor; font: 700 27px "Cascadia Code", Consolas, monospace; letter-spacing: -2px; opacity: 0; transform-origin: center; animation: emblem-in .65s 1s cubic-bezier(.2,.8,.2,1) forwards; }
.emblem-signal { margin-top: 13px; text-align: center; color: var(--muted); font-size: .58rem; letter-spacing: .17em; opacity: 0; animation: node-in .4s 1.3s forwards; }
.emblem-signal span { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes node-in { to { opacity: 1; } }
@keyframes emblem-in { from { opacity: 0; transform: scale(.86); filter: blur(5px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes core-breathe { 0%, 100% { opacity: .32; } 50% { opacity: .48; } }
@keyframes circuit-idle { 0%, 100% { opacity: .55; } 45%, 55% { opacity: .76; } }
@keyframes node-pulse { 0%, 82%, 100% { opacity: .5; } 88% { opacity: 1; filter: drop-shadow(0 0 4px var(--green)); } }

.apps {
    padding: 24px clamp(24px, 7vw, 76px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    background: rgba(255,255,255,.025);
    border-top: 2px solid var(--line);
}
.command { margin-bottom: 8px; font-size: .78rem; color: var(--muted); }
h2 { margin: 0 0 7px; font-size: clamp(1.05rem, 2vw, 1.35rem); }
.section-title { margin: 0 0 17px; font-size: 1rem; font-weight: 400; }
.apps__copy > p:last-child { color: var(--muted); font-size: .76rem; line-height: 1.5; }
.store-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 11px; }
.store { min-width: 162px; padding: 9px 14px; display: flex; align-items: center; gap: 10px; color: var(--text); border: 1px solid rgba(255,255,255,.6); border-radius: 7px; text-decoration: none; transition: .2s; }
.store:hover, .store:focus-visible { color: #071009; background: var(--green); border-color: var(--green); transform: translateY(-2px); }
.store svg { width: 25px; height: 25px; flex: 0 0 auto; fill: currentColor; }
.store span { font-family: "Segoe UI", Arial, sans-serif; font-size: 1rem; font-weight: 600; line-height: 1.05; }
.store small { display: block; margin-bottom: 2px; font-size: .61rem; font-weight: 400; }

.imprint {
    padding: clamp(34px, 5vw, 54px) clamp(24px, 7vw, 76px);
    display: grid;
    grid-template-columns: minmax(210px, .7fr) 1.3fr;
    gap: clamp(35px, 8vw, 100px);
    border-top: 2px solid var(--line);
    scroll-margin-top: 20px;
}
.imprint__heading > p:last-child { color: var(--muted); font-size: .76rem; }
.imprint__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.imprint h3 { margin: 0 0 13px; color: var(--green); font-size: .76rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; }
.imprint address, .imprint__details p { color: #c4cdc7; font-family: "Segoe UI", Arial, sans-serif; font-size: .86rem; font-style: normal; line-height: 1.75; }
.imprint a, .terminal__footer a { color: inherit; text-underline-offset: 4px; text-decoration-color: var(--green); }
.imprint a:hover, .terminal__footer a:hover { color: var(--green); }

.terminal__footer { min-height: 49px; border: 0; border-top: 1px solid rgba(255,255,255,.13); color: var(--muted); font-size: .7rem; }
.cursor-line { color: #cbd5ce; }
.cursor { display: inline-block; width: 8px; height: 14px; vertical-align: -2px; background: var(--green); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

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

@media (max-width: 920px) {
    .terminal__content { grid-template-columns: minmax(0, 1fr) 190px; gap: 24px; }
    h1 { font-size: clamp(2.45rem, 5.5vw, 3.2rem); }
    .r0-emblem { width: 190px; }
}

@media (max-width: 760px) {
    body { padding: 0; place-items: stretch; }
    .terminal { min-height: 100vh; border: 0; border-radius: 0; }
    .terminal__content { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; }
    .r0-emblem { display: none; }
    .apps { align-items: flex-start; flex-direction: column; }
    .store-links { width: 100%; justify-content: flex-start; }
    .imprint { grid-template-columns: 1fr; }
    .terminal__footer { flex-wrap: wrap; padding-block: 12px; }
}

@media (max-width: 420px) {
    .terminal__status { display: none; }
    .store { width: 100%; }
    .imprint__details { grid-template-columns: 1fr; }
    .cursor-line { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
    .network { opacity: .35; }
}
