/* ==========================================================================
   Cubeberg — TM1 & IBM Planning Analytics Consulting
   Brand system per "Cubeberg Markenhandbuch, Edition 01":
   Papier/Nebel surfaces (60/30), Marineblau structure (30), Graphit accents (10).
   Archivo (display/body) · Source Serif 4 italic (leads/quotes) · IBM Plex Mono.
   Icons: 24px grid, 1.6px stroke, miter joins, no fill.
   Pure CSS, no build step.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Farbwelt */
  --paper: #F5F6F8;
  --mist: #E9EBEE;
  --graphite: #6E747C;
  --silver: #D5DAE1;
  --navy: #17243A;    /* Marineblau */
  --shadow: #0C1622;
  --g1: #223A5E;      /* dunkle Flanke */
  --g2: #2F4E7A;      /* Tiefsee */
  --g3: #486693;      /* Hang */
  --g4: #6B84AE;      /* Lichtflanke */

  --ink: #17243A;
  --body-c: #39424E;
  --muted: #6E747C;

  --line: rgba(23, 36, 58, 0.12);
  --line-strong: rgba(23, 36, 58, 0.28);
  --silver-line: rgba(213, 218, 225, 0.22);
  --silver-dim: rgba(213, 218, 225, 0.62);

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --pad: clamp(1.25rem, 4vw, 4rem);
  --header-h: 76px;
  --radius: 2px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
}

/* Native smooth scrolling ONLY as a fallback when Lenis is not running */
html.no-lenis { scroll-behavior: smooth; }

/* Lenis recommended styles */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Paper-grain overlay, very subtle */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
strong { color: var(--ink); font-weight: 600; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.serif { font-family: var(--font-serif); font-style: italic; }

::selection { background: var(--silver); color: var(--navy); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--mist); }
::-webkit-scrollbar-thumb { background: var(--graphite); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 3000;
  background: var(--navy);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--g2);
  outline-offset: 3px;
  border-radius: 2px;
}

section { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- Brand mark (inline SVG helpers) ---------- */
.mark { display: block; }
/* Over dark surfaces (hero header state, preloader, footer) */
.mark .f1 { fill: rgba(245, 246, 248, 0.4); }
.mark .f2 { fill: rgba(245, 246, 248, 0.55); }
.mark .f3 { fill: rgba(245, 246, 248, 0.72); }
.mark .f4 { fill: rgba(245, 246, 248, 0.9); }
.mark .cap { fill: var(--silver); }
/* Colored variant on light surfaces */
.mark--color .f1 { fill: var(--g1); }
.mark--color .f2 { fill: var(--g2); }
.mark--color .f3 { fill: var(--g3); }
.mark--color .f4 { fill: var(--g4); }

/* ---------- Icon system (per brand book: 24px grid, 1.6px stroke,
   miter joins, butt caps, no fill, single stroke weight) ---------- */
.icon {
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: miter;
  stroke-linecap: butt;
}
.icon--lg { width: 34px; height: 34px; }

/* ---------- Preloader ---------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: var(--navy);
  display: flex;
  align-items: flex-end;
}
.pre-inner {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: var(--pad);
}
.pre-name {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  letter-spacing: -0.02em;
  color: var(--paper);
}
.pre-count {
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1;
  color: var(--silver);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 var(--pad);
  color: var(--paper);
  transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(245, 246, 248, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  color: var(--ink);
}
/* mark switches to colored ramp on light header */
.site-header.is-scrolled .mark .f1 { fill: var(--g1); }
.site-header.is-scrolled .mark .f2 { fill: var(--g2); }
.site-header.is-scrolled .mark .f3 { fill: var(--g3); }
.site-header.is-scrolled .mark .f4 { fill: var(--g4); }

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.main-nav { display: flex; gap: 2.2rem; }
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0.75;
  position: relative;
  transition: opacity 0.25s;
  padding: 0.4rem 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.main-nav a:hover, .main-nav a.is-active { opacity: 1; }
.main-nav a:hover::after, .main-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-right { display: flex; align-items: center; gap: 1.4rem; }

/* ---------- Profile links (LinkedIn / Xing / e-mail) ---------- */
.social { display: flex; align-items: center; gap: 0.9rem; }
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  opacity: 0.65;
  transition: opacity 0.25s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.social-link svg { width: 18px; height: 18px; display: block; }
.social-link:hover { opacity: 1; transform: translateY(-2px); }
/* Separator between the profile links and the language switcher */
.header-right .social {
  padding-right: 1.4rem;
  border-right: 1px solid currentColor;
  border-right-color: color-mix(in srgb, currentColor 25%, transparent);
  margin-right: -0.4rem;
}
/* In the mobile overlay they sit above the e-mail address */
.social--menu {
  gap: 1.4rem;
  margin-bottom: 0.4rem;
}
.social--menu .social-link { width: 26px; height: 26px; opacity: 0.8; }
.social--menu .social-link svg { width: 22px; height: 22px; }

.lang { display: flex; align-items: center; gap: 0.45rem; }
.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  opacity: 0.6;
  padding: 0.3rem 0.15rem;
  transition: opacity 0.25s;
}
.lang-btn[aria-current="page"] { opacity: 1; font-weight: 500; }
.lang-btn:hover { opacity: 1; }
.lang-sep { opacity: 0.35; font-size: 0.78rem; }

/* ---------- Buttons ---------- */
/* The sweep fill and the hover text colour are set as a pair, so the label
   always contrasts with the fill. They must never both resolve to
   currentColor — that makes the fill track the text and the label vanish. */
.btn {
  --btn-fill: var(--navy);
  --btn-text: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.9rem;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: color 0.35s ease, border-color 0.35s ease;
  isolation: isolate;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-fill);
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:hover::before { transform: translateY(0); }
/* label flips against the incoming sweep */
.btn:hover { color: var(--btn-text); }

/* On dark surfaces the pair inverts: light sweep, dark label */
.hero .btn,
.mobile-menu .btn,
.site-header:not(.is-scrolled) .btn {
  --btn-fill: var(--paper);
  --btn-text: var(--navy);
}

.btn-accent {
  background: var(--silver);
  border-color: var(--silver);
  color: var(--navy);
  --btn-fill: var(--paper);
  --btn-text: var(--navy);
}
.btn-accent:hover { border-color: var(--paper); }

.btn-small { padding: 0.6rem 1.3rem; font-size: 0.85rem; }

/* Buttons carrying a brand glyph — the icon rides with the label colour */
.btn-icon { gap: 0.55rem; }
.btn-icon svg {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  display: block;
}

/* ---------- Mobile menu ---------- */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px; height: 44px;
  align-items: center;
}
.menu-btn span {
  display: block;
  width: 26px; height: 2px;
  background: currentColor;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--navy);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3rem;
  padding: var(--pad);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.55s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 0.55s;
}
.mobile-menu.is-open {
  clip-path: inset(0 0 0% 0);
  visibility: visible;
  transition: clip-path 0.55s cubic-bezier(0.76, 0, 0.24, 1);
}
.mobile-nav { display: flex; flex-direction: column; gap: 0.4rem; }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--paper);
  transition: color 0.25s, transform 0.3s;
}
.mobile-nav a:hover { color: var(--silver); transform: translateX(8px); }
.mobile-menu-foot {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid var(--silver-line);
  padding-top: 1.5rem;
}
.mobile-menu .lang-btn { color: var(--silver-dim); opacity: 1; }
.mobile-menu .lang-btn[aria-current="page"] { color: var(--silver); }
.mobile-mail { color: var(--silver-dim); text-transform: none; letter-spacing: 0.02em; }

/* ---------- Hero (Tannengrün cover) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 3rem) var(--pad) 3.5rem;
  overflow: hidden;
  background: var(--navy);
  color: var(--paper);
}
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--silver-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--silver-line) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.14;
  mask-image: radial-gradient(ellipse 90% 70% at 55% 35%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 55% 35%, black 0%, transparent 75%);
}

/* Generated backdrop — cube massif */
.hero-bg {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
}
.hero-bg img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  /* Massif sits right of the headline column, peak clear of the copy */
  object-position: 34% 72%;
  opacity: 0.92;
  will-change: transform;
}
/* Keeps the headline readable while letting the massif stay visible.
   The imagery is already navy, so only a light scrim is needed. */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23, 36, 58, 0.72) 0%, rgba(23, 36, 58, 0.12) 42%, rgba(23, 36, 58, 0.42) 100%),
    radial-gradient(ellipse 62% 72% at 22% 46%, rgba(12, 22, 34, 0.72) 0%, transparent 70%);
}

.hero-inner {
  position: relative;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  align-items: center;
}
.hero-copy { max-width: 54rem; }

.hero-eyebrow {
  color: var(--graphite);
  margin-bottom: 2.2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 8.5vw, 7.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 1.8rem;
  color: var(--paper);
}
.ht-line { display: block; overflow: hidden; padding-bottom: 0.07em; margin-bottom: -0.02em; }
.ht-outline { color: var(--silver); }

/* word-split spans (created by JS) */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.07em; margin-bottom: -0.07em; }
.split .wi { display: inline-block; will-change: transform; }

.hero-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.5;
  color: var(--graphite);
  max-width: 36rem;
  margin-bottom: 1.6rem;
}

.hero-sub {
  max-width: 36rem;
  color: var(--silver-dim);
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  margin-bottom: 2.6rem;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.2rem; }

.hero-avail {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--graphite);
}
.avail-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--silver);
  box-shadow: 0 0 0 0 rgba(213, 218, 225, 0.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(213, 218, 225, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(213, 218, 225, 0); }
  100% { box-shadow: 0 0 0 0 rgba(213, 218, 225, 0); }
}

.hero-foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding-top: 1.6rem;
  border-top: 1px solid var(--silver-line);
}
.hero-foot-left { display: flex; align-items: center; gap: 1rem; }
.scroll-hint { color: var(--silver-dim); }
.scroll-line {
  flex: 0 0 64px;
  height: 1px;
  background: var(--silver-line);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--silver);
  animation: scrollLine 2.4s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}
@keyframes scrollLine {
  0% { transform: translateX(-100%); }
  55% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}
.hero-foot-meta {
  color: var(--silver-dim);
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: right;
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.1rem 0;
  background: var(--mist);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee-chunk { color: var(--muted); white-space: nowrap; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sections base ---------- */
.section {
  padding: clamp(5rem, 11vw, 9rem) var(--pad);
  max-width: 1400px;
  margin: 0 auto;
}

.kicker {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  color: var(--muted);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.kicker-dot {
  width: 8px; height: 8px;
  background: var(--g2);
  flex: none;
  align-self: center;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 1.8rem;
  color: var(--ink);
}
.section-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head .section-title { margin-bottom: 0; }
.section-sub { color: var(--body-c); max-width: 30rem; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) var(--pad);
  gap: 2rem;
}
.stat {
  border-left: 1px solid var(--line);
  padding-left: 1.4rem;
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
  color: var(--ink);
}
.stat-plus { color: var(--g3); }
.stat-label { color: var(--body-c); font-size: 0.92rem; display: block; max-width: 15rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.about-copy p { color: var(--body-c); margin-bottom: 1.4rem; max-width: 36rem; }
.about-copy p.lead-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.45;
  color: var(--g2);
  margin-bottom: 1.8rem;
}

/* Image reveal frame — clip-path animated by JS */
.img-reveal {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.img-reveal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.about-photo {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  margin: 0;
  background: var(--mist);
}
.about-photo figcaption {
  position: absolute;
  bottom: 1.1rem; left: 1.2rem;
  color: var(--navy);
  background: rgba(245, 246, 248, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.9rem;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem 2rem;
  margin-top: 2.6rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.fact dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.fact dd { color: var(--ink); font-size: 0.98rem; font-weight: 500; }

/* ---------- Services ---------- */
.svc-list { border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }

.svc-head {
  display: grid;
  grid-template-columns: 4.2rem 1fr 3rem;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: clamp(1.4rem, 3vw, 2.1rem) 0;
  text-align: left;
  transition: padding-left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-head:hover { padding-left: 1rem; }

.svc-num { color: var(--g2); font-weight: 500; }
.svc-title {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 1.6vw, 1.1rem);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  transition: color 0.3s;
}
.svc-title .icon {
  color: var(--g3);
  transition: color 0.3s, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-head:hover .svc-title { color: var(--g2); }
.svc-head:hover .svc-title .icon { color: var(--g2); transform: translateY(-2px); }
.svc-head[aria-expanded="true"] .svc-title .icon { color: var(--navy); }
@media (max-width: 640px) {
  .svc-title .icon { width: 20px; height: 20px; }
}

.svc-icon {
  position: relative;
  width: 30px; height: 30px;
  justify-self: end;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color 0.3s, background 0.3s, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-icon::before, .svc-icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: var(--ink);
  transition: background 0.3s;
}
.svc-icon::before { width: 12px; height: 1.5px; transform: translate(-50%, -50%); }
.svc-icon::after  { width: 1.5px; height: 12px; transform: translate(-50%, -50%); }
.svc-head[aria-expanded="true"] .svc-icon { transform: rotate(135deg); background: var(--navy); border-color: var(--navy); }
.svc-head[aria-expanded="true"] .svc-icon::before,
.svc-head[aria-expanded="true"] .svc-icon::after { background: var(--silver); }

.svc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-body-inner {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(200px, 22vw, 300px);
  grid-template-rows: auto auto;
  column-gap: clamp(1.5rem, 3.5vw, 4rem);
  align-items: start;
}
/* Expanded service copy is the reading text of the page — set a step above
   the 16px base so it stays comfortable on large screens. */
.svc-body-inner p {
  grid-column: 1;
  color: var(--body-c);
  font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.15rem);
  line-height: 1.75;
  max-width: 40rem;
  padding: 0 0 1.4rem 5.2rem;
}
.svc-body-inner .svc-tags {
  grid-column: 1;
  color: var(--g2);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  padding-bottom: 2rem;
}
.svc.is-open .svc-body { grid-template-rows: 1fr; }

/* Small service image on the right of the expanded body (injected by JS) */
.svc-img {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 1.6rem;
}
@media (max-width: 640px) {
  .svc-body-inner { grid-template-columns: 1fr; }
  .svc-img {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    width: min(320px, calc(100% - 3.6rem));
    margin: 0 0 1.4rem 3.6rem;
  }
}

/* ---------- Approach ---------- */
.approach {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
  background: var(--mist);
}
.apr-head {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.apr-wrap {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  padding: 0 var(--pad);
}
.apr-track {
  display: flex;
  gap: clamp(1.2rem, 2.5vw, 2rem);
  width: max-content;
  will-change: transform;
}
.apr-card {
  width: min(420px, 78vw);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 320px;
  transition: border-color 0.35s, transform 0.35s;
}
.apr-card:hover { border-color: var(--line-strong); transform: translateY(-6px); }
.apr-num {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--graphite);
  line-height: 1;
  font-weight: 500;
}
.apr-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.02em;
  margin-top: auto;
  color: var(--ink);
}
.apr-card p { color: var(--body-c); font-size: 1.02rem; line-height: 1.7; }

/* Below the pinned-scroll breakpoint the horizontal track has no way to
   scroll, so the steps stack instead — all four stay reachable. */
@media (max-width: 1024px) {
  .apr-wrap { margin-top: clamp(1.6rem, 4vw, 2.4rem); }
  .apr-track {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }
  .apr-card {
    width: 100%;
    min-height: 0;
    gap: 0.5rem;
    padding: 1.5rem 1.4rem 1.6rem;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1.1rem;
    align-items: baseline;
  }
  .apr-num { grid-row: 1 / span 2; font-size: 1.6rem; }
  .apr-card h3 { margin-top: 0; font-size: 1.25rem; }
  .apr-card p { grid-column: 2; }
}

/* ---------- Quote (Tannengrün statement block) ---------- */
.quote {
  position: relative;
  overflow: hidden;
  min-height: 74vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(7rem, 16vw, 13rem) var(--pad);
  background: var(--navy);
}
.quote-bg {
  position: absolute;
  inset: -14% 0;
  pointer-events: none;
}
.quote-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Navy imagery on a navy section — needs near-full opacity to read at all */
  opacity: 0.95;
  will-change: transform;
}
.quote-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--navy) 0%, rgba(23, 36, 58, 0.15) 26%, rgba(23, 36, 58, 0.15) 74%, var(--navy) 100%),
    radial-gradient(ellipse 70% 42% at 50% 52%, rgba(12, 22, 34, 0.55) 0%, transparent 78%);
}
.quote-mark {
  position: absolute;
  right: -70px; top: -90px;
  opacity: 0.1;
  pointer-events: none;
}
.quote-text {
  position: relative;
  max-width: 1000px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.8rem, 4.6vw, 3.6rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--paper) 50%, rgba(245, 246, 248, 0.18) 50%);
  background-size: 220% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.quote-attr {
  position: relative;
  margin-top: 1.8rem;
  color: var(--graphite);
}

/* ---------- Toolbox ---------- */
/* Needs its own breathing room — it follows the full-bleed quote image */
.stack { padding-top: clamp(3.5rem, 8vw, 6rem); }
.chips { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.chip {
  color: var(--body-c);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 1.1rem;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.chip:hover {
  color: var(--paper);
  background: var(--navy);
  border-color: var(--navy);
}

/* ---------- Contact ---------- */
.contact-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.2rem, 10.5vw, 9rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 2rem;
  color: var(--ink);
}
.contact-sub { color: var(--body-c); max-width: 34rem; margin-bottom: 3rem; }

.contact-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 2rem;
}
/* E-mail and phone are equal contact channels — same type, same treatment */
.contact-mail,
.contact-phone {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 3.2vw, 2.2rem);
  letter-spacing: -0.02em;
}
.contact-mail {
  color: var(--g2);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.2rem;
  transition: color 0.3s, border-color 0.3s;
  overflow-wrap: anywhere;
}
.contact-mail:hover { color: var(--navy); border-color: var(--navy); }

.copy-chip {
  color: var(--body-c);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.5rem 1.1rem;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.copy-chip:hover { color: var(--paper); background: var(--navy); border-color: var(--navy); }

.contact-phone {
  margin: -1.2rem 0 2rem;
}
.contact-phone a {
  color: var(--g2);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.2rem;
  transition: color 0.3s, border-color 0.3s;
  white-space: nowrap;
}
.contact-phone a:hover { color: var(--navy); border-color: var(--navy); }

.contact-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--ink);
}
.contact-loc { color: var(--muted); }

/* ---------- References (clients + partner) ---------- */
.refs {
  background: var(--navy);
  color: var(--silver-dim);
  padding: clamp(3rem, 7vw, 5rem) var(--pad) 0;
}
.refs-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  border-top: 1px solid var(--silver-line);
  padding-top: clamp(1.8rem, 3.5vw, 2.6rem);
}
.refs-label {
  display: block;
  color: rgba(213, 218, 225, 0.5);
  margin-bottom: 1.1rem;
}
.refs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.7rem clamp(1.2rem, 2.4vw, 2.2rem);
}
.refs-list li {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(0.95rem, 1.45vw, 1.2rem);
  letter-spacing: -0.01em;
  color: var(--silver);
  white-space: nowrap;
}
/* Partner is a relationship, not a client — set apart by a rule */
.refs-group--partner {
  border-left: 1px solid var(--silver-line);
  padding-left: clamp(2rem, 4vw, 3.5rem);
}
@media (max-width: 760px) {
  .refs-inner { grid-template-columns: 1fr; gap: 2rem; }
  .refs-group--partner {
    border-left: 0;
    border-top: 1px solid var(--silver-line);
    padding-left: 0;
    padding-top: 1.6rem;
  }
}

/* ---------- Giant footer wordmark + footer (Marineblau) ---------- */
.footer-word-wrap {
  overflow: hidden;
  background: var(--navy);
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(1rem, 3vw, 2rem);
}
.footer-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.8rem, 14vw, 13.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px rgba(213, 218, 225, 0.35);
  user-select: none;
  pointer-events: none;
  will-change: transform;
}

.site-footer {
  background: var(--navy);
  color: var(--silver-dim);
  padding: 2.2rem var(--pad) 2.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.site-footer > div {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.footer-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  border-top: 1px solid var(--silver-line);
  padding-top: 1.6rem;
}
.footer-top .mono { color: var(--silver-dim); }
.footer-role { font-size: 0.92rem; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a {
  font-size: 0.9rem;
  transition: color 0.25s;
}
.footer-legal a:hover { color: var(--paper); }
.footer-geo { color: rgba(213, 218, 225, 0.35); }
.to-top { color: var(--silver-dim); transition: color 0.25s; }
.to-top:hover { color: var(--silver); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translate(-50%, calc(100% + 2.5rem));
  z-index: 3000;
  visibility: hidden;
  background: var(--navy);
  color: var(--silver);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.45s;
  pointer-events: none;
}
.toast.is-visible {
  transform: translate(-50%, 0);
  visibility: visible;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Legal page ---------- */
.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) var(--pad) 5rem;
}
.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.03em;
  margin-bottom: 2.5rem;
  color: var(--ink);
}
.legal-page h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin: 2.8rem 0 1rem;
  color: var(--ink);
}
.legal-page p { color: var(--body-c); margin-bottom: 1rem; }
.legal-page p a {
  color: var(--g2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-page p a:hover { color: var(--navy); }
.legal-page .todo {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  color: var(--g2);
  font-size: 0.9rem;
  margin: 1rem 0;
}
.back-link {
  display: inline-flex;
  gap: 0.5rem;
  color: var(--muted);
  margin-bottom: 3rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.25s;
}
.back-link:hover { color: var(--g2); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .menu-btn { display: flex; }
  .header-right .btn { display: none; }
  .header-right .lang { display: none; }
  /* Profile links move into the mobile overlay */
  .header-right .social { display: none; }

  .hero { padding-top: calc(var(--header-h) + 1.5rem); }
  .hero-bg img { object-position: 55% 78%; opacity: 0.8; }
  .hero-foot-meta { display: none; }

  .section-head { grid-template-columns: 1fr; align-items: start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 420px; }
}

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 1.6rem 1rem; }
  .facts { grid-template-columns: 1fr; }
  .svc-head { grid-template-columns: 2.6rem 1fr 2.4rem; }
  .svc-body-inner p, .svc-body-inner .svc-tags { padding-left: 3.6rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  /* Keep the copy button beside the address: tighten the gap and the type
     so both fit the 350px content width instead of wrapping. */
  .contact-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.7rem;
  }
  /* Phone follows the address down so the two stay the same size */
  .contact-mail,
  .contact-phone {
    font-size: clamp(0.95rem, 4.2vw, 1.25rem);
  }
  .contact-mail { min-width: 0; }
  .copy-chip { flex: none; padding: 0.45rem 0.85rem; }
}

/* Under ~340px the address would have to break mid-string to share the row,
   so the button goes back below it. */
@media (max-width: 340px) {
  .contact-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .marquee-track { animation: none; transform: none; }
  .scroll-line::after { animation: none; }
  .avail-dot { animation: none; }
}
