/* ==========================================================================
   Korvia — Zeichnungslinie (nur Startseite)
   Konstruktionszeichnung als gemeinsame Gestaltungssprache: Tiefschwarz, Haarlinien,
   Champagner-Gold, eckige Flächen, ein Raster von 96 px mit Unterteilung 24 px.
   Wird NACH styles.css und v2.css geladen und gibt Hero, Kennzahlen, Eckwerte sowie
   Karten, Schritte, Formulare und Schaltflächen dieselbe Handschrift.
   ========================================================================== */

:root {
  --major: 96px;
  --minor: 24px;
  --pad: 96px;
  --vcol: 12;
  --line: rgba(245, 239, 227, 0.2);
  --line-soft: rgba(245, 239, 227, 0.12);
  --gold: #d4af37;
  --gold-a: #fff1c4;
  --gold-b: #e9c867;
  --grid-minor: rgba(245, 239, 227, 0.05);
  --grid-major: rgba(245, 239, 227, 0.11);
  --sec: 88px;
  --nav-h: 68px;
}
@media (max-width: 1023px) { :root { --pad: 48px; --vcol: 7; --sec: 72px; } }
@media (max-width: 767px)  { :root { --pad: 24px; --vcol: 3; --sec: 56px; } }

/* ---- Gemeinsamer Rahmen: Inhalte stehen auf der Rasterlinie des Heros ------- */
.container { max-width: 1440px; padding-inline: var(--pad); }
.section { padding-block: var(--sec); border-top: 1px solid var(--line-soft); }
.footer { margin-top: 0; }

/* Seitenhintergrund: sehr zartes Raster statt farbiger Lichtflecken */
.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: var(--major) var(--major);
  opacity: 0.6;
}
.atmosphere .glow { opacity: 0.45; }

/* ---- Navigation: Lineal unter dem Kopf, nur ganz oben sichtbar --------------- */
.nav { height: var(--major); transition: height 0.4s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease); }
.nav.is-scrolled { height: var(--nav-h); background: rgba(10, 9, 8, 0.86); }
.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(245, 239, 227, 0.5) 1px, transparent 1px) 0 0 / var(--major) 14px repeat-x,
    linear-gradient(90deg, rgba(245, 239, 227, 0.28) 1px, transparent 1px) 0 0 / var(--minor) 7px repeat-x;
  transition: opacity 0.3s var(--ease);
}
.nav.is-scrolled::after { opacity: 0; }
.brand { gap: 12px; font-size: 1.18rem; }
.brand .logo-mark { width: 28px; height: 28px; }
.nav-links { gap: 36px; }
.nav-links a:not(.nav-cta) { font-family: var(--font-display); font-weight: 500; font-size: 0.92rem; color: var(--text-2); }
.nav-links a:not(.nav-cta):hover { color: var(--text); }
.nav-cta {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text);
  padding: 10px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.55);
  transition: border-color 0.5s var(--ease);
}
.nav-cta:hover { border-color: var(--gold-a); }
.nav-toggle { border-radius: 0; border-color: var(--line); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad) 24px;
    background: #0a0908;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open a { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-links.open .nav-cta { margin-top: 12px; align-self: flex-start; border-bottom-color: rgba(212, 175, 55, 0.55); }
}

/* ---- Eyebrow, Schaltflächen, Textlink ---------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 clamp(22px, 3.5vh, 34px);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--gold); flex: none; opacity: 1; }

.btn {
  position: relative;
  gap: 14px;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 0;
  border: 0;
  font-size: 1rem;
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.btn:active { transform: none; }
.btn svg { transition: transform 0.5s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { color: #0a0908; background: var(--text); box-shadow: none; }
.btn--primary::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #d4af37, #fff1c4); }
.btn--primary:hover { background: #fff; transform: none; box-shadow: none; }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { background: transparent; border-color: var(--gold-b); transform: none; }
.text-link {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid rgba(245, 239, 227, 0.3);
  padding: 6px 0;
  transition: border-color 0.5s var(--ease);
}
.text-link:hover { border-color: var(--gold-a); }
.btn:focus-visible, .text-link:focus-visible, .nav-cta:focus-visible { outline: 2px solid var(--gold-b); outline-offset: 4px; border-radius: 0; }

/* ---- Hero ---------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: var(--major);
  overflow: hidden;
  isolation: isolate;
  border-top: 0;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: var(--major) var(--major), var(--major) var(--major), var(--minor) var(--minor), var(--minor) var(--minor);
  -webkit-mask-image: radial-gradient(120% 100% at 70% 30%, #000 25%, rgba(0, 0, 0, 0.45) 70%, rgba(0, 0, 0, 0.2) 100%);
  mask-image: radial-gradient(120% 100% at 70% 30%, #000 25%, rgba(0, 0, 0, 0.45) 70%, rgba(0, 0, 0, 0.2) 100%);
}
.hero-glow {
  position: absolute;
  z-index: -3;
  width: 900px;
  max-width: 100vw;
  aspect-ratio: 1;
  right: -10%;
  top: -12%;
  background: radial-gradient(closest-side, rgba(212, 175, 55, 0.08), transparent 70%);
  pointer-events: none;
}
.hero-run { position: absolute; z-index: -1; pointer-events: none; opacity: 0; }
.hero-run.h { left: 0; top: var(--major); height: 1px; width: 320px; background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.9) 70%, #fff1c4); }
.hero-run.v { top: 0; left: calc(var(--major) * var(--vcol)); width: 1px; height: 320px; background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.9) 70%, #fff1c4); }

.hero-core {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 44px;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding: clamp(32px, 5vh, 64px) var(--pad) clamp(40px, 5vh, 56px);
}
@media (min-width: 1200px) { .hero-core { grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr); gap: 40px; } }

.hero h1 {
  margin: 0;
  font-weight: 500;
  color: var(--text);
  font-size: clamp(2.4rem, 12vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
@media (min-width: 768px)  { .hero h1 { font-size: clamp(3.4rem, 8vw, 5.4rem); } }
@media (min-width: 1200px) { .hero h1 { font-size: clamp(2.6rem, 4.4vw, 5.6rem); } }
.hero h1 .ln { display: block; }
.hero-hgroup { width: fit-content; max-width: 100%; }
.hero-dim {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(20px, 3vh, 32px);
  width: 100%;
  color: var(--gold-b);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-dim i { display: block; position: relative; height: 1px; flex: 1; background: var(--gold); transform-origin: left; }
.hero-dim i::before, .hero-dim i::after { content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: var(--gold); }
.hero-dim i:first-child::before { left: 0; }
.hero-dim i:first-child::after { display: none; }
.hero-dim i:last-child::before { display: none; }
.hero-dim i:last-child::after { right: 0; }
.hero .lead { max-width: 32em; margin: clamp(20px, 3vh, 32px) 0 0; font-size: clamp(1.02rem, 0.96rem + 0.4vw, 1.22rem); color: var(--text-2); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: clamp(24px, 4vh, 38px); }
@media (max-width: 479px) { .hero-cta .btn { width: 100%; } }

/* Konstruktionszeichnung */
.stage { position: relative; margin: 0; width: 100%; max-width: 660px; justify-self: center; }
@media (min-width: 1200px) { .stage { max-width: none; justify-self: stretch; margin-right: calc(-0.25 * var(--pad)); } }
.stage-glow { position: absolute; z-index: -1; inset: -12% -22% -22% -12%; background: radial-gradient(closest-side, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.06) 55%, transparent 75%); pointer-events: none; }
.fig { position: relative; width: 100%; aspect-ratio: var(--ar); }
.fig svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; display: block; }
.fig svg * { transform-box: fill-box; }
.fig-p { display: none; width: min(100%, 300px); margin: 0 auto; }
.fig-p svg { overflow: hidden; }
.fig .gd { fill: none; stroke: #e9c867; stroke-width: 1; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; opacity: 0.3; }
.fig .ed { fill: none; stroke: rgba(233, 200, 103, 0.78); stroke-width: 1.25; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fig .sk { fill: none; stroke: rgba(245, 239, 227, 0.3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.fig .dm, .fig .pl { fill: none; stroke: #e9c867; stroke-width: 1; vector-effect: non-scaling-stroke; }
.fig .fill { stroke: none; }
.fig .dot { fill: rgba(245, 239, 227, 0.24); }
.fig .bw { fill: rgba(245, 239, 227, 0.86); }
.fig .bg { fill: url(#gold); }
.fig .bt { fill: rgba(245, 239, 227, 0.3); }
.fig .o-l { transform-origin: 0 50%; }
.fig .o-r { transform-origin: 100% 50%; }
.fig .o-t { transform-origin: 50% 0; }
.fig .o-b { transform-origin: 50% 100%; }
.fig .o-c { transform-origin: 50% 50%; }
.fig-lb { position: absolute; white-space: nowrap; font-family: var(--font-display); font-weight: 600; font-size: 11px; line-height: 1; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-b); }
.stage figcaption { margin-top: 18px; font-size: 0.8rem; line-height: 1.4; color: var(--muted); }
.stage figcaption::before { content: ""; display: inline-block; width: 24px; height: 1px; background: var(--gold); vertical-align: middle; margin-right: 12px; }
@media (max-width: 767px) {
  .fig-w { display: none; }
  .fig-p { display: block; }
  .stage figcaption { text-align: center; }
  .stage figcaption::before { display: none; }
}

/* Kennzahlen in Rasterfeldern */
.factswrap { width: 100%; max-width: 1440px; margin-inline: auto; padding: 0 var(--pad) clamp(24px, 4vh, 48px); }
.facts { position: relative; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: rgba(10, 9, 8, 0.55); }
.facts li { position: relative; padding: 22px 22px 26px; border-left: 1px solid var(--line); }
.facts li:first-child { border-left: 0; }
.facts li::before { content: "+"; position: absolute; left: -6px; top: -13px; line-height: 1; font-size: 14px; font-weight: 500; color: var(--gold-b); }
.facts .num { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 1rem + 1.4vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.1; color: var(--text); font-variant-numeric: normal; }
.facts .num small { font-size: 0.5em; font-weight: 500; letter-spacing: 0; color: var(--text-2); margin-left: 0.3em; }
.facts .num.txt { font-size: clamp(1.2rem, 0.85rem + 0.95vw, 1.6rem); line-height: 1.2; letter-spacing: -0.02em; }
@media (min-width: 768px) { .facts .num { min-height: 2.3rem; display: flex; align-items: flex-end; } }
.facts .lbl { display: block; margin-top: 8px; font-size: 0.88rem; line-height: 1.45; color: var(--muted); }
@media (max-width: 767px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li { padding: 18px 16px 22px; }
  .facts li:nth-child(odd) { border-left: 0; }
  .facts li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .facts li:nth-child(3)::before { display: none; }
  .eyebrow { font-size: 0.7rem; letter-spacing: 0.14em; }
  .hero-dim { font-size: 0.64rem; letter-spacing: 0.12em; gap: 10px; }
}

/* Aufbau der Zeichnung, nur transform und opacity. Bei reduzierter Bewegung gibt es
   keine Animation: die fertige Zeichnung steht von Anfang an. */
@media (prefers-reduced-motion: no-preference) {
  .hero-grid { animation: hk-fade 2.4s var(--ease) both; }
  .hero-glow { animation: hk-fade 2.4s var(--ease) both; }
  .nav:not(.is-scrolled), .hero .eyebrow { animation: hk-fade 1.4s var(--ease) 0.1s both; }
  .hero h1 .ln { animation: hk-lift 1.6s var(--ease) 0.3s both; }
  .hero h1 .ln:nth-child(2) { animation-delay: 0.45s; }
  .hero-dim i { animation: hk-draw 1.8s var(--ease) 0.9s both; }
  .hero-dim span { animation: hk-fade 1.4s var(--ease) 1.5s both; }
  .hero .lead { animation: hk-lift 1.4s var(--ease) 0.9s both; }
  .hero-cta { animation: hk-lift 1.4s var(--ease) 1.05s both; }
  .factswrap .facts { animation: hk-lift 1.5s var(--ease) 1.4s both; }
  .hero-run.h { animation: hk-runx 18s linear 6s infinite; }
  .hero-run.v { animation: hk-runy 22s linear 9s infinite; }
  /* Zeitmass: --k staucht alle Verzögerungen und Dauern der Zeichnung gleichmässig.
     Ursprünglich lief der Aufbau 6.2 s, mit 0.38 steht alles nach rund 2.4 s. */
  .stage { --k: 0.38; }
  .stage-glow { animation: hk-fade 1s var(--ease) 1.4s both; }
  .stage figcaption { animation: hk-fade 0.7s var(--ease) 2s both; }
  .fig-lb { animation: hk-fade calc(1.2s * var(--k)) var(--ease) calc(var(--d, 0s) * var(--k)) both; }
  .fig .fd { animation: hk-fade calc(var(--t, 1s) * var(--k)) var(--ease) calc(var(--d, 0s) * var(--k)) both; }
  .fig .dX { animation: hk-drawX calc(var(--t, 0.6s) * var(--k)) var(--ease) calc(var(--d, 0s) * var(--k)) both; }
  .fig .dY { animation: hk-drawY calc(var(--t, 0.6s) * var(--k)) var(--ease) calc(var(--d, 0s) * var(--k)) both; }
  .fig .gr { animation: hk-grow calc(var(--t, 0.9s) * var(--k)) var(--ease) calc(var(--d, 0s) * var(--k)) both; }
  .fig .gX { animation: hk-gdX calc(var(--t, 4s) * var(--k)) var(--ease) calc(var(--d, 0s) * var(--k)) both; }
  .fig .gY { animation: hk-gdY calc(var(--t, 4s) * var(--k)) var(--ease) calc(var(--d, 0s) * var(--k)) both; }
  /* Grundform sofort: die äusseren Umrisse von Browser- und Handyfenster stehen ohne Verzögerung */
  .fig .ed.dX, .fig .ed.dY, .fig .ed.fd { animation: none; }
}
@keyframes hk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hk-lift { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes hk-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hk-drawX { from { transform: scaleX(0); } to { transform: none; } }
@keyframes hk-drawY { from { transform: scaleY(0); } to { transform: none; } }
@keyframes hk-grow { from { opacity: 0; transform: scaleX(0.12); } to { opacity: 1; transform: none; } }
@keyframes hk-gdX { 0% { opacity: 0; transform: scaleX(0); } 22% { opacity: 0.85; transform: none; } 100% { opacity: 0.3; transform: none; } }
@keyframes hk-gdY { 0% { opacity: 0; transform: scaleY(0); } 22% { opacity: 0.85; transform: none; } 100% { opacity: 0.3; transform: none; } }
@keyframes hk-runx { 0% { transform: translateX(-340px); opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } 100% { transform: translateX(calc(100vw + 20px)); opacity: 0; } }
@keyframes hk-runy { 0% { transform: translateY(-340px); opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } 100% { transform: translateY(110vh); opacity: 0; } }

/* ---- Abschnitte darunter: gleiche Handschrift ----------------------------------- */
.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.section-head .eyebrow { margin-bottom: 20px; }
.section-head h2 { color: var(--text); }
.section-head p { color: var(--text-2); }

.card, .step {
  border-radius: 0;
  border: 1px solid var(--line);
  background: rgba(12, 10, 9, 0.72);
  transition: border-color 0.4s var(--ease);
}
.card::before, .step::before {
  content: "+";
  position: absolute;
  left: -6px;
  top: -10px;
  line-height: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--gold-b);
}
.card { padding: 28px; }
.card:hover { transform: none; box-shadow: none; border-color: rgba(233, 200, 103, 0.5); }
.card-ic { border-radius: 0; background: transparent; border: 1px solid rgba(233, 200, 103, 0.5); color: var(--gold-b); }
.card h3, .step h3 { font-weight: 500; letter-spacing: -0.01em; }
.step { padding: 24px 24px 28px; }
.step .step-n {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: transparent;
  border: 1px solid rgba(233, 200, 103, 0.6);
  color: var(--gold-b);
  font-weight: 500;
}

.redeem, .form { border-radius: 0; border: 1px solid var(--line); background: rgba(12, 10, 9, 0.8); }
.redeem { background-image: none; }
.redeem-form input, .field input, .field textarea { border-radius: 0; border: 1px solid var(--line); background: rgba(10, 9, 8, 0.9); }
.redeem-form input:focus, .field input:focus, .field textarea:focus { border-color: var(--gold-b); box-shadow: none; outline: 1px solid var(--gold-b); outline-offset: 0; }
.redeem-price { border-radius: 0; border-color: var(--line); background: rgba(10, 9, 8, 0.7); }
.redeem-result { border-top-color: var(--line); }
.contact-line .ic { border-radius: 0; background: transparent; border: 1px solid rgba(233, 200, 103, 0.5); color: var(--gold-b); }
.field label .req, .redeem-result-rabatt { color: var(--gold-b); }
.redeem-note a { color: var(--gold-b) !important; }
.footer { border-top-color: var(--line); }
.footer-bottom { border-top-color: var(--line-soft); }

/* ---- Eckwerte (Preise, Fristen, Ablauf) ------------------------------------------- */
.rahmen-wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.rahmen-head { position: sticky; top: calc(var(--nav-h) + 32px); margin-bottom: 0; }
.rahmen-head h2 { font-size: clamp(1.9rem, 1.1rem + 2.2vw, 2.8rem); }
.rahmen-head .text-link { margin-top: 24px; }
.spec { position: relative; margin: 0; border-top: 1px solid rgba(233, 200, 103, 0.55); }
.spec::before { content: "+"; position: absolute; left: -6px; top: -10px; line-height: 1; font-size: 14px; font-weight: 500; color: var(--gold-b); }
.spec-row { display: grid; grid-template-columns: minmax(170px, 0.42fr) minmax(0, 1fr); gap: 8px 32px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.spec dt { display: flex; align-items: baseline; gap: 16px; font-family: var(--font-display); font-weight: 600; font-size: 0.74rem; line-height: 1.5; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-b); }
.spec .pos { flex: none; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.spec dd { margin: 0; font-size: 1.02rem; line-height: 1.6; color: var(--text-2); }
.spec dd strong { font-family: var(--font-display); font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
.spec .erkl { display: block; margin-top: 8px; font-size: 0.92rem; line-height: 1.55; color: var(--muted); }
@media (max-width: 960px) {
  .rahmen-wrap { grid-template-columns: minmax(0, 1fr); }
  .rahmen-head { position: static; }
}
@media (max-width: 639px) {
  .spec-row { grid-template-columns: minmax(0, 1fr); padding: 24px 0; }
  /* Kurzfassung fürs Handy: Erklärsätze entfallen, Frist und Pflichtabo bleiben stehen */
  .spec .erkl { display: none; }
}

/* Ohne JavaScript steht alles sichtbar da (Standard von .reveal); dieser Block ist nur
   Absicherung, falls ein Browser die Klassen nicht auswertet. */
@media (prefers-reduced-motion: reduce) {
  .hero-run { display: none; }
}
