/* ============================================================
   STEUERANALYST — Design System
   Swiss-grid institutional. White / slate / one blue.
   Mono carries the "precision instrument" voice.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- Ground / paper ---- */
  --paper:      #ffffff;
  --bg:         #f4f6f9;   /* cool light well */
  --bg-2:       #eaeef3;
  --bg-ink:     #0c1422;   /* near-black slate ground */
  --bg-ink-2:   #0f1a2c;

  /* ---- Slate ink scale (cool) ---- */
  --ink:        #0c1422;   /* primary text */
  --slate-900:  #111d31;
  --slate-800:  #1b2942;
  --slate-700:  #2c3a55;
  --slate-600:  #43526e;
  --slate-500:  #5d6c87;
  --slate-400:  #8190a6;
  --slate-300:  #aab5c6;
  --slate-200:  #ccd4e0;

  /* ---- Lines ---- */
  --line:        #e3e8ef;
  --line-2:      #d4dbe5;
  --line-strong: #b6c0ce;
  --line-dark:   rgba(255,255,255,0.10);

  /* ---- Accent: institutional blue ---- */
  --blue:       #1f4ed8;   /* primary signal */
  --blue-600:   #1a44bd;
  --blue-700:   #163a9f;
  --blue-800:   #122f80;
  --blue-tint:  #eaf0fd;
  --blue-tint-2:#dce7fb;
  --blue-glow:  rgba(31,78,216,0.16);

  /* ---- Swiss red: micro-accent only (mark, active dot) ---- */
  --swiss:      #da2b1f;

  /* ---- Semantic ---- */
  --fg:         var(--ink);
  --fg-muted:   var(--slate-600);
  --fg-subtle:  var(--slate-500);
  --fg-faint:   var(--slate-400);

  /* ---- Type ---- */
  --sans: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ---- Radii ---- */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* ---- Shadows (cool, restrained) ---- */
  --sh-1: 0 1px 2px rgba(12,20,34,0.05), 0 0 0 1px rgba(12,20,34,0.04);
  --sh-2: 0 4px 16px rgba(12,20,34,0.07), 0 1px 3px rgba(12,20,34,0.05);
  --sh-3: 0 18px 48px -12px rgba(12,20,34,0.18), 0 4px 14px rgba(12,20,34,0.07);
  --sh-4: 0 40px 90px -24px rgba(12,20,34,0.28), 0 12px 28px rgba(12,20,34,0.10);

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  /* ---- Layout ---- */
  --maxw: 1240px;
  --maxw-narrow: 920px;
  --nav-h: 72px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--paper);
  font-feature-settings: "ss01", "cv05";
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--blue); color: #fff; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.05; letter-spacing: -0.022em; color: var(--ink); text-wrap: balance; }

.display {
  font-size: clamp(42px, 6.0vw, 80px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
h1, .h1 { font-size: clamp(34px, 4.4vw, 58px); font-weight: 800; letter-spacing: -0.03em; }
h2, .h2 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 700; }
h3, .h3 { font-size: clamp(21px, 2.0vw, 27px); font-weight: 700; letter-spacing: -0.018em; }
h4, .h4 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }

p { color: var(--fg-muted); text-wrap: pretty; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--slate-600); }
strong { font-weight: 600; color: var(--ink); }

/* Eyebrow — mono tracked, preceded by a short rule */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-700);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--blue);
  display: inline-block;
}
.eyebrow.muted { color: var(--slate-500); }
.eyebrow.muted::before { background: var(--line-strong); }
.eyebrow.on-dark { color: var(--slate-300); }
.eyebrow.on-dark::before { background: rgba(255,255,255,0.35); }

.mono { font-family: var(--mono); font-feature-settings: "zero" on; }
.tnum { font-feature-settings: "tnum" on, "lnum" on; }

/* Tracked mono microlabel */
.microlabel {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.text-blue { color: var(--blue); }
.text-muted { color: var(--fg-muted); }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 32px; }
section { position: relative; }
.section { padding: clamp(72px, 9vw, 132px) 0; }
.section-sm { padding: clamp(48px, 6vw, 80px) 0; }
.divider { border: 0; border-top: 1px solid var(--line); }

.eq { display: grid; gap: clamp(28px, 4vw, 64px); }
@media (min-width: 880px) {
  .cols-2 { grid-template-columns: 1fr 1fr; }
  .cols-3 { grid-template-columns: repeat(3, 1fr); }
  .cols-4 { grid-template-columns: repeat(4, 1fr); }
  .split { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
  .split-wide { grid-template-columns: 1.15fr 0.85fr; }
}
.cols-2, .cols-3, .cols-4, .split, .split-wide { display: grid; gap: clamp(24px, 3vw, 56px); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  padding: 13px 22px; border-radius: var(--r-sm);
  transition: background var(--ease) .2s, color var(--ease) .2s, transform .12s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--blue); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, var(--sh-2); }
.btn-blue:hover { background: var(--blue-600); box-shadow: var(--sh-3); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn-light { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.btn-light:hover { box-shadow: var(--sh-2); }
.btn-on-dark { background: #fff; color: var(--ink); }
.btn-on-dark:hover { background: var(--blue); color: #fff; }
.btn-ghost-dark { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22); }
.btn-ghost-dark:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn .arr { transition: transform .2s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* Text link with mono arrow */
.tlink {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; color: var(--blue-700);
  border-bottom: 1px solid transparent; transition: gap .2s var(--ease), border-color .2s var(--ease);
}
.tlink .arr { transition: transform .2s var(--ease); }
.tlink:hover { gap: 11px; }
.tlink:hover .arr { transform: translateX(2px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(255,255,255,0.92); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-text { font-weight: 700; font-size: 18px; letter-spacing: -0.03em; color: var(--ink); }
.brand-text b { font-weight: 800; }
.nav-links { display: none; align-items: center; gap: 4px; }
.nav-link {
  position: relative; font-size: 14.5px; font-weight: 500; color: var(--slate-600);
  padding: 8px 13px; border-radius: var(--r-xs); transition: color .18s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); font-weight: 600; }
.nav-cta { display: none; }
.nav-right { display: flex; align-items: center; gap: 10px; }

/* dropdown */
.nav-item { position: relative; }
.nav-item > .nav-link { cursor: default; }
.nav-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(6px);
  margin-top: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-3); padding: 8px; min-width: 250px;
  opacity: 0; visibility: hidden; transition: opacity .18s var(--ease), transform .18s var(--ease);
}
/* invisible bridge so moving the cursor from the trigger into the menu never breaks :hover */
.nav-menu::before {
  content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 16px; background: transparent;
}
.nav-item:hover .nav-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-menu a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); transition: background .15s var(--ease); }
.nav-menu a:hover { background: var(--bg); }
.nav-menu .nm-t { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.nav-menu .nm-d { font-size: 12.5px; color: var(--fg-subtle); }

.nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 20px; height: 1.5px; background: var(--ink); transition: transform .25s var(--ease), opacity .2s; }
.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99; background: #fff;
  padding: 24px 32px 40px; display: flex; flex-direction: column; gap: 2px;
  transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), transform .25s var(--ease);
  overflow-y: auto;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu a { padding: 14px 4px; font-size: 18px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
.mobile-menu .mm-section { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-faint); padding: 20px 4px 6px; }
.mobile-menu .btn { margin-top: 22px; }

@media (min-width: 1000px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* ============================================================
   CARDS / SURFACES
   ============================================================ */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card-pad { padding: clamp(22px, 2.4vw, 32px); }
.card-hover:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); }
.card-lift:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--line-2); }

.surface-sunken { background: var(--bg); }
.surface-ink { background: var(--bg-ink); color: #fff; }
.surface-ink h1, .surface-ink h2, .surface-ink h3, .surface-ink h4 { color: #fff; }
.surface-ink p { color: var(--slate-300); }

/* Chip / tag */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.04em;
  padding: 5px 11px; border-radius: var(--r-full, 999px); border-radius: 999px;
  background: var(--bg); color: var(--slate-600); border: 1px solid var(--line);
}
.chip-blue { background: var(--blue-tint); color: var(--blue-700); border-color: var(--blue-tint-2); }
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--blue); }
.chip .dot.red { background: var(--swiss); }
.chip .dot.green { background: #1f9d6b; }

/* Pill toggle group */
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--slate-500); transition: all .18s var(--ease); }
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }

/* ============================================================
   STAT / NUMBER
   ============================================================ */
.stat-num { font-weight: 800; font-size: clamp(40px, 5vw, 68px); letter-spacing: -0.04em; line-height: 0.9; color: var(--ink); font-feature-settings: "tnum" on, "lnum" on; }
.stat-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-subtle); margin-top: 12px; }

/* ============================================================
   CASE PROFILE CARD — signature artifact
   ============================================================ */
.profile-card {
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--sh-4); overflow: hidden; width: 100%;
}
.pc-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fcfdff, #f7f9fc); }
.pc-id { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--slate-500); }
.pc-live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate-500); }
.pc-live .pulse { width: 7px; height: 7px; border-radius: 999px; background: #1f9d6b; box-shadow: 0 0 0 0 rgba(31,157,107,0.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31,157,107,0.45);} 70% { box-shadow: 0 0 0 7px rgba(31,157,107,0);} 100% { box-shadow: 0 0 0 0 rgba(31,157,107,0);} }
.pc-body { padding: 6px 0; }
.pc-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.pc-row:last-child { border-bottom: none; }
.pc-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-faint); }
.pc-v { font-size: 15px; font-weight: 600; color: var(--ink); text-align: right; }
.pc-v .sub { display: block; font-weight: 400; font-size: 12.5px; color: var(--fg-subtle); font-family: var(--mono); }

/* complexity meter */
.meter { display: flex; gap: 4px; }
.meter i { width: 18px; height: 7px; border-radius: 2px; background: var(--line-2); transition: background .4s var(--ease); }
.meter i.on { background: var(--blue); }
.meter.amber i.on { background: #d98a1f; }

/* match preview footer */
.pc-match { background: var(--bg); padding: 16px 20px; display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); }
.pc-avatar { width: 42px; height: 42px; border-radius: 999px; flex: none; background: linear-gradient(135deg, var(--slate-700), var(--slate-900)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.pc-match-info { flex: 1; min-width: 0; }
.pc-match-name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.pc-match-meta { font-family: var(--mono); font-size: 11px; color: var(--fg-subtle); letter-spacing: 0.04em; }
.fit-badge { font-family: var(--mono); font-size: 12px; font-weight: 600; color: #1f9d6b; background: #e8f6ef; border: 1px solid #c9ebd9; padding: 5px 10px; border-radius: 999px; }

/* ============================================================
   PROCESS STEPS
   ============================================================ */
.step { display: flex; gap: 20px; padding: 26px 0; border-top: 1px solid var(--line); }
.step-num { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--blue); letter-spacing: 0.05em; padding-top: 4px; flex: none; width: 40px; }
.step-body h3 { margin-bottom: 8px; }

/* ============================================================
   ICON BADGE
   ============================================================ */
.ibadge { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--blue-tint); color: var(--blue-700); flex: none; }
.ibadge svg { width: 22px; height: 22px; }
.ibadge.ink { background: var(--ink); color: #fff; }

/* feature list */
.flist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.flist li { display: flex; gap: 12px; align-items: flex-start; color: var(--slate-600); font-size: 16px; }
.flist li svg { width: 19px; height: 19px; flex: none; color: var(--blue); margin-top: 2px; }
.flist.on-dark li { color: var(--slate-300); }
.flist.on-dark li svg { color: #5b8cff; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--bg-ink); color: var(--slate-300); padding: 80px 0 40px; }
.footer h4 { color: #fff; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-col-t { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate-500); margin-bottom: 18px; }
.footer a.fl { display: block; color: var(--slate-300); font-size: 14.5px; padding: 7px 0; transition: color .15s var(--ease); }
.footer a.fl:hover { color: #fff; }
.footer .brand-text { color: #fff; }
.footer-bottom { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; font-size: 13px; color: var(--slate-500); }

/* ============================================================
   SCROLL REVEAL  (visible by default — animation is enhancement)
   ============================================================ */
.reveal { opacity: 1; transform: none; }
body.anims-on .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
body.anims-on .reveal.in { opacity: 1; transform: none; }
body.anims-on .reveal[data-d="1"] { transition-delay: .07s; }
body.anims-on .reveal[data-d="2"] { transition-delay: .14s; }
body.anims-on .reveal[data-d="3"] { transition-delay: .21s; }
body.anims-on .reveal[data-d="4"] { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) { body.anims-on .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   MISC
   ============================================================ */
.grid-bg {
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}
.kicker-row { display: flex; flex-wrap: wrap; gap: 10px; }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.maxw-680 { max-width: 680px; }
.maxw-760 { max-width: 760px; }
.mt-s { margin-top: 16px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 44px; }

/* canton coverage strip */
.canton-row { display: flex; flex-wrap: wrap; gap: 8px; }
.canton {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.05em;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--slate-600); background: #fff; transition: all .18s var(--ease);
}
.canton.hot { background: var(--ink); color: #fff; border-color: var(--ink); }

/* quote */
.pullquote { font-size: clamp(24px, 3vw, 38px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.22; color: var(--ink); text-wrap: balance; }
.pullquote .text-blue { font-weight: 700; }
