/* polarpixel.se – modern-retro (80er); Markenmotiv Polarlicht (PP-36), im Hero naturnah (PP-44),
   Farbwelt aus dem Polarlicht auf der ganzen Seite (PP-46): Nacht, Grün, Mint, Türkis, Violett, Schnee;
   Orange als Kontrastakzent für Hauptaktion, Logo-Kern und Schrift-Akzente (PP-47).
   Keine externen Ressourcen, Systemschriften. Bewegung nur ohne prefers-reduced-motion. */
:root {
  /* Polarlicht-Palette (PP-46): Nacht Blau-Schwarz, Grün, Türkis und Violett tragen die Flächen.
     Orange (PP-47, Wert wie vor PP-46) ist Komplementär zu Grün/Türkis und hebt nur Aktion, Marke und Claim heraus. */
  --night: #040a12;
  --night-2: #0a1a24;
  --green: #2fe08f;      /* Hauptaktion, hellste Farbe des Polarlichts */
  --mint: #6dffb3;       /* Lichtkante, Fokus auf dunklem Grund */
  --teal: #2bc9b9;
  --violet: #a08cff;     /* Strahlenspitzen, zweiter Akzent */
  --green-deep: #0a6a58; /* Links auf hellem Grund (5,9:1 auf Schnee) */
  --violet-deep: #4b33b8;/* zweiter Akzent auf hellem Grund (7,7:1) */
  --orange: #ff6a2b;     /* Kontrastakzent auf dunklem Grund (6,9:1 auf Nacht, Nacht auf Orange ebenso) */
  --orange-deep: #a8421c;/* Orange als Schrift auf hellem Grund (5,4:1 auf Schnee) */
  --snow: #eef4f3;
  --snow-2: #fbfdfd;
  --focus: var(--violet-deep);
  --ink: #0b1d26;
  --ink-soft: #3b5560;
  --max: 70rem;
  --sans: "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--snow);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}
main { flex: 1; }

a { color: var(--green-deep); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 20;
  background: var(--mint); color: var(--night); padding: 0.6rem 1rem; font-weight: 700;
}
.skip:focus { left: 0; }
/* Auf dunklem Grund Fokus in Mint (15,7:1 auf Nacht) */
.site-header, .hero, .page-head, .site-footer { --focus: var(--mint); }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

/* Kopf */
.site-header { background: var(--night); color: var(--snow); position: relative; z-index: 2; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding: 1rem 0; }
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem; color: var(--snow); text-decoration: none;
  font-size: 1.3rem; font-weight: 500; letter-spacing: 0.04em;
}
.brand b { font-weight: 800; color: var(--orange); }
.brand:hover { color: var(--snow); }
.logo { width: 2.66rem; height: 1.9rem; flex: none; }
/* Zeichen „Lichtband“ (PP-49): Band Mint, Grün, Türkis, Saum Violett, Stern Orange, wie assets/brand/ (LOGO.md) */
.logo .vio { fill: var(--violet); }
.logo .tur { fill: var(--teal); }
.logo .grn { fill: var(--green); }
.logo .mint { fill: var(--mint); }
.logo .core { fill: var(--orange); }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: inline-block; padding: 0.55rem 0; color: var(--snow); text-decoration: none;
  font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.18em;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--orange); color: var(--snow); }
.nav .lang a { border: 1px solid var(--teal); border-radius: 2px; padding: 0.3rem 0.55rem; color: var(--teal); }
.nav .lang a:hover { background: var(--teal); color: var(--night); }

/* Startseite: Nachthimmel Blau-Schwarz (PP-46), naturnahes Polarlicht (Canvas, ohne JS als SVG-Standbild), Fichten am Horizont (PP-44) */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(70% 45% at 70% 100%, rgba(47, 224, 143, 0.08), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, #06121c 60%, var(--night-2) 100%);
  color: var(--snow);
  --fh: clamp(4.5rem, 10vw, 9.5rem);   /* Höhe der Baumlinie */
  min-height: min(88vh, 46rem);
  display: flex; align-items: center;
  padding: clamp(3rem, 9vw, 6rem) 0 clamp(7rem, 16vw, 11rem);
}
.hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art .stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art .treeline { position: absolute; left: 0; bottom: 0; width: 100%; height: var(--fh); }
/* Polarlicht-Kasten: rechts, links weich ausgeblendet, damit kein Text auf hellen Strahlen liegt */
.aurora {
  position: absolute; right: -2rem; bottom: calc(var(--fh) * 0.45);
  width: min(72vw, 66rem); aspect-ratio: 12 / 5;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%);
  mask-image: linear-gradient(90deg, transparent, #000 35%);
}
.aurora img, .aurora canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.aurora canvas { opacity: 0; transition: opacity 1.2s ease; }
.aurora.is-live canvas { opacity: 1; }
.aurora.is-live img { opacity: 0; transition: opacity 1.2s ease; }
.hero-copy { position: relative; z-index: 2; }
/* main wächst per flex: 1 bis zum Fuß; der Hero wächst mit, sonst bleibt zwischen Baumlinie und Fuß
   ein Streifen body-Hintergrund (Schnee) stehen, sobald das Fenster höher ist als Kopf + Hero + Fuß (PP-113) */
.is-home main { display: flex; flex-direction: column; }
.is-home .hero { flex: 1 0 auto; }

.boot { font-family: var(--mono); color: var(--green); font-size: 0.95rem; margin: 0 0 1.2rem; letter-spacing: 0.04em; }
.prompt { color: var(--orange); }
.cursor {
  display: inline-block; width: 0.6em; height: 1.1em; margin-left: 0.2em; vertical-align: -0.2em;
  background: currentColor;
}

h1, h2, h3 { line-height: 1.08; margin: 0 0 1rem; }
h1 { font-weight: 800; letter-spacing: -0.02em; }
.claim {
  font-size: clamp(2.6rem, 7vw, 5.2rem); max-width: 14ch; margin-bottom: 1.4rem;
  color: var(--snow);
  /* Schatten: Orange als harte Kante (PP-47), dahinter Violett aus dem Polarlicht als Leuchten */
  text-shadow: 3px 3px 0 var(--orange), 6px 6px 0 rgba(160, 140, 255, 0.4);
}
.claim .ch { display: inline-block; white-space: pre; }
.intro { font-size: clamp(1.1rem, 2.2vw, 1.3rem); max-width: 38rem; color: #d5e2e4; margin: 0 0 2rem; }

.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; }
.btn {
  display: inline-block; padding: 0.85rem 1.5rem; text-decoration: none; font-weight: 700;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.9rem;
  border: 2px solid var(--orange); border-radius: 2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn-primary { background: var(--orange); color: var(--night); box-shadow: 4px 4px 0 var(--violet); }
.btn-primary:hover { color: var(--night); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--violet); }
.btn-ghost { color: var(--snow); border-color: var(--teal); }
.btn-ghost:hover { color: var(--night); background: var(--teal); }

/* Unterseiten */
.page-head {
  background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); color: var(--snow); position: relative; overflow: hidden;
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(2rem, 5vw, 3rem);
  border-bottom: 6px solid var(--green);
  box-shadow: 0 6px 0 var(--teal), 0 12px 0 var(--violet);
  margin-bottom: 12px;
}
.page-head::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 90% at 88% 0%, rgba(109, 255, 179, 0.16), transparent 70%),
    radial-gradient(30% 80% at 70% 0%, rgba(160, 140, 255, 0.18), transparent 70%);
}
.page-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image:
    linear-gradient(to right, rgba(43, 201, 185, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(43, 201, 185, 0.35) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  mask-image: linear-gradient(90deg, transparent 30%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
}
.page-head h1 { font-size: clamp(2.2rem, 6vw, 4rem); margin: 0; position: relative; text-shadow: 3px 3px 0 var(--orange); }
.page-head h1 .ch { display: inline-block; white-space: pre; }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }

.cards {
  list-style: none; margin: 0 0 2.5rem; padding: 0;
  display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.card {
  position: relative; background: var(--snow-2); border: 2px solid var(--ink); border-radius: 2px;
  padding: 1.5rem 1.4rem 1.3rem; box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--orange); }
.card h2 { font-size: 1.35rem; margin: 0.9rem 0 0.4rem; }
.card p { margin: 0; color: var(--ink-soft); }
.card .num { position: absolute; top: 1.1rem; right: 1.2rem; font-family: var(--mono); font-size: 0.85rem; color: var(--orange-deep); letter-spacing: 0.1em; }
.icon { width: 2.4rem; height: 2.4rem; fill: var(--ink); shape-rendering: crispEdges; }
.card:nth-child(3n+1) .icon { fill: var(--violet-deep); }
.card:nth-child(3n+2) .icon { fill: var(--green-deep); }
.card:nth-child(3n) .icon { fill: #0e6a80; }
.closing { font-size: 1.2rem; font-weight: 600; }

.contact .lead { font-size: clamp(1.15rem, 2.4vw, 1.4rem); max-width: 36rem; }
.mail {
  display: inline-block; margin: 0.5rem 0 1.5rem; padding: 1rem 1.4rem;
  background: var(--night); color: var(--green); text-decoration: none; border-radius: 2px;
  font-family: var(--mono); font-size: clamp(1.05rem, 3.6vw, 1.6rem); word-break: break-all;
  box-shadow: 6px 6px 0 var(--orange);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mail:hover { color: var(--snow); transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--green); }
.company { font-weight: 700; letter-spacing: 0.04em; }

/* Rechtstexte */
.prose { max-width: 48rem; }
.prose h2 { font-size: 1.35rem; margin: 2.2rem 0 0.6rem; }
.prose p, .prose ul { margin: 0 0 1rem; }
.prose ul { padding-left: 1.3rem; }
.draft {
  border: 2px dashed var(--violet-deep); background: #eceaff; padding: 0.8rem 1rem; font-family: var(--mono); font-size: 0.9rem;
}
mark.offen { background: var(--mint); color: var(--night); padding: 0 0.2em; font-size: 0.9em; font-family: var(--mono); }

/* Fuß */
.site-footer { background: var(--night); color: #c9d6da; font-size: 0.92rem; }
.site-footer a { color: var(--snow); }
.site-footer a:hover { color: var(--mint); }
.stripes { display: block; width: 100%; height: 30px; }
/* Streifen wie das Polarlicht: oben Violett, dann Türkis, unten Grün */
.stripes .s1 { fill: var(--violet); }
.stripes .s2 { fill: var(--teal); }
.stripes .s3 { fill: var(--green); }
.foot { padding: 1.6rem 0 2rem; }
.foot p { margin: 0 0 0.4rem; }
.foot-claim { font-family: var(--mono); color: var(--green); letter-spacing: 0.06em; }

@media (max-width: 40rem) {
  .bar { padding: 0.8rem 0; }
  .nav { gap: 0.1rem 1rem; }
  .nav a { font-size: 0.74rem; letter-spacing: 0.12em; }
  .claim { text-shadow: 2px 2px 0 var(--orange), 4px 4px 0 rgba(160, 140, 255, 0.4); }
}

/* Bis 70rem: Polarlicht über die ganze Breite unter dem Text, nach oben ausgeblendet. Der Text bekommt unten
   so viel Platz, dass er über dem hellen Teil (untere 60 % des Kastens) endet. */
@media (max-width: 70rem) {
  .hero { --ah: clamp(15rem, 60vw, 24rem); padding-bottom: calc(var(--fh) * 0.45 + var(--ah) * 0.62); }
  .aurora {
    left: 0; right: 0; width: auto; height: var(--ah); aspect-ratio: auto;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%);
    mask-image: linear-gradient(180deg, transparent, #000 35%);
  }
}

/* Bewegung */
@media (prefers-reduced-motion: no-preference) {
  /* Polarlicht steigt beim Laden auf; das Flackern übernimmt assets/aurora.js */
  .aurora { animation: aurora-in 2.4s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes aurora-in { from { transform: translateY(6%); opacity: 0; } }

  .cursor { animation: blink 1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }

  /* Band steigt auf, danach löst sich der Saum in Stufen aus dem Dunkel */
  .logo .band { animation: band-in 0.6s cubic-bezier(.2, .8, .2, 1) both; transform-box: fill-box; }
  @keyframes band-in { from { transform: translateY(40%); opacity: 0; } }
  .logo .vio { animation: px-fade 0.45s steps(3) 0.45s both; }
  @keyframes px-fade { from { opacity: 0; } }
  .brand:hover .core { animation: core 0.6s steps(2) 2; }
  @keyframes core { 50% { fill: var(--violet); } }

  .stripes .s { animation: stripe 1.2s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
  .stripes .s2 { animation-delay: .12s; } .stripes .s3 { animation-delay: .24s; }
  @keyframes stripe { from { transform: scaleX(0); } }

  /* Buchstaben, die motion.js einzeln setzt */
  .js .ch { animation: glitch-in 0.5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--n) * 28ms + 0.25s); }
  @keyframes glitch-in {
    0% { opacity: 0; transform: translateY(0.4em) skewX(-20deg); color: var(--mint); }
    60% { opacity: 1; color: var(--violet); }
  }
  .js .boot-text { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; animation: type 0.9s steps(19) both; }
  @keyframes type { from { width: 0; } to { width: 19ch; } }

  .js .card { animation: rise 0.6s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 70ms + 0.15s); }
  @keyframes rise { from { opacity: 0; transform: translateY(1.2rem); } }
}
