/* ============================================================
   CORVUS — style.css
   Palette: Rabengefieder. Anthrazit-Basis, irisierender
   Schimmer aus Petrol → Stahlblau → Violett.
   ============================================================ */

/* ---------- Fonts ----------
   Bewusst KEIN Google-Fonts-CDN (DSGVO / LG München).
   Wenn du eine eigene Schrift willst: Font-Dateien (woff2)
   lokal in /assets/fonts legen und hier einbinden:

------------------------------------------------------------ */

:root {
  /* Farben */
  --ink:        #0E1014;   /* Hintergrund, tiefes Anthrazit */
  --ink-raised: #16191F;   /* Karten */
  --line:       #262B34;   /* Rahmen */
  --paper:      #F2F0EC;   /* Text, warmes Off-White */
  --muted:      #9AA1AC;   /* Nebentext */

  /* Der Schimmer — Rabenfeder im Licht */
  --aqua: #00FFFF;
  --aqualight: #09cae4;
  --petrol:  #2FA3AD;
  --steel:   #4C7DD9;
  --violet:  #8B7BC7;
  --blueviolet: #8A2BE2;
  --shimmer: linear-gradient(115deg,
              var(--aqua) 0%,
              var(--aqualight) 10%,
              var(--petrol) 20%,
              var(--steel)  30%,
              var(--violet) 40%,
              var(--blueviolet) 50%,
              var(--violet) 60%,
              var(--steel)  70%,
              var(--petrol) 80%,
              var(--aqualight) 90%,
              var(--aqua) 110%);

  /* Typo */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rhythmus */
  --radius: 14px;
  --section-pad: clamp(4rem, 10vw, 8rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset & Basis ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--steel); color: var(--ink); }

/* ============================================================
   SIGNATUR: Der Schimmer
   Irisierender Verlauf, der wie Licht über eine Rabenfeder
   wandert. Animiert im Hero, statisch als Akzent.
   ============================================================ */

.shimmer,
.shimmer-static {
  background: var(--shimmer);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.shimmer {
  animation: sheen 5s linear infinite;
}

@keyframes sheen {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1.25rem, 5vw, 3rem);
  transition: background 0.4s, box-shadow 0.4s;
}

.nav.is-scrolled {
  background: rgba(14, 16, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav__mark { width: 26px; height: 26px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: 0.95rem;
}

.nav__links a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.25s;
}

.nav__links a:hover { color: var(--paper); }

.nav__cta {
  color: var(--ink) !important;
  background: var(--shimmer);
  background-size: 250% 100%;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-weight: 600;
  animation: sheen 5s linear infinite;
  transition: box-shadow 0.3s;
}

.nav__cta:hover { 
  box-shadow: 0,4px 20px rgba(76, 125, 217, 0.35);
 }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(1.25rem, 6vw, 5rem);
  isolation: isolate;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero__sub {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
  will-change: transform;
}

.btn--primary {
  background: var(--shimmer);
  background-size: 250% 100%;
  color: var(--ink);
  animation: sheen 5s linear infinite;
}

.btn--primary:hover {
  box-shadow: 0 8px 32px rgba(76, 125, 217, 0.35);
}

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--paper);
}

.btn--ghost:hover { border-color: var(--petrol); }

/* ---------- Sektionen ---------- */
.section {
  padding: var(--section-pad) clamp(1.25rem, 6vw, 5rem);
  max-width: 72rem;
  margin-inline: auto;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 40rem;
  margin-bottom: 3rem;
}


/* ---------- Karten mit Cursor-Sheen ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), border-color 0.4s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(76, 125, 217, 0.4);
}

/* Lichtreflex, folgt dem Cursor (JS setzt --mx / --my) */
[data-sheen]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%),
              rgba(76, 125, 217, 0.14),
              rgba(139, 123, 199, 0.07) 40%,
              transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

[data-sheen]:hover::before { opacity: 1; }

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--muted);
  font-size: 0.98rem;
}

.card__tag {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--petrol);
  border: 1px solid rgba(47, 163, 173, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}

/* ---------- Arbeitsweise ---------- */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.step__num {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }

.step p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Referenz ---------- */
.reference {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-decoration: none;
  transition: transform 0.4s var(--ease-out), border-color 0.4s;
}

.reference:hover {
  transform: translateY(-4px);
  border-color: rgba(76, 125, 217, 0.4);
}

.reference__info { max-width: 32rem; }

.reference__info h3 {
  color: var(--muted);
}

.reference__info p {
  color: var(--muted);
  font-size: 0.98rem;
}

.reference__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  white-space: nowrap;
}

.reference__link .shimmer-static {
  color: white;
}

.reference__arrow {
  transition: transform 1ms var(--ease-out);
}

.reference:hover .reference__arrow {
  transform: translate(4px, -4px);
}

/* ---------- Kontakt ---------- */
.contact__inner {
  position: relative;
  overflow: hidden;
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.5);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
}

.contact__inner .section__title { margin-inline: auto; margin-bottom: 1rem; }

.contact__text {
  color: var(--muted);
  max-width: 30rem;
  margin: 0 auto 2.25rem;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding: 2rem clamp(1.25rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer nav { display: flex; gap: 1.5rem; }

.footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s;
}

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

/* ---------- Scroll-Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .shimmer,
  .btn--primary,
  .hero__glow {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn, .card { transition: none; }
}

/* ---------- Mobil ---------- */
@media (max-width: 600px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .step { flex-direction: column; gap: 0.5rem; }
}

/* ---------- Partikel-Orb (security.html) ---------- */
.hero--orb { overflow: hidden; }   /* wegfliegende Partikel abschneiden */

.orb {
  position: absolute;
  top: 50%;
  left: 65%;                       /* leicht rechts, Text bleibt lesbar */
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  perspective: 1000px;
  animation: orb-rotate 14s infinite linear;
  z-index: -1;
}

@keyframes orb-rotate {
  100% { transform: rotateY(360deg) rotateX(360deg); }
}

.orb .p {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  opacity: 0;
  background: hsl(var(--hue) 75% 58%);
  box-shadow: 0 0 6px hsl(var(--hue) 75% 58% / 0.8);
  animation: orbit 14s infinite;
  animation-delay: var(--delay);
}

@keyframes orbit {
  20% { opacity: 1; }
  30% {
    transform: rotateZ(calc(var(--rz) * -1)) rotateY(var(--ry))
               translateX(180px) rotateZ(var(--rz));
  }
  80% {
    transform: rotateZ(calc(var(--rz) * -1)) rotateY(var(--ry))
               translateX(180px) rotateZ(var(--rz));
    opacity: 1;
  }
  100% {
    transform: rotateZ(calc(var(--rz) * -1)) rotateY(var(--ry))
               translateX(540px) rotateZ(var(--rz));
  }
}

/* Am Handy: Orb mittig hinter den Text, etwas kleiner wirken lassen */
@media (max-width: 700px) {
  .orb { left: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .orb .p { animation: none; }
  .orb .p { opacity: 1; }
}

/* ---------- Rechtshinweis im Kontaktblock ---------- */
.contact__note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 28rem;
  margin-inline: auto;
}

/* ============================================================
   CYBER-THEME (nur security.html — scoped über body.page-security)
   Adaptiert aus drei CodePen-Vorlagen, umgebaut auf die
   Corvus-Palette und ohne externe Fonts/CDNs.
   ============================================================ */

/* ---------- 1. Grid-Hintergrund (Kästchen, alle Seiten) ---------- */
body::before {
  --size: 45px;
  --grid-line: rgba(9, 202, 228, 0.10);   /* aqualight, stark transparent */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px var(--size))
      calc(var(--size) * 0.36) 50% / var(--size) var(--size),
    linear-gradient(var(--grid-line) 1px, transparent 1px var(--size))
      0% calc(var(--size) * 0.32) / var(--size) var(--size);
  mask: linear-gradient(-20deg, transparent 40%, white);
  -webkit-mask: linear-gradient(-20deg, transparent 40%, white);
  pointer-events: none;
}

/* ---------- 2. Glitch-Headline ---------- */
/* Prinzip: zwei Kopien des Texts (::before/::after, content: attr(data-text))
   liegen über dem Original. Per clip-path ist immer nur ein horizontaler
   Streifen sichtbar; Keyframes verschieben Streifen + Versatz + Farbsäume. */

.glitch {
  position: relative;
  display: inline-block;
  animation: glitch-scale 11s infinite alternate;
}

.glitch::before,
.glitch::after {
  --top: 0;          /* Streifen-Offset von oben, 0–10 */
  --left: 0;         /* horizontaler Versatz, ±0.001–0.09 */
  --v-height: 30%;   /* sichtbare Streifenhöhe */
  --t-cut: calc(var(--top) * 10%);
  --b-cut: calc(var(--t-cut) + var(--v-height));

  content: attr(data-text);
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  background: var(--ink);
  transform: translateX(calc(var(--left) * 100%));
  text-shadow:
    calc(var(--left) * -3em) 0 0.02em var(--aqualight),
    calc(var(--left) * -6em) 0 0.02em var(--blueviolet);
  clip-path: polygon(0% var(--t-cut), 100% var(--t-cut),
                     100% var(--b-cut), 0% var(--b-cut));
}

.glitch::before { animation: glitch-b 1.7s infinite alternate-reverse; }
.glitch::after  { animation: glitch-a 3.1s infinite alternate; }

@keyframes glitch-scale {
  17% { transform: scaleX(0.94); }
  31% { transform: scaleX(1.03); }
  37% { transform: scaleX(1.06); }
  47% { transform: scaleX(0.97); }
  87% { transform: scaleX(1); }
}

@keyframes glitch-a {
  10%, 30%, 50%, 70%, 90% { --top: 0; --left: 0; }
  0%   { --v-height: 15%; }
  20%  { --left: 0.005; }
  40%  { --left: 0.01;  --v-height: 20%; --top: 3; }
  60%  { --left: 0.03;  --v-height: 25%; --top: 6; }
  80%  { --left: 0.07;  --v-height: 5%;  --top: 8; }
  100% { --left: 0.083; --v-height: 30%; --top: 1; }
}

@keyframes glitch-b {
  10%, 30%, 50%, 70%, 90% { --top: 0; --left: 0; }
  0%   { --v-height: 15%; --top: 10; }
  20%  { --left: -0.005; }
  40%  { --left: -0.01;  --v-height: 17%; --top: 3; }
  60%  { --left: -0.03;  --v-height: 35%; --top: 6; }
  80%  { --left: -0.07;  --v-height: 5%;  --top: 8; }
  100% { --left: -0.083; --v-height: 30%; --top: 1; }
}

/* ---------- 3. Cyber-Kanten statt runder Ecken ---------- */
/* Abgeschnittene Ecke unten rechts — das Corner-Cut-Motiv der Vorlage */
.page-security .card,
.page-security .contact__inner {
  --corner: 16px;
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0,
                     100% calc(100% - var(--corner)),
                     calc(100% - var(--corner)) 100%,
                     0 100%);
}

/* Buttons überall eckig mit Corner-Cut — keine Pillen mehr */
.btn,
.nav__cta,
.page-security .card__tag {
  --corner: 10px;
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0,
                     100% calc(100% - var(--corner)),
                     calc(100% - var(--corner)) 100%,
                     0 100%);
}

/* ---------- 4. Chaos-Social-Card ---------- */
.socials {
  display: grid;
  place-items: center;
  padding-bottom: var(--section-pad);
}

.chaos-terminal {
  width: 250px;
  height: 100px;
  position: relative;
  cursor: pointer;
}

.chaos-frame {
  width: 100%;
  height: 100%;
  position: relative;
  background: repeating-linear-gradient(0deg,
      var(--ink) 0px, var(--ink) 3px,
      var(--ink-raised) 3px, var(--ink-raised) 6px);
  border: 3px solid var(--aqualight);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow:
    0 0 0 2px var(--ink),
    0 0 0 3px var(--line),
    8px 8px 0 3px var(--aqua),
    16px 16px 0 3px rgba(0, 0, 0, 0.6);
}

.chaos-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 900;
  font-size: 16px;
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 3px;
  z-index: 10;
  text-shadow: 2px 2px 0 var(--aqua);
  animation: chaos-jitter 2s linear infinite;
}

@keyframes chaos-jitter {
  0%, 100% { transform: translate(-50%, -50%); }
  20% { transform: translate(-49%, -51%); }
  40% { transform: translate(-48%, -52%); }
  60% { transform: translate(-53%, -51%); }
  80% { transform: translate(-51%, -53%); }
}

/* Icon-Raster: erscheint, wenn die Karte "zerfällt" */
.icon-chaos {
  position: absolute;
  inset: -10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 12px;
  background: repeating-linear-gradient(90deg,
      var(--ink) 0px, var(--ink) 3px,
      var(--ink-raised) 3px, var(--ink-raised) 6px);
  border: 3px solid var(--aqualight);
  transform: scale(0) rotate(180deg);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 15;
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px var(--aqua);
}

.social-unit {
  background: var(--ink-raised);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0) rotate(360deg);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: inset 0 0 0 1px rgba(9, 202, 228, 0.4);
}

.social-unit svg {
  width: 20px;
  height: 20px;
  fill: var(--paper);
  transition: all 0.2s ease;
}

/* Hover ODER Tastatur-Fokus im Inneren: Frame weicht, Icons kommen */
.chaos-terminal:hover .chaos-frame,
.chaos-terminal:focus-within .chaos-frame {
  transform: scale(0.9) rotate(4deg);
  opacity: 0.25;
  box-shadow:
    0 0 0 2px var(--ink),
    0 0 0 3px var(--line),
    20px 20px 0 3px var(--aqua),
    40px 40px 0 3px rgba(0, 0, 0, 0.35);
}

.chaos-terminal:hover .chaos-text,
.chaos-terminal:focus-within .chaos-text {
  transform: translate(-50%, -50%) scale(0) rotate(720deg);
  opacity: 0;
}

.chaos-terminal:hover .icon-chaos,
.chaos-terminal:focus-within .icon-chaos {
  transform: scale(1) rotate(0deg);
  opacity: 1;
  transition-delay: 0.15s;
}

.chaos-terminal:hover .social-unit,
.chaos-terminal:focus-within .social-unit {
  transform: scale(1) rotate(0deg);
  transition-delay: 0.1s;
}

.social-unit:hover,
.social-unit:focus-visible {
  background: var(--aqua);
  transform: scale(1.15) !important;
  box-shadow: inset 0 0 0 1px var(--ink), 0 0 18px var(--aqua);
}

.social-unit:hover svg,
.social-unit:focus-visible svg { fill: var(--ink); }

/* Scanlines über der ganzen Karte */
.chaos-terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      transparent 0px, transparent 2px,
      rgba(9, 202, 228, 0.14) 2px, rgba(9, 202, 228, 0.22) 4px);
  pointer-events: none;
  z-index: 25;
  animation: scanlines 1s linear infinite;
}

@keyframes scanlines {
  0%   { transform: translateY(0); }
  100% { transform: translateY(10px); }
}

/* ---------- Reduced Motion für alles Neue ---------- */
@media (prefers-reduced-motion: reduce) {
  .glitch,
  .glitch::before,
  .glitch::after,
  .chaos-text,
  .chaos-terminal::after {
    animation: none;
  }
  .glitch::before,
  .glitch::after { display: none; }
}
