/* Layout: "Meridian" – Hamburg und Kapstadt liegen fast auf demselben Längengrad.
   Eine senkrechte Meridianlinie trägt den Hero; der Rest der Seite bleibt ruhig und typografisch. */

@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('fonts/BricolageGrotesque-normal-400_800.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/AtkinsonHyperlegible-normal-400.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/AtkinsonHyperlegible-italic-400.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/AtkinsonHyperlegible-normal-700.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/IBMPlexMono-normal-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/IBMPlexMono-normal-500.woff2') format('woff2'); }

:root {
  --paper: #f2f6f6;
  --paper-2: #e6eff0;
  --ink: #0b2730;
  --muted: #4b6770;
  --rule: #c9dbde;
  --teal: #00728a;      /* Akzent für Text/Links auf hellem Grund */
  --cyan: #18bfdc;      /* Markenfarbe aus dem Logo, für Flächen und Marker */
  --signal: #d9301f;    /* nur für Kapstadt */
  --panel: #0b2730;
  --panel-ink: #e9f3f4;
  --panel-muted: #9db7bd;

  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 3.4vw, 2.6rem);
  --step-4: clamp(2.5rem, 6.2vw, 4.6rem);

  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #091c22; --paper-2: #0e262d; --ink: #e4eff1; --muted: #93aeb5; --rule: #1f3d46;
    --teal: #4fd0e8; --cyan: #18bfdc; --signal: #ff5b47;
    --panel: #12313a; --panel-ink: #e9f3f4; --panel-muted: #a3bcc2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #091c22; --paper-2: #0e262d; --ink: #e4eff1; --muted: #93aeb5; --rule: #1f3d46;
  --teal: #4fd0e8; --cyan: #18bfdc; --signal: #ff5b47;
  --panel: #12313a; --panel-ink: #e9f3f4; --panel-muted: #a3bcc2;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Zweisprachigkeit: html[lang] steuert, welche Sprache sichtbar ist */
html[lang="de"] [lang="en"]:not(html) { display: none !important; }
html[lang="en"] [lang="de"]:not(html) { display: none !important; }

a { color: var(--teal); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

.mono { font-family: var(--f-mono); font-size: var(--step--1); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.label { font-family: var(--f-mono); font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }

/* Kopfzeile */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; }
.brand svg { width: 36px; height: 25px; flex: none; }
.brand small { font-weight: 500; color: var(--muted); font-size: .95rem; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--ink); }
.lang { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; }
.lang button { font: 500 .75rem/1 var(--f-mono); letter-spacing: .08em; border: 0; border-radius: 999px; background: transparent; color: var(--muted); padding: 7px 11px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Hero */
.hero { padding-block: clamp(56px, 8vw, 104px) clamp(56px, 7vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero h1 { font-size: var(--step-4); line-height: 1.02; font-weight: 750; letter-spacing: -.035em; margin-block: 18px 26px; font-variation-settings: "opsz" 96; }
.hero h1 .accent { color: var(--teal); }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 54ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-body); font-weight: 700; font-size: 1rem; text-decoration: none; padding: 14px 22px; border-radius: 8px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); transition: transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--ink); }
.btn .arrow { font-family: var(--f-mono); }

/* Meridian-Grafik */
.meridian { width: 100%; max-width: 330px; justify-self: end; }
.meridian svg { display: block; width: 100%; height: auto; overflow: visible; }
.meridian .line { stroke: var(--ink); stroke-width: 1.5; }
.meridian .tick { stroke: var(--muted); stroke-width: 1; }
.meridian .eq { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
.meridian text { font-family: var(--f-mono); font-size: 11px; fill: var(--muted); }
.meridian .city { font-family: var(--f-display); font-size: 19px; font-weight: 700; fill: var(--ink); letter-spacing: -.01em; }
.meridian .hh { fill: var(--cyan); }
.meridian .ct { fill: var(--signal); }
.meridian .ring { fill: none; stroke-width: 1.5; }
.meridian .ring.hh { stroke: var(--cyan); }
.meridian .ring.ct { stroke: var(--signal); }
.meridian .span { stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 520; stroke-dashoffset: 0; animation: draw 1.6s ease-out .2s both; }
.meridian .dist { font-family: var(--f-mono); font-size: 12px; font-weight: 500; fill: var(--teal); }
@keyframes draw { from { stroke-dashoffset: 520; } to { stroke-dashoffset: 0; } }

/* Abschnitte */
.section { scroll-margin-top: 68px; padding-block: clamp(64px, 8vw, 104px); border-top: 1px solid var(--rule); }
.section.alt { background: var(--paper-2); }
.head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.head h2 { font-size: var(--step-3); line-height: 1.1; margin-top: 12px; }
.head p { color: var(--muted); max-width: 52ch; }

/* Bildband und Diptychon */
.band { margin: 0; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); padding-bottom: clamp(56px, 7vw, 88px); }
.band img { display: block; width: 100%; height: auto; max-width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: 50% 40%; border-radius: 12px; }
.diptych { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: clamp(16px, 3vw, 32px); }
.diptych figure { margin: 0; display: grid; gap: 10px; }
.diptych img { display: block; width: 100%; height: auto; max-width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.diptych figcaption { color: var(--muted); }
.diptych .pin { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }

/* Leistungen */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; }
.service { padding-block: 28px; border-top: 1px solid var(--rule); display: grid; gap: 10px; }
.service h3 { font-size: var(--step-2); line-height: 1.15; }
.service p { color: var(--muted); max-width: 48ch; }
.service .mono { color: var(--teal); }

/* Ablauf: echte Reihenfolge, daher nummeriert */
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: phase; }
.phases li { counter-increment: phase; display: grid; gap: 10px; align-content: start; position: relative; padding-top: 26px; }
.phases li::before { content: ""; position: absolute; top: 0; left: 0; right: -28px; height: 1px; background: var(--rule); }
.phases li:last-child::before { right: 0; }
.phases li::after { content: ""; position: absolute; top: -5px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--teal); }
.phases .mono { color: var(--teal); }
.phases .mono::before { content: "Phase " counter(phase); }
html[lang="en"] .phases .mono::before { content: "Phase " counter(phase); }
.phases h3 { font-size: var(--step-1); }
.phases p { color: var(--muted); font-size: 1rem; }

/* International */
.intl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.intl h2 { font-size: var(--step-3); line-height: 1.1; margin-block: 12px 18px; }
.intl .text p + p { margin-top: 14px; }
.intl .text p { color: var(--muted); max-width: 54ch; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.fact { padding: 22px; display: grid; gap: 6px; align-content: start; }
.fact:nth-child(odd) { border-right: 1px solid var(--rule); }
.fact:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
.fact strong { font-family: var(--f-display); font-size: var(--step-2); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fact > span:not(.mono) { color: var(--muted); font-size: .95rem; }
.fact .mono { color: var(--muted); }
.fact .pin { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 2px; }
.pin.hh { background: var(--cyan); }
.pin.ct { background: var(--signal); }

/* Referenzprojekte */
.product { background: var(--panel); color: var(--panel-ink); border-radius: 14px; padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 40px; }
.product-head { grid-column: 1 / -1; display: grid; gap: 10px; }
.product .label { color: var(--cyan); }
.product h2 { font-size: var(--step-3); color: var(--panel-ink); }
.product-head p { color: var(--panel-muted); max-width: 58ch; }
.group { display: grid; gap: 4px; align-content: start; min-width: 0; }
.group h3 { font-family: var(--f-mono); font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--panel-muted); padding-bottom: 12px; border-bottom: 1px solid color-mix(in srgb, var(--panel-ink) 18%, transparent); }
.group-list { display: grid; }
.proj { display: grid; gap: 6px; padding-block: 16px; text-decoration: none; color: var(--panel-ink); border-bottom: 1px solid color-mix(in srgb, var(--panel-ink) 10%, transparent); }
.proj:last-child { border-bottom: 0; }
.proj-name { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.proj-name .arrow { font-family: var(--f-mono); font-size: .9rem; color: var(--cyan); transition: transform .15s ease; display: inline-block; }
.proj:hover .proj-name { color: var(--cyan); }
.proj:hover .arrow { transform: translate(2px, -2px); }
.proj-text { color: var(--panel-muted); font-size: .95rem; line-height: 1.5; }
.proj:focus-visible { outline-color: var(--cyan); }

/* Kontakt */
.contact .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }
.contact h2 { font-size: var(--step-3); line-height: 1.1; margin-block: 12px 16px; }
.contact p { color: var(--muted); max-width: 50ch; }
.mail { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.4rem); letter-spacing: -.02em; color: var(--ink); text-decoration: none; border-bottom: 3px solid var(--cyan); overflow-wrap: anywhere; justify-self: start; }
.mail:hover { color: var(--teal); }

/* Fußzeile */
footer { border-top: 1px solid var(--rule); padding-block: 28px; font-size: .9rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer nav { display: flex; gap: 20px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Rechtstexte */
.legal { padding-block: 56px 88px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 8px; }
.legal h2 { font-size: 1.25rem; margin: 36px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 12px; }
.back { display: inline-block; margin-bottom: 28px; text-decoration: none; font-family: var(--f-mono); font-size: .85rem; }

@media (max-width: 900px) {
  .hero .wrap, .head, .intl, .contact .wrap, .product { grid-template-columns: minmax(0, 1fr); }
  .meridian { justify-self: start; max-width: 300px; }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phases li:nth-child(2)::before { right: 0; }
}
@media (max-width: 640px) {
  .nav a { display: none; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .phases { grid-template-columns: minmax(0, 1fr); }
  .phases li::before { right: 0; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .diptych { grid-template-columns: minmax(0, 1fr); }
  .band img { aspect-ratio: 4 / 3; }
  .fact:nth-child(odd) { border-right: 0; }
  .fact:not(:last-child) { border-bottom: 1px solid var(--rule); }
}
