/* Kunstform — landing. Two faces: Italiana (wordmark + hero) and Archivo (everything else). */
:root {
  --ink: #141312;
  --ground: #f3f2f2;
  --dark: #1c1712;
  --cream: #fbf7f0;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-display: "Italiana", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--ground); color: var(--ink); font-family: var(--font-body); }
html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; }
a:hover { opacity: 0.6; }
::selection { background: rgba(20,19,18,0.12); }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.manifesto button:focus-visible, .manifesto a:focus-visible { outline-color: var(--ink); }

.page { overflow-x: clip; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
/* Mobile browsers: 100vh (= 100lvh) is the viewport with the toolbar collapsed. The stage keeps that
   height so the photo never shows a gap, and everything anchored to the bottom moves up by the toolbar
   height (lvh − svh) so it stays visible while the toolbar is showing. 0 on desktop. */
:root { --toolbar: 0px; }
@supports (height: 1svh) { :root { --toolbar: calc(100lvh - 100svh); } }
.hero { position: relative; height: 200vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100lvh; min-height: 560px; overflow: hidden; background: var(--dark); }
robot-arm { position: absolute; inset: 0; z-index: 1; display: block; }
.hero.is-static .controls, .hero.is-static .readout { display: none; } /* photo-only fallback: nothing to control */

.loader { position: absolute; left: 44px; top: 120px; z-index: 4; display: flex; align-items: center; gap: 14px; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream); text-shadow: 0 1px 3px rgba(20,12,6,0.5); pointer-events: none; transition: opacity 0.9s ease 0.3s; }
.loader.is-hidden { opacity: 0; }
.loader-dot { display: inline-block; width: 6px; height: 6px; background: var(--cream); animation: pulse 1.6s ease-in-out infinite; }

.scrim { position: absolute; left: 0; right: 0; z-index: 3; pointer-events: none; }
.scrim-bottom { bottom: 0; height: 38%; background: linear-gradient(to top, rgba(28,22,17,0.55), rgba(28,22,17,0.22) 55%, rgba(28,22,17,0)); }
.scrim-top { top: 0; height: 140px; background: linear-gradient(to bottom, rgba(28,22,17,0.4), rgba(28,22,17,0)); }

.header { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; align-items: baseline; justify-content: space-between; padding: 30px 44px; pointer-events: none; }
.wordmark { pointer-events: auto; font-family: var(--font-display); font-size: 30px; letter-spacing: 0.14em; color: var(--cream); text-shadow: 0 1px 3px rgba(20,12,6,0.45), 0 2px 24px rgba(20,12,6,0.5); }
.nav { pointer-events: auto; display: flex; gap: 30px; align-items: baseline; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(251,247,240,0.9); text-shadow: 0 1px 3px rgba(20,12,6,0.5), 0 1px 18px rgba(20,12,6,0.5); }
.nav a:hover { color: #fff; opacity: 1; }
.lang { display: flex; gap: 10px; margin-left: 10px; }
.lang button { background: transparent; border: none; padding: 0 0 2px; cursor: pointer; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; border-bottom: 1px solid transparent; color: rgba(251,247,240,0.55); text-shadow: inherit; }
.lang button.is-on { color: var(--cream); border-bottom-color: rgba(251,247,240,0.8); }

.hero-copy { position: absolute; left: 44px; bottom: calc(120px + var(--toolbar)); z-index: 4; max-width: min(860px, 72vw); pointer-events: none; }
.hero-copy h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(44px, 7vw, 124px); line-height: 0.96; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 26px; color: var(--cream); text-shadow: 0 2px 6px rgba(20,12,6,0.4), 0 6px 60px rgba(20,12,6,0.45); }
.triad { font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: rgba(251,247,240,0.9); text-shadow: 0 1px 3px rgba(20,12,6,0.5); }

.readout { position: absolute; right: 44px; bottom: calc(36px + var(--toolbar)); z-index: 4; text-align: right; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(251,247,240,0.75); line-height: 1.9; pointer-events: none; text-shadow: 0 1px 3px rgba(20,12,6,0.5); }
.axes { display: flex; gap: 14px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.axes b { font-weight: 400; color: var(--cream); }

.controls { position: absolute; left: 44px; bottom: calc(36px + var(--toolbar)); z-index: 6; display: flex; align-items: center; gap: 22px; }
.ctl { background: transparent; border: none; padding: 0 0 3px; cursor: pointer; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid transparent; color: rgba(244,238,227,0.45); }
.ctl.is-on { color: #f4eee3; border-bottom-color: rgba(244,238,227,0.7); }
.hint { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(251,247,240,0.7); pointer-events: none; text-shadow: 0 1px 3px rgba(20,12,6,0.5); }
.scroll-hint { position: absolute; left: 50%; bottom: calc(36px + var(--toolbar)); transform: translateX(-50%); z-index: 4; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(251,247,240,0.7); pointer-events: none; text-shadow: 0 1px 3px rgba(20,12,6,0.5); }

/* touch targets: the labels stay 10–11 px, the hit area grows to ≥ 32 px without moving anything */
.nav a, .lang button, .ctl, .footer-links a, .legal-nav a { position: relative; }
.nav a::before, .lang button::before, .ctl::before, .footer-links a::before, .legal-nav a::before { content: ""; position: absolute; inset: -12px -8px; }
.lang button::before { inset: -12px -4px; } /* EN and DE sit 10 px apart */

@media (max-width: 1500px) { .hint { display: none; } }
@media (max-width: 1200px) { .scroll-hint { display: none; } }
@media (max-width: 720px) {
  .hero-copy, .controls, .readout, .loader { left: 24px; right: 24px; }
  .header { padding: 20px 24px; }
  .wordmark { font-size: 24px; }
  .nav { gap: 18px; }
  .lang { margin-left: 4px; }
  .hero-copy { max-width: none; bottom: calc(110px + var(--toolbar)); }
  .hero-copy h1 { font-size: clamp(30px, 10vw, 50px); } /* keeps the three lines in both languages down to 360 px */
  .readout { display: none; }
}
@media (max-width: 440px) {
  .header, .legal-header { flex-wrap: wrap; row-gap: 10px; } /* nav drops under the wordmark */
  .nav, .legal-nav { width: 100%; }
  .triad { letter-spacing: 0.2em; } /* "Intelligenz × Robotik × Handwerk" on one line at 360 px */
}
/* touch screens: "on click" vs "continuous" is a mouse concept — a tap places and extrudes, a drag steers */
@media (pointer: coarse) {
  .ctl[data-mode] { display: none; }
  .hint { display: inline; }
}

/* ── Manifesto ────────────────────────────────────────────────────────── */
.manifesto { position: relative; z-index: 5; background: var(--ground); color: var(--ink); min-height: 100vh; margin-top: -56vh; box-shadow: 0 -60px 120px rgba(20,12,6,0.3); display: flex; flex-direction: column; justify-content: space-between; padding: 20vh 44px 26px; }
.manifesto-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(40px, 8vw, 140px); align-items: start; max-width: 1500px; }
.kicker { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; line-height: 2; white-space: pre-line; }
.manifesto-text { display: flex; flex-direction: column; gap: 34px; max-width: 62ch; }
.manifesto-text p { font-size: 17px; font-weight: 400; line-height: 1.65; margin: 0; text-wrap: pretty; }
.manifesto-text p.lead { font-size: clamp(22px, 2vw, 32px); line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 10px; }
.manifesto-text p.lines { white-space: pre-line; }
.contact { display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: baseline; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.contact a { border-bottom: 1px solid var(--ink); padding-bottom: 3px; white-space: nowrap; }
.footer { display: flex; justify-content: space-between; gap: 24px; padding-top: 40px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #5c5a58; }
@media (max-width: 860px) {
  .manifesto { padding: 16vh 24px 22px; }
  .manifesto-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Motion ───────────────────────────────────────────────────────────── */
@keyframes pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(56px); } to { opacity: 1; transform: none; } }
@keyframes heroFade { to { opacity: 0; transform: translateY(-40px); } }
@supports (animation-timeline: scroll()) {
  [data-fx="hero"] { animation: heroFade linear both; animation-timeline: scroll(root); animation-range: 0px 80vh; }
  [data-fx="rise"] { animation: rise 1ms linear both; animation-timeline: view(); animation-range: entry 10% entry 55%; }
}
@media (prefers-reduced-motion: reduce) {
  [data-fx="hero"], [data-fx="rise"] { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── Footer links + legal pages (Impressum, Datenschutz) ──────────────── */
.footer-links { display: flex; gap: 24px; }
.legal { max-width: 72ch; margin: 0 auto; padding: 30px 44px 26px; display: flex; flex-direction: column; min-height: 100vh; }
.legal main { flex: 1; }
.legal-header { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 28px; margin-bottom: 14vh; border-bottom: 1px solid rgba(20,19,18,0.18); }
.legal-header .wordmark { color: var(--ink); text-shadow: none; }
.legal-nav { display: flex; gap: 30px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.legal h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 60px; }
.legal h2 { font-size: 11px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; line-height: 2; margin: 0 0 14px; padding-top: 30px; border-top: 1px solid rgba(20,19,18,0.18); }
.legal p, .legal li { font-size: 17px; font-weight: 400; line-height: 1.65; margin: 0 0 20px; text-wrap: pretty; }
.legal ul { margin: 0 0 20px; padding-left: 1.2em; }
.legal li { margin-bottom: 4px; }
.legal main a { border-bottom: 1px solid var(--ink); padding-bottom: 1px; }
.legal .placeholder { background: rgba(20,19,18,0.08); padding: 0 0.3em; }
.legal .footer { margin-top: 14vh; }
@media (max-width: 860px) {
  .legal { padding: 22px 24px 22px; }
  .legal-header { margin-bottom: 10vh; }
  .footer { flex-wrap: wrap; }
}
