/* =========================================================================
   Oliver Heidorn — site.css
   Ported 1:1 from the HTML design prototype (OliverHeidorn.dc.html).
   Order: fonts -> tokens -> reset -> layout -> sections -> responsive.
   ========================================================================= */

/* ---------- fonts (self-hosted, drop files into static/fonts/) ---------- */
@font-face {
  font-family: "DM Serif Display";
  src: url("../fonts/DMSerifDisplay-Regular.woff2") format("woff2"),
       url("../fonts/DMSerifDisplay-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Serif Display";
  src: url("../fonts/DMSerifDisplay-Italic.woff2") format("woff2"),
       url("../fonts/DMSerifDisplay-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --red-500: #FF002E; --red-600: #D60027; --red-050: #FFE6EB;
  --white: #ffffff; --grey-050: #f5f6f8; --grey-100: #F1F6F9;
  --grey-300: #c5c5c5; --grey-600: #6b6f76; --grey-800: #454545;
  --ink-900: #131419; --ink-800: #1E2027; --ink-950: #0D0D12; --ink-975: #0A0A0F;
  --black: #121212;

  --accent: var(--red-500); --accent-hover: var(--red-600);
  --text-primary: var(--grey-800); --text-secondary: var(--grey-600);
  --text-heading: var(--black);
  --surface-page: var(--white); --surface-tint: var(--grey-050);
  --surface-card: var(--white);
  --border-subtle: rgba(19,20,25,0.10); --border-on-dark: rgba(255,255,255,0.14);
  --selection-bg: var(--red-500);

  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  --radius-sm: 0.25rem; --radius-md: 0.5rem; --radius-pill: 3.75rem;
  --shadow-light: 0 6px 24px -2px rgba(119,139,165,0.20);
  --shadow-light-lg: 0 18px 48px -8px rgba(119,139,165,0.28);
  --shadow-dark: 0 12px 30px rgba(0,0,0,0.60);
  --ease-out-expo: cubic-bezier(0.165, 0.84, 0.44, 1);

  --wrap: 1290px;
  --gutter: 24px;

  /* medal dots */
  --medal-gold: #C6A15B; --medal-silver: #A9AEB4; --medal-bronze: #B0783F;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; overflow-x: hidden;
  background: var(--surface-page); color: var(--text-primary);
  font-family: var(--font-body); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--selection-bg); color: #fff; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: pretty; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }
.wrap--narrow { max-width: 1040px; }
.accent { color: var(--accent); }
.ph { color: var(--grey-600); font-size: 0.85rem; text-align: center; padding: 24px; }

.h2 {
  margin: 24px 0 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.2rem, 3.6vw, 3rem); line-height: 1.12; color: var(--text-heading);
}
.h2--light { color: #fff; }
.h2--xl { font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1.1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 16px;
  font-size: 0.875rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent);
}
.eyebrow__rule { width: 56px; height: 1px; background: currentColor; }

.card {
  background: var(--surface-card); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-light);
}

[data-reveal] { will-change: opacity, transform; }

/* ---------- header ---------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 80; height: 74px;
  display: flex; align-items: center;
  transition: background .3s var(--ease-out-expo), box-shadow .3s var(--ease-out-expo);
}
.hdr__inner { display: flex; align-items: center; justify-content: space-between; }
.hdr__mark {
  font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -0.01em;
  color: #fff; transition: color .3s var(--ease-out-expo);
}
.hdr__nav { display: flex; align-items: center; gap: 34px; }
.navlink {
  color: #fff; font-size: 0.95rem; font-weight: 500; letter-spacing: 0.01em;
  transition: color .2s var(--ease-out-expo);
}
.navlink:hover { color: var(--accent); }
.langbtn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,0.28); border-radius: var(--radius-pill);
  padding: 8px 14px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
}
.lang { color: rgba(255,255,255,0.5); transition: color .3s var(--ease-out-expo); }
.lang__sep { color: rgba(150,150,150,0.4); }
.langbtn[data-lang="de"] .lang[data-l="de"],
.langbtn[data-lang="en"] .lang[data-l="en"] { color: #fff; }

/* scrolled / on light pages */
.hdr.scrolled {
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(19,20,25,0.08);
}
.hdr.scrolled .hdr__mark, .hdr.scrolled .navlink { color: var(--text-heading); }
.hdr.scrolled .navlink:hover { color: var(--accent); }
.hdr.scrolled .langbtn { border-color: var(--border-subtle); }
.hdr.scrolled .lang { color: var(--grey-600); }
.hdr.scrolled .langbtn[data-lang="de"] .lang[data-l="de"],
.hdr.scrolled .langbtn[data-lang="en"] .lang[data-l="en"] { color: var(--text-heading); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  justify-content: flex-start; background: var(--ink-975); color: #fff;
  padding: 150px 0 76px; overflow: hidden;
}
.hero__glow {
  position: absolute; inset: 0;
  background: radial-gradient(135% 95% at 50% -22%,
    rgba(255,0,46,0.22), rgba(255,0,46,0.05) 34%, transparent 62%);
}
.hero__inner { position: relative; min-width: 0; overflow: hidden; }
.hero__live { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.hero__dot { position: relative; display: inline-flex; width: 7px; height: 7px; }
.hero__dot span { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); }
.hero__dot span:first-child { opacity: .5; }
.hero__livelabel {
  font-family: var(--font-display); font-style: italic; font-size: 0.95rem;
  letter-spacing: 0.01em; color: rgba(255,255,255,0.2);
}
.hero__h1 {
  margin: 0; white-space: nowrap; font-family: var(--font-display); font-weight: 400;
  font-size: 4.91vw; line-height: 1.14; letter-spacing: -0.015em;
}
.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--grey-300); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.hero__scrollline { width: 1px; height: 34px; background: linear-gradient(var(--grey-300), transparent); }

/* ticker: 4 rows in the DOM, 3 visible; JS slides the track up by one row */
.tk { position: relative; overflow: hidden; height: 120px; margin-bottom: 120px; font-family: var(--font-mono); }
.tk__track { display: flex; flex-direction: column; gap: 12px; will-change: transform; }
.tk-row { display: flex; align-items: baseline; gap: 20px; transition: opacity .5s var(--ease-out-expo); }
.tk-time { flex: none; width: 52px; color: var(--accent); font-size: 0.85rem; letter-spacing: 0.04em; }
.tk-text { color: #fff; font-size: 2.2vw; font-weight: 350; line-height: 1.25; white-space: nowrap; }

/* ---------- intro ---------- */
.intro { padding: 130px var(--gutter); }
.intro__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.intro__h2 {
  margin: 26px 0 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.14; letter-spacing: -0.01em;
  color: var(--text-heading);
}
.intro__h2 span { display: block; }
.intro__kicker {
  margin: 22px 0 0; font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 3rem); color: var(--accent);
}
.intro__copy { padding-top: 8px; }
.intro__copy p { margin: 0; font-size: 1.2rem; line-height: 1.75; color: var(--text-primary); }

/* ---------- services ---------- */
.services { background: var(--surface-tint); padding: 120px 0; }
.services__head { max-width: 640px; margin-bottom: 72px; }
.services__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.svc {
  display: flex; flex-direction: column; padding: 44px;
  transition: transform .3s var(--ease-out-expo), box-shadow .3s var(--ease-out-expo);
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-light-lg); }
.svc__top { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; }
.chip {
  flex: none; width: 64px; height: 64px; border-radius: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--red-050); color: var(--accent);
}
.chip svg { width: 24px; height: 24px; stroke-width: 1.5; }
.svc__cat {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--accent);
}
.svc__title {
  margin: 0 0 16px; font-family: var(--font-display); font-weight: 400;
  font-size: 1.7rem; line-height: 1.2; color: var(--text-heading);
}
.svc__body { margin: 0; font-size: 1rem; line-height: 1.7; }

/* ---------- clients marquee ---------- */
.clients { padding: 96px 0; overflow: hidden; }
.clients__overline {
  margin: 0 auto 44px; text-align: center; font-size: 0.875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-secondary);
}
.mq {
  overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.mq__track { display: flex; gap: 20px; width: max-content; will-change: transform; }
.mq__item {
  flex: none; width: 200px; height: 74px; padding: 0 12px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--surface-tint); border-radius: var(--radius-sm);
  color: var(--grey-600); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em;
  pointer-events: none;
}
.mq__item img { max-height: 40px; width: auto; object-fit: contain; }

/* ---------- ablauf / winding path ---------- */
.ablauf { background: var(--ink-900); color: #fff; padding: 120px 0 90px; overflow: hidden; }
.ablauf__head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.eyebrow--center { justify-content: center; }
.path { position: relative; max-width: 940px; margin: 0 auto; height: 1520px; }
.path__svg {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 300px; height: 1500px; overflow: visible;
}
.path__bg { fill: none; stroke: rgba(255,255,255,0.12); stroke-width: 2; }
.path__fg { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.station {
  position: absolute; width: 312px; opacity: 0; transform: translateY(30px);
  transition: opacity .6s var(--ease-out-expo), transform .6s var(--ease-out-expo);
}
.station--left { left: 0; }
.station--right { right: 0; text-align: right; }
.station__title {
  margin: 0 0 12px; font-family: var(--font-display); font-weight: 400;
  font-size: 1.7rem; color: #fff;
}
.station__copy { margin: 0; font-size: 1rem; line-height: 1.7; color: var(--grey-300); }

/* ---------- bio ---------- */
.bio { padding: 130px var(--gutter); }
.bio__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: center; }
.bio__grid--cv { margin-top: 104px; align-items: start; }
.bio__photo {
  position: relative; width: 100%; aspect-ratio: 4/5; overflow: hidden;
  background: var(--surface-tint); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.bio__photo img { width: 100%; height: 100%; object-fit: cover; }
.bio__h2 {
  margin: 24px 0 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2rem, 3.2vw, 2.8rem); line-height: 1.14; color: var(--text-heading);
}
.bio__copy { margin: 24px 0 0; font-size: 1.15rem; line-height: 1.75; }
.bio__cvtitle {
  margin: 24px 0 0; font-family: var(--font-display); font-weight: 400;
  font-size: 2rem; line-height: 1.16; color: var(--text-heading);
}
.cv { display: flex; flex-direction: column; gap: 22px; padding-top: 6px; }
.cv__row { display: grid; grid-template-columns: 116px 1fr; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--border-subtle); }
.cv__row:last-child { border-bottom: none; padding-bottom: 0; }
.cv__years { color: var(--accent); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em; }
.cv__text { margin: 0; font-size: 1rem; line-height: 1.6; }
.statements { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 104px; }
.statements__rule { width: 40px; height: 3px; background: var(--accent); margin-bottom: 22px; }
.statements__title {
  margin: 0 0 14px; font-family: var(--font-display); font-weight: 400;
  font-size: 1.5rem; line-height: 1.2; color: var(--text-heading);
}
.statements__body { margin: 0; font-size: 1rem; line-height: 1.7; }

/* ---------- awards ---------- */
.awards { background: var(--surface-tint); padding: 84px 0; }
.awards__overline {
  text-align: center; margin: 0 0 40px; font-size: 0.875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent);
}
.awards__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.award { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px 24px; }
.award__logo { align-self: center; max-height: 48px; width: auto; object-fit: contain; }
.award__row { display: flex; align-items: center; justify-content: center; gap: 10px; align-self: center; }
.award__dots { display: inline-flex; align-items: center; gap: 5px; }
.dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; }
.dot--gold { background: var(--medal-gold); }
.dot--silver { background: var(--medal-silver); }
.dot--bronze { background: var(--medal-bronze); }
.dot--mention { background: transparent; border: 1px solid var(--grey-300); }
.award__cat { font-size: 0.72rem; letter-spacing: 0.02em; line-height: 1.3; color: var(--text-secondary); }
/* tooltip: CSS-only, hover + keyboard focus */
.award__tip {
  position: absolute; left: 24px; bottom: calc(100% - 8px); z-index: 5;
  padding: 6px 11px; background: var(--ink-900); color: #fff; border-radius: 3px;
  white-space: nowrap; font-size: 0.68rem; letter-spacing: 0.04em;
  box-shadow: 0 6px 24px -2px rgba(119,139,165,.35);
  opacity: 0; pointer-events: none; transform: translateY(4px);
  transition: opacity .2s var(--ease-out-expo), transform .2s var(--ease-out-expo);
}
.award:hover .award__tip, .award:focus-visible .award__tip { opacity: 1; transform: translateY(0); }

/* ---------- projects (masonry, column-packed by JS — see site.js) ----------
   CSS column-count's balance algorithm is unreliable across browsers once
   break-inside:avoid meets cards of very different heights (large gaps,
   uneven column starts). JS packs each card into the shortest column
   instead. Without JS, cards simply stack full-width — see fallback below. */
.projects { padding: 130px var(--gutter); }
.projects__head { margin-bottom: 72px; }
.projects__grid { position: relative; }
.proj { padding: 32px; margin-bottom: 36px; }
.projects__grid.is-packed .proj { position: absolute; top: 0; left: 0; margin-bottom: 0; }
.proj__cat {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.13em; color: var(--accent);
}
.proj__title {
  margin: 10px 0 12px; font-family: var(--font-display); font-weight: 400;
  font-size: 1.7rem; line-height: 1.18; color: var(--text-heading);
}
.proj__body { margin: 0; font-size: 0.98rem; line-height: 1.7; }
.proj__media {
  position: relative; width: 100%; margin-top: 24px; overflow: hidden;
  border-radius: var(--radius-sm); background: var(--surface-tint);
}
.proj__media img { width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: transform .6s var(--ease-out-expo); }
.proj:hover .proj__media img { transform: scale(1.05); }
.proj__badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  padding: 4px 10px; background: rgba(10,10,15,.5); backdrop-filter: blur(4px);
  color: #fff; font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; border-radius: var(--radius-pill); pointer-events: none;
}
.proj__media--ph { padding-bottom: 66%; }
.proj__media--ph .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* ---------- footer ---------- */
.ftr { background: var(--ink-900); color: var(--grey-300); padding: 64px 0; }
.ftr__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.ftr__mark { font-family: var(--font-display); font-size: 1.3rem; color: #fff; }
.ftr__nav { display: flex; align-items: center; gap: 26px; font-size: 0.9rem; }
.ftr__nav a { color: var(--grey-300); }
.ftr__nav a:hover { color: #fff; }
.ftr__copy { color: var(--grey-600); }

/* ---------- sticky contact bubble ---------- */
.cb {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  display: flex; align-items: center; justify-content: flex-end;
  transition: transform .3s var(--ease-out-expo);
}
.cb__banner {
  position: absolute; right: 72px; bottom: 0; width: 330px;
  background: var(--ink-800); color: #fff; border-radius: var(--radius-md);
  padding: 26px 28px; box-shadow: var(--shadow-dark);
  opacity: 0; transform: translateX(16px); pointer-events: none;
  transition: opacity .3s var(--ease-out-expo), transform .3s var(--ease-out-expo);
}
/* Invisible bridge over the ~12px gap to .cb__btn (72px offset - 60px button width),
   so the pointer never leaves #oh-contact's hoverable subtree while crossing it. */
.cb__banner::after {
  content: ""; position: absolute; top: 0; bottom: 0; right: -14px; width: 16px;
}
.cb.is-open .cb__banner { opacity: 1; transform: translateX(0); pointer-events: auto; }
.cb__h1 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; }
.cb__h2 { margin: 0 0 20px; font-size: 0.95rem; line-height: 1.55; color: var(--grey-300); }
.cb__cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 13px 20px; background: var(--accent); color: #fff;
  border-radius: var(--radius-pill); font-weight: 600; font-size: 0.95rem;
}
.cb__cta:hover { background: var(--accent-hover); color: #fff; }
.cb__or { margin: 16px 0 0; font-size: 0.85rem; color: var(--grey-300); }
.cb__or a { color: #fff; text-decoration: underline; }
.cb__btn {
  width: 60px; height: 60px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(255,0,46,0.4);
}

/* ---------- legal pages ---------- */
.legal { max-width: 820px; margin: 0 auto; padding: 140px var(--gutter) 110px; }
.legal h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.14; color: var(--text-heading); margin: 0 0 48px; }
.legal h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; color: var(--text-heading); margin: 40px 0 10px; }
.legal p { margin: 0; }
.legal__notice { font-size: 0.9rem; color: var(--grey-600); margin: -28px 0 40px !important; }
.legal__notice a { color: inherit; text-decoration: underline; }

/* =========================================================================
   RESPONSIVE
   The prototype was designed desktop-only (1290px). Breakpoints below are a
   pragmatic reduction, not a designed mobile layout — review with Oliver.
   ========================================================================= */
@media (max-width: 1100px) {
  .statements { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hdr__nav .navlink { display: none; }          /* TODO: burger + overlay nav */
  .hero { padding: 120px 0 90px; }
  .hero__h1 { white-space: normal; font-size: clamp(2rem, 7.5vw, 3.4rem); }
  .tk { height: auto; margin-bottom: 72px; }
  .tk-text { font-size: 1.05rem; white-space: normal; }
  .intro, .bio, .projects { padding: 84px var(--gutter); }
  .intro__grid, .bio__grid, .bio__grid--cv { grid-template-columns: 1fr; gap: 36px; }
  .services__grid { grid-template-columns: 1fr; }
  .services { padding: 84px 0; }
  .svc { padding: 32px; }
  .awards__grid { grid-template-columns: 1fr; }
  .statements { grid-template-columns: 1fr; gap: 40px; margin-top: 72px; }
  /* the winding path does not work in one column: stack the stations */
  .path { height: auto; max-width: none; }
  .path__svg { display: none; }
  .station {
    position: static !important; width: auto; text-align: left !important;
    padding: 0 var(--gutter); margin-bottom: 44px; opacity: 1; transform: none;
  }
  .cb__banner { right: 0; bottom: 76px; width: min(330px, calc(100vw - 52px)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .station { opacity: 1 !important; transform: none !important; }
}
