/* ═══════════════════════════════════════════════════
   SCHERBARTH SOLUTIONS · main.css
   Core design system – shared across all pages
   Vercel-inspired · Inter 400/500/600
═══════════════════════════════════════════════════ */

/* ── VARIABLES ─────────────────────────────────── */
:root {
  --canvas:        #ffffff;
  --canvas-soft:   #fafafa;
  --canvas-soft-2: #f5f5f5;
  --ink:           #171717;
  --body-color:    #4d4d4d;
  --mute:          #888888;
  --hairline:      #ebebeb;
  --hairline-s:    #a1a1a1;
  --link:          #0070f3;

  --sh-1: 0 1px 1px rgba(0,0,0,.04), 0 2px 2px rgba(0,0,0,.06), inset 0 0 0 1px rgba(0,0,0,.06);
  --sh-2: 0 2px 4px rgba(0,0,0,.05), 0 8px 16px rgba(0,0,0,.07), inset 0 0 0 1px rgba(0,0,0,.06);
  --sh-3: 0 2px 4px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.09), inset 0 0 0 1px rgba(0,0,0,.06);

  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-pill: 100px;
  --r-full: 9999px;

  --container: 1200px;
  --section-v: 120px;
}

/* ── RESET & BASE ──────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--canvas-soft);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { width: 100%; display: block; object-fit: cover; }
a   { text-decoration: none; color: inherit; }

.container {
  width: min(92%, var(--container));
  margin: 0 auto;
}

/* ── BUTTONS ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: opacity .15s, background .15s, border-color .15s;
  white-space: nowrap;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-md { height: 40px; padding: 0 20px; font-size: 14px; border-radius: var(--r-pill); }
.btn-lg { height: 48px; padding: 0 28px; font-size: 15px; border-radius: var(--r-pill); }

.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--sh-1); }
.btn-primary:hover { opacity: .82; }

.btn-secondary { background: var(--canvas); color: var(--ink); border-color: var(--hairline); box-shadow: var(--sh-1); }
.btn-secondary:hover { background: var(--canvas-soft-2); border-color: var(--hairline-s); }

/* ── NAVBAR ────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  height: 64px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow .25s;
}
.navbar.scrolled {
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.05);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo img { height: 34px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; gap: 2px; }

.nav-link {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 400;
  color: var(--body-color);
  border-radius: var(--r-full);
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--ink); background: var(--canvas-soft-2); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--r-md);
}
.nav-toggle:hover { background: var(--canvas-soft-2); }

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6.5px)  rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.nav-mobile[hidden] { display: none; }

.nav-mobile nav {
  width: min(92%, var(--container));
  margin: 0 auto;
  padding: 12px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-mobile nav a {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--body-color);
  border-radius: var(--r-md);
  transition: background .15s, color .15s;
}
.nav-mobile nav a:hover { background: var(--canvas-soft); color: var(--ink); }
.nav-mobile nav .btn-primary { margin-top: 8px; justify-content: center; border-radius: var(--r-pill); }

/* ── SECTION UTILITIES ─────────────────────────── */
.section     { padding: var(--section-v) 0; background: var(--canvas-soft); }
.section-alt { padding: var(--section-v) 0; background: var(--canvas); }

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 14px;
}

.section-head  { margin-bottom: 48px; }

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 14px;
  max-width: 680px;
}

.section-desc {
  font-size: 16px;
  color: var(--body-color);
  max-width: 540px;
  line-height: 1.7;
}

/* ── FOOTER ────────────────────────────────────── */
footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hairline);
}

.footer-brand img { height: 26px; width: auto; margin-bottom: 14px; }
.footer-brand p   { font-size: 13px; color: var(--mute); line-height: 1.6; max-width: 220px; }

.footer-col h6 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}
.footer-col a,
.footer-col button {
  display: block;
  font-size: 13px;
  color: var(--mute);
  margin-bottom: 8px;
  transition: color .15s;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  line-height: 1.5;
}
.footer-col a:hover,
.footer-col button:hover { color: var(--ink); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-copyright { font-size: 12px; color: var(--mute); }

/* Simplified footer for error pages */
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { font-size: 12px; color: var(--mute); transition: color .15s; }
.footer-links a:hover { color: var(--ink); }

/* ── COOKIE BANNER ─────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  width: min(calc(100% - 32px), 720px);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 20px 24px;
  box-shadow: var(--sh-3);
  animation: cookieIn .3s ease;
}
.cookie-banner[hidden] { display: none; }

@keyframes cookieIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.cookie-inner { display: flex; align-items: center; gap: 20px; }
.cookie-text  { flex: 1; min-width: 0; }
.cookie-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.cookie-desc  { font-size: 13px; color: var(--mute); line-height: 1.5; }
.cookie-desc a { color: var(--link); }
.cookie-desc a:hover { text-decoration: underline; }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-btns .btn-sm { border-radius: var(--r-sm); }

/* ── SCROLL & LOAD ANIMATIONS ──────────────────── */
.fi {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.fi.vis { opacity: 1; transform: translateY(0); }
.fi-d1  { transition-delay: .1s; }
.fi-d2  { transition-delay: .2s; }
.fi-d3  { transition-delay: .3s; }

.hero-anim { opacity: 0; animation: heroUp .6s ease forwards; }
.hero-anim.d1 { animation-delay: .1s; }
.hero-anim.d2 { animation-delay: .22s; }
.hero-anim.d3 { animation-delay: .36s; }

@keyframes heroUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── LEGAL PAGE HEADER ─────────────────────────── */
.page-header {
  background: var(--canvas);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--hairline);
}
.page-header .eyebrow { margin-bottom: 12px; }
.page-header h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1.1;
}

/* ── LEGAL CONTENT ─────────────────────────────── */
.legal-wrap    { padding: 64px 0 96px; background: var(--canvas-soft); }
.legal-content { max-width: 780px; }

.legal-content h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 40px 0 12px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}
.legal-content h2:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.legal-content h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 24px 0 8px; }
.legal-content p  { font-size: 15px; color: var(--body-color); line-height: 1.75; margin-bottom: 14px; }
.legal-content ul { margin: 0 0 14px 0; padding-left: 20px; }
.legal-content li { font-size: 15px; color: var(--body-color); line-height: 1.75; margin-bottom: 6px; }
.legal-content a  { color: var(--link); }
.legal-content a:hover { text-decoration: underline; }
.legal-content strong { color: var(--ink); }
.legal-content code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 13px;
  background: var(--canvas-soft-2);
  padding: 2px 6px;
  border-radius: var(--r-xs);
}

.inline-reset-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-1);
  transition: background .15s, border-color .15s;
  margin: 12px 0 14px;
}
.inline-reset-btn:hover { background: var(--canvas-soft-2); border-color: var(--hairline-s); }

/* ── ERROR PAGE LAYOUT ─────────────────────────── */
.is-error-layout { min-height: 100dvh; display: flex; flex-direction: column; }
.is-error-layout footer { padding: 32px 0 24px; margin-top: auto; }

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  :root { --section-v: 80px; }

  .nav-links  { display: none; }
  .nav-cta    { display: none; }
  .nav-toggle { display: flex; }

  .footer-grid   { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-btns  { flex-wrap: wrap; }
  .cookie-btns .btn-sm { flex: 1; }
}
