/* ─── Fonts ─────────────────────────────────────────────── */

@font-face {
  font-family: 'Soehne';
  src: url('fonts/soehne-kraftig.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Soehne';
  src: url('fonts/soehne-buch.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ─── Reset & Base ─────────────────────────────────────── */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  font-kerning: normal;
  hanging-punctuation: first last;
}

:root {
  --bg: #fafafa;
  --fg: #050505;
  --type-hero: clamp(2.5rem, 7vw, 9rem);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Soehne', system-ui, sans-serif;
  font-weight: 700;
  min-height: 100vh;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Sections ─────────────────────────────────────────── */

.section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10vw;
  position: relative;
}

.section-text {
  font-size: var(--type-hero);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  text-align: center;
  mix-blend-mode: multiply;
}

.section-text.no-blend {
  mix-blend-mode: normal;
}

.section-text a {
  text-decoration: none;
  color: inherit;
  text-underline-offset: 0.12em;
}

.section-text a:hover,
.section-text a:focus-visible {
  text-decoration: underline;
}

.section-text a:focus-visible,
#play-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0.16em;
}

/* ─── Intro ────────────────────────────────────────────── */

#intro {
  flex-direction: column;
}

.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.423em;                /* Söhne descender depth */
  font-size: var(--type-hero);
}

/* ─── Play Button ──────────────────────────────────────── */

#play-btn {
  --btn-size: clamp(44px, 0.525em, 0.525em); /* Söhne x-height, 44px touch floor */
  display: none;
  width: var(--btn-size);
  height: var(--btn-size);
  font-size: var(--type-hero);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg);
  padding: 0;
  mix-blend-mode: multiply;
  touch-action: manipulation;
}

.js #play-btn {
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.js #play-btn.visible {
  opacity: 1;
}

#play-btn svg {
  width: 100%;
  height: 100%;
}

#arrow-group {
  transform-origin: 24.57px 24.59px;
}

#arrow-stem {
  transform-origin: 24.58px 25.14px;
}

/* ─── Keynote Scrub ────────────────────────────────────── */

.scrub-wrap {
  height: 1500vh;
  position: relative;
}

.scrub-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scrub-sticky canvas {
  display: block;
  opacity: 0;
}

.scrub-fallback {
  display: block;
  width: min(90vw, 640px);
  height: auto;
}

/* ─── Placards ─────────────────────────────────────────── */

.scrub-placard {
  position: absolute;
  bottom: 8vh;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  font-weight: 400;
  font-size: clamp(0.8125rem, calc(var(--type-hero) * 0.2015), 1.125rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
  opacity: 1;
}

.js .scrub-placard {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.js .scrub-placard.visible {
  opacity: 0.5;
}

.scrub-placard strong {
  display: block;
  font-weight: 700;
  font-size: clamp(1rem, calc(var(--type-hero) * 0.2756), 1.5rem);
  line-height: 1.3;
}

.scrub-placard strong:empty {
  display: none;
}

/* ─── Emoji ────────────────────────────────────────────── */

.emoji-wrap {
  height: 500vh;
  position: relative;
}

.emoji-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6vh;
  padding: 10vw;
}

.emoji-row {
  display: flex;
  gap: 4vw;
}

.emoji-slot {
  position: relative;
  width: clamp(100px, 16vw, 240px);
  height: clamp(100px, 16vw, 240px);
}

.emoji-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* ─── Reveal ───────────────────────────────────────────── */

.reveal {
  opacity: 1;
}

.js .reveal {
  opacity: 0;
  transition: opacity 1.4s ease;
}

.js .reveal.visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .js #play-btn,
  .js .reveal,
  .js .scrub-placard,
  .emoji-slot img {
    transition-duration: 0.01ms;
  }

  .emoji-slot img {
    filter: none !important;
  }
}
