/* Amber & Spark – amberandspark.com
   Dunkel und warm, ein Gedanke pro Bildschirm. Bewegung nur mit CSS und js/main.js, keine Bibliothek. */

:root {
  --black: #0b0907;
  --card: #17130f;
  --card-2: #1f1a14;
  --white: #f7f2ea;
  --grey: #8c8479;
  --grey-light: #b9b0a3;
  --line: #2b251e;
  --amber: #f6a623;
  --spark: #ff6b2c;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 4vw, 44px);
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, video { max-width: 100%; display: block; }
h1, h2, h3, p, ol, dl, dd { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--amber); color: var(--black); }

.glow { background: linear-gradient(100deg, var(--amber), var(--spark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dim { color: var(--grey); }

.display {
  font-size: clamp(42px, 7.2vw, 100px);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.lead {
  max-width: 32em;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.35;
  color: var(--grey-light);
  text-wrap: balance;
}
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  border-radius: 980px;
  background: var(--white); color: var(--black);
  font-size: 17px; font-weight: 500;
}
.pill:hover { background: #fff; }
.pill--small { min-height: 32px; padding: 0 16px; font-size: 14px; }
.pill--ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.pill--ghost:hover { background: rgba(255, 255, 255, .08); }

section { padding: clamp(90px, 13vw, 180px) var(--gutter); }
.center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(18px, 2vw, 28px); }

/* Navigation */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; transition: background .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.is-solid, .nav--solid {
  background: rgba(11, 9, 7, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: rgba(255, 255, 255, .08);
}
.nav--solid { position: sticky; }
.nav__inner { max-width: var(--max); margin: 0 auto; min-height: 56px; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__logo img { height: 17px; width: auto; filter: invert(1) brightness(1.6); }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 30px); font-size: 14px; color: var(--grey-light); }
.nav__links a:not(.pill):hover { color: var(--white); }

/* Hero: Video füllt den Bildschirm und zieht sich beim Scrollen zu einer Karte zusammen */
.hero { padding: 0; height: 190vh; }
.hero__pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.hero__media {
  position: absolute; inset: 0; overflow: hidden;
  transform: scale(var(--scale, 1));
  border-radius: calc(var(--round, 0) * 1px);
  will-change: transform;
}
.hero__media video, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(11, 9, 7, .42), rgba(11, 9, 7, .18) 45%, rgba(11, 9, 7, .5) 100%),
    linear-gradient(180deg, rgba(11, 9, 7, .5), transparent 26%, transparent 68%, rgba(11, 9, 7, .75));
}
.hero__text { position: relative; z-index: 1; padding: 0 var(--gutter); display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(16px, 2vw, 26px); opacity: var(--fade, 1); transform: translateY(calc(var(--lift, 0) * -1px)); }
.hero__title {
  font-size: clamp(40px, 12vw, 190px);
  font-weight: var(--wght, 620);
  font-stretch: var(--wdth, 100%);
  line-height: .94;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.hero__title .amp { font-weight: 300; }
.hero__text { text-shadow: 0 2px 40px rgba(11, 9, 7, .55); }
.hero__text .lead { color: var(--white); }
.hero__text .glow { text-shadow: none; filter: drop-shadow(0 2px 30px rgba(11, 9, 7, .45)); }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.hero .pill--ghost { background: rgba(11, 9, 7, .38); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-shadow: none; }
.hero__hint { position: absolute; bottom: 26px; left: 50%; width: 1px; height: 46px; background: linear-gradient(var(--white), transparent); opacity: calc(var(--fade, 1) * .6); transform-origin: top; }

/* Aussage: Wörter leuchten beim Scrollen auf */
.statement { display: flex; justify-content: center; padding-block: clamp(80px, 11vw, 160px); }
.statement__text {
  max-width: 19em;
  font-size: clamp(28px, 4.4vw, 60px);
  font-weight: 620;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--grey);
  text-wrap: pretty;
}
.statement__text strong { font-weight: inherit; color: var(--white); }

/* Leistungen */
.tiles { max-width: calc(var(--max) + 2 * var(--gutter)); margin: clamp(40px, 6vw, 80px) auto 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); text-align: left; }
.tile {
  position: relative; overflow: hidden;
  grid-column: span 3;
  min-height: clamp(340px, 34vw, 460px);
  padding: clamp(26px, 3vw, 44px);
  border-radius: 28px;
  background: var(--card);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
  isolation: isolate;
}
.tile:not(.tile--wide) { padding-top: 270px; }
.tile--wide { grid-column: 1 / -1; min-height: clamp(380px, 40vw, 540px); }
/* Lichtfleck folgt der Maus (--mx/--my setzt main.js) */
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(246, 166, 35, .2), transparent 62%);
  opacity: 0; transition: opacity .5s;
}
.tile:hover::before { opacity: 1; }
.tile h3 { font-size: clamp(28px, 3.2vw, 44px); font-weight: 650; line-height: 1.05; letter-spacing: -.03em; }
.tile p { max-width: 30em; color: var(--grey-light); }
.tile__no { position: absolute; top: clamp(26px, 3vw, 44px); left: clamp(26px, 3vw, 44px); font-size: 14px; font-weight: 600; letter-spacing: .14em; color: var(--amber); }

/* Kachel 1: Ringe um einen Kern */
.rings { position: absolute; top: -30%; right: -18%; width: 78%; aspect-ratio: 1; z-index: -1; }
.rings i { position: absolute; inset: calc(var(--i) * 11%); border-radius: 50%; border: 1px solid rgba(246, 166, 35, calc(.16 + var(--i) * .1)); }
.rings i:last-child { background: radial-gradient(circle, var(--amber), var(--spark)); border: 0; filter: blur(2px); box-shadow: 0 0 80px 20px rgba(255, 107, 44, .35); }
/* Kachel 2: Textzeilen, eine davon markiert */
.lines { position: absolute; top: clamp(70px, 8vw, 110px); left: clamp(26px, 3vw, 44px); right: clamp(26px, 3vw, 44px); display: grid; gap: 14px; z-index: -1; }
.lines i { height: 14px; border-radius: 7px; background: var(--card-2); width: var(--w); transform-origin: left; }
.lines i.hot { background: linear-gradient(90deg, var(--amber), var(--spark)); }
/* Kachel 3: Code-Video */
.tile__video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.tile--wide::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--card) 8%, rgba(23, 19, 15, .55) 55%, rgba(23, 19, 15, .2)), linear-gradient(0deg, var(--card), transparent 55%); }

/* Ablauf: Abschnitt bleibt stehen, die Schritte leuchten nacheinander auf */
.process { padding-block: 0; }
.process__pin { max-width: var(--max); margin: 0 auto; padding-block: clamp(80px, 11vw, 150px); display: flex; flex-direction: column; gap: clamp(40px, 6vw, 80px); }
.process__head { display: flex; flex-direction: column; gap: 18px; }
.process__bar { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.process__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--spark)); transform-origin: left; transform: scaleX(var(--p, 1)); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.step { display: flex; flex-direction: column; gap: 10px; }
.step__no { font-size: 14px; font-weight: 600; letter-spacing: .14em; color: var(--amber); font-variant-numeric: tabular-nums; }
.step h3 { font-size: clamp(24px, 2.6vw, 36px); font-weight: 650; letter-spacing: -.03em; line-height: 1.05; }
.step p { color: var(--grey-light); }

/* AI: Entwurf entsteht, Mensch hakt ab */
.ai { width: 100%; max-width: var(--max); margin-top: clamp(22px, 4vw, 52px); padding: clamp(26px, 4vw, 60px); border-radius: 28px; background: var(--card); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; text-align: left; }
.ai__copy { display: flex; flex-direction: column; gap: 18px; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; }
.ai__copy p:last-child { color: var(--grey-light); }
.draft { display: grid; gap: 14px; }
.draft__head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.draft > span { display: flex; align-items: center; gap: 16px; }
.draft i { flex: 0 1 var(--w); height: 14px; border-radius: 7px; background: #332b22; transform-origin: left; }
.draft b { position: relative; flex: none; margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--amber), var(--spark)); }
.draft b::after { content: ""; position: absolute; left: 8px; top: 5px; width: 6px; height: 10px; border: solid var(--black); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.points { list-style: none; padding: 0; width: 100%; max-width: var(--max); margin-top: clamp(10px, 2vw, 24px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); text-align: left; }
.points li { padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.points h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 650; letter-spacing: -.03em; line-height: 1.05; }
.points p { color: var(--grey-light); }

/* Firma */
.company { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 90px); align-items: end; }
.company__text { display: flex; flex-direction: column; gap: 22px; }
.company__text h2 { font-size: clamp(34px, 4.6vw, 64px); font-weight: 650; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.company__text p { max-width: 34em; color: var(--grey-light); }
.facts div { display: flex; justify-content: space-between; gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--grey); }
.facts dd { text-align: right; }

/* Kontakt */
.contact { position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: 50%; bottom: -55%; width: min(1200px, 130vw); aspect-ratio: 1; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(255, 107, 44, .34), rgba(246, 166, 35, .12) 45%, transparent 70%);
  pointer-events: none;
}
.contact > * { position: relative; }
.contact__mail { font-size: clamp(26px, 6.2vw, 88px); font-weight: 650; letter-spacing: -.04em; line-height: 1.05; overflow-wrap: anywhere; background: linear-gradient(100deg, var(--white) 30%, var(--amber) 70%, var(--spark)); background-size: 200% 100%; background-position: 0 0; -webkit-background-clip: text; background-clip: text; color: transparent; transition: background-position .8s var(--ease); }
.contact__mail:hover { background-position: 100% 0; }
.contact__more { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }

/* Fuß */
.footer { border-top: 1px solid var(--line); }
.footer__inner { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 34px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; font-size: 13px; color: var(--grey); }
.footer nav { display: flex; gap: 22px; }
.footer a:hover { color: var(--white); }

/* Rechtstexte und 404 */
.legal { max-width: 720px; margin: 0 auto; padding: clamp(56px, 9vw, 120px) var(--gutter); }
.legal h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 650; line-height: 1.04; letter-spacing: -.035em; margin-bottom: 12px; }
.legal .date { color: var(--grey); margin-bottom: 48px; }
.legal h2 { font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin: 48px 0 12px; }
.legal h3 { font-size: 15px; font-weight: 600; color: var(--amber); margin: 30px 0 8px; }
.legal p { color: var(--grey-light); margin-bottom: 14px; }
.lost { min-height: 78vh; justify-content: center; }

/* Bewegung: nur wenn JS läuft und Bewegung erwünscht ist */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(30px); filter: blur(10px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s ease; transition-delay: calc(var(--d, 0) * 1s); }
  .js .reveal.is-in { opacity: 1; transform: none; filter: none; }

  /* Hero: Titel baut sich beim Laden auf */
  .js .hero__title { animation: title-in 1.3s var(--ease) both; }
  .js .hero__text > :not(.hero__title) { animation: rise 1s var(--ease) both; animation-delay: .35s; }
  .js .hero__text > .hero__actions { animation-delay: .5s; }
  .js .hero__media { animation: media-in 1.2s ease both; }
  .js .hero__hint { animation: hint 2.4s ease-in-out 1.6s infinite both; }
  @keyframes title-in { from { opacity: 0; font-weight: 200; letter-spacing: .02em; filter: blur(14px); } }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes media-in { from { opacity: 0; } }
  @keyframes hint { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

  /* Aussage: Wörter einzeln */
  .js .statement__text.reveal { opacity: 1; transform: none; filter: none; }
  .js .statement__text .w { opacity: .2; transition: opacity .5s ease; }
  .js .statement__text .w.on { opacity: 1; }

  /* Kacheln: Grafiken bewegen sich leicht */
  .rings i { animation: breathe 7s ease-in-out infinite; animation-delay: calc(var(--i) * -.9s); }
  @keyframes breathe { 50% { transform: scale(1.045); } }
  .js .lines i { transform: scaleX(0); transition: transform 1.1s var(--ease); transition-delay: calc(var(--n) * .09s + .2s); }
  .js .tile.is-in .lines i { transform: none; }
  .js .draft i { transform: scaleX(0); transition: transform .5s var(--ease); transition-delay: calc(var(--n) * .08s + .3s); }
  .js .draft b { transform: scale(0); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); transition-delay: calc(var(--n) * .28s + 1.2s); }
  .js .ai.is-in .draft i, .js .ai.is-in .draft b { transform: none; }
  .tile { transition: transform .5s var(--ease); }
  .tile:hover { transform: translateY(-4px); }

  .pill { transition: background .2s, transform .25s var(--ease); }
  .pill:hover { transform: scale(1.04); }
  .pill:active { transform: scale(.98); }
}

/* Ablauf angeheftet: nur am Desktop und nur mit Bewegung */
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  .js .process { height: 320vh; }
  .js .process__pin { position: sticky; top: 0; height: 100vh; justify-content: center; padding-block: 70px 0; }
  .js .process .reveal { opacity: 1; transform: none; filter: none; }
  .js .process__bar i { transform: scaleX(var(--p, 0)); }
  .js .step { opacity: .22; transform: translateY(14px); transition: opacity .6s ease, transform .6s var(--ease); }
  .js .step.on { opacity: 1; transform: none; }
}

@media (max-width: 899px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .step { padding-top: 18px; border-top: 1px solid var(--line); }
  .process__bar { display: none; }
  .tile, .tile--wide { grid-column: 1 / -1; }
  .company { grid-template-columns: minmax(0, 1fr); }
  .ai, .points { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .nav__links a:not(.pill) { display: none; }
  .hero { height: 150vh; }
  .rings { width: 110%; top: -34%; right: -40%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: auto; }
  .hero__pin { position: relative; }
}
