/* ==========================================================================
   eggimann entlastet — Base layer
   Design tokens, typography, reset, layout primitives, utilities.
   ========================================================================== */

/* --- Fonts (self-hosted, no third-party requests) ----------------------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/intertight-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/intertight-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Design tokens ------------------------------------------------------ */
:root {
  /* Ink & neutrals — warm, never sterile */
  --ink: #181210;
  --ink-soft: #463c38;
  --mute: #7c6f6a;
  --mute-light: #9b908b;
  --line: #e7dfd9;
  --line-strong: #d5c8c0;

  /* Papers */
  --paper: #fcf9f6;
  --paper-2: #f5efe9;
  --paper-3: #efe6de;
  --blush: #f9eef2;
  --blush-2: #f3e2e9;
  --white: #ffffff;

  /* Brand */
  --accent: #c2004b;
  --accent-dark: #9c033e;
  --accent-soft: #e05a89;
  --accent-tint: rgba(194, 0, 75, .08);
  --wine: #5c0a2b;
  --wine-soft: #7a1a3e;

  /* Night sections */
  --night: #1a0b11;
  --night-2: #26121a;
  --night-line: #3d2029;

  /* Typography */
  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-body: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --fs-display: clamp(2.9rem, 1.1rem + 6.4vw, 6.25rem);
  --fs-h1: clamp(2.35rem, 1.35rem + 3.9vw, 4.6rem);
  --fs-h2: clamp(1.95rem, 1.32rem + 2.5vw, 3.35rem);
  --fs-h3: clamp(1.45rem, 1.2rem + 1.05vw, 2.05rem);
  --fs-h4: clamp(1.15rem, 1.06rem + .38vw, 1.4rem);
  --fs-lead: clamp(1.08rem, 1rem + .48vw, 1.35rem);
  --fs-body: clamp(1.0rem, .97rem + .17vw, 1.115rem);
  --fs-small: .9375rem;
  --fs-xs: .8125rem;
  --fs-label: .72rem;

  /* Rhythm */
  --gutter: clamp(1.25rem, 4.5vw, 4.5rem);
  --maxw: 1360px;
  --maxw-narrow: 780px;
  --section-y: clamp(4.5rem, 8vw, 9.5rem);
  --section-y-tight: clamp(3.25rem, 5.5vw, 6rem);

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .38s;

  --radius: 2px;
  --radius-md: 4px;
  --shadow-soft: 0 1px 2px rgba(24, 18, 16, .04), 0 12px 32px -18px rgba(24, 18, 16, .22);
  --shadow-lift: 0 2px 4px rgba(24, 18, 16, .05), 0 26px 56px -26px rgba(24, 18, 16, .3);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
/* `clip` instead of `hidden`: it prevents sideways scrolling without turning
   the element into a scroll container, which would break `position: sticky`. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  /* long German compounds must never push a column wider than its container */
  overflow-wrap: break-word;
}

/* Single-column stacks are implicit grids; without this the implicit column is
   sized by the longest word (min-content) and overflows narrow viewports. */
:where(.grid, .stack, .sec-head, .split__body, .tile, .step, .audience__item,
       .svc-detail__head, .svc-detail__col, .contact-block, .contact-info,
       .team-card__body, .field, .fieldset, .newsletter, .facts, .tick-list,
       .pillar__list, .checklist, .file-list, .cart-lines, .rail-nav,
       .portal__nav, .portal__aside, .calc__form, .calc__range, .calc__rows,
       .footer__links, .footer__contact, .timeline, .tl-body, .quote,
       .job, .job__head, .job__col, .acc, .event-list, .insight, .form-grid,
       .card-grid, .steps, .pillars, .audience,
       .portal, .shop-layout, .sticky-layout, .split, .contact-grid, .auth,
       .calc, .post-feature, .cta-band__grid, .hero__grid, .page-hero__grid,
       .svc-detail__grid, .job__cols, .portal__panel, .card--event, .newsletter__row) {
  grid-auto-columns: minmax(0, 1fr);
}

/* Wide content scrolls inside its own box instead of widening the page. */
.table-wrap { min-width: 0; }
body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 400; }
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
::selection { background: var(--accent); color: #fff; }

/* --- Focus -------------------------------------------------------------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}
.on-night :focus-visible, .site-footer :focus-visible { outline-color: #ff8ab4; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 999;
  background: var(--accent); color: #fff; padding: .8rem 1.35rem;
  font-size: var(--fs-small); font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* --- Typography --------------------------------------------------------- */
.display, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 100;
  line-height: 1.03;
  letter-spacing: -0.025em;
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
}
.display { font-size: var(--fs-display); line-height: .98; letter-spacing: -0.035em; }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); line-height: 1.06; }
.h3 {
  font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.018em;
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 40;
}
.h4 {
  font-family: var(--font-body); font-size: var(--fs-h4); font-weight: 600;
  line-height: 1.3; letter-spacing: -0.014em;
}

.display em, .h1 em, .h2 em, .h3 em {
  font-style: italic;
  font-variation-settings: 'SOFT' 30, 'WONK' 1, 'opsz' 100;
  color: var(--accent);
}
.display .thin, .h1 .thin, .h2 .thin { color: var(--mute); }

.lead {
  font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-soft);
  letter-spacing: -0.011em; text-wrap: pretty;
}
.body-lg { font-size: 1.0625rem; line-height: 1.7; }
.muted { color: var(--mute); }
.small { font-size: var(--fs-small); }
.xs { font-size: var(--fs-xs); }

.label {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: var(--fs-label); font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); line-height: 1;
}
.label::before {
  content: ''; width: 1.75rem; height: 1px; background: currentColor; opacity: .55;
}
.label--plain::before { display: none; }
.label--mute { color: var(--mute); }
.on-night .label { color: #ff7fae; }

.eyebrow {
  font-size: var(--fs-label); font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--mute);
}

.num {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 100;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  line-height: 1; color: var(--accent); letter-spacing: -0.03em;
}

.rich > * + * { margin-top: 1.1em; }
.rich strong { font-weight: 600; color: var(--ink); }
.rich a:not(.btn) {
  color: var(--accent); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: .22em;
}
.rich a:not(.btn):hover { color: var(--accent-dark); }

/* --- Layout primitives -------------------------------------------------- */
.shell {
  width: min(100% - (var(--gutter) * 2), var(--maxw));
  margin-inline: auto;
}
.shell--wide { --maxw: 1560px; }
.shell--narrow { --maxw: 900px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: var(--section-y-tight); }
.section--top0 { padding-top: 0; }
.section--bottom0 { padding-bottom: 0; }

.paper-2 { background: var(--paper-2); }
.paper-3 { background: var(--paper-3); }
.blush { background: var(--blush); }

.on-night { background: var(--night); color: #f3e9ec; }
.on-night .h1, .on-night .h2, .on-night .h3, .on-night .display { color: #fdf6f8; }
.on-night .lead { color: #d8c6cd; }
.on-night .muted { color: #b6a1a9; }
.on-night hr, .on-night .rule { border-color: var(--night-line); }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 3rem); }
.stack > * + * { margin-top: var(--stack, 1.25rem); }

.rule { border-top: 1px solid var(--line); }

/* Section heading block: label + heading + optional lead, editorial left align */
.sec-head { display: grid; gap: 1.15rem; max-width: 62ch; }
.sec-head--split {
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  align-items: end; gap: 1.5rem;
}
@media (min-width: 62rem) {
  .sec-head--split { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 5rem); }
  .sec-head--split .sec-head__aside { padding-bottom: .35rem; }
}

/* --- Reveal animation ---------------------------------------------------
   Progressive enhancement: content is visible by default and only starts
   hidden once the inline head script has confirmed that JavaScript runs. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --- Utilities ---------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.no-wrap { white-space: nowrap; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.hide-sm { display: none; }
@media (min-width: 48rem) { .hide-sm { display: revert; } .only-sm { display: none !important; } }
