/* dedelab
   Self-hosted only: Geist (OFL) from /assets/fonts, Phosphor icons (MIT) inline.
   Shape rule: cards 22px, icon boxes 14px, buttons and chips full pill. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin-wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f3f4f2;
  --surface: #fafbf9;
  --text: #111413;
  --muted: #545b57;
  --faint: #8a918d;
  --line: #dadfdb;
  --accent: #157049;
  --accent-ink: #f6fbf8;
  --glow-a: rgb(52 196 128 / .38);
  --glow-b: rgb(21 112 73 / .28);
  --glow-c: rgb(120 220 180 / .30);
  --dot: rgb(17 20 19 / .14);
  --spot: rgb(21 112 73 / .10);
  --grain: .045;

  --r-card: 22px;
  --r-box: 14px;
  --sans: "Geist", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d0c;
    --surface: #121513;
    --text: #e9ece9;
    --muted: #a1a9a4;
    --faint: #6b736e;
    --line: #222824;
    --accent: #5fd39b;
    --accent-ink: #08130d;
    --glow-a: rgb(95 211 155 / .30);
    --glow-b: rgb(21 112 73 / .45);
    --glow-c: rgb(60 170 150 / .22);
    --dot: rgb(233 236 233 / .10);
    --spot: rgb(95 211 155 / .12);
    --grain: .07;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Film grain: fixed, never on a scrolling layer. */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 40;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 16px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header (z 20 = sticky layer, 30 = grain, 40 = skip link) */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand__mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--mono); font-size: .78rem; font-weight: 700; letter-spacing: -0.04em;
}
.nav { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; font-size: .94rem; }
.nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--text); }
.top__nav { margin-left: auto; }
@media (max-width: 600px) { .top__nav { display: none; } }

/* Language toggle: segmented pill, current language filled. */
.lang {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--mono); font-size: .76rem; font-weight: 600; letter-spacing: .04em;
}
.lang a {
  display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 8px;
  border-radius: 999px; text-decoration: none; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { background: var(--text); color: var(--bg); }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero__inner {
  min-height: calc(100dvh - 64px);
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 64px; padding-bottom: 96px;
}
@media (min-width: 900px) { .hero__inner { min-height: min(calc(100dvh - 64px), 860px); padding-top: 72px; } }

.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 11vw, 7.25rem);
  line-height: 1;
  letter-spacing: -0.055em;
  font-weight: 640;
}
.hero h1 span { display: block; }
.hero__dim { color: var(--faint); }
.hero__sub { margin: 32px 0 0; color: var(--muted); font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 40ch; line-height: 1.5; }
.hero__cta { margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  height: 50px; padding: 0 22px 0 24px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  box-shadow: 0 10px 30px -12px var(--glow-b);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px var(--glow-b); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn__icon { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover .btn__icon { transform: translate(2px, 2px); }

/* Aurora: three blurred light sources behind the right half of the hero. */
.aurora {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.aurora::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 70% at 78% 45%, #000 0%, transparent 70%);
          mask-image: radial-gradient(60% 70% at 78% 45%, #000 0%, transparent 70%);
}
.aurora span { position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform; }
.aurora span:nth-child(1) { width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; right: -6vw; top: 4%; background: var(--glow-a); }
.aurora span:nth-child(2) { width: 34vw; height: 34vw; max-width: 480px; max-height: 480px; right: 18vw; top: 38%; background: var(--glow-b); }
.aurora span:nth-child(3) { width: 26vw; height: 26vw; max-width: 380px; max-height: 380px; right: 4vw; bottom: -6%; background: var(--glow-c); }
@media (max-width: 700px) {
  .aurora span:nth-child(1) { width: 90vw; height: 90vw; right: -40vw; top: -10%; }
  .aurora span:nth-child(2) { width: 70vw; height: 70vw; right: -10vw; top: 50%; }
  .aurora span:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .aurora span:nth-child(1) { animation: drift-a 22s ease-in-out infinite alternate; }
  .aurora span:nth-child(2) { animation: drift-b 28s ease-in-out infinite alternate; }
  .aurora span:nth-child(3) { animation: drift-c 19s ease-in-out infinite alternate; }
  @keyframes drift-a { to { transform: translate(-6vw, 5vh) scale(1.08); } }
  @keyframes drift-b { to { transform: translate(5vw, -6vh) scale(.92); } }
  @keyframes drift-c { to { transform: translate(-4vw, -8vh) scale(1.12); } }

  .hero h1 span, .hero__sub, .hero__cta { animation: rise 1s var(--ease) both; }
  .hero h1 span:nth-child(2) { animation-delay: .08s; }
  .hero__sub { animation-delay: .18s; }
  .hero__cta { animation-delay: .28s; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

  .js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .bento [data-reveal]:nth-child(2) { transition-delay: .1s; }
  .js .services__list li:nth-child(2) { transition-delay: .08s; }
  .js .services__list li:nth-child(3) { transition-delay: .16s; }
}

/* Sections */
.section { padding-top: 88px; padding-bottom: 88px; }
@media (min-width: 900px) { .section { padding-top: 128px; padding-bottom: 128px; } }
.h2 { margin: 0 0 40px; font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -0.04em; line-height: 1.05; font-weight: 620; }

/* Projects: asymmetric 7/5 split, two very different surfaces. */
.bento { display: grid; gap: 16px; }
@media (min-width: 860px) { .bento { grid-template-columns: 7fr 5fr; } }

.tile {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 32px;
  min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
}
@media (min-width: 860px) { .tile { padding: 40px; min-height: 420px; } }
.tile h3 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.25rem); letter-spacing: -0.035em; line-height: 1.1; font-weight: 620; }
.tile p { margin: 0; color: var(--muted); max-width: 44ch; }
.tile__icon {
  position: absolute; top: 32px; left: 32px;
  width: 56px; height: 56px; border-radius: var(--r-box);
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--line);
  color: var(--accent);
  backdrop-filter: blur(6px);
}
@media (min-width: 860px) { .tile__icon { top: 40px; left: 40px; } }
.tile__icon svg { width: 28px; height: 28px; }

/* Web: soft accent wash from the top right. */
.tile--web {
  background:
    radial-gradient(120% 90% at 100% 0%, var(--glow-a), transparent 55%),
    radial-gradient(80% 70% at 85% 10%, var(--glow-c), transparent 60%),
    var(--surface);
}
/* AI: dot field that fades out towards the text. */
.tile--ai::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
          mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}

/* Spotlight that follows the pointer (set by main.js on fine pointers). */
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 60%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.tile:hover::after { opacity: 1; }
.tile { transition: border-color .4s var(--ease); }
.tile:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

/* Services: sticky title left, big statements right. */
.services { display: grid; gap: 8px; }
@media (min-width: 900px) {
  .services { grid-template-columns: 4fr 8fr; gap: 48px; align-items: start; }
  .services__title { position: sticky; top: 112px; }
}
.services__list { list-style: none; margin: 0; padding: 0; }
.services__list li { padding: 28px 0 36px; }
.services__list li + li { border-top: 1px solid var(--line); }
.services__list li:first-child { padding-top: 0; }
.services__lead {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 5.2vw, 4.25rem);
  line-height: 1.02; letter-spacing: -0.05em; font-weight: 640;
}
.services__list p:not(.services__lead) { margin: 0; color: var(--muted); font-size: 1.12rem; max-width: 46ch; }


/* Footer: oversized wordmark, cropped by the page edge. */
.foot { border-top: 1px solid var(--line); overflow: hidden; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-top: 28px; font-size: .92rem; color: var(--muted); }
.foot__row p { margin: 0; }
.foot__links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.foot__links a { color: var(--muted); text-decoration: none; transition: color .2s; }
.foot__links a:hover { color: var(--text); }
.foot__word {
  margin: 24px 0 -0.22em;
  font-size: clamp(5rem, 21vw, 18.5rem);
  line-height: 1; letter-spacing: -0.07em; font-weight: 700;
  color: transparent;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--text) 16%, transparent), transparent 85%);
  -webkit-background-clip: text; background-clip: text;
  user-select: none;
}

/* Legal + 404 */
.legal { max-width: 760px; padding-top: 72px; padding-bottom: 96px; }
.legal h1 { margin: 0 0 40px; font-size: clamp(2.4rem, 5vw, 3.5rem); letter-spacing: -0.045em; line-height: 1; font-weight: 640; }
.legal h2 { margin: 36px 0 8px; font-size: 1.05rem; font-weight: 600; }
.legal p { margin: 0; color: var(--muted); max-width: 65ch; }

.nf { min-height: 70dvh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; padding-top: 64px; padding-bottom: 64px; }
.nf h1 { margin: 0; font-size: clamp(2.4rem, 6vw, 4.5rem); letter-spacing: -0.05em; line-height: 1; font-weight: 640; }
.nf p { margin: 0; color: var(--muted); }

/* Footer: Anmelden-Link mit Schloss (Phosphor "lock-simple", light, MIT) */
.foot__links a { display: inline-flex; align-items: center; gap: 6px; }
.foot__icon { width: 15px; height: 15px; }
