/* marcelw.de – Richtung „Bühne“ */

@font-face { font-family: "Satoshi"; src: url("../fonts/Satoshi-Variable.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --white: #ffffff;
  --paper: #f5f5f7;
  --paper-2: #e8e8ed;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --mute: #c7c7cc;
  --stage: #000000;
  --on-stage-2: #a1a1a6;
  --m: clamp(20px, 4vw, 64px);
  --gap: clamp(12px, 1.6vw, 24px);
  --section: clamp(112px, 13vw, 200px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --hero-delay: 120ms;
}
html.intro { --hero-delay: 1080ms; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: "Satoshi", -apple-system, system-ui, "Segoe UI", sans-serif;
  font-size: clamp(17px, 1.2vw, 20px); line-height: 1.5; font-weight: 450; -webkit-font-smoothing: antialiased;
}
html.intro body { overflow: hidden; }
::selection { background: var(--ink); color: var(--white); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }
section[id], main[id] { scroll-margin-top: 72px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 70; background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* Zweisprachigkeit: Deutsch ist Standard, Englisch per Umschalter */
html:not([lang="en"]) [data-l="en"], html[lang="en"] [data-l="de"] { display: none !important; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ---------- Einstieg: vier Streifen und drei Wörter ---------- */
.curtain { display: none; }
html.intro .curtain { display: grid; position: fixed; inset: 0; z-index: 50; grid-template-columns: repeat(4, 1fr); background: var(--stage); animation: ground-off 1ms linear 940ms both; }
@keyframes ground-off { to { background-color: transparent; } }
.strip { background: var(--stage); }
html.intro .strip { animation: strip-up 640ms var(--ease-in-out) both; }
html.intro .strip:nth-child(1) { animation-delay: 940ms; }
html.intro .strip:nth-child(2) { animation-delay: 1000ms; }
html.intro .strip:nth-child(3) { animation-delay: 1060ms; }
html.intro .strip:nth-child(4) { animation-delay: 1120ms; }
@keyframes strip-up { to { transform: translateY(-101%); } }
.slot { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.slot-mask { display: grid; overflow: hidden; padding: 0.08em 0.1em 0.14em; }
.slot-mask span {
  grid-area: 1 / 1; color: var(--white); font-weight: 700; letter-spacing: -0.04em; line-height: 1;
  font-size: clamp(2rem, 6.4vw, 6.4rem); transform: translateY(115%) rotate(6deg); transform-origin: 0 100%; white-space: nowrap;
}
html.intro .slot-mask span:nth-child(1) { animation: word-through 520ms var(--ease-out) 60ms both; }
html.intro .slot-mask span:nth-child(2) { animation: word-through 520ms var(--ease-out) 360ms both; }
html.intro .slot-mask span:nth-child(3) { animation: word-last 1040ms var(--ease-out) 660ms both; }
@keyframes word-through {
  0% { transform: translateY(115%) rotate(6deg); }
  38%, 62% { transform: translateY(0) rotate(0); }
  100% { transform: translateY(-115%) rotate(-3deg); }
}
@keyframes word-last {
  0% { transform: translateY(115%) rotate(6deg); }
  20%, 45% { transform: translateY(0) rotate(0); }
  72%, 100% { transform: translateY(-115%) rotate(-3deg); }
}
html.intro.skipping .curtain { opacity: 0; transition: opacity 220ms ease; }

/* ---------- Kopf ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px var(--m); background: var(--white);
  transition: background-color 300ms ease, color 300ms ease, transform 360ms var(--ease-out);
}
.bar.on-dark { background: var(--stage); color: var(--white); }
.bar.away { transform: translateY(-100%); }
.bar:focus-within { transform: none; }
.brand { font-weight: 700; letter-spacing: -0.02em; padding: 8px 0; white-space: nowrap; }
.nav { position: relative; display: flex; gap: clamp(14px, 2.4vw, 36px); align-items: center; }
.nav a, .lang-btn { position: relative; padding: 10px 0; font: inherit; font-weight: 500; font-size: 0.94em; color: var(--ink-2); transition: color 200ms ease; }
.bar.on-dark .nav a, .bar.on-dark .lang-btn { color: var(--on-stage-2); }
.nav a[aria-current="page"], .nav a[aria-current="true"] { color: var(--ink); }
.bar.on-dark .nav a[aria-current="page"], .bar.on-dark .nav a[aria-current="true"] { color: var(--white); }
@media (hover: hover) and (pointer: fine) { .nav a:hover, .lang-btn:hover { color: var(--ink); } .bar.on-dark .nav a:hover, .bar.on-dark .lang-btn:hover { color: var(--white); } }
.lang-btn { background: none; border: 0; cursor: pointer; min-width: 28px; }
.nav-ind { position: absolute; left: 0; bottom: 2px; height: 2px; width: 1px; background: currentColor; transform-origin: 0 0; opacity: 0; pointer-events: none;
  transition: transform 300ms var(--ease-in-out), opacity 200ms ease; }

/* ---------- Typo-Bausteine ---------- */
.line { display: block; overflow: hidden; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.line > span { display: block; transform-origin: 0 100%; }
html.js .rise .line > span { transform: translateY(110%) rotate(4deg); }
html.ready .rise .line > span { transform: none; transition: transform 1000ms var(--ease-out) var(--hero-delay); }
html.ready .rise .line:nth-child(2) > span { transition-delay: calc(var(--hero-delay) + 90ms); }
html.ready .rise .line:nth-child(3) > span { transition-delay: calc(var(--hero-delay) + 180ms); }
.after-rise { }
html.js .after-rise > * { opacity: 0; transform: translateY(16px); }
html.ready .after-rise > * { opacity: 1; transform: none; transition: opacity 700ms ease calc(var(--hero-delay) + 360ms), transform 900ms var(--ease-out) calc(var(--hero-delay) + 360ms); }
html.ready .after-rise > *:nth-child(2) { transition-delay: calc(var(--hero-delay) + 440ms); }

.h-xl { margin: 0; font-weight: 700; font-size: clamp(2.6rem, 9.2vw, 10.5rem); line-height: 0.92; letter-spacing: -0.05em; }
.h-l { margin: 0; font-weight: 700; font-size: clamp(2.3rem, 5.6vw, 5.8rem); line-height: 0.96; letter-spacing: -0.045em; }
.h-m { margin: 0; font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.5rem); line-height: 1.06; letter-spacing: -0.03em; }
.lead { font-size: clamp(1.1rem, 1.55vw, 1.5rem); line-height: 1.4; }
.muted { color: var(--ink-2); }
.small { font-size: 0.9em; }

/* ---------- Buttons und Links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-weight: 500; background: var(--ink); color: var(--white);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.btn svg { width: 16px; height: 16px; transition: transform 240ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn.ghost { background: var(--paper); color: var(--ink); }
.on-stage .btn { background: var(--white); color: var(--ink); }
.on-stage .btn.ghost { background: #1d1d1f; color: var(--white); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #000; }
  .btn.ghost:hover { background: var(--paper-2); }
  .btn:hover svg { transform: translateX(3px); }
  .on-stage .btn:hover { background: var(--paper-2); }
  .on-stage .btn.ghost:hover { background: #2c2c2e; }
}
.actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ulink { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; padding-bottom: 2px; transition: background-size 300ms var(--ease-out); font-weight: 500; }
.ulink.always { background-size: 100% 1.5px; }
@media (hover: hover) and (pointer: fine) { .ulink:hover { background-size: 100% 1.5px; } }
.ulink:focus-visible { background-size: 100% 1.5px; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; padding: 120px var(--m) clamp(28px, 4vw, 56px); display: grid; grid-template-rows: 1fr auto; }
.hero h1 { align-self: center; }
.hero-foot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; row-gap: 28px; }
.hero-foot > p { grid-column: 1 / span 6; max-width: 40ch; }
.hero-foot > p strong { font-weight: 500; }
.hero-foot > .actions { grid-column: 8 / -1; justify-self: end; }
.page-hero { padding: clamp(140px, 18vh, 200px) var(--m) clamp(56px, 7vw, 104px); display: grid; gap: clamp(28px, 3vw, 48px); }
.page-hero p { max-width: 42ch; }

/* ---------- Kompetenzen ---------- */
.skills { padding: var(--section) var(--m) 0; row-gap: clamp(48px, 6vw, 88px); }
.skills > h2 { grid-column: 1 / span 9; }
.skill-list { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 64px) var(--gap); margin: 0; }
.skill-list dt { font-weight: 700; font-size: clamp(1.2rem, 1.6vw, 1.5rem); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 12px; }
.skill-list dd { margin: 0; color: var(--ink-2); max-width: 34ch; }
.skill-list dd strong { color: var(--ink); font-weight: 500; }

/* ---------- Porträt-Bühne ---------- */
.stage { position: relative; height: 150vh; margin-top: clamp(72px, 9vw, 140px); view-timeline-name: --stage; }
.stage-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; }
.frame { grid-area: 1 / 1; position: relative; overflow: hidden; margin: 0; clip-path: inset(9% var(--m) 9% var(--m) round 28px); background: var(--stage); }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 30%; transform: scale(1.12); filter: grayscale(1); }
.frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.62), rgba(0,0,0,0) 58%); opacity: var(--scrim, 0); }
.stage-line { grid-area: 1 / 1; align-self: end; padding: 0 var(--m) clamp(40px, 7vw, 96px); color: var(--white); position: relative;
  font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 4.8rem); line-height: 1; letter-spacing: -0.04em; max-width: 16ch; opacity: 0; transform: translateY(32px); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 821px) {
    .frame { animation: frame-open linear both; animation-timeline: --stage; animation-range: contain 0% contain 50%; }
    .frame img { animation: img-settle linear both; animation-timeline: --stage; animation-range: contain 0% contain 70%; }
    .frame::after { animation: fade-in linear both; animation-timeline: --stage; animation-range: contain 35% contain 60%; }
    .stage-line { animation: line-in linear both; animation-timeline: --stage; animation-range: contain 42% contain 70%; }
  }
}
@keyframes frame-open { to { clip-path: inset(0 0 0 0 round 0); } }
@keyframes img-settle { to { transform: scale(1); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes line-in { to { opacity: 1; transform: none; } }

/* ---------- Heute ---------- */
.now { padding: var(--section) var(--m) 0; row-gap: 28px; align-items: start; }
.now h2 { grid-column: 1 / span 5; }
.now .body { grid-column: 7 / -1; display: grid; gap: 20px; }
.now .role { font-weight: 500; }
.now .body p { max-width: 44ch; }

/* ---------- Projekte ---------- */
.projects { padding: var(--section) var(--m) 0; }
.projects > header { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 20px; margin-bottom: clamp(48px, 6vw, 88px); }
.projects > header h2 { grid-column: 1 / span 8; }
.projects > header p { grid-column: 9 / -1; align-self: end; }
.case { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(28px, 3vw, 44px); padding-block: clamp(40px, 5vw, 72px); }
.case + .case { margin-top: clamp(40px, 6vw, 96px); }
.case-media { grid-column: 1 / -1; margin: 0; background: var(--paper); border-radius: 28px; overflow: hidden; }
.case-media img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: 50% 58%; }
.case-type { grid-column: 1 / -1; background: var(--stage); color: var(--white); border-radius: 28px; padding: clamp(36px, 6vw, 96px) clamp(24px, 4vw, 64px); display: grid; gap: 10px; }
.case-type .big { font-weight: 700; font-size: clamp(2.6rem, 8vw, 8.6rem); line-height: 0.9; letter-spacing: -0.05em; }
.case-type .big.dim { color: #8e8e93; }
.case-type.light { background: var(--paper); color: var(--ink); }
.case-type.light .big.dim { color: var(--ink-2); }
.case-head { grid-column: 1 / span 5; display: grid; gap: 14px; align-content: start; }
.case-meta { color: var(--ink-2); }
.case-body { grid-column: 7 / -1; display: grid; gap: 26px; margin: 0; }
.case-body dt { font-weight: 500; margin-bottom: 6px; }
.case-body dd { margin: 0; color: var(--ink-2); max-width: 52ch; }
.case-body .result dd { color: var(--ink); }
html.js .case-media.reveal-img { clip-path: inset(0 0 100% 0 round 28px); }
html.js .case-media.reveal-img img { transform: scale(1.12); }
html.js .case-media.reveal-img.in { clip-path: inset(0 0 0 0 round 28px); transition: clip-path 1100ms var(--ease-in-out); }
html.js .case-media.reveal-img.in img { transform: none; transition: transform 1500ms var(--ease-out); }

/* ---------- Arbeitsweise ---------- */
.approach { padding: var(--section) var(--m) 0; row-gap: clamp(56px, 7vw, 104px); }
.approach h2 { grid-column: 1 / span 3; font-size: 1rem; font-weight: 500; color: var(--ink-2); padding-top: 0.6em; margin: 0; }
.read { grid-column: 4 / -1; font-weight: 500; font-size: clamp(1.7rem, 3.3vw, 3.4rem); line-height: 1.12; letter-spacing: -0.03em; max-width: 24ch; }
/* Lesetext: schon vor dem Effekt gut lesbar (ink-2 = 5:1), beim Lesen wird er satt schwarz */
html.js .read .w { color: var(--ink-2); transition: color 420ms ease; }
html.js .read .w.on { color: var(--ink); }
.principles { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--gap); margin: 0; }
.principles dt { font-weight: 500; margin-bottom: 6px; }
.principles dd { margin: 0; color: var(--ink-2); max-width: 30ch; }

/* ---------- Mein Weg: Porträt-Bühne, Begriffe wechseln mit der Scrollposition (vor- und rückwärts) ---------- */
.weg { margin-top: var(--section); padding: var(--section) var(--m); background: var(--paper); }
.weg-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 20px; margin-bottom: clamp(48px, 6vw, 88px); }
.weg-head h2 { grid-column: 1 / span 8; }
.weg-head p { grid-column: 9 / -1; align-self: end; }
.w4 { margin-top: 0; background: var(--white); padding-top: var(--section); padding-bottom: clamp(40px, 5vw, 72px); }
.w4-track { position: relative; height: calc(5 * 42vh + 100svh); }
.w4-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--stage); color: var(--white); display: grid; padding: 0 var(--m); }
.w4-frame { grid-area: 1 / 1; margin: 0 calc(-1 * var(--m)); position: relative; overflow: hidden; }
.w4-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 35%; filter: grayscale(1); transform: scale(1.08); will-change: transform; }
.w4-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.72), rgba(0,0,0,0.35) 45%, rgba(0,0,0,0) 70%), linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0) 40%); }
.w4-list { grid-area: 1 / 1; position: relative; list-style: none; margin: 0; padding: 0; display: grid; align-items: end; padding-bottom: clamp(88px, 14vh, 150px); }
.w4-st { grid-area: 1 / 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(18px, 2vw, 30px); align-content: end; }
.w4-word { grid-column: 1 / span 8; margin: 0; font-weight: 700; font-size: clamp(3rem, 8.6vw, 9rem); line-height: 0.9; letter-spacing: -0.055em; }
.w4-mask { display: block; overflow: hidden; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.w4-mask > span { display: block; transform-origin: 0 100%; will-change: transform; }
.w4-fact { grid-column: 1 / span 5; display: grid; gap: 8px; will-change: transform, opacity; }
.w4-meta { color: #c7c7cc; }
.w4-say { color: #f5f5f7; font-size: clamp(1.05rem, 1.4vw, 1.35rem); line-height: 1.42; max-width: 40ch; }
.w4-strips { grid-area: 1 / 1; position: relative; align-self: end; display: flex; gap: 8px; padding-bottom: clamp(28px, 5vh, 56px); }
.w4-strips i { position: relative; width: 44px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.28); overflow: hidden; }
.w4-strips b { position: absolute; inset: 0; background: var(--white); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-width: 820px) {
  .w4-track { height: calc(5 * 36vh + 100svh); }
  .w4-frame img { object-position: 90% 30%; }
  .w4-frame::after { background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.4) 55%, rgba(0,0,0,0.1)); }
  .w4-word { grid-column: 1 / -1; font-size: clamp(2.6rem, 14vw, 4.6rem); }
  .w4-fact { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .w4-track { height: auto; }
  .w4-stage { position: relative; height: auto; display: block; padding-block: 0 clamp(64px, 8vw, 120px); }
  .w4-frame { height: 60vh; }
  .w4-frame img { transform: none; }
  .w4-list { padding: clamp(48px, 6vw, 88px) 0 0; gap: clamp(40px, 5vw, 72px); }
  .w4-st { grid-area: auto; }
  .w4-mask > span, .w4-fact { transform: none !important; opacity: 1 !important; }
  .w4-word { font-size: clamp(2.4rem, 5.6vw, 5.6rem); }
  .w4-strips { display: none; }
}
.w4-track + .contact { margin-top: 0; }

/* ---------- Profil-Seite ---------- */
.portrait-reveal { margin: 0 var(--m); border-radius: 28px; overflow: hidden; background: var(--paper); }
.portrait-reveal img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: 78% 30%; filter: grayscale(1); }
html.js .portrait-reveal { clip-path: inset(0 0 100% 0 round 28px); }
html.js .portrait-reveal img { transform: scale(1.15); }
html.ready .portrait-reveal { clip-path: inset(0 0 0 0 round 28px); transition: clip-path 1100ms var(--ease-in-out) calc(var(--hero-delay) + 420ms); }
html.ready .portrait-reveal img { transform: none; transition: transform 1600ms var(--ease-out) calc(var(--hero-delay) + 420ms); }
.block { padding: var(--section) var(--m) 0; row-gap: 28px; align-items: start; }
.block > h2 { grid-column: 1 / span 5; }
.block > .body { grid-column: 7 / -1; display: grid; gap: 22px; }
.block > .body p { max-width: 48ch; }
.facts { margin: 8px 0 0; display: grid; gap: 18px; }
.facts > div { display: grid; grid-template-columns: 11rem 1fr; gap: var(--gap); }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
.note-box { background: var(--paper); border-radius: 18px; padding: 18px 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { background: var(--paper); border-radius: 999px; padding: 6px 14px; font-size: 0.92em; }

/* ---------- Kontaktbühne und Fuß ---------- */
.contact { margin-top: var(--section); background: var(--stage); color: var(--white); padding: clamp(120px, 14vw, 220px) var(--m) 40px; }
.contact .row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 28px; margin-top: clamp(40px, 5vw, 72px); align-items: end; }
.contact .row p { grid-column: 1 / span 6; color: #d2d2d7; max-width: 36ch; }
.contact .row .actions { grid-column: 8 / -1; justify-self: end; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 28px var(--m) 36px; color: var(--ink-2); font-size: 0.9em; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.foot a { padding: 6px 0; }
.on-stage .foot, .foot.on-stage { color: var(--on-stage-2); padding-inline: 0; padding-bottom: 0; margin-top: clamp(96px, 10vw, 160px); }
.on-stage .foot a:hover { color: var(--white); }
.page-end { background: var(--white); }

/* ---------- Kontaktseite ---------- */
.contact-page { padding: clamp(140px, 18vh, 200px) var(--m) var(--section); row-gap: clamp(48px, 6vw, 88px); }
.contact-page .intro { grid-column: 1 / span 6; display: grid; gap: 28px; align-content: start; }
.contact-page .direct { display: grid; gap: 10px; margin-top: 12px; }
.contact-page .direct a { font-size: clamp(1.2rem, 1.8vw, 1.7rem); font-weight: 500; justify-self: start; }
.contact-page form { grid-column: 8 / -1; display: grid; gap: 22px; align-content: start; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 2px solid transparent; border-radius: 14px; padding: 14px 16px; width: 100%;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.field textarea { min-height: 180px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: var(--white); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; }
.field[data-invalid="true"] input, .field[data-invalid="true"] textarea { border-color: #c4161c; background: #fff5f5; }
.field .err { color: #b3121a; font-size: 0.92em; min-height: 1.4em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { color: var(--ink-2); font-size: 0.92em; max-width: 52ch; }
.form-status { min-height: 1.5em; font-weight: 500; }
.form-status[data-state="ok"] { color: #1a7f37; }
.form-status[data-state="error"] { color: #b3121a; }
.btn[aria-busy="true"] { opacity: 0.6; pointer-events: none; }

/* ---------- Rechtstexte ---------- */
.legal { padding: clamp(140px, 18vh, 200px) var(--m) var(--section); row-gap: 40px; }
.legal > h1 { grid-column: 1 / -1; }
.legal .text { grid-column: 4 / span 7; display: grid; gap: 28px; }
.legal .text h2 { margin: 0 0 6px; font-size: 1.15em; letter-spacing: -0.01em; }
.legal .text p { max-width: 64ch; color: #3a3a3c; }
.draft { background: var(--paper); border-radius: 18px; padding: 18px 22px; font-weight: 500; }
.todo { background: #fff3b0; border-radius: 4px; padding: 0 4px; }

/* ---------- Einblendungen ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(28px); }
html.js [data-reveal].in { opacity: 1; transform: none; transition: opacity 700ms ease var(--d, 0ms), transform 900ms var(--ease-out) var(--d, 0ms); }

/* ---------- Reduzierte Bewegung: alles sichtbar, nur sanfte Überblendungen ---------- */
@media (prefers-reduced-motion: reduce) {
  html.js .rise .line > span, html.js .after-rise > *, html.js [data-reveal], html.js .case-media.reveal-img img, html.js .portrait-reveal img { transform: none !important; }
  html.js [data-reveal] { opacity: 1; }
  html.js .case-media.reveal-img, html.js .portrait-reveal { clip-path: none; }
  .stage { height: auto; }
  .stage-sticky { position: relative; height: 80svh; }
  .frame { clip-path: none; }
  .frame img { transform: none; }
  .frame::after, .stage-line { opacity: 1; transform: none; }
  .bar { transition: background-color 300ms ease, color 300ms ease; }
}

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 820px) {
  .nav { gap: 16px; }
  .nav .opt { display: none; }
  .hero { min-height: auto; padding-top: 22vh; row-gap: 10vh; }
  .hero .h-xl { font-size: clamp(2.4rem, 12.4vw, 5rem); }
  .hero-foot > p, .hero-foot > .actions { grid-column: 1 / -1; justify-self: stretch; }
  .hero-foot > .actions { display: grid; grid-template-columns: 1fr; }
  .hero-foot > .actions .ghost { order: 2; }
  .skills > h2, .now h2, .now .body, .projects > header h2, .projects > header p, .case-head, .case-body,
  .approach h2, .read, .principles, .weg-head h2, .weg-head p, .block > h2, .block > .body,
  .contact .row p, .contact .row .actions, .contact-page .intro, .contact-page form, .legal .text { grid-column: 1 / -1; justify-self: stretch; }
  .skill-list, .principles { grid-template-columns: 1fr; }
  /* Porträt: kein Scroll-Abschnitt, eine kurze Öffnung, dann weiter */
  .stage { height: auto; margin-top: 72px; }
  .stage-sticky { position: relative; height: auto; aspect-ratio: 4 / 5; }
  .frame { clip-path: inset(0 16px 0 16px round 22px); }
  .frame img { object-position: 82% 30%; transform: none; }
  .frame::after, .stage-line { opacity: 1; transform: none; }
  .stage-line { font-size: clamp(1.7rem, 7.6vw, 2.6rem); padding: 0 36px 32px; }
  html.js .stage.m-reveal .frame { clip-path: inset(0 16px 100% 16px round 22px); }
  html.js .stage.m-reveal.in .frame { clip-path: inset(0 16px 0 16px round 22px); transition: clip-path 1000ms var(--ease-in-out); }
  html.js .stage.m-reveal .stage-line { opacity: 0; transform: translateY(20px); }
  html.js .stage.m-reveal.in .stage-line { opacity: 1; transform: none; transition: opacity 600ms ease 500ms, transform 800ms var(--ease-out) 500ms; }
  .case-media img { aspect-ratio: 4 / 3; }
  .portrait-reveal img { aspect-ratio: 4 / 5; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .contact .row .actions { display: grid; grid-template-columns: 1fr; }
}
@media (max-width: 820px) and (prefers-reduced-motion: reduce) {
  html.js .stage.m-reveal .frame { clip-path: inset(0 16px 0 16px round 22px); }
  html.js .stage.m-reveal .stage-line { opacity: 1; transform: none; }
}
