/* Alive Landingpage */

@font-face { font-family: "HK Grotesk Wide"; src: url("fonts/hk-grotesk-wide-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "HK Grotesk Wide"; src: url("fonts/hk-grotesk-wide-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "HK Grotesk"; src: url("fonts/hk-grotesk-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "HK Grotesk"; src: url("fonts/hk-grotesk-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "HK Grotesk"; src: url("fonts/hk-grotesk-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Junicode"; src: url("fonts/junicode-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --waldboden: #2F3A2C;
  --tanne: #3E5B3A;
  --moos: #6B8F4E;
  --olive: #8A9A5B;
  --salbei: #A9BA9D;
  --leinen: #E8E4D4;
  --rinde: #7A5C3E;
  --terrakotta: #C0714F;

  --bg: #F2EFE5;
  --ink: #2F3A2C;
  --muted: #5F6A5A;
  --line: rgba(47, 58, 44, .14);
  --card: rgba(255, 255, 255, .5);
  --btn-bg: var(--tanne);
  --btn-ink: #F2EFE5;
  --btn-hover: var(--moos);
  --wash-a: rgba(169, 186, 157, .55);
  --wash-b: rgba(169, 186, 157, .32);
  --panel: #A9BA9D;
  --panel-deep: #6E8A66;
  --panel-light: #C9D0C4;
  --panel-ink: #2F3A2C;
  --panel-card: rgba(242, 239, 229, .42);
  --shadow-rgb: 38, 46, 34;
  --hint: #9A4F30;

  --wide: "HK Grotesk Wide", "HK Grotesk", system-ui, sans-serif;
  --sans: "HK Grotesk", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --serif: "Junicode", "Iowan Old Style", Georgia, serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

/* Dunkle Abschnitte. Der Salbei-Kasten (--panel…) bleibt überall gleich. */
.dark {
  --bg: #232B21;
  --ink: #E8E4D4;
  --muted: #A9BA9D;
  --line: rgba(232, 228, 212, .16);
  --card: rgba(232, 228, 212, .06);
  --btn-bg: var(--moos);
  --btn-ink: #161C14;
  --btn-hover: var(--salbei);
  --wash-a: rgba(62, 91, 58, .55);
  --wash-b: rgba(62, 91, 58, .3);
  --shadow-rgb: 0, 0, 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.floaty { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--moos); outline-offset: 4px; border-radius: 6px; }

/* Abschnitt über die volle Breite, Inhalt höchstens 70rem */
.band { background: var(--bg); color: var(--ink); padding-inline: max(1rem, calc((100% - 70rem) / 2)); }

/* Typografie */
.wide { font-family: var(--wide); font-weight: 700; letter-spacing: -.012em; }
.serif { font-family: var(--serif); font-weight: 400; font-size: 1.14em; letter-spacing: 0; }
h1, h2 { text-transform: uppercase; line-height: 1; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 5vw, 3.9rem); }
h1 span { display: block; }
h1 .serif { margin-top: .16em; font-size: min(.74em, 5.5vw); white-space: nowrap; }
h2 { font-size: clamp(1.55rem, 4.2vw, 3.1rem); text-align: center; }
h3 { font: 700 1.05rem/1.2 var(--wide); text-transform: uppercase; letter-spacing: .005em; }
.lead, .sub { color: var(--muted); text-wrap: pretty; }
.lead { font-size: clamp(1rem, 1.25vw, 1.0625rem); max-width: 29rem; margin: 1.4rem auto 0; }
.sub { font-size: 1.15rem; text-align: center; max-width: 36rem; margin: 1rem auto 0; }
.fine { font-size: .9rem; color: var(--muted); margin-top: 1.1rem; text-wrap: balance; }
.muted { color: var(--muted); }

/* Kopfzeile */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 1.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font: 700 1rem/1 var(--wide); }
.brand img { width: 36px; height: 36px; }
.top-right { display: flex; align-items: center; gap: .6rem; }
.lang { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang a {
  font: 600 .8rem/1 var(--sans); text-decoration: none; color: var(--muted);
  padding: .42rem .65rem; border-radius: 999px; transition: color .2s, background-color .2s;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { color: var(--bg); background: var(--ink); }
.top-link {
  font-weight: 500; font-size: .95rem; text-decoration: none;
  padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  transition: background-color .2s, border-color .2s;
}
.top-link:hover { background: var(--card); border-color: var(--ink); }

/* Hero */
.hero {
  --overlap: calc(min(720px, 100vw - 2rem) * .36); /* so weit ragt der Screenshot in den hellen Abschnitt */
  text-align: center; padding-block: clamp(2.5rem, 6vw, 4.5rem) 0;
  position: relative; isolation: isolate; /* kein overflow: hidden, sonst wird der Fensterschatten abgeschnitten */
  background: linear-gradient(var(--bg) calc(100% - var(--overlap)), #F2EFE5 0);
}
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: 0 0 var(--overlap);
  background:
    radial-gradient(52rem 34rem at 8% 100%, var(--wash-a), transparent 70%),
    radial-gradient(40rem 28rem at 96% 0%, var(--wash-b), transparent 70%);
}

.cta {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(.5rem, 2vw, 1.25rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.cta-icon img { width: clamp(64px, 12vw, 112px); height: auto; filter: drop-shadow(0 10px 18px rgba(var(--shadow-rgb), .22)); }
.cta-arrow { width: clamp(64px, 17vw, 190px); flex: none; overflow: visible; }
.cta-arrow path, .tile svg path, .tile svg rect, .footer svg path {
  fill: none; stroke: currentColor; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1.0625rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  color: var(--btn-ink); background: var(--btn-bg);
  padding: 1.05rem 1.7rem; border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .16) inset, 0 10px 24px -10px rgba(var(--shadow-rgb), .55);
  transition: background-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { background: var(--btn-hover); transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 16px 28px -12px rgba(var(--shadow-rgb), .55); }
.btn:active { transform: translateY(0); }

/* Linie zeichnet sich einmal beim Laden */
.cta-draw .pulse { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.3s .25s var(--ease) forwards; }
.cta-draw .arrowhead { opacity: 0; animation: appear .35s 1.35s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* Screenshots */
.shot {
  border-radius: 1.667% / 1.917%; /* 12 px bei 720 × 626 */
  overflow: hidden;
  box-shadow:
    0 0 0 .5px rgba(var(--shadow-rgb), .35),
    0 2px 6px rgba(var(--shadow-rgb), .1),
    0 28px 60px -12px rgba(var(--shadow-rgb), .34);
}
.shot img { width: 100%; }
.hero-shot { max-width: 720px; margin: clamp(3rem, 6vw, 4.5rem) auto 0; }

/* 3D-Neigung */
.tilt { perspective: 1100px; }
.tilt-inner {
  position: relative;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--lift, 1));
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  transform-style: preserve-3d; will-change: transform;
}
.tilt.is-tilting .tilt-inner { transition-duration: .18s; --lift: 1.012; }
/* weicher Lichtreflex, der der Maus folgt */
.shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(60% 70% at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .16), transparent 70%);
  transition: opacity .4s;
}
.tilt.is-tilting .shot::after { opacity: 1; }
.tilt.is-tilting .shot {
  box-shadow:
    0 0 0 .5px rgba(var(--shadow-rgb), .35),
    0 2px 6px rgba(var(--shadow-rgb), .1),
    calc(var(--sx, 0) * 1px) 40px 80px -16px rgba(var(--shadow-rgb), .4);
}

/* Abschnitte */
.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.hero + .section { padding-top: clamp(2rem, 5vw, 4rem); }

/* Zustände */
.states { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.card .tilt-inner {
  height: 100%; padding: 2rem 1.75rem 2.1rem; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 28px;
}
.card.is-tilting .tilt-inner { box-shadow: 0 30px 50px -28px rgba(var(--shadow-rgb), .4); }
.card h3 { margin-top: 1.6rem; }
.card p { color: var(--muted); margin-top: .5rem; text-wrap: balance; }
.tile {
  width: 132px; aspect-ratio: 1; margin-inline: auto; border-radius: 30px;
  display: grid; place-items: center; color: #EFEBDD;
  background: linear-gradient(160deg, #56654F, #37452F 55%, #2F3A2C);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 14px 24px -12px rgba(var(--shadow-rgb), .5);
}
.tile svg { width: 78%; }
.tile-lock { grid-template-rows: auto auto; align-content: center; gap: .1rem; }
.tile-lock svg { width: 46%; margin-inline: auto; }
.countdown { font: 600 1.15rem/1 var(--wide); font-variant-numeric: tabular-nums; }

/* Agents */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; max-width: 46rem; margin: clamp(2rem, 4vw, 3rem) auto 0; }
.chips li {
  font-weight: 500; font-size: 1.05rem; padding: .7rem 1.25rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
}
.chips .more { background: none; border-style: dashed; color: var(--muted); }
.note { text-align: center; color: var(--muted); font-size: .95rem; margin-top: 1.5rem; }

/* Einstellungen */
.feature {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center;
  gap: clamp(1.5rem, 6vw, 5rem); margin-top: clamp(3.5rem, 8vw, 6.5rem);
}
.feature.flip .feature-text { order: 2; }
.feature-text h3 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); }
.feature-text p { color: var(--muted); font-size: 1.15rem; margin-top: .8rem; max-width: 24rem; text-wrap: pretty; }
.feature .tilt { max-width: 560px; width: 100%; justify-self: end; }
.feature.flip .tilt { justify-self: start; }

/* Installieren */
.panel {
  color: var(--panel-ink); border-radius: clamp(24px, 4vw, 40px);
  padding: clamp(2.25rem, 5.5vw, 4.5rem) clamp(1.25rem, 5vw, 4.5rem);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 5.5rem);
  background:
    radial-gradient(60% 70% at 0% 100%, var(--panel-deep), transparent 70%),
    radial-gradient(45% 80% at 100% 10%, var(--panel-light), transparent 70%),
    var(--panel);
}
.panel-intro { display: flex; flex-direction: column; }
.panel h2 { text-align: left; font-size: clamp(1.7rem, 3.6vw, 3rem); }
.panel h2 span { display: block; }
.panel .sub { color: inherit; opacity: .8; text-align: left; margin-inline: 0; }

/* Wie im Installer: Alive in den Ordner Programme ziehen */
.drag { display: flex; align-items: flex-start; gap: clamp(.5rem, 1.5vw, 1rem); margin-top: auto; padding-top: 3rem; }
.drag figure { margin: 0; flex: none; text-align: center; width: clamp(76px, 8.5vw, 96px); }
.drag figure img, .drag .folder { width: 100%; height: auto; filter: drop-shadow(0 10px 14px rgba(38, 46, 34, .28)); }
.drag figcaption { font: 600 clamp(.58rem, 1vw, .68rem)/1 var(--wide); text-transform: uppercase; margin-top: .7rem; }
.drag .cta-arrow { flex: 1; width: auto; min-width: 0; max-width: 190px; margin-top: clamp(4px, 1.2vw, 14px); }
.folder-back { fill: #56654F; }
.folder-front { fill: #2F3A2C; }
.folder-mark { fill: none; stroke: #EFEBDD; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

.steps li {
  display: grid; grid-template-columns: clamp(2.6rem, 6vw, 4.25rem) 1fr; align-items: start;
  padding-block: 1.35rem; border-top: 1px solid rgba(47, 58, 44, .22);
}
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps li:last-child { padding-bottom: 0; }
.num { font: 400 clamp(2.6rem, 4.6vw, 3.6rem)/.82 var(--serif); font-feature-settings: "lnum"; }
.steps p { margin-top: .35rem; max-width: 26rem; }
.steps a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.steps .hint {
  font-weight: 600; font-size: .9rem; color: var(--hint);
  margin-top: .8rem; padding-left: .7rem; border-left: 2px solid var(--terrakotta);
}

/* Abschluss und Fuß */
.closing { text-align: center; padding-bottom: clamp(3.5rem, 7vw, 5.5rem); }
.footer {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding-block: 1.75rem 2.5rem; font-size: .95rem;
  box-shadow: 0 1px 0 var(--line) inset;
}
.footer svg { width: 28px; }
.footer p:first-of-type { font-weight: 600; }
.footer .muted { margin-left: auto; }
.footer a { text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Impressum und Datenschutz */
.legal { padding-block: clamp(3rem, 7vw, 5.5rem); }
.legal > * { max-width: 42rem; }
.legal h1 { font-size: clamp(1.75rem, 4.2vw, 3rem); }
.legal h2 { font: 700 1.25rem/1.2 var(--wide); text-align: left; margin-top: 3.5rem; }
.legal h3 { margin-top: 2rem; }
.legal p, .legal ul { margin-top: .8rem; }
.legal ul { list-style: disc; padding-left: 1.2rem; }
.legal address { font-style: normal; margin-top: .8rem; }
.legal a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal .todo { background: rgba(192, 113, 79, .2); box-shadow: 0 0 0 3px rgba(192, 113, 79, .2); border-radius: 3px; font-weight: 600; }

/* Einblenden beim Scrollen (Klasse setzt das Skript) */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }

/* Schmale Fenster */
@media (max-width: 860px) {
  .panel { grid-template-columns: 1fr; }
  .drag { padding-top: 2.25rem; max-width: 22rem; }
}
@media (max-width: 760px) {
  .states { grid-template-columns: 1fr; }
  .feature, .feature.flip { grid-template-columns: 1fr; text-align: center; }
  .feature.flip .feature-text { order: 0; }
  .feature-text p { margin-inline: auto; }
  .feature .tilt, .feature.flip .tilt { justify-self: center; }
}
@media (max-width: 520px) {
  .btn { padding: .95rem 1.25rem; font-size: 1rem; }
  /* Handy: Titel größer, Fließtext klar darunter */
  h1 { font-size: 8.8vw; }
  h1 .serif { font-size: 5.7vw; margin-top: .3em; }
  html[lang="en"] h1 .serif { font-size: 6.2vw; }
  .lead { font-size: .9375rem; line-height: 1.5; max-width: 19.5rem; margin-top: 1.1rem; }
  .fine { font-size: .8125rem; }
  .top-link { padding: .5rem .8rem; font-size: .875rem; }
  .cta-arrow path { stroke-width: 9; }
  .footer .muted { margin-left: 0; width: 100%; }
  .footer a { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cta-draw .pulse { stroke-dashoffset: 0; }
  .cta-draw .arrowhead { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
  .tilt-inner { transform: none; }
}
