:root {
  --espresso: #2E1F1F;
  --rose: #FFEBF7;
  --creme: #FAF7F2;
  --sand: #D9C9BA;
  --salbei: #718477;

  --bg: var(--rose);
  --fg: var(--espresso);
  --line: var(--sand);

  --pad: clamp(24px, 6vw, 96px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

body[data-theme="rose"]     { --bg: var(--rose);     --fg: var(--espresso); --line: var(--sand); }
body[data-theme="creme"]    { --bg: var(--creme);    --fg: var(--espresso); --line: var(--sand); }
body[data-theme="espresso"] { --bg: var(--espresso); --fg: var(--rose);     --line: rgba(255, 235, 247, .22); }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  transition: background-color 1.6s var(--ease), color 1.6s var(--ease);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

section {
  min-height: 100svh;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* Soft band behind the corner wordmark and the contact link */
.top-fade {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9;
  height: clamp(96px, 13vw, 150px);
  background: var(--bg);
  transition: background-color 1.6s var(--ease);
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent);
          mask-image: linear-gradient(to bottom, #000 45%, transparent);
  pointer-events: none;
}

/* Top link */
.top-link {
  position: fixed;
  top: clamp(20px, 3vw, 40px);
  right: var(--pad);
  z-index: 10;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.top-link:hover { background-size: 100% 1px; }

/* Hero */
.hero { align-items: center; text-align: center; }
.hero-inner { will-change: transform, opacity; }
.hero { --w: min(80vw, 860px); }
.hero-slot { width: var(--w); margin: 0 auto; }
.hero-slot svg { display: block; width: 100%; height: auto; }
.hero-name { width: calc(var(--w) * .681); height: auto; margin: calc(var(--w) * .0726) auto 0; }

/* The wordmark that travels to the corner (created by main.js) */
.brand {
  position: fixed; top: 0; left: 0; z-index: 10;
  display: block;
  transform-origin: 0 0;
  will-change: transform;
  color: var(--fg);
  transition: color 1.6s var(--ease);
  animation: soft-in 2.2s var(--ease) .2s both;
}
.brand svg { display: block; width: 100%; height: auto; }
@keyframes soft-in { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: none; } }
.js .hero-slot.moved { visibility: hidden; }

.brand-static {
  position: absolute; top: clamp(20px, 3vw, 40px); left: var(--pad);
  width: clamp(96px, 9vw, 128px); z-index: 10;
}
.brand-static svg { display: block; width: 100%; height: auto; }
.hero-claim {
  margin-top: clamp(28px, 5vw, 56px);
  font-size: clamp(17px, 1.8vw, 22px);
  letter-spacing: .01em;
}

/* Services */
.services ul { max-width: 1200px; width: 100%; margin: 0 auto; }
.services li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(26px, 5vh, 52px) 0;
  position: relative;
  transition: padding-left .8s var(--ease);
}
.services li::before, .services li:last-child::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px;
  background: var(--line);
  transform-origin: left;
  transition: transform 1.8s var(--ease) .15s;
}
.services li::before { top: 0; }
.services li:last-child::after { bottom: 0; }
.js .services li::before, .js .services li:last-child::after { transform: scaleX(0); }
.js .services li.in::before, .js .services li.in:last-child::after { transform: scaleX(1); }
.services .name {
  font-size: clamp(40px, 8.5vw, 120px);
  font-weight: 300;
  letter-spacing: -.03em;
  line-height: 1;
}
.services .desc {
  font-size: clamp(15px, 1.4vw, 18px);
  opacity: .6;
}
@media (hover: hover) and (min-width: 801px) {
  .services li { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .services .desc { opacity: 0; transform: translateX(-12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .services li:hover { padding-left: 24px; }
  .services li:hover .desc { opacity: .7; transform: none; }
}

/* Belief */
.belief { align-items: flex-start; }
.belief .big {
  font-size: clamp(38px, 8vw, 116px);
  font-weight: 300;
  letter-spacing: -.035em;
  line-height: 1.05;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.belief .line { display: block; }
.js .belief .line:nth-child(2) { transition-delay: .2s; }
.plus {
  position: absolute;
  right: var(--pad);
  bottom: calc(var(--pad) + 6vh);
  width: 48px; height: 48px;
}
.plus::before, .plus::after {
  content: ""; position: absolute; background: var(--salbei);
}
.plus::before { left: 0; right: 0; top: 50%; height: 1px; }
.plus::after  { top: 0; bottom: 0; left: 50%; width: 1px; }

/* Contact */
.contact { align-items: flex-start; }
.contact .label {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .6;
  margin-bottom: clamp(18px, 3vw, 32px);
  width: 100%; max-width: 1200px; margin-inline: auto;
}
.mail {
  display: block;
  width: 100%; max-width: 1200px; margin-inline: auto;
  font-size: clamp(19px, 5.3vw, 76px);
  font-weight: 300;
  letter-spacing: -.03em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.mail span {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .7s var(--ease);
  padding-bottom: .12em;
}
.mail:hover span { background-size: 100% 1px; }

.foot {
  position: absolute;
  left: var(--pad); right: var(--pad);
  bottom: clamp(24px, 4vw, 48px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  font-size: 13px; opacity: .6;
}
.foot img { width: clamp(90px, 12vw, 140px); }
.foot-meta { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
.foot-meta a { border-bottom: 1px solid transparent; transition: border-color .4s var(--ease); }
.foot-meta a:hover { border-color: currentColor; }

/* Impressum */
.legal-page section { justify-content: center; }
.legal-page main { animation: fade 1.4s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.legal { max-width: 640px; width: 100%; margin: 0 auto; }
.legal h1 {
  font-size: clamp(36px, 7vw, 88px);
  font-weight: 300;
  letter-spacing: -.035em;
  line-height: 1.05;
  margin: 0 0 clamp(32px, 6vw, 64px);
}
.legal p { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; margin-bottom: 1.4em; }
.legal .label {
  display: block;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  opacity: .6; margin-bottom: 6px;
}
.legal a { border-bottom: 1px solid var(--line); }
.legal .back { display: inline-block; margin-top: 24px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; border: 0; }

/* Reveal on scroll */
.js .reveal {
  opacity: 0;
  transform: translateY(36px);
  filter: blur(8px);
  transition: opacity 1.6s var(--ease), transform 1.6s var(--ease), filter 1.4s var(--ease), padding-left .8s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; filter: none; }
.js .services li:nth-child(2) { transition-delay: .15s, .15s, .15s, 0s; }
.js .services li:nth-child(3) { transition-delay: .3s, .3s, .3s, 0s; }
.js .foot.reveal.in { opacity: .6; }

/* Hero intro */
.js .hero-slot, .js .hero-name, .js .hero-claim, .js .top-link {
  opacity: 0;
  animation: intro 2.2s var(--ease) forwards;
}
.js .hero-slot, .js .hero-name { animation-delay: .2s; }
.js .hero-claim { animation-delay: .9s; }
.js .top-link   { animation-delay: 1.4s; }
@keyframes intro {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .hero-slot, .js .hero-name, .js .hero-claim, .js .top-link { opacity: 1; transform: none; filter: none; }
  .js .foot.reveal { opacity: .6; }
}
