/* =================================================================
   Erasmus Consulting Group
   Styled after zahlmann.com: white bg, black Aeonik-style sans,
   square buttons, 28px cream-bordered cards, minimal.
   Font: Manrope (free stand-in for Aeonik).
   ================================================================= */

:root {
  --bg:      #ffffff;   /* white */
  --ink:     #000000;   /* pure black text */
  --charcoal:#2f3235;   /* dark charcoal (button hover, dark sections) */
  --muted:   #7b838e;   /* secondary grey */
  --panel:   #ecf0f2;   /* light grey section bg */
  --cream:   #eae3d7;   /* warm card borders */
  --red:     #f0413a;   /* sparing accent */
  --line:    #e4e7ea;   /* hairlines */
  --on-dark: #ffffff;
  --on-dark-mut: #a6adb5;

  --font: "Manrope", "Aeonik", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --header-h: 78px;
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius-card: 28px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.5;
  font-weight: 400; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--ink); color: #fff; }
.dot { color: var(--red); }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; font-size: 0.9rem; font-weight: 500; transition: top .2s var(--ease); }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 10vw, 140px); scroll-margin-top: var(--header-h); }

/* ---------- shared type ---------- */
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
.eyebrow-invert { color: var(--on-dark-mut); }
.section-head { max-width: 760px; margin-bottom: clamp(44px, 6vw, 76px); }
.section-title { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; }
.section-lead { margin-top: 22px; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 60ch; line-height: 1.55; }

/* ---------- buttons (square, Zahlmann-style) ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; min-width: 160px; padding: 15px 30px;
  font-family: var(--font); font-size: 1rem; font-weight: 500; line-height: 1.4;
  text-align: center; white-space: nowrap; cursor: pointer;
  border: 1px solid var(--ink); border-radius: 0;
  background: var(--ink); color: #fff;
  transition: background-color .3s ease-out, border-color .3s ease-out, color .3s ease-out, transform .12s ease-out;
}
.button:hover { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.button:active { transform: scale(0.96); }
.button-sm { min-width: 0; padding: 11px 20px; font-size: 0.92rem; }
.button-block { width: 100%; }
.button-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.button-secondary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.button-invert { background: #fff; border-color: #fff; color: var(--ink); }
.button-invert:hover { background: var(--panel); border-color: var(--panel); color: var(--ink); }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h); display: flex; align-items: center; background: rgba(255,255,255,0.9); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); gap: 28px; }

.brand { font-weight: 700; font-size: 1.06rem; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.nav { margin-left: auto; }
.nav-list { display: flex; gap: 34px; }
.nav-list a { font-size: 0.96rem; font-weight: 500; color: var(--ink); transition: color .2s var(--ease); }
.nav-list a:hover { color: var(--charcoal); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.header-actions { display: flex; align-items: center; }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 6px; width: 42px; height: 42px; background: none; border: none; cursor: pointer; padding: 10px; }
.nav-toggle-bar { display: block; height: 2px; width: 100%; background: var(--ink); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- mobile menu ---------- */
.mobile-menu { position: fixed; inset: 0; z-index: 90; background: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s; }
.mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu nav { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(82%, 340px); }
.mobile-menu ul { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 26px; }
.mobile-menu a:not(.button) { font-weight: 700; font-size: 1.9rem; letter-spacing: -0.02em; color: var(--ink); padding: 8px; }
.mobile-menu a:not(.button):hover { color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding-top: calc(var(--header-h) + clamp(16px, 3vh, 36px)); padding-bottom: clamp(48px, 8vw, 96px); }
.hero-inner { max-width: 940px; }
.hero-eyebrow { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 26px; }
.hero-title { font-size: clamp(2.4rem, 4.3vw, 3.6rem); font-weight: 700; line-height: 1.06; letter-spacing: -0.03em; max-width: 20ch; }
.hero-sub { margin-top: 30px; font-size: clamp(1.1rem, 1.7vw, 1.35rem); color: var(--muted); max-width: 56ch; line-height: 1.5; }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- hero data-viz: animated bar chart (right side) ---------- */
.hero { overflow: hidden; }
.hero .container { position: relative; }
.hero-inner { position: relative; z-index: 1; max-width: 680px; }
.hero-viz { position: absolute; top: 0; bottom: 0; right: 0; width: min(34%, 420px); display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 0; }
.viz-chart { width: 100%; height: auto; max-height: 100%; display: block; overflow: visible; }

.viz-axis { stroke: #d3d7da; stroke-width: 1.4; }
.viz-avg { stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 5 6; opacity: 0.7; }
.viz-bars rect { fill: var(--ink); transform-box: fill-box; transform-origin: 50% 100%; animation: bar-rise 3.2s ease-in-out infinite; }
.viz-bars rect:nth-child(1) { animation-delay: 0s; }
.viz-bars rect:nth-child(2) { animation-delay: .18s; }
.viz-bars rect:nth-child(3) { animation-delay: .36s; }
.viz-bars rect:nth-child(4) { animation-delay: .54s; }
.viz-bars rect:nth-child(5) { animation-delay: .72s; }
.viz-bars rect:nth-child(6) { animation-delay: .90s; }
.viz-bars rect:nth-child(7) { animation-delay: 1.08s; }
.viz-bars .bar-peak { fill: var(--red); animation: none; transform: none; }
.viz-peakdot { fill: #fff; stroke: var(--red); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: viz-pulse 2.6s ease-in-out infinite; }
.viz-anno { fill: var(--muted); font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.viz-trend { fill: var(--red); }

@keyframes bar-rise { 0%, 100% { transform: scaleY(0.55); } 50% { transform: scaleY(1); } }
@keyframes viz-pulse { 0%, 100% { transform: scale(0.72); opacity: 0.55; } 50% { transform: scale(1.15); opacity: 1; } }

/* ---------- feature band (full-bleed image) ---------- */
.feature { position: relative; overflow: hidden; background: var(--ink); }
.feature-picture { display: block; }
.feature-img { width: 100%; height: clamp(380px, 62vh, 660px); object-fit: cover; object-position: center 42%; filter: grayscale(100%); }
.feature-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.72) 100%); }
.feature-inner { padding-bottom: clamp(40px, 6vw, 76px); }
.feature-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.72); margin: 0 0 16px; }
.feature-statement { color: #fff; font-size: clamp(1.6rem, 3.4vw, 3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; max-width: 22ch; }

/* ---------- expertise cards ---------- */
.expertise { background: var(--bg); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--bg); border: 1px solid var(--cream); border-radius: var(--radius-card); padding: 34px 32px 36px; transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(0,0,0,0.28); }
.card-no { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); }
.card h3 { font-size: 1.34rem; font-weight: 700; letter-spacing: -0.02em; margin: 20px 0 12px; }
.card p { font-size: 0.98rem; color: var(--muted); line-height: 1.55; }

/* ---------- approach (editorial list) ---------- */
.approach { background: var(--bg); }
.approach-list { border-top: 1px solid var(--ink); }
.approach-row { display: grid; grid-template-columns: 88px minmax(180px, 1fr) 2.1fr; align-items: baseline; column-gap: clamp(20px, 4vw, 56px); padding: clamp(28px, 3.4vw, 44px) 8px; border-bottom: 1px solid var(--line); transition: padding-left .3s var(--ease), background-color .3s var(--ease); }
.approach-row:hover { background: var(--panel); padding-left: 20px; }
.ar-index { font-size: clamp(1.4rem, 2vw, 2rem); font-weight: 700; letter-spacing: -0.02em; color: var(--muted); font-variant-numeric: tabular-nums; transition: color .3s var(--ease); }
.approach-row:hover .ar-index { color: var(--red); }
.ar-title { font-size: clamp(1.4rem, 2.2vw, 2rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.ar-desc { font-size: 1.02rem; color: var(--muted); line-height: 1.55; max-width: 60ch; }

/* ---------- practice (dark, with image) ---------- */
.practice { background: var(--ink); color: var(--on-dark); scroll-margin-top: var(--header-h); }
.practice-picture { display: block; }
.practice-img { width: 100%; height: clamp(300px, 46vh, 560px); object-fit: cover; object-position: center 35%; filter: grayscale(100%); display: block; }
.practice-body { padding-block: clamp(64px, 9vw, 128px); }
.practice .section-title { color: #fff; }
.practice .section-lead { color: var(--on-dark-mut); }
.practice-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.practice-copy .section-head { margin-bottom: 0; }
.practice-note { margin-top: 24px; color: var(--on-dark-mut); font-size: 1.02rem; line-height: 1.6; max-width: 54ch; }
.practice-copy .button { margin-top: 36px; }
.practice-facts { display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,0.16); }
.practice-facts li { display: flex; flex-direction: column; gap: 8px; padding: 24px 0; border-bottom: 1px solid rgba(255,255,255,0.16); }
.fact-k { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-mut); }
.fact-v { font-size: 1.28rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; line-height: 1.25; }

/* ---------- contact ---------- */
.contact { background: var(--bg); padding-block: clamp(44px, 5vw, 72px); }
.contact .section-head { margin-bottom: clamp(28px, 3vw, 40px); }
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(36px, 5vw, 72px); align-items: start; }
.contact-details ul { display: flex; flex-direction: column; gap: 22px; }
.contact-details li { display: flex; flex-direction: column; gap: 6px; }
.contact-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.contact-details a, .contact-value { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.contact-details a:hover { text-decoration: underline; text-underline-offset: 4px; }

.contact-form-wrap { background: var(--bg); border: 1px solid var(--cream); border-radius: var(--radius-card); padding: clamp(28px, 3.5vw, 44px); }
.contact-form { display: flex; flex-direction: column; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 14px; display: flex; flex-direction: column; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.field input, .field textarea { font-family: var(--font); font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid #d3d7da; border-radius: 8px; padding: 13px 15px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,0.08); }
.field.invalid input, .field.invalid textarea { border-color: var(--red); background: #fef5f4; }
.field-error { min-height: 0; font-size: 0.8rem; color: var(--red); margin-top: 6px; opacity: 0; transform: translateY(-3px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.field.invalid .field-error { opacity: 1; transform: none; }
.contact-form .button { margin-top: 6px; }
.form-status { margin-top: 14px; font-size: 0.92rem; min-height: 1.1em; }
.form-status.success { color: #198754; }
.form-status.error { color: var(--red); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-mut); padding-top: clamp(60px, 7vw, 96px); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.brand-footer { color: #fff; }
.footer-tag { margin-top: 20px; max-width: 42ch; color: var(--on-dark-mut); font-size: 0.94rem; line-height: 1.55; }
.footer-title { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #6b727b; margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: #c3c9cf; font-size: 0.96rem; transition: color .2s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-muted { color: #6b727b; font-size: 0.94rem; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-block: 26px; border-top: 1px solid rgba(255,255,255,0.12); }
.footer-bottom p { font-size: 0.85rem; color: #6b727b; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ================= responsive ================= */
@media (max-width: 1160px) {
  .hero-viz { display: none; }
}
@media (max-width: 1040px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .approach-row { grid-template-columns: 64px 1fr; row-gap: 12px; }
  .approach-row .ar-desc { grid-column: 2; }
  .practice-grid { grid-template-columns: 1fr; gap: 44px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 560px) {
  :root { --header-h: 66px; }
  .card-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .button { min-width: 0; width: 100%; }
  .hero-actions .button { width: auto; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
