/* ============================================================
   ESSE — Base
   Reset, Font-Faces, Grundtypo, Grain, Cutout-System, A11y-Utilities.
   ============================================================ */

/* ---------- Font-Faces (selbst gehostet, siehe assets/fonts/LICENSES) ---------- */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../assets/fonts/fraunces-variable.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Fraunces Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url('../assets/fonts/fraunces-variable-italic.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url('../assets/fonts/archivo-variable.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Martian Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  src: url('../assets/fonts/martian-mono-variable.woff2') format('woff2-variations');
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  scroll-behavior: auto; /* Lenis uebernimmt das Smoothing */
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.5;
  font-variation-settings: 'wght' 400;
  overflow-x: hidden;
  min-height: 100vh;
}
img, picture, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; background: none; border: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  text-wrap: balance;
}

/* ---------- Grundtypo-Utilities ---------- */
.mono {
  font-family: var(--font-mono);
  font-variation-settings: 'wght' 400, 'wdth' 87.5;
  letter-spacing: 0.02em;
}
.dot { color: var(--accent); }

.kicker {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-kicker);
  letter-spacing: var(--track-kicker);
  text-transform: uppercase;
  color: var(--muted);
  font-variation-settings: 'wght' 400, 'wdth' 87.5;
}
.kicker__line {
  display: block;
  width: 24px;
  height: 1px;
  flex: none;
  background: var(--detail);
  transform-origin: left center;
}

/* ---------- Film-Korn ---------- */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: var(--z-nav);
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Cutout-System (freigestellte Produkte + konstruierter Kontaktschatten) ---------- */
.cutout { position: relative; }
.cutout__img { position: relative; z-index: 2; display: block; }
.cutout__img img { width: 100%; height: auto; }
.cutout__shadow {
  position: absolute;
  z-index: 1;
  left: 8%;
  right: 8%;
  bottom: -4%;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, transparent 70%);
  filter: blur(6px);
}

/* ---------- A11y ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* transform statt top-Offset: skaliert zuverlaessig mit der eigenen Hoehe,
     unabhaengig von Font-/Padding-Aenderungen (kein Sliver-Leck wie bei fixem top). */
  transform: translateY(-150%);
  transition: transform var(--dur-hover) var(--ease-out-hard);
}
.skip-link:focus {
  transform: translateY(0);
}
:focus-visible {
  outline: 2px solid var(--detail);
  outline-offset: 3px;
}

/* ---------- Reduced-Motion-Grundhaltung ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
