/* ==========================================================================
   EDService – Hauptwebsite
   Static stylesheet · no framework · no external requests
   ========================================================================== */

/* ---------- Font (self-hosted, SIL OFL – see assets/fonts/OFL-Inter.txt) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-wght.woff2") format("woff2-variations"),
       url("../assets/fonts/inter-latin-wght.woff2") format("woff2");
}

/* ---------- Design tokens */
:root {
  /* Brand colours – red derived from the canonical logo */
  --c-red: #b5000f;
  --c-red-deep: #8c000b;
  --c-red-bright: #e1061b;

  --c-bg: #f7f5f1;            /* Warm White */
  --c-surface: #ffffff;
  --c-surface-2: #efece6;
  --c-ink: #141414;           /* Near Black */
  --c-ink-2: #2b2e32;
  --c-charcoal: #1c1f22;      /* Deep Charcoal */
  --c-charcoal-2: #24282c;
  --c-charcoal-3: #2e3338;
  --c-grey: #63666a;          /* Neutral Grey */
  --c-line: #dcd7cf;
  --c-line-strong: #c9c3b9;
  --c-on-dark: #f3f1ed;
  --c-on-dark-muted: #a9adb2;
  --c-line-dark: rgba(255, 255, 255, 0.12);

  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --container: 1240px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-h: 72px;
  --radius: 4px;
  --section-pad: clamp(4.5rem, 9vw, 8.5rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-sm: 0 1px 2px rgba(20, 20, 20, 0.06);
  --shadow-md: 0 18px 40px -24px rgba(20, 20, 20, 0.35);
}

@media (min-width: 1080px) {
  :root { --header-h: 84px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* clip (not hidden) keeps position: sticky working */
}

html.nav-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
  text-wrap: balance;
}

p { margin: 0; }
p, li, dd { overflow-wrap: break-word; hyphens: auto; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

strong { font-weight: 650; }

:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 3px;
  border-radius: 2px;
}

.on-dark :focus-visible { outline-color: #ffffff; }

::selection { background: var(--c-red); color: #fff; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--c-ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* ---------- Typography helpers */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-grey);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--c-red);
  flex: none;
}
.eyebrow-num { color: var(--c-red); font-variant-numeric: tabular-nums; }
.on-dark .eyebrow { color: var(--c-on-dark-muted); }
.on-dark .eyebrow-num { color: #ff4a55; }

.section-title {
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  color: var(--c-ink-2);
  max-width: 38em;
}
.on-dark .lead { color: var(--c-on-dark-muted); }

.text-red { color: var(--c-red); }

/* ---------- Buttons */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--c-ink);
  --btn-bd: var(--c-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0.85rem 1.5rem;
  border: 1.5px solid var(--btn-bd);
  border-radius: 2px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 0.9875rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn-primary { --btn-bg: var(--c-red); --btn-fg: #fff; --btn-bd: var(--c-red); }
.btn-primary:hover { --btn-bg: var(--c-red-deep); --btn-bd: var(--c-red-deep); }

.btn-ghost:hover { --btn-bg: var(--c-ink); --btn-fg: #fff; }

.btn-light { --btn-bg: #fff; --btn-fg: var(--c-ink); --btn-bd: #fff; }
.btn-light:hover { --btn-bg: var(--c-surface-2); --btn-bd: var(--c-surface-2); }

.btn-outline-light { --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, 0.45); }
.btn-outline-light:hover { --btn-bg: #fff; --btn-fg: var(--c-ink); --btn-bd: #fff; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
/* Background + blur live on a pseudo layer: a backdrop-filter on the header itself
   would become the containing block of the fixed mobile menu and clip it. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247, 245, 241, 0.94);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header::before { backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
}
.site-header.is-scrolled {
  border-bottom-color: var(--c-line);
  box-shadow: 0 6px 24px -18px rgba(20, 20, 20, 0.35);
}
html.nav-open .site-header::before { background: var(--c-bg); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand {
  display: block;
  flex: none;
  line-height: 0;
  border-radius: 2px;
}
.brand img {
  width: auto;
  height: 48px;
}
@media (min-width: 1080px) {
  .brand img { height: 56px; }
}

.nav { display: flex; align-items: center; }

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 550;
  color: var(--c-ink-2);
  transition: color 0.2s var(--ease);
}
.nav-list a:hover,
.nav-list a[aria-current] { color: var(--c-ink); }

.nav-toggle {
  display: none;
  position: relative;
  width: 48px;
  height: 48px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-ink);
  cursor: pointer;
  border-radius: 2px;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 13px;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease), top 0.25s var(--ease);
}
.nav-toggle-bars { top: 23px; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* Desktop navigation */
@media (min-width: 1080px) {
  .nav { gap: clamp(1.5rem, 2.4vw, 2.5rem); }
  .nav-list { display: flex; align-items: center; gap: clamp(1.1rem, 1.8vw, 1.9rem); }
  .nav-list a {
    height: var(--header-h);
    font-size: 0.9375rem;
  }
  .nav-list a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 22px;
    height: 2px;
    background: var(--c-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
  }
  .nav-list a:hover::after,
  .nav-list a[aria-current]::after { transform: scaleX(1); }
  .nav-cta { min-height: 46px; padding: 0.7rem 1.2rem; font-size: 0.9375rem; }
}

/* Mobile navigation (only when JS is available) */
@media (max-width: 1079.98px) {
  .js .nav-toggle { display: inline-block; }

  .js .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem var(--gutter) max(2rem, env(safe-area-inset-bottom));
    background: var(--c-bg);
    border-top: 1px solid var(--c-line);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s linear 0.22s;
  }
  .js .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s;
  }
  .nav-list { display: flex; flex-direction: column; }
  .nav-list li { border-bottom: 1px solid var(--c-line); }
  .nav-list a {
    width: 100%;
    min-height: 60px;
    font-size: clamp(1.25rem, 1rem + 1.6vw, 1.6rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--c-ink);
  }
  .nav-list a[aria-current] { color: var(--c-red); }
  .nav-cta { width: 100%; }

  /* no-JS fallback: simple wrapped navigation below the logo */
  html:not(.js) .header-inner { height: auto; flex-wrap: wrap; padding-block: 0.75rem; }
  html:not(.js) .nav { width: 100%; flex-wrap: wrap; gap: 1rem; }
  html:not(.js) .nav-list { flex-direction: row; flex-wrap: wrap; gap: 0 1.25rem; }
  html:not(.js) .nav-list li { border: 0; }
  html:not(.js) .nav-list a { min-height: 44px; font-size: 1rem; }
  html:not(.js) .nav-cta { width: auto; }
}

/* ==========================================================================
   Media frames (illustrations / future photos)
   ========================================================================== */
.media { margin: 0; }
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--c-charcoal);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  aspect-ratio: 5 / 4;
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media.is-fallback img { visibility: hidden; }
.media-caption {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  color: var(--c-grey);
  font-size: 0.75rem;
  font-weight: 550;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
}
.media-caption::before {
  content: "";
  width: 16px;
  height: 1px;
  background: currentColor;
  flex: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(3.5rem, 7vw, 6.5rem);
  overflow: hidden;
}
.hero::before {
  /* fine technical grid, fading out */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(20, 20, 20, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 20, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.hero-title {
  font-size: clamp(1.5rem, 0.3rem + 7.4vw, 4.75rem);
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: initial;
}
.hero-title > span { display: block; }
.hero-title .dot { display: inline; color: var(--c-red); }

.hero-lead {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 34em;
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.6;
  color: var(--c-ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-line);
  font-size: 0.875rem;
  color: var(--c-grey);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-meta svg { width: 16px; height: 16px; color: var(--c-red); flex: none; }

.media--hero .media-frame { box-shadow: var(--shadow-md); }

@media (max-width: 479.98px) {
  .hero-actions .btn { width: 100%; }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
  .hero-title { font-size: clamp(2.9rem, 0.6rem + 4.1vw, 4.75rem); }
}

/* ==========================================================================
   Value strip
   ========================================================================== */
.values {
  background: var(--c-surface);
  border-block: 1px solid var(--c-line);
}
.values-grid { display: grid; }
.value {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding-block: 1.75rem;
}
.value + .value { border-top: 1px solid var(--c-line); }
.value-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--c-line-strong);
  border-radius: 2px;
  color: var(--c-red);
}
.value-icon svg { width: 24px; height: 24px; }
.value-title { font-size: 1.125rem; letter-spacing: -0.015em; margin-bottom: 0.35rem; }
.value p { font-size: 0.9375rem; line-height: 1.55; color: var(--c-grey); }

@media (min-width: 860px) {
  .values-grid { grid-template-columns: repeat(3, 1fr); }
  .value { padding: 2.25rem 2rem; }
  .value:first-child { padding-left: 0; }
  .value:last-child { padding-right: 0; }
  .value + .value { border-top: 0; border-left: 1px solid var(--c-line); }
}

/* ==========================================================================
   Sections – shared
   ========================================================================== */
.section { padding-block: var(--section-pad); }
.section--surface { background: var(--c-surface); }
.section--tint { background: var(--c-surface-2); }

.section-head { display: grid; gap: 1.5rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .lead { align-self: end; }

@media (min-width: 960px) {
  .section-head--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 4rem; align-items: end; }
}

/* Phase 2.1 fix: in the two-column head (960–1159 px) the column is too narrow for the
   single word "Photovoltaikprojekte" at the default size → scale with the column so it never breaks mid-word. */
@media (min-width: 960px) and (max-width: 1159.98px) {
  #pv-title { font-size: min(3.6rem, calc(5.6vw - 0.5rem)); }
}

/* ---------- Check list */
.check-list { display: grid; gap: 0; }
.check-list li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.9rem;
  border-bottom: 1px solid var(--c-line);
  font-size: 0.9875rem;
  line-height: 1.45;
}
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--c-red);
  border-bottom: 2px solid var(--c-red);
  transform: rotate(-45deg);
}
.check-list .is-coordinated { color: var(--c-ink-2); }
.check-list .tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--c-line-strong);
  border-radius: 2px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-grey);
  white-space: nowrap;
  vertical-align: 0.1em;
}

/* ---------- Notice */
.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: 1.5rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-red);
  border-radius: 2px;
}
.notice svg { width: 22px; height: 22px; color: var(--c-red); margin-top: 0.15rem; }
.notice p { font-size: 0.9875rem; line-height: 1.6; color: var(--c-ink-2); }
.notice strong { display: block; margin-bottom: 0.2rem; color: var(--c-ink); }

/* ==========================================================================
   Photovoltaik
   ========================================================================== */
.section--pv { position: relative; }
.pv-layout { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.pv-groups { display: grid; gap: 1rem; }
.pv-group {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}
.pv-group h3 {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
}
.pv-group h3 span {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--c-red);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 700px) {
  .pv-group .check-list { grid-template-columns: 1fr 1fr; column-gap: 1.75rem; }
  .pv-group .check-list li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}

@media (min-width: 1080px) {
  .pv-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pv-layout .media { position: sticky; top: calc(var(--header-h) + 1.5rem); }
  .pv-group .check-list { grid-template-columns: 1fr; }
  .pv-group .check-list li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--c-line); }
}

/* ==========================================================================
   Bau & Montage
   ========================================================================== */
.bau-layout { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }

.service-grid {
  display: grid;
  border-top: 1px solid var(--c-line);
}
.service-item {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0.25rem 0.75rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--c-line);
}
.service-num {
  grid-row: span 2;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c-red);
  font-variant-numeric: tabular-nums;
  padding-top: 0.2rem;
}
.service-item h3 { font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.3; }
.service-item p { font-size: 0.9375rem; line-height: 1.55; color: var(--c-grey); }

@media (min-width: 700px) {
  .service-grid { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
}

@media (min-width: 1080px) {
  .bau-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  .bau-layout .media { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

/* ==========================================================================
   Projektkoordination
   ========================================================================== */
.coord-layout { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: start; }

.coord-text p + p { margin-top: 1rem; }
.coord-title { font-size: clamp(2rem, 1.1rem + 3vw, 3.25rem); text-wrap: initial; }
.coord-title span { display: block; }
.coord-text .lead { margin-bottom: 1.25rem; }

/* Hub diagram */
.hub {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}
.hub-node {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  background: var(--c-bg);
  border: 1px solid var(--c-line-strong);
  border-radius: 2px;
  font-size: 0.9875rem;
  font-weight: 600;
  line-height: 1.3;
}
.hub-node small {
  display: block;
  font-size: 0.8125rem;
  font-weight: 450;
  color: var(--c-grey);
}
.hub-node svg { width: 22px; height: 22px; flex: none; color: var(--c-red); }
.hub-center {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 1.25rem 1.25rem;
  background: var(--c-charcoal);
  border-color: var(--c-charcoal);
  color: #fff;
}
.hub-center .hub-kicker {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff6b74;
}
.hub-center strong { font-size: 1.25rem; letter-spacing: -0.02em; }
.hub-center small { color: var(--c-on-dark-muted); }

/* mobile: vertical spine */
.hub::before {
  content: "";
  position: absolute;
  left: calc(clamp(1.25rem, 3vw, 2rem) + 21px);
  top: 2rem; bottom: 2rem;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--c-red) 0 6px, transparent 6px 12px);
  opacity: 0.55;
}

@media (min-width: 640px) {
  .hub {
    grid-template-columns: 1fr 1.15fr 1fr;
    grid-template-areas:
      ".      top    ."
      "left   center right"
      ".      bottom .";
    gap: 1.5rem 1.25rem;
    align-items: center;
  }
  .hub::before {
    left: 50%; top: 2.5rem; bottom: 2.5rem;
    transform: translateX(-1px);
  }
  .hub::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 2.5rem; right: 2.5rem;
    height: 2px;
    background: repeating-linear-gradient(to right, var(--c-red) 0 6px, transparent 6px 12px);
    opacity: 0.55;
  }
  .hub-node { flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; }
  .hub-center { align-items: center; text-align: center; min-height: 140px; justify-content: center; }
  .hub-top { grid-area: top; }
  .hub-left { grid-area: left; }
  .hub-center { grid-area: center; }
  .hub-right { grid-area: right; }
  .hub-bottom { grid-area: bottom; }
}

@media (min-width: 1080px) {
  .coord-layout { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
}

.coord-services {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(2rem, 4vw, 2.5rem);
  border-top: 1px solid var(--c-line);
}
.coord-services h3 {
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-grey);
}
.chip-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip-list li {
  padding: 0.6rem 0.95rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 2px;
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1.3;
  hyphens: manual;
}

.statement {
  position: relative;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3.5rem);
  background: var(--c-charcoal);
  color: var(--c-on-dark);
  border-radius: var(--radius);
  overflow: hidden;
}
.statement::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--c-red);
}
.statement p {
  max-width: 44em;
  font-size: clamp(1.1875rem, 1rem + 0.9vw, 1.6rem);
  font-weight: 550;
  line-height: 1.4;
  letter-spacing: -0.015em;
  hyphens: manual;
}
.statement .statement-label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-on-dark-muted);
}

/* ==========================================================================
   Process
   ========================================================================== */
.process {
  display: grid;
  counter-reset: step;
  border-top: 1px solid var(--c-line);
}
.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0 1rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--c-line);
}
.process-num {
  grid-row: span 2;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--c-red);
  font-variant-numeric: tabular-nums;
}
.process-step h3 { font-size: 1.1875rem; letter-spacing: -0.015em; line-height: 1.25; margin-bottom: 0.5rem; }
.process-step p { font-size: 0.9875rem; line-height: 1.6; color: var(--c-grey); }

@media (min-width: 760px) {
  .process { grid-template-columns: repeat(2, 1fr); column-gap: 2.5rem; }
}

@media (min-width: 1080px) {
  .process {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 0;
    border-top: 0;
  }
  .process-step {
    grid-template-columns: 1fr;
    align-content: start;
    padding: 2.25rem 2rem 2.5rem;
    border-bottom: 0;
    border-top: 2px solid var(--c-line);
  }
  .process-step:not(:nth-child(3n + 1)) { border-left: 1px solid var(--c-line); }
  .process-step:nth-child(3n + 1) { padding-left: 0; }
  .process-step:nth-child(3n) { padding-right: 0; }
  .process-step::before {
    /* progress marker on the top rule */
    content: "";
    position: absolute;
    left: -1px; top: -2px;
    width: 56px;
    height: 2px;
    background: var(--c-red);
  }
  .process-num { grid-row: auto; margin-bottom: 1.5rem; font-size: 3rem; }
}

/* ==========================================================================
   Business model (dark)
   ========================================================================== */
.section--dark {
  position: relative;
  background: var(--c-charcoal);
  color: var(--c-on-dark);
  overflow: hidden;
}
.section--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
  pointer-events: none;
}
.section--dark > .container { position: relative; }

.model-layout { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.model-copy .section-title { margin-bottom: 1.75rem; }
.model-copy p + p { margin-top: 1rem; }
.model-copy .lead { color: #d4d7da; }

/* Flow diagram */
.flow { display: grid; gap: 0; }
.flow-row { position: relative; }
.flow-row + .flow-row { padding-top: 2.25rem; }
.flow-row + .flow-row::before {
  /* connector arrow */
  content: "";
  position: absolute;
  left: 50%; top: 0.35rem;
  width: 2px; height: 1.4rem;
  transform: translateX(-1px);
  background: rgba(255, 255, 255, 0.35);
}
.flow-row + .flow-row::after {
  content: "";
  position: absolute;
  left: 50%; top: 1.35rem;
  width: 8px; height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.55);
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  transform: translateX(-50%) rotate(45deg);
}

.flow-box {
  padding: 1rem 1.25rem;
  border: 1px solid var(--c-line-dark);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}
.flow-box .flow-kicker {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-on-dark-muted);
}
.flow-box strong { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.01em; }

.flow-box--brand {
  background: var(--c-red);
  border-color: var(--c-red);
  padding: 1.25rem;
}
.flow-box--brand .flow-kicker { color: rgba(255, 255, 255, 0.82); }
.flow-box--brand strong { font-size: 1.375rem; }

.flow-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.flow-pillars .flow-box { padding: 1.1rem 0.75rem; display: grid; place-items: center; gap: 0.5rem; }
.flow-pillars svg { width: 22px; height: 22px; color: #ff6b74; }
.flow-pillars strong { font-size: 0.9375rem; line-height: 1.3; hyphens: manual; }

.flow-result { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.flow-result .flow-box { background: rgba(255, 255, 255, 0.07); }


@media (min-width: 1080px) {
  .model-layout { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
}

.model-points {
  display: grid;
  gap: 0;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  border-top: 1px solid var(--c-line-dark);
}
.model-point { padding: 1.75rem 0; border-bottom: 1px solid var(--c-line-dark); }
.model-point h3 {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
}
.model-point h3::before {
  content: "";
  width: 10px; height: 10px;
  flex: none;
  margin-top: 0.42em;
  background: var(--c-red-bright);
}
.model-point p { font-size: 0.9875rem; line-height: 1.6; color: var(--c-on-dark-muted); }

@media (min-width: 860px) {
  .model-points { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--c-line-dark); }
  .model-point { padding: 2rem 2rem 2.25rem; border-bottom: 0; }
  .model-point:first-child { padding-left: 0; }
  .model-point:last-child { padding-right: 0; }
  .model-point + .model-point { border-left: 1px solid var(--c-line-dark); }
}

/* ==========================================================================
   About
   ========================================================================== */
.about-layout { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.about-text p:not(.eyebrow) { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem); line-height: 1.7; color: var(--c-ink-2); }
.about-text .about-lead { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); line-height: 1.45; letter-spacing: -0.015em; color: var(--c-ink); font-weight: 550; }
.about-text p:not(.eyebrow) + p { margin-top: 1.25rem; }
.about-text .section-title { margin-bottom: 2rem; }

.facts {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-top: 3px solid var(--c-red);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.facts-logo { width: 180px; height: auto; margin-bottom: 1.5rem; }
.facts dl { margin: 0; display: grid; }
.facts dl > div {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--c-line);
}
.facts dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-grey);
}
.facts dd { margin: 0; font-size: 1rem; font-weight: 550; line-height: 1.45; hyphens: manual; }

@media (min-width: 480px) {
  .facts dl > div { grid-template-columns: 9.5rem 1fr; gap: 1rem; align-items: baseline; }
}

@media (min-width: 1080px) {
  .about-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  .facts { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-card {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.75rem, 5vw, 4rem);
  background: var(--c-charcoal);
  color: var(--c-on-dark);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: var(--c-red);
}
.contact-card .section-title { margin-bottom: 1.25rem; }
.contact-intro .lead { color: #d4d7da; }

.contact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
@media (max-width: 479.98px) { .contact-actions .btn { width: 100%; } }

.contact-hints {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-line-dark);
}
.contact-hints h3 {
  margin-bottom: 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-on-dark-muted);
}
.contact-hints ul { display: grid; gap: 0.5rem; }
.contact-hints li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #d4d7da;
}
.contact-hints li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  background: var(--c-red-bright);
}

.contact-details {
  display: grid;
  gap: 0;
  align-content: start;
  border-top: 1px solid var(--c-line-dark);
}
.contact-line {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--c-line-dark);
  color: inherit;
  text-decoration: none;
}
.contact-line .icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--c-line-dark);
  border-radius: 2px;
  color: #ff6b74;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.contact-line .icon svg { width: 20px; height: 20px; }
.contact-line .cl-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-on-dark-muted);
}
.contact-line .cl-value {
  display: block;
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.contact-line address { font-style: normal; }
/* Phase 2.1 fix: below 360 px the e-mail address no longer fits on one line at the fluid size. */
@media (max-width: 359.98px) {
  .contact-line .cl-value { font-size: 1rem; }
}
a.contact-line:hover .icon { background: var(--c-red); border-color: var(--c-red); color: #fff; }
a.contact-line:hover .cl-value { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

@media (min-width: 960px) {
  .contact-card { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 4rem; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
  background: var(--c-surface-2);
  border-top: 1px solid var(--c-line);
  font-size: 0.9375rem;
}
.footer-grid { display: grid; gap: 2.5rem; }
.footer-brand img { width: 168px; height: auto; }
.footer-tagline {
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-ink-2);
}
.footer-col h2 {
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-grey);
}
.footer-col address { font-style: normal; line-height: 1.7; }
.footer-col ul { display: grid; gap: 0.15rem; }
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  text-decoration: none;
  color: var(--c-ink-2);
}
.footer-col a:hover { color: var(--c-red); text-decoration: underline; }
.footer-contact a { min-height: 32px; }

.footer-future {
  margin-top: 0.75rem;
}
.footer-future .muted {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--c-grey);
  cursor: default;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-block: 1.5rem;
  border-top: 1px solid var(--c-line-strong);
  font-size: 0.8125rem;
  color: var(--c-grey);
}

@media (min-width: 700px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .footer-grid { grid-template-columns: 1.3fr 1.1fr 1fr 0.9fr; gap: 3rem; }
}

/* ==========================================================================
   Legal pages & 404
   ========================================================================== */
.page-hero {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--c-line);
}
.page-hero .section-title { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); }

.legal {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section-pad);
}
.legal-body { max-width: 46rem; }
.legal-body h2 {
  margin: 2.75rem 0 0.85rem;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  letter-spacing: -0.02em;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { margin: 1.75rem 0 0.5rem; font-size: 1.0625rem; letter-spacing: -0.01em; }
.legal-body p, .legal-body li { color: var(--c-ink-2); }
.legal-body p + p { margin-top: 0.85rem; }
.legal-body ul { margin: 0.75rem 0; display: grid; gap: 0.4rem; }
.legal-body ul li { position: relative; padding-left: 1.25rem; }
.legal-body ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.68em;
  width: 6px; height: 6px;
  background: var(--c-red);
}
.legal-body address { font-style: normal; line-height: 1.7; }
.legal-body a { color: var(--c-red-deep); }
.legal-body a:hover { color: var(--c-red); }
.legal-card {
  padding: 1.5rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-red);
  border-radius: 2px;
}
.legal-meta { margin-top: 3rem; font-size: 0.875rem; color: var(--c-grey); }

.notfound {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-content: center;
  padding-block: 4rem;
}
.notfound-code {
  font-size: clamp(5rem, 3rem + 12vw, 11rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--c-red);
}
.notfound .lead { margin-top: 1.25rem; }
.notfound .hero-actions { margin-top: 2rem; }

/* ==========================================================================
   Motion (subtle, opt-in via JS, respects reduced motion)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: var(--reveal-delay, 0s);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .site-header, .nav-toggle, .hero-actions, .contact-actions, .media, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .hero { padding-block: 1.5rem; }
  .section--dark, .contact-card, .statement { background: #fff !important; color: #000 !important; }
  .section--dark *, .contact-card *, .statement * { color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; }
}
