/* ==========================================================================
   ERFT DIGITAL 2026 — Design System  ·  CLEAN / LIGHT (Apple-style)
   Principle: subtraction. One accent, used rarely. Hairlines. Whitespace.
   No glows, no gradients-on-everything, no emojis, flat surfaces.
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* --- Surfaces (light, calm) --- */
  --bg:           #fbfbfd;   /* page (off-white) */
  --bg-2:         #f5f5f7;   /* alternating quiet sections */
  --surface:      #ffffff;   /* cards */
  --surface-2:    #f5f5f7;   /* hover / subtle fill */
  --surface-3:    #ececef;
  --border:       #e6e6eb;   /* hairlines */
  --border-2:     #d3d3da;   /* stronger hairlines / inputs */

  /* --- Text --- */
  --text:         #1d1d1f;   /* near-black (primary) */
  --text-muted:   #5f6066;   /* secondary  (~6.8:1 on --bg) */
  --text-dim:     #6b6b70;   /* tertiary — AA on light (~4.9:1) */

  /* --- The ONE accent (used sparingly) --- */
  --blue:         #0071e3;   /* button fill (Apple blue) */
  --blue-hover:   #0077ed;
  --blue-link:    #0066cc;   /* text/links on white — AA (~5.6:1) */
  /* legacy aliases so older class refs resolve to the calm scale */
  --blue-600: var(--blue); --blue-700: #0061c9; --blue-bright: var(--blue-link);
  --sky: var(--blue); --cyan: var(--blue-link); --cyan-bright: var(--blue-link);
  --indigo: var(--blue); --indigo-600: var(--blue); --indigo-bright: var(--blue-link);
  --violet-600: var(--blue); --purple-600: var(--blue);
  --magenta: var(--blue-link); --magenta-bright: var(--blue-link);

  /* gradients neutralised to flat fills (kept as vars so refs don't break) */
  --accent-grad:      var(--blue);
  --accent-grad-soft: var(--surface-2);
  --hairline-grad:    var(--border);

  /* --- Shadow (subtle only) — no glows --- */
  --glow-indigo:  none;
  --glow-magenta: none;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 6px 20px -8px rgba(20,20,40,.12);
  --shadow-lg: 0 18px 50px -22px rgba(20,20,40,.18);
  --shadow-glow: var(--shadow-lg);

  /* --- Typography --- */
  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-display: clamp(2.6rem, 1.4rem + 4.4vw, 4.7rem);
  --fs-h1:      clamp(2.1rem, 1.4rem + 2.4vw, 3.1rem);
  --fs-h2:      clamp(1.7rem, 1.25rem + 1.6vw, 2.4rem);
  --fs-h3:      clamp(1.2rem, 1.05rem + 0.6vw, 1.4rem);
  --fs-lead:    clamp(1.08rem, 1rem + 0.45vw, 1.3rem);
  --fs-body:    1rem;
  --fs-sm:      0.9rem;
  --fs-eyebrow: 0.8rem;

  --lh-tight: 1.05;
  --lh-snug:  1.18;
  --lh-body:  1.62;

  /* --- Spacing (generous) --- */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4.5rem;
  --sp-9: 7rem;     --sp-10: 9.5rem;

  /* --- Radii --- */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 28px; --r-full: 980px;

  /* --- Layout --- */
  --container: 1120px;
  --container-narrow: 760px;
  --gutter: clamp(1.25rem, 0.6rem + 2.6vw, 2.5rem);
  --header-h: 68px;

  /* --- Motion --- */
  --t-fast: .15s; --t: .25s; --t-slow: .55s;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --z-header: 100; --z-menu: 200; --z-toast: 300;
}

/* ==========================================================================
   2. RESET / BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul[role="list"] { list-style: none; padding: 0; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: var(--lh-snug); letter-spacing: -0.03em; color: var(--text); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { text-wrap: pretty; }
strong { font-weight: 600; color: var(--text); }
::selection { background: rgba(0,113,227,.16); color: var(--text); }

/* ==========================================================================
   3. LAYOUT PRIMITIVES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(4rem, 2.5rem + 7vw, 8rem); position: relative; }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.section--panel { background: var(--bg-2); }
.section--surface { background: var(--bg); }
.section--accent { background: var(--bg-2); }
/* dark accent band (used rarely, e.g. closing CTA) */
.section--dark { background: #0a0d14; color: #f4f6fa; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #f6f8fb; }

.stack > * + * { margin-top: var(--sp-4); }
.grid { display: grid; gap: var(--sp-6); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .split-collapse { grid-template-columns: 1fr !important; } }

/* ==========================================================================
   4. SECTION HEADERS / EYEBROW / TYPE HELPERS
   ========================================================================== */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.eyebrow--center { justify-content: center; }

.section-head { max-width: 680px; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: var(--sp-4); }
.section-head p { margin-top: var(--sp-4); color: var(--text-muted); font-size: var(--fs-lead); }

.lead { font-size: var(--fs-lead); color: var(--text-muted); line-height: var(--lh-body); }
.text-muted { color: var(--text-muted); }
/* headlines stay SOLID in the clean look (no gradient) */
.text-gradient { color: var(--text); -webkit-text-fill-color: currentColor; background: none; }
.section--dark .text-gradient { color: #f6f8fb; }

/* ==========================================================================
   5. BUTTONS — one system, calm (no glow, no gradient)
   ========================================================================== */
.btn {
  --btn-h: 50px; --btn-pad-x: 1.5rem; --btn-fs: 1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: var(--btn-h); padding-inline: var(--btn-pad-x);
  font-family: var(--font-body); font-weight: 500; font-size: var(--btn-fs);
  line-height: 1; letter-spacing: -0.01em; white-space: nowrap;
  border-radius: var(--r-full); border: 1px solid transparent;
  transition: background var(--t) var(--ease), border-color var(--t), color var(--t), transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn .btn-arrow { transition: transform var(--t) var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

.btn--sm { --btn-h: 40px; --btn-pad-x: 1.1rem; --btn-fs: 0.9rem; }
.btn--lg { --btn-h: 54px; --btn-pad-x: 1.8rem; --btn-fs: 1.05rem; }
.btn--block { display: flex; width: 100%; }

.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-hover); }

.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn--secondary:hover { background: var(--surface-2); border-color: var(--text-dim); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn--ghost:hover { background: var(--surface-2); }
.section--dark .btn--ghost { color: #f4f6fa; border-color: rgba(255,255,255,.25); }
.section--dark .btn--ghost:hover { background: rgba(255,255,255,.08); }
.section--dark .btn--primary { background: #fff; color: #0a0d14; }
.section--dark .btn--primary:hover { background: #e6e8ec; }

/* text link (Apple "Mehr ›") — the accent, used sparingly */
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-weight: 500; color: var(--blue-link);
  transition: gap var(--t) var(--ease);
}
.link-arrow:hover { gap: 0.55rem; }
.section--dark .link-arrow { color: #6aa6ff; }

/* ==========================================================================
   6. COMPONENTS — Card, Badge, Chip, Stat, Input
   ========================================================================== */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  transition: transform var(--t) var(--ease), border-color var(--t), box-shadow var(--t);
}
.card--hover:hover { border-color: var(--border-2); box-shadow: var(--shadow-md); }
.card--glow:hover { border-color: var(--border-2); box-shadow: var(--shadow-md); }
/* featured = subtle blue ring, no gradient */
.card--feature { border-color: var(--blue); }

.badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.35rem 0.8rem; border-radius: var(--r-full);
  font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
}
.badge--live .dot { width: 7px; height: 7px; border-radius: 50%; background: #34c759; }

.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem; border-radius: var(--r-full);
  font-size: var(--fs-sm); color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
}

.num-tag { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 500; color: var(--text-dim); }

.stat .stat-value {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1;
  color: var(--text); letter-spacing: -0.03em;
}
.stat .stat-label { margin-top: var(--sp-2); color: var(--text-muted); font-size: var(--fs-sm); }

/* form inputs */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); }
.field .req { color: var(--blue-link); }
.input, .textarea, .select {
  width: 100%; padding: 0.85rem 1rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-2); border-radius: var(--r-sm);
  transition: border-color var(--t), box-shadow var(--t);
}
.textarea { min-height: 150px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,113,227,.15);
}

/* ==========================================================================
   7. HEADER / NAV
   ========================================================================== */
.skip-link {
  position: fixed; top: -100%; left: 1rem; z-index: var(--z-toast);
  background: var(--blue); color: #fff; padding: .7rem 1.1rem;
  border-radius: var(--r-sm); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background var(--t), border-color var(--t), backdrop-filter var(--t);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(251,251,253,.8);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); }

.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; }
.brand-icon { height: 28px; width: auto; flex: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; flex: none; background: var(--blue); }
.brand b { color: var(--text); }
.brand span { color: var(--text-dim); }

.nav { display: flex; align-items: center; gap: var(--sp-2); }
.nav a {
  position: relative; padding: .5rem .75rem; border-radius: var(--r-sm);
  color: var(--text-muted); font-weight: 450; font-size: .94rem;
  transition: color var(--t);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

.header-cta { display: flex; align-items: center; gap: var(--sp-3); }

/* mobile menu toggle */
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: var(--r-sm); align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 1.5px; background: var(--text); border-radius: 2px;
  transition: transform var(--t) var(--ease), opacity var(--t);
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after { transform: translateY(4.5px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg) translateY(-1.4px); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav, .header-cta .btn { display: none; }
}

/* mobile menu panel (display-toggle, robust) */
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: var(--z-menu);
  display: none; flex-direction: column; gap: .2rem;
  padding: var(--sp-6) var(--gutter); overflow-y: auto;
  background: rgba(251,251,253,.98); backdrop-filter: blur(16px);
}
.mobile-menu.is-open { display: flex; }
@media (min-width: 901px) { .mobile-menu, .mobile-menu.is-open { display: none; } }
.mobile-menu a { padding: .95rem .4rem; font-size: 1.3rem; font-family: var(--font-display); font-weight: 500; color: var(--text); border-bottom: 1px solid var(--border); }
.mobile-menu .btn { margin-top: var(--sp-5); }

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); padding-block: var(--sp-8) var(--sp-6); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--sp-6); }
@media (max-width: 860px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-5) var(--sp-4); }
  .footer-col:first-child { grid-column: 1 / -1; }
  .site-footer { padding-block: var(--sp-6) var(--sp-5); }
  .footer-bottom { margin-top: var(--sp-5); }
}
.footer-h { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; color: var(--text-dim); margin-bottom: var(--sp-4); letter-spacing: .02em; }
.footer-col a { display: block; color: var(--text-muted); padding: .35rem 0; transition: color var(--t); }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; color: var(--text-dim); font-size: var(--fs-sm); }

/* ==========================================================================
   9. MOTION — gentle reveal (vertical only; calm)
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.reveal--left, .reveal--right, .reveal--scale { transform: translateY(20px); }
.reveal.is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"]{ transition-delay:.06s } [data-reveal-delay="2"]{ transition-delay:.12s }
[data-reveal-delay="3"]{ transition-delay:.18s } [data-reveal-delay="4"]{ transition-delay:.24s }
[data-reveal-delay="5"]{ transition-delay:.30s }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--left, .reveal--right, .reveal--scale { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ==========================================================================
   10. A11Y UTILITIES
   ========================================================================== */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
