/* ============================================================================
   webDash 2026 — Mittelstand Trade Press direction
   Warm paper ground, graphite ink, single saturated purple, column rules.
   ============================================================================ */

/* ---------- Tokens -------------------------------------------------------- */

:root {
  /* Palette — pulled from the real webDash logo:
     brand violet #4F21B8 and warm brand ink #2B2530. Paper stays warm off-white. */
  --ink: #2B2530;
  --ink-80: rgba(43, 37, 48, 0.80);
  --ink-60: rgba(43, 37, 48, 0.60);
  --ink-40: rgba(43, 37, 48, 0.40);
  --ink-20: rgba(43, 37, 48, 0.20);
  --ink-10: rgba(43, 37, 48, 0.10);
  --rule:   rgba(43, 37, 48, 0.70);
  --rule-soft: rgba(43, 37, 48, 0.16);

  --paper: #F6F3EB;
  --paper-warm: #EEE9DC;
  --paper-80: rgba(246, 243, 235, 0.80);
  --paper-60: rgba(246, 243, 235, 0.60);

  --violet: #4F21B8;
  --violet-ink: #3A1890;
  --violet-tint: rgba(79, 33, 184, 0.10);

  /* Dark inversion (AI pullquote spread) — warm dark that echoes brand ink */
  --dark-ground: #1A141F;
  --dark-paper: #EDE8DB;

  /* Typography — EB Garamond (classical Garamond revival, strong display character,
     outside the AI-UI default cluster) + the contract's "system-ui stack" option
     for sans (no web font load, native rendering). */
  --serif: 'EB Garamond Variable', 'EB Garamond', ui-serif, Georgia, 'Times New Roman', serif;
  --sans:  system-ui, -apple-system, 'Segoe UI', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;

  /* Scale (fluid) */
  --fs-micro: clamp(10px, 0.70rem + 0.10vw, 12px);
  --fs-small: clamp(13px, 0.80rem + 0.15vw, 15px);
  --fs-body:  clamp(16px, 0.95rem + 0.25vw, 18.5px);
  --fs-lede:  clamp(19px, 1.05rem + 0.55vw, 24px);
  --fs-deck:  clamp(40px, 2.10rem + 4.2vw, 96px);
  --fs-heading: clamp(28px, 1.60rem + 2.2vw, 56px);
  --fs-sub:   clamp(20px, 1.10rem + 0.90vw, 30px);
  --fs-nameplate: clamp(48px, 3.00rem + 6.5vw, 150px);

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-28: 7rem;
  --sp-36: 9rem;

  /* Grid */
  --page-pad: clamp(20px, 2vw + 12px, 48px);
  --page-max: 1440px;
  --measure:  68ch;

  /* Motion — stronger custom curves than the built-in CSS easings.
     Use --ease-out for enter/hover/press, --ease-in-out for on-screen movement,
     --ease-drawer for sheet/panel physics. See emil-design-eng.md. */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Fonts (EB Garamond + system-ui) — Garamond is self-hosted via
   @fontsource-variable/eb-garamond, imported from the layout; the sans side is
   the native system-ui stack and loads nothing. */

/* ---------- Reset / base -------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-weight: 400;
  font-feature-settings: 'ss01' on, 'cv11' on, 'kern' on;
  line-height: 1.55;
  letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul {
  margin: 0;
}
ol, ul { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Browser-surface theming */
::selection { background: var(--violet); color: var(--paper); }
::-moz-selection { background: var(--violet); color: var(--paper); }
:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 1px;
}
html { caret-color: var(--violet); }

/* Scrollbar (webkit + firefox) */
html { scrollbar-color: var(--ink-40) var(--paper); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--ink-20); border-radius: 0; border: 3px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-40); }

/* Numerals in tabular context */
.tabular { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Layout -------------------------------------------------------- */

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.rule {
  border: 0;
  border-top: 0.5px solid var(--rule);
  height: 0;
  margin: 0;
}
.rule.soft { border-top-color: var(--rule-soft); }
.rule.heavy { border-top-width: 1.5px; }

/* 12-column grid for editorial compositions */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--sp-6);
}

@media (max-width: 760px) {
  .grid-12 { grid-template-columns: repeat(6, 1fr); column-gap: var(--sp-4); }
}

/* Column-rule dividers (visible on desktop, suppressed on mobile where columns collapse) */
.col-rule {
  position: relative;
}
.col-rule::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(-0.5 * var(--sp-6));
  border-left: 0.5px solid var(--rule-soft);
}
@media (max-width: 760px) {
  .col-rule::before { display: none; }
}

/* ---------- Typography primitives ---------------------------------------- */

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.sans  { font-family: var(--sans); }

.indicia {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-60);
}
.indicia .live { color: var(--violet); font-variant-numeric: tabular-nums; }

.caption {
  font-family: var(--sans);
  font-size: var(--fs-small);
  color: var(--ink-60);
  line-height: 1.5;
}
.caption strong { color: var(--ink); font-weight: 600; }

.marginalia {
  font-family: var(--sans);
  font-size: var(--fs-small);
  color: var(--ink-80);
  line-height: 1.45;
}
ul.marginalia {
  list-style: none;
  padding-left: 0;
}
ul.marginalia > li {
  position: relative;
  padding-left: 1.1em;
}
ul.marginalia > li::before {
  content: "";
  position: absolute;
  left: 0.1em;
  top: 0.6em;
  width: 0.32em;
  height: 0.32em;
  background: var(--violet);
}

.page-number {
  font-family: var(--sans);
  font-feature-settings: 'tnum' on;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--ink-60);
}

.deck {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-deck);
  line-height: 0.98;
  letter-spacing: -0.022em;
  text-wrap: balance;
  color: var(--ink);
}
.deck em { font-style: italic; color: var(--violet); font-weight: 500; letter-spacing: -0.018em; }

.heading {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-heading);
  line-height: 1.04;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.sub {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-sub);
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.lede {
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--fs-lede);
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 40ch;
  text-wrap: pretty;
}

.body {
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink-80);
  max-width: 68ch;
  text-wrap: pretty;
}
.body a {
  color: var(--ink);
  background-image: linear-gradient(var(--violet), var(--violet));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 92%;
  transition: background-size 240ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .body a:hover { background-size: 100% 42%; color: var(--ink); }
}

/* Pullquote */
.pullquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-sub);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.018em;
  position: relative;
  padding-left: var(--sp-6);
}
.pullquote::before {
  content: "¶";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--violet);
  font-style: normal;
  font-weight: 600;
  font-size: 1em;
}

/* ---------- Primary action (CTA) ----------------------------------------- */

.cta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
  padding: 0.68em 1.1em 0.72em;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--fs-body);
  letter-spacing: -0.006em;
  border-radius: 2px;
  transition: background-color 200ms var(--ease-out),
              transform 160ms var(--ease-out),
              box-shadow 200ms var(--ease-out);
  position: relative;
  overflow: hidden;
  transform-origin: center;
  will-change: transform;
}
.cta .icon-arrow {
  display: inline-block;
  transition: transform 220ms var(--ease-out);
  margin-left: 0.15em;
  vertical-align: -0.02em;
}
.icon-arrow, .icon-arrow-ur {
  display: inline-block;
  vertical-align: -0.08em;
  margin-left: 0.25em;
  transition: transform 220ms var(--ease-out);
  flex-shrink: 0;
}
.inline-action .icon-arrow,
.inline-action .icon-arrow-ur { margin-left: 0.15em; }
@media (hover: hover) and (pointer: fine) {
  a:hover .icon-arrow { transform: translateX(3px); }
  a:hover .icon-arrow-ur { transform: translate(2px, -2px); }
  .cta:hover {
    background: var(--violet-ink);
    box-shadow: 0 6px 18px -8px rgba(79, 33, 184, 0.35);
  }
}
/* Press: the button must feel responsive. Scale 0.97 gives instant feedback. */
.cta:active {
  background: var(--violet);
  transform: scale(0.97);
  transition-duration: 100ms;
}

.cta.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: calc(0.68em - 1px) calc(1.1em - 1px) calc(0.72em - 1px);
}
@media (hover: hover) and (pointer: fine) {
  .cta.ghost:hover { background: var(--ink); color: var(--paper); box-shadow: none; }
}

/* Inline text link as action (for the first-viewport primary action beside the lede) */
.inline-action {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 1px;
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .inline-action:hover { color: var(--violet-ink); border-color: var(--violet-ink); }
}
.inline-action:active { transform: translateY(1px); transition-duration: 100ms; }

/* ---------- Masthead ------------------------------------------------------ */

.masthead {
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.masthead-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-6);
}
.masthead-top .indicia span + span::before,
.running-head .indicia span + span::before,
.indicia.inline span + span::before,
.indicia > .live + span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin: 0 0.85em;
  vertical-align: -0.1em;
  background: var(--ink-40);
}

.nameplate {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-nameplate);
  line-height: 0.86;
  letter-spacing: -0.032em;
  color: var(--ink);
}
.nameplate em {
  font-style: italic;
  color: var(--violet);
  font-weight: 500;
  letter-spacing: -0.024em;
}

/* Logo masthead — the symbol SVG is paired with a live wordmark rendered in
   the page's content serif so the nameplate shares the editorial voice of
   the running text. The legacy .logo-mark class is kept for any page that
   still references the full wordmark SVG as a single image. */
.logo-mark {
  display: block;
  height: clamp(36px, 1.6rem + 2.2vw, 64px);
  width: auto;
}
.logo-mark.lg {
  height: clamp(48px, 2.4rem + 3vw, 84px);
}
.logo-mark.footer {
  height: clamp(36px, 1.5rem + 1.6vw, 56px);
}

/* Lockup: symbol mark + live wordmark set in EB Garamond. */
.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.34em;
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.028em;
  font-size: clamp(32px, 1.4rem + 2.1vw, 56px);
  text-decoration: none;
}
.logo-lockup.lg {
  font-size: clamp(40px, 2rem + 3vw, 76px);
}
.logo-lockup.footer {
  font-size: clamp(26px, 1.1rem + 1.3vw, 44px);
}
.logo-lockup .mark {
  display: block;
  height: 0.84em;
  width: auto;
  flex-shrink: 0;
  transition: transform 420ms var(--ease-out);
  transform-origin: center;
}
@media (hover: hover) and (pointer: fine) {
  .logo-lockup:hover .mark { transform: rotate(-4deg) scale(1.04); }
}
.logo-lockup:active .mark { transform: scale(0.96); transition-duration: 120ms; }
.logo-lockup .wordmark {
  display: inline-block;
}

.masthead-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-6);
  padding-top: var(--sp-2);
}

/* ---------- Nav ----------------------------------------------------------- */

.nav {
  display: flex;
  align-items: baseline;
  gap: var(--sp-8);
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: -0.003em;
}
.nav a {
  position: relative;
  color: var(--ink-80);
  padding-bottom: 2px;
  transition: color 180ms var(--ease-out);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 260ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--ink); }
  .nav a:hover::after { transform: scaleX(1); }
}
.nav a[aria-current="page"] {
  color: var(--ink);
}
.nav a[aria-current="page"]::after {
  background: var(--violet);
  transform: scaleX(1);
}

/* Mobile nav toggle */
.nav-toggle { display: none; }
.nav-overlay { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .nav-toggle {
    display: inline-flex;
    font-family: var(--sans);
    font-size: var(--fs-small);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    transition: transform 160ms var(--ease-out), color 180ms var(--ease-out);
    background: transparent;
    border: 0;
    padding: 0.4em 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle:active { transform: scale(0.96); transition-duration: 100ms; }
  .nav-toggle:focus-visible {
    outline: 1px solid var(--violet);
    outline-offset: 4px;
    border-radius: 1px;
  }

  /* ---------- Mobile contents spread (fullscreen nav) --------------------- */
  html.nav-lock { overflow: hidden; touch-action: none; }
  html.nav-lock body { overflow: hidden; }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
    background: var(--paper);
    color: var(--ink);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 320ms var(--ease-out), transform 360ms var(--ease-out);
    will-change: opacity, transform;
  }
  .nav-overlay[hidden] { display: none; }
  .nav-overlay.is-open {
    opacity: 1;
    transform: none;
  }

  .nav-overlay-inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding-top: var(--sp-6);
    padding-bottom: calc(var(--sp-10) + env(safe-area-inset-bottom, 0px));
  }
  .nav-overlay-top {
    align-items: center;
  }
  .nav-overlay-head {
    padding-block: var(--sp-3) var(--sp-8);
  }

  .nav-overlay-list {
    flex: 1 0 auto;
  }
  .nav-overlay-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
  }
  .nav-overlay-row {
    opacity: 0;
    transform: translateY(8px);
    animation: nav-overlay-in 520ms var(--ease-out) var(--enter-delay, 0ms) forwards;
    border-top: 0.5px solid var(--rule-soft);
  }
  .nav-overlay-row:last-child {
    border-bottom: 0.5px solid var(--rule-soft);
  }
  .nav-overlay-row a {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: var(--sp-6);
    align-items: baseline;
    padding-block: var(--sp-5);
    min-height: 56px;
    color: var(--ink);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-overlay-num {
    font-family: var(--sans);
    font-size: clamp(11px, 0.72rem + 0.12vw, 13px);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-40);
    font-variant-numeric: tabular-nums;
    padding-top: 0.22em;
    transition: color 220ms var(--ease-out);
  }
  .nav-overlay-label {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(36px, 1.6rem + 6vw, 58px);
    line-height: 0.98;
    letter-spacing: -0.022em;
    color: var(--ink);
    position: relative;
    display: inline-block;
  }
  .nav-overlay-label::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.08em;
    height: 1px;
    background: var(--violet);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 280ms var(--ease-out);
  }
  .nav-overlay-row[data-current] .nav-overlay-num { color: var(--violet); }
  .nav-overlay-row[data-current] .nav-overlay-label::after {
    transform: scaleX(0.32);
  }
  .nav-overlay-row a:active .nav-overlay-label {
    transform: translateX(2px);
    transition: transform 140ms var(--ease-out);
  }
  @media (hover: hover) and (pointer: fine) {
    .nav-overlay-row a:hover .nav-overlay-label::after { transform: scaleX(0.32); }
    .nav-overlay-row a:hover .nav-overlay-num { color: var(--violet); }
  }
  .nav-overlay-row a:focus-visible {
    outline: 1px solid var(--violet);
    outline-offset: 6px;
    border-radius: 1px;
  }

  .nav-overlay-foot {
    margin-top: var(--sp-10);
    padding-top: var(--sp-8);
    border-top: 0.5px solid var(--rule-soft);
    display: flex;
    flex-direction: column;
    gap: var(--sp-8);
    opacity: 0;
    transform: translateY(6px);
    animation: nav-overlay-in 520ms var(--ease-out) 360ms forwards;
  }
  .nav-overlay-cta {
    align-self: stretch;
    justify-content: space-between;
    font-size: var(--fs-lede);
    padding: 0.95em 1.2em;
  }
  .nav-overlay-colophon {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--sp-4);
    row-gap: var(--sp-2);
    color: var(--ink-60);
  }
  .nav-overlay-colophon span + span::before,
  .nav-overlay-colophon a + span::before,
  .nav-overlay-colophon span + a::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 0.9em;
    margin-right: var(--sp-4);
    vertical-align: -0.1em;
    background: var(--ink-40);
  }
  .nav-overlay-colophon a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--ink-40);
    padding-bottom: 1px;
  }

  @keyframes nav-overlay-in {
    to { opacity: 1; transform: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .nav-overlay { transition: opacity 120ms linear; transform: none; }
    .nav-overlay-row,
    .nav-overlay-foot { animation: none; opacity: 1; transform: none; }
  }
}

/* ---------- Sections ------------------------------------------------------ */

.section {
  /* padding-block only — do NOT use shorthand "padding: X 0;" here, it would
     overwrite the horizontal padding inherited from .page and the section
     content would run wider than the masthead. */
  padding-block: var(--sp-20);
  border-top: 0.5px solid var(--rule-soft);
}
.section-tight { padding-block: var(--sp-12); }

.running-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--sp-6);
}

/* ---------- Feature article (case study) --------------------------------- */

.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}
@media (min-width: 900px) {
  .feature { grid-template-columns: 7fr 5fr; gap: var(--sp-12); }
  .feature.flip { grid-template-columns: 5fr 7fr; }
}

.plate {
  background: var(--paper-warm);
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.plate.portrait { aspect-ratio: 3 / 4; }
.plate.wide { aspect-ratio: 16 / 9; }
.plate img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Project index ------------------------------------------------ */

.project-tag {
  font-family: var(--sans);
  font-size: var(--fs-caption);
  color: var(--ink-70);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25em 0.7em;
  border: 0.5px solid var(--rule-soft);
  border-radius: 999px;
  white-space: nowrap;
}

.project-cover {
  display: block;
  text-decoration: none;
  color: inherit;
}
.project-cover .plate { transition: box-shadow 400ms var(--ease-out); }
.project-cover .plate img {
  transition: transform 700ms var(--ease-out), filter 500ms var(--ease-out);
  will-change: transform;
}
.project-cover .caption .indicia {
  color: var(--ink-60);
  transition: color 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .project-cover:hover .plate { box-shadow: 0 24px 60px -32px rgba(43, 37, 48, 0.35); }
  .project-cover:hover .plate img { transform: scale(1.025); }
  .project-cover:hover .caption .indicia { color: var(--violet); }
}
.project-cover:active .plate img { transform: scale(1.01); transition-duration: 160ms; }

.project-index {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 0.5px solid var(--rule-soft);
}
.project-index > li {
  border-bottom: 0.5px solid var(--rule-soft);
}
.project-row {
  display: grid;
  grid-template-columns: auto 180px 1fr auto;
  gap: var(--sp-6);
  align-items: center;
  padding: var(--sp-6) 0;
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: background-color 240ms var(--ease-out);
}
/* Violet accent rail that slides in from the left edge on hover */
.project-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--sp-4);
  bottom: var(--sp-4);
  width: 2px;
  background: var(--violet);
  transform: scaleY(0);
  transform-origin: center top;
  transition: transform 320ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .project-row:hover { background: rgba(43, 37, 48, 0.025); }
  .project-row:hover::before { transform: scaleY(1); }
}
.project-num {
  font-family: var(--serif);
  font-feature-settings: "tnum" 1;
  font-size: var(--fs-small);
  color: var(--violet);
  padding-left: var(--sp-4);
  min-width: 2.2em;
}
.project-thumb {
  margin: 0;
  overflow: hidden;
}
.project-thumb .plate img {
  transition: transform 700ms var(--ease-out);
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .project-row:hover .project-thumb .plate img { transform: scale(1.04); }
}
.project-meta { min-width: 0; }
.project-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-sub);
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
  transition: color 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .project-row:hover .project-name { color: var(--violet); }
}
.project-tagline {
  font-family: var(--sans);
  font-size: var(--fs-small);
  color: var(--ink-70);
  margin: var(--sp-2) 0 0;
  line-height: 1.4;
}
.project-tags {
  margin-top: var(--sp-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.project-ref {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding-right: var(--sp-4);
  color: var(--ink-60);
  transition: color 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .project-row:hover .project-ref { color: var(--violet); }
}

@media (max-width: 760px) {
  .project-row {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "num meta"
      "thumb thumb"
      "ref ref";
    gap: var(--sp-4);
  }
  .project-num { grid-area: num; padding-left: 0; }
  .project-meta { grid-area: meta; }
  .project-thumb { grid-area: thumb; }
  .project-ref { grid-area: ref; padding-right: 0; }
}

/* ---------- Credits table ------------------------------------------------ */

.credits-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--serif);
  font-size: var(--fs-body);
  color: var(--ink);
}
.credits-table thead th {
  text-align: left;
  font-family: var(--sans);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-60);
  padding: 0 var(--sp-5) var(--sp-3);
  border-bottom: 0.5px solid var(--rule-soft);
}
.credits-table td {
  padding: var(--sp-5) var(--sp-5);
  border-bottom: 0.5px solid var(--rule-soft);
  vertical-align: top;
  line-height: 1.4;
}
.credits-table td:first-child, .credits-table th:first-child { padding-left: 0; }
.credits-table td:last-child, .credits-table th:last-child { padding-right: 0; }
.credits-table .thumb {
  width: 96px;
  height: 64px;
  object-fit: cover;
  display: block;
}
.credits-table a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--rule-soft);
}
.credits-table a:hover { color: var(--violet); text-decoration-color: var(--violet); }

/* ---------- Contact form ------------------------------------------------- */

.contact-form {
  display: grid;
  gap: var(--sp-6);
}
.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  position: relative;
}
.contact-form .field-label { transition: color 200ms var(--ease-out); }
.contact-form .field:focus-within .field-label { color: var(--violet); }
.contact-form .field-label {
  font-family: var(--sans);
  font-size: var(--fs-caption);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-60);
  font-weight: 500;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  font-family: var(--serif);
  font-size: var(--fs-body);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 0.5px solid var(--rule);
  padding: var(--sp-3) 0;
  width: 100%;
  resize: vertical;
  letter-spacing: -0.01em;
  /* clip-path reveals a 1.5px violet underline that grows from center on focus */
  background-image: linear-gradient(var(--violet), var(--violet));
  background-repeat: no-repeat;
  background-position: 50% 100%;
  background-size: 0% 1.5px;
  transition: background-size 260ms var(--ease-out),
              border-color 180ms var(--ease-out);
}
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
  border-bottom-color: transparent;
  background-size: 100% 1.5px;
}
.contact-form textarea { min-height: 140px; line-height: 1.5; }
.contact-form .consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-3);
  align-items: start;
  font-size: var(--fs-small);
  color: var(--ink-70);
  line-height: 1.45;
}
.contact-form .consent input[type="checkbox"] {
  margin-top: 0.3em;
  accent-color: var(--violet);
  width: 16px;
  height: 16px;
}
.contact-form .consent a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-soft);
  text-underline-offset: 0.2em;
}
.contact-form .consent a:hover { color: var(--violet); text-decoration-color: var(--violet); }
.contact-form .submit-row {
  margin-top: var(--sp-4);
  display: flex;
  gap: var(--sp-6);
  align-items: center;
}
.contact-form button[type="submit"] {
  font-family: var(--sans);
  font-size: var(--fs-body);
  letter-spacing: -0.01em;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 999px;
  padding: 0.85em 1.5em;
  cursor: pointer;
  transition: background-color 200ms var(--ease-out),
              transform 160ms var(--ease-out),
              box-shadow 200ms var(--ease-out);
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .contact-form button[type="submit"]:hover {
    background: var(--violet);
    box-shadow: 0 8px 22px -10px rgba(79, 33, 184, 0.45);
  }
}
.contact-form button[type="submit"]:active {
  transform: scale(0.97);
  transition-duration: 100ms;
}

.contact-channels {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.contact-channels > li {
  border-top: 0.5px solid var(--rule-soft);
}
.contact-channels > li:last-child {
  border-bottom: 0.5px solid var(--rule-soft);
}
.contact-channels a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-5) 0;
  color: inherit;
  text-decoration: none;
  transition: background-color 200ms var(--ease-out);
}
.contact-channels .value,
.contact-channels .arrow { transition: color 220ms var(--ease-out), transform 260ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .contact-channels a:hover { background: rgba(43, 37, 48, 0.025); }
  .contact-channels a:hover .value { transform: translateX(4px); }
  .contact-channels a:hover .arrow { transform: translateX(6px); }
}
.contact-channels .label {
  font-family: var(--sans);
  font-size: var(--fs-caption);
  color: var(--ink-60);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-left: var(--sp-4);
  min-width: 7em;
}
.contact-channels .value {
  font-family: var(--serif);
  font-size: var(--fs-sub);
  color: var(--ink);
  letter-spacing: -0.015em;
  font-weight: 400;
}
.contact-channels a:hover .value { color: var(--violet); }
.contact-channels .arrow {
  padding-right: var(--sp-4);
  color: var(--ink-60);
}
.contact-channels a:hover .arrow { color: var(--violet); }

/* ---------- Legal / long-form prose -------------------------------------- */

.legal-prose {
  max-width: 68ch;
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
}
.legal-prose h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-heading);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 var(--sp-8);
  color: var(--ink);
}
.legal-prose h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-sub);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: var(--sp-10) 0 var(--sp-3);
  color: var(--ink);
}
.legal-prose h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-body);
  letter-spacing: -0.01em;
  margin: var(--sp-6) 0 var(--sp-2);
  color: var(--ink);
}
.legal-prose h4 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  margin: var(--sp-5) 0 var(--sp-2);
  color: var(--ink-80);
}
.legal-prose p { margin: 0 0 var(--sp-4); }
.legal-prose ul, .legal-prose ol {
  margin: var(--sp-3) 0 var(--sp-5);
  padding-left: 1.4em;
}
.legal-prose li { margin-bottom: var(--sp-2); }
.legal-prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--rule-soft);
}
.legal-prose a:hover {
  color: var(--violet);
  text-decoration-color: var(--violet);
}
.legal-prose strong { color: var(--ink); font-weight: 600; }
.legal-prose hr {
  border: 0;
  border-top: 0.5px solid var(--rule-soft);
  margin: var(--sp-10) 0;
}

/* ---------- Social proof: rating strip + testimonials -------------------- */

.rating-strip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--sans);
  font-size: var(--fs-small);
  color: var(--ink-70);
  letter-spacing: 0.01em;
}
.rating-strip strong {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rating-strip .separator {
  display: inline-block;
  width: 1px;
  height: 0.95em;
  background: var(--rule-soft);
}
.rating-strip a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 0.25em;
  text-decoration-color: var(--rule-soft);
}
.rating-strip a:hover { text-decoration-color: var(--violet); color: var(--violet); }

.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--violet);
}
.rating-stars .star { display: block; }

.testimonial {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  margin: 0;
  padding: 0;
  border-top: 0.5px solid var(--rule-soft);
  padding-top: var(--sp-6);
}
.testimonial .quote {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-sub);
  line-height: 1.38;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-weight: 400;
  position: relative;
}
.testimonial .quote::before {
  content: "„";
  color: var(--violet);
  font-family: var(--serif);
  font-size: 1.6em;
  line-height: 0;
  position: relative;
  vertical-align: -0.18em;
  margin-right: 0.04em;
}
.testimonial .attribution {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: auto;
}
.testimonial .attribution .name {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: var(--fs-body);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.testimonial .attribution .source {
  font-family: var(--sans);
  font-size: var(--fs-caption);
  color: var(--ink-60);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
  .testimonial {
    transition: transform 220ms var(--ease-out);
  }
  .testimonial:hover {
    transform: translateY(-2px);
  }
}

/* ---------- Dark pullquote spread (AI) ----------------------------------- */

.spread-dark {
  background: var(--dark-ground);
  color: var(--dark-paper);
  margin-left: calc(-1 * var(--page-pad));
  margin-right: calc(-1 * var(--page-pad));
  padding: var(--sp-28) var(--page-pad);
  position: relative;
  overflow: hidden;
}
.spread-dark .indicia { color: rgba(237, 232, 219, 0.60); }
.spread-dark .indicia .live { color: #9B85F8; }
.spread-dark .deck,
.spread-dark .heading,
.spread-dark .sub { color: var(--dark-paper); }
.spread-dark .body { color: rgba(237, 232, 219, 0.78); }
.spread-dark .rule,
.spread-dark .col-rule::before { border-color: rgba(237, 232, 219, 0.18); }
.spread-dark .marginalia { color: rgba(237, 232, 219, 0.70); }
.spread-dark .cta {
  background: var(--dark-paper);
  color: var(--dark-ground);
}
.spread-dark .cta:hover { background: var(--violet); color: var(--dark-paper); }
.spread-dark .inline-action {
  color: var(--dark-paper);
  border-bottom-color: var(--dark-paper);
}
.spread-dark .inline-action:hover { color: var(--violet); border-bottom-color: var(--violet); }
.spread-dark .pullquote::before { color: var(--violet); }

.ki-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.ki-toc li {
  display: flex;
  align-items: baseline;
  gap: 1.1em;
  padding-bottom: var(--sp-4);
  border-bottom: 0.5px solid rgba(237, 232, 219, 0.14);
}
.ki-toc li:last-child { border-bottom: none; padding-bottom: 0; }
.ki-toc li span:last-child {
  font-size: clamp(14px, 0.85rem + 0.2vw, 16px);
  font-family: 'EB Garamond', ui-serif, Georgia, 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -0.012em;
}

/* Signature flourish inside dark spread: measured specimen card */
.specimen {
  border: 0.5px solid rgba(237, 232, 219, 0.28);
  padding: var(--sp-6);
  background: rgba(237, 232, 219, 0.02);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.specimen .specimen-id {
  font-family: var(--sans);
  font-feature-settings: 'tnum' on;
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(237, 232, 219, 0.55);
}
.specimen .specimen-id .violet { color: #9B85F8; margin-right: 1.1em; }
.specimen h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-sub);
  line-height: 1.10;
  letter-spacing: -0.016em;
  color: var(--dark-paper);
}
.specimen p {
  font-size: var(--fs-small);
  color: rgba(237, 232, 219, 0.78);
  line-height: 1.5;
}
.specimen dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(237, 232, 219, 0.55);
}
.specimen dd { color: var(--dark-paper); text-transform: none; letter-spacing: -0.003em; }

@media (hover: hover) and (pointer: fine) {
  .specimen {
    transition: border-color 180ms var(--ease-out), background 180ms var(--ease-out);
  }
  .specimen:hover {
    border-color: rgba(155, 133, 248, 0.5);
    background: rgba(237, 232, 219, 0.05);
  }
}

/* ---------- Service table-of-contents ------------------------------------ */

.toc {
  display: grid;
  grid-template-columns: 1fr;
}
.toc-row {
  display: grid;
  grid-template-columns: 1fr;
  padding: var(--sp-10) 0;
  border-top: 0.5px solid var(--rule-soft);
}
.toc-row:last-child { border-bottom: 0.5px solid var(--rule-soft); }
@media (min-width: 900px) {
  .toc-row { grid-template-columns: 1fr 1.6fr 0.6fr; gap: var(--sp-12); align-items: baseline; }
}
.toc-row {
  transition: background-color 240ms var(--ease-out);
  position: relative;
}
.toc-row h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-sub);
  line-height: 1.05;
  letter-spacing: -0.02em;
  transition: color 240ms var(--ease-out), transform 240ms var(--ease-out);
  transform-origin: left center;
}
.toc-row .ref { transition: color 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .toc-row:hover { background: rgba(43, 37, 48, 0.025); }
  .toc-row:hover h3 { color: var(--violet); transform: translateX(4px); }
  .toc-row:hover .ref { color: var(--violet); }
}
.toc-row .desc {
  font-size: var(--fs-body);
  color: var(--ink-80);
  line-height: 1.5;
  max-width: 48ch;
}
.toc-row .ref {
  font-family: var(--sans);
  font-feature-settings: 'tnum' on;
  font-size: var(--fs-small);
  color: var(--ink-60);
  letter-spacing: 0.06em;
  text-align: right;
}
@media (max-width: 899px) {
  .toc-row .ref { text-align: left; margin-top: var(--sp-3); }
}

/* ---------- Footer -------------------------------------------------------- */

.footer {
  border-top: 1.5px solid var(--ink);
  padding: var(--sp-16) 0 var(--sp-10);
  margin-top: var(--sp-20);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-8); }
}
.footer h5 {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-60);
  padding-bottom: var(--sp-3);
  border-bottom: 0.5px solid var(--rule-soft);
  margin-bottom: var(--sp-4);
}
.footer ul li { padding: 0.18em 0; }
.footer a { color: var(--ink-80); }
.footer a:hover { color: var(--ink); }
.footer .colophon {
  padding-top: var(--sp-12);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-6);
  font-size: var(--fs-micro);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-60);
  flex-wrap: wrap;
}

/* ---------- Motion -------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .enter {
    opacity: 0;
    transform: translateY(14px);
    animation: enter 820ms var(--ease-out) forwards;
    animation-delay: var(--enter-delay, 0ms);
  }
  @keyframes enter {
    to { opacity: 1; transform: none; }
  }

  /* Reveal on scroll: elements marked [data-reveal] start hidden and fade/
     lift into place when their intersection observer flips [data-revealed].
     Staggers via --reveal-delay (0–N * ~60ms) stay inside the frame budget. */
  [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 680ms var(--ease-out), transform 680ms var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }
  [data-reveal][data-revealed] {
    opacity: 1;
    transform: none;
  }
}

/* Reduced motion: keep opacity fade, drop movement. Motion sickness lives in
   transforms, not in color/opacity. */
@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;
  }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Utilities ---------------------------------------------------- */

.max-measure { max-width: var(--measure); }
.pt-0 { padding-top: 0; }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mt-10 { margin-top: var(--sp-10); }
.mt-12 { margin-top: var(--sp-12); }
.mt-16 { margin-top: var(--sp-16); }
.row { display: flex; align-items: baseline; gap: var(--sp-4); flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; }
.stack-4 > * + * { margin-top: var(--sp-4); }
.stack-6 > * + * { margin-top: var(--sp-6); }
.stack-8 > * + * { margin-top: var(--sp-8); }
.stack-12 > * + * { margin-top: var(--sp-12); }

/* Column spans */
.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-12 { grid-column: span 12; }

@media (max-width: 760px) {
  .col-sm-full { grid-column: 1 / -1; }
  .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-12 { grid-column: 1 / -1; }
}

/* Hidden helper */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}


/* Rubric numbers in the Leistungen contents list (§1 …), set apart by
   width and tone instead of a separator glyph. */
.rubric-num {
  display: inline-block;
  min-width: 2.2em;
  color: var(--ink-60);
  font-variant-numeric: tabular-nums;
}

/* Hide the CCM19 floating cookie icon — settings are in the footer instead */
.ccm-settings-summoner {
  display: none !important;
}

/* Cookie settings button in footer Legal list — looks like the sibling links */
.footer-cookie-btn {
  all: unset;
  cursor: pointer;
  color: inherit;
  font: inherit;
  line-height: inherit;
}
