/* xrt9.de – shared styles | Terminal / Matrix look */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #020503;
  --surface: #060d08;
  --surface2: #0a150d;
  --border: #12331a;
  --muted: #3f7a50;
  --text: #9fd8ac;
  --bright: #d9ffe3;
  --accent: #00ff41;
  --accent-dim: #0f8f2a;
  --warn: #ffb000;
  --err: #ff4d4d;
  --mono: ui-monospace, "JetBrains Mono", "Fira Code", "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}
::selection { background: var(--accent); color: #000; }

/* Matrix rain canvas + scanlines */
#rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .16; pointer-events: none; }
body::after {
  content: ''; position: fixed; inset: 0; z-index: 1000; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.18) 3px);
}
main, footer, nav { position: relative; z-index: 2; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-shadow: 0 0 8px var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2.5rem; border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
nav.scrolled { border-color: var(--border); background: rgba(2,5,3,.92); backdrop-filter: blur(8px); }
.logo { font-weight: 700; font-size: .95rem; color: var(--bright); letter-spacing: .04em; }
.logo .p { color: var(--muted); }
.logo .c { color: var(--accent); }
.logo .cursor { display: inline-block; width: .6em; height: 1.05em; background: var(--accent); vertical-align: -.2em; margin-left: 3px; animation: blink 1s steps(1) infinite; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a { font-size: .75rem; letter-spacing: .08em; text-transform: lowercase; color: var(--muted); }
.nav-links a::before { content: './'; color: var(--accent-dim); }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.burger { display: none; background: none; border: 1px solid var(--border); color: var(--accent); font-family: var(--mono); padding: .35rem .7rem; cursor: pointer; font-size: .8rem; }

/* LAYOUT */
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 2rem; }
section { padding: 5rem 0; }
.page-top { padding-top: 9rem; }

h1, h2, h3 { font-family: var(--mono); color: var(--bright); line-height: 1.25; }
h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 1.5rem; }
h2::before { content: '## '; color: var(--accent-dim); }
h3 { font-size: 1.05rem; margin-bottom: .5rem; }
p { margin-bottom: 1rem; max-width: 70ch; }
.dim { color: var(--muted); }
.ok { color: var(--accent); }
.warn { color: var(--warn); }
.label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dim); margin-bottom: .75rem; display: block; }
.label::before { content: '// '; }

/* HERO */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 8rem 0 4rem; }
.term { border: 1px solid var(--border); background: rgba(6,13,8,.92); box-shadow: 0 0 40px rgba(0,255,65,.06); }
.term-bar { display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-bottom: 1px solid var(--border); font-size: .72rem; color: var(--muted); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); display: inline-block; }
.term-bar i:first-child { background: #ff5f56; opacity: .7; }
.term-bar i:nth-child(2) { background: var(--warn); opacity: .7; }
.term-bar i:nth-child(3) { background: var(--accent); opacity: .7; }
.term-bar span { margin-left: .6rem; }
.term-body { padding: 1.5rem 1.5rem 1.75rem; font-size: .88rem; }
.term-body .line { margin-bottom: .35rem; max-width: none; }
.prompt { color: var(--accent); }
.prompt::before { content: 'admin@xrt9:~$ '; color: var(--accent-dim); }
.out { color: var(--text); padding-left: 0; }
.caret { display: inline-block; width: .55em; height: 1em; background: var(--accent); vertical-align: -.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero h1 { margin: 1.75rem 0 1rem; text-shadow: 0 0 24px rgba(0,255,65,.25); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 1.02rem; color: var(--text); max-width: 60ch; }
.cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.btn { display: inline-block; font-family: var(--mono); font-size: .8rem; padding: .75rem 1.4rem; border: 1px solid var(--accent); color: var(--accent); background: transparent; cursor: pointer; letter-spacing: .06em; transition: background .2s, color .2s, box-shadow .2s; }
.btn:hover { background: var(--accent); color: #000; box-shadow: 0 0 20px rgba(0,255,65,.4); text-shadow: none; }
.btn.ghost { border-color: var(--border); color: var(--muted); }
.btn.ghost:hover { border-color: var(--accent); background: transparent; color: var(--accent); box-shadow: none; }

/* STATUS STRIP */
.status { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 3rem; }
.status div { background: var(--surface); padding: .9rem 1.1rem; font-size: .78rem; }
.status b { display: block; color: var(--bright); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .2rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); margin-right: .5rem; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
h1 .dot { width: 14px; height: 14px; margin-right: 1rem; vertical-align: .1em; }

/* CARDS */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.card { background: var(--surface); padding: 1.75rem; transition: background .25s; position: relative; }
.card:hover { background: var(--surface2); }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { text-shadow: none; box-shadow: inset 0 0 0 1px var(--accent-dim); }
a.card:focus-visible { outline-offset: -3px; }
.card .tag { font-size: .7rem; color: var(--accent-dim); letter-spacing: .1em; display: block; margin-bottom: .6rem; }
.card h3 { color: var(--accent); }
.card h3::before { content: '> '; color: var(--accent-dim); }
.card p { font-size: .85rem; margin-bottom: 0; color: var(--text); }
.card ul { list-style: none; margin-top: .9rem; font-size: .8rem; color: var(--muted); }
.card li::before { content: '+ '; color: var(--accent-dim); }

/* STEPS */
.steps { counter-reset: s; display: grid; gap: 1rem; }
.step { border-left: 2px solid var(--border); padding: .2rem 0 .2rem 1.25rem; counter-increment: s; }
.step::before { content: '[' counter(s, decimal-leading-zero) ']'; color: var(--accent); font-size: .78rem; display: block; margin-bottom: .15rem; }
.step h3 { margin-bottom: .2rem; }
.step p { font-size: .85rem; margin: 0; }

/* CODE BLOCK */
pre.code { background: var(--surface); border: 1px solid var(--border); border-left: 2px solid var(--accent); padding: 1rem 1.25rem; font-size: .8rem; overflow-x: auto; color: var(--text); margin: 1.5rem 0; }
pre.code .c { color: var(--muted); }
pre.code .k { color: var(--accent); }

/* FAQ */
details { border: 1px solid var(--border); background: var(--surface); margin-bottom: .6rem; }
summary { cursor: pointer; padding: 1rem 1.25rem; color: var(--bright); list-style: none; font-size: .9rem; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '[+] '; color: var(--accent); }
details[open] summary::before { content: '[-] '; }
details[open] summary { border-bottom: 1px solid var(--border); }
details p { padding: 1rem 1.25rem 0; font-size: .85rem; }
details p:last-child { padding-bottom: 1rem; margin: 0; }

/* FORM */
form { display: grid; gap: 1.1rem; max-width: 620px; }
.field { display: grid; gap: .35rem; }
label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
input, select, textarea { width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--bright); font-family: var(--mono); font-size: .88rem; padding: .75rem .9rem; border-radius: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); outline: none; }
textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: .75rem; color: var(--muted); }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .78rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.consent input { width: auto; margin-top: .3rem; accent-color: var(--accent); }

/* LEGAL */
.legal h2 { margin-top: 2.5rem; }
.legal p, .legal li { font-size: .88rem; }
.legal ul { margin: 0 0 1rem 1.2rem; max-width: 70ch; }
.ph { border: 1px dashed var(--warn); color: var(--warn); padding: 0 .35rem; font-size: .85em; }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 2.5rem 0 3rem; font-size: .75rem; color: var(--muted); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.foot ul { display: flex; gap: 1.5rem; list-style: none; flex-wrap: wrap; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }

/* COOKIE */
#cookie { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; max-width: 560px; z-index: 500; background: var(--surface); border: 1px solid var(--accent-dim); padding: 1.1rem 1.25rem; font-size: .78rem; display: none; box-shadow: 0 0 30px rgba(0,255,65,.12); }
#cookie.show { display: block; }
#cookie p { margin-bottom: .8rem; }
#cookie .row { display: flex; gap: .7rem; flex-wrap: wrap; }
#cookie .btn { padding: .5rem 1rem; font-size: .72rem; }

/* 404 + BAUSTELLE */
.center { min-height: calc(100vh - 7rem); display: flex; align-items: center; padding: 6rem 0 2rem; }
.hero > .wrap, .center > .wrap { width: 100%; }
.err-code { font-size: clamp(4rem, 16vw, 9rem); font-weight: 700; color: var(--accent); line-height: 1; text-shadow: 0 0 30px rgba(0,255,65,.35); animation: flicker 4s infinite; }
@keyframes flicker { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .4; } 94% { opacity: 1; } 96% { opacity: .55; } 97% { opacity: 1; } }
.bar { height: 14px; border: 1px solid var(--accent-dim); padding: 2px; margin: 1.25rem 0 .5rem; max-width: 520px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); transition: width .2s; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret, .cursor, .dot, .err-code { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 760px) {
  nav { padding: 1rem 1.25rem; }
  .burger { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(2,5,3,.98); border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
  .wrap { padding: 0 1.25rem; }
  section { padding: 3.5rem 0; }
}
