/* ====================================================================
   RecMedia – Mantis-Style-Test
   Helles Grau, riesige tighte Grotesk, Scroll-Story, Kritzel-Figur (WebGL)
   ==================================================================== */

/* Selbst gehostete Schriften (OFL) – keine Google-Fonts-Anfragen,
   dadurch datenschutzkonform ohne IP-Uebertragung an Dritte */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/archivo-var.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/plexmono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/plexmono-500.woff2") format("woff2");
}

:root {
  --bg:     #d4d4d2;
  --ink:    #121212;
  --muted:  #55554f;
  --green:  #4cdb27;   /* Mantis-Grün-Analogon als Mini-Akzent */
  --font:   "Archivo", system-ui, sans-serif;
  --mono:   "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Filmkorn wie beim Original */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 400;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.07; mix-blend-mode: multiply;
}

/* ---------- Preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  transition: opacity .6s ease, visibility .6s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-logo { font-size: 1.6rem; font-weight: 500; letter-spacing: -0.02em; }
.loader-logo b { font-weight: 700; }
.loader-pct { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }

/* ---------- WebGL-Figur ---------- */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- Rails / Widgets ---------- */
.rail {
  position: fixed; z-index: 50; font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.14em; color: var(--ink); display: flex; gap: 12px; align-items: center;
}
.rail i { font-style: normal; opacity: 0.5; }
.rail-left { left: 18px; top: 20px; writing-mode: vertical-rl; transform: rotate(180deg); height: 40vh; justify-content: flex-end; }
.rail-right { right: 18px; top: 42vh; writing-mode: vertical-rl; height: 40vh; }
.rail-love { left: 18px; bottom: 20px; writing-mode: vertical-rl; transform: rotate(180deg); }
.widget-weather {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 50;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em;
  display: flex; gap: 10px; align-items: center; text-align: left;
}
.ww-ico { font-size: 0.9rem; }

.topnav { position: fixed; top: 18px; right: 24px; z-index: 60; display: flex; flex-direction: column; gap: 2px; text-align: right; }
.topnav a { color: var(--ink); text-decoration: none; font-size: 1rem; }
.topnav a:hover { opacity: 0.6; }

.brand-fixed {
  position: fixed; left: 24px; top: 44vh; z-index: 60;
  display: flex; flex-direction: column; align-items: flex-start;
}
.brand-row {
  font-size: 1.7rem; font-weight: 500; letter-spacing: -0.03em;
  display: flex; gap: 10px; align-items: flex-start;
}
.brand-fixed b { font-weight: 700; }
.brand-row span { font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.1em; line-height: 1.5; margin-top: 6px; color: var(--muted); }
/* Rechtstexte-Links direkt unter dem Logo */
.brand-legal { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.brand-legal a {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.brand-legal a:hover { color: var(--ink); }

/* ---------- Szenen ---------- */
main { position: relative; z-index: 10; }
.scene { min-height: 175vh; display: flex; align-items: center; justify-content: center; padding: 0 6vw; }
.scene-hero { min-height: 100vh; min-height: 100svh; flex-direction: column; gap: 3vh; justify-content: center; padding-top: 8vh; }
.scene-right { justify-content: flex-end; }
.scene-right .statement-md { max-width: 44vw; text-align: left; }

.statement {
  font-size: clamp(3.2rem, 10.5vw, 11rem);
  font-weight: 600; letter-spacing: -0.045em; line-height: 0.98;
  text-align: center; text-transform: lowercase;
}
.statement-md {
  font-size: clamp(2rem, 4.6vw, 4.6rem);
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.04;
}
/* Wort-Reveal wie Original: Woerter erscheinen stueckweise, erst grau, dann schwarz */
[data-split] .w { display: inline-block; vertical-align: bottom; }
[data-split] .w > span { display: inline-block; opacity: 0; will-change: opacity, transform; }
html.no-js [data-split] .w > span { opacity: 1; }
/* Story-Bloecke: sanftes Scrub-Fade */
[data-fade] { opacity: 0; transform: translateY(48px); will-change: opacity, transform; }
html.no-js [data-fade] { opacity: 1; transform: none; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
  font-family: var(--font); font-size: 1.05rem; font-weight: 500; line-height: 1;
  padding: 15px 30px; border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 1.5px solid var(--ink); transition: transform .2s ease, background .2s, color .2s;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { transform: scale(1.04); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* ---------- Statement-Kaskade ---------- */
.stack {
  position: relative; z-index: 10; min-height: 175vh;
  display: flex; flex-direction: column; justify-content: center; gap: 1.4vh;
  padding: 0 8vw;
}
.stack-l {
  font-size: clamp(2.4rem, 7.5vw, 7.5rem);
  font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  text-transform: lowercase;
}
.stack-l2 { margin-left: 16vw; }
.stack-l3 { margin-left: 34vw; }
@media (max-width: 700px) {
  .stack { min-height: 120vh; }
  .stack-l { font-size: clamp(1.9rem, 9.5vw, 3.4rem); }
  .stack-l2 { margin-left: 8vw; }
  .stack-l3 { margin-left: 18vw; }
}

/* ---------- Story ---------- */
.story { position: relative; z-index: 10; max-width: 620px; margin-left: 52vw; padding: 12vh 6vw 16vh 0; display: flex; flex-direction: column; gap: 14vh; }
.story h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 600; letter-spacing: -0.03em; margin-bottom: 14px; }
.story p { font-size: 1rem; line-height: 1.65; color: var(--muted); margin-bottom: 12px; }

/* ---------- Referenzen ---------- */
.refs { position: relative; z-index: 10; padding: 14vh 6vw; display: flex; flex-direction: column; gap: 5vh; }
.refs-lead { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.refs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 34px); justify-items: center; }
.ref { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 340px; }
.ref-media {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 6px;
  background: #c8c8c6; cursor: pointer;
}
.ref-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #c8c8c6; }
.ref-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%; background: rgba(18,18,18,0.5);
  color: #fff; display: flex; align-items: center; justify-content: center;
  pointer-events: none; transition: opacity .25s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.ref-play svg { margin-left: 3px; }
.ref-media.playing .ref-play { opacity: 0; }
.ref figcaption { font-size: 0.9rem; color: var(--muted); }
.ref figcaption b { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .refs-grid { grid-template-columns: 1fr; }
  .ref { max-width: min(72vw, 300px); }
}

/* ---------- Kunden-Logos ---------- */
.clients { position: relative; z-index: 10; padding: 4vh 6vw 12vh; display: flex; flex-direction: column; gap: 5vh; align-items: center; }
.clients-row { display: flex; flex-wrap: wrap; gap: clamp(26px, 4.5vw, 64px); align-items: center; justify-content: center; max-width: 1100px; }
/* gleichmaessige Logo-Groessen: Hoehe UND Breite gedeckelt */
.clients-row img { max-height: 38px; max-width: 132px; width: auto; height: auto; filter: grayscale(1); opacity: 0.72; transition: opacity .25s; }
.clients-row img:hover { opacity: 1; }
.clients-row img.inv { filter: grayscale(1) invert(1); }
@media (max-width: 700px) {
  .clients-row { gap: 20px; }
  .clients-row img { max-height: 24px; max-width: 88px; }
}

/* ---------- Zahlen ---------- */
.numbers { min-height: 90vh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7vh; padding: 0 6vw; text-align: center; }
.numbers-lead { max-width: 480px; font-size: 1.05rem; color: var(--muted); line-height: 1.6; }
.numbers-grid { display: flex; gap: clamp(30px, 8vw, 110px); flex-wrap: wrap; justify-content: center; }
.numbers-grid .num { font-size: clamp(4rem, 10vw, 9rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; display: block; }
.numbers-grid label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Footer ---------- */
.foot { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6vh; }
.foot-head { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 600; letter-spacing: -0.04em; text-align: center; }

/* ChatGPT-artiger Kontakt-Composer (funktioniert als Kontaktformular) */
.composer { width: min(92vw, 640px); display: flex; flex-direction: column; gap: 14px; }
.composer-box {
  display: flex; align-items: flex-end; gap: 8px; background: #f4f4f2;
  border: 1px solid #c4c4c0; border-radius: 26px; padding: 10px 10px 10px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.06); transition: border-color .2s, box-shadow .2s;
}
.composer-box:focus-within { border-color: var(--ink); box-shadow: 0 14px 46px rgba(0,0,0,0.10); }
.composer-fields { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.composer-input, .composer-mail {
  border: 0; background: none; resize: none; outline: none; width: 100%;
  font-family: var(--font); font-size: 1.05rem; color: var(--ink); line-height: 1.5; padding: 8px 0;
}
.composer-input { max-height: 200px; }
.composer-mail { border-top: 1px solid #d8d8d4; padding-top: 10px; margin-top: 4px; }
.composer-input::placeholder, .composer-mail::placeholder { color: #8a8a82; }
.composer-send {
  flex-shrink: 0; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--bg); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: transform .15s;
}
.composer-send:hover { transform: scale(1.06); }
.composer-hint { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--muted); text-align: center; }
.composer-done { font-size: 1.4rem; font-weight: 500; text-align: center; max-width: 520px; line-height: 1.4; }
.is-hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.foot-legal { display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; }
.foot-legal a { color: var(--muted); text-decoration: none; }
.foot-legal a:hover { color: var(--ink); text-decoration: underline; }
.foot-legal span { color: var(--muted); opacity: 0.5; }
.foot-note { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--muted); text-align: center; padding: 0 6vw; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .rail-left, .rail-right, .rail-love { display: none; }
  .brand-fixed { top: auto; bottom: 18px; }
  .brand-row { font-size: 1.2rem; }
  .brand-legal { display: none; }   /* mobil ueber Footer erreichbar */
  .scene-right { justify-content: flex-end; }
  .scene-right .statement-md { max-width: 78vw; text-align: right; }
  .story { margin-left: 6vw; padding-right: 6vw; }
}
@media (max-width: 700px) {
  .widget-weather { display: none; }
  .topnav { top: 14px; right: 16px; }
  .topnav a { font-size: 0.88rem; }
  .scene { min-height: 105vh; padding: 0 5vw; }
  .statement { font-size: clamp(2.6rem, 13.5vw, 5rem); }
  .statement-md { font-size: clamp(1.5rem, 7vw, 2.6rem); }
  .btn { font-size: 1rem; padding: 13px 24px; }
  .story { gap: 7vh; padding-top: 4vh; }
  .numbers-grid { gap: 26px; }
  .numbers-grid .num { font-size: clamp(3rem, 16vw, 5rem); }
  .foot-head { font-size: clamp(1.9rem, 9vw, 3rem); }
  .foot-note { padding: 0 6vw; text-align: center; }
  .brand-fixed span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-split] .w > span { transition: none; transform: none; }
}

/* ---------- Rechtstexte (Impressum / Datenschutz) ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 12vh 6vw 16vh; }
.legal-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); text-decoration: none; margin-bottom: 7vh;
}
.legal-back:hover { color: var(--ink); }
.legal h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 4vh; }
.legal h2 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; margin: 4.5vh 0 1rem; }
.legal h3 { font-size: 1.02rem; font-weight: 600; margin: 2.6vh 0 0.4rem; }
.legal p, .legal li { font-size: 1rem; line-height: 1.7; color: #2a2a28; margin-bottom: 1rem; }
.legal ul { padding-left: 1.2rem; margin-bottom: 1rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a { color: var(--ink); }
.legal strong { font-weight: 600; }
.legal address { font-style: normal; line-height: 1.7; }
.legal .todo { background: #ffe08a; color: #5a4500; padding: 1px 7px; border-radius: 3px; font-weight: 600; }
.legal-note {
  font-family: var(--mono); font-size: 0.78rem; line-height: 1.65; color: #7a5f00;
  background: #fff6da; border: 1px solid #f0d98a; padding: 15px 18px; border-radius: 10px; margin-bottom: 5vh;
}
.legal-note b { color: #5a4500; }

/* ---------- FAQ ---------- */
.faq { position: relative; z-index: 10; max-width: 820px; margin: 0 auto; padding: 8vh 6vw 14vh; display: flex; flex-direction: column; gap: 3vh; }
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid #bcbcb8; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 22px 42px 22px 0; position: relative;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; color: var(--ink);
}
.faq-item summary h3 { margin: 0; font: inherit; letter-spacing: inherit; color: inherit; display: inline; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 300; color: var(--muted);
}
.faq-item[open] summary::after { content: "\2013"; }
.faq-a { padding: 0 42px 26px 0; }
.faq-a p { font-size: 1rem; line-height: 1.7; color: var(--muted); max-width: 660px; }
@media (max-width: 700px) {
  .faq-item summary { font-size: 1.08rem; padding-right: 34px; }
  .faq-a { padding-right: 0; }
}

/* ---------- Cookie-Consent (DSGVO) ---------- */
.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 500; padding: 16px; display: flex; justify-content: center; }
.cookie[hidden] { display: none; }
.cookie-inner {
  max-width: 900px; width: 100%; background: #1a1a1a; color: #eaeae6; border-radius: 14px;
  padding: 18px 22px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}
.cookie-text { flex: 1; min-width: 240px; font-size: 0.86rem; line-height: 1.55; }
.cookie-text a { color: #fff; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-btn { font-family: var(--font); font-size: 0.9rem; font-weight: 500; padding: 11px 22px; border-radius: 999px; cursor: pointer; border: 1.5px solid transparent; transition: transform .15s, border-color .2s; }
.cookie-btn:hover { transform: scale(1.03); }
.cookie-primary { background: #fff; color: #121212; }
.cookie-ghost { background: transparent; color: #eaeae6; border-color: #55554f; }
.cookie-ghost:hover { border-color: #eaeae6; }
.foot-legal-btn { background: none; border: 0; cursor: pointer; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--muted); padding: 0; }
.foot-legal-btn:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 600px) {
  .cookie-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-actions { justify-content: stretch; }
  .cookie-btn { flex: 1; }
}
