/* ELIT Metallverarbeitung — Design System
   Art direction: Markenfarben aus Logo/Banner — tiefes Aubergine, Türkis-Akzent, Violett als Sekundärton. */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --radius: 4px;
  --radius-lg: 8px;
  --maxw: 1180px;
  --font-display: 'Cabinet Grotesk', 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

:root, [data-theme='light'] {
  --color-bg: #f6f5f8;
  --color-surface: #ffffff;
  --color-surface-offset: #edeaf2;
  --color-deep: #271c3c;
  --color-deep-2: #1e1530;
  --color-deep-text: #eae7f1;
  --color-border: #dcd7e5;
  --color-divider: #e6e2ec;
  --color-text: #221733;
  --color-text-muted: #5c5570;
  --color-text-faint: #8a839b;
  --color-primary: #0e6b66;
  --color-primary-hover: #0a5450;
  --color-on-primary: #ffffff;
  --color-brand-teal: #3fa9a5;
  --color-brand-violet: #7b62b8;
  --shadow-sm: 0 1px 2px rgba(34, 23, 51, 0.06), 0 1px 3px rgba(34, 23, 51, 0.05);
  --shadow-md: 0 10px 28px rgba(34, 23, 51, 0.10);
}

[data-theme='dark'] {
  --color-bg: #1a1229;
  --color-surface: #241a38;
  --color-surface-offset: #2e2246;
  --color-deep: #150e22;
  --color-deep-2: #100a1a;
  --color-deep-text: #eae7f1;
  --color-border: #3c3055;
  --color-divider: #2c2140;
  --color-text: #ece8f4;
  --color-text-muted: #aaa2bd;
  --color-text-faint: #857d99;
  --color-primary: #4fc0b8;
  --color-primary-hover: #6ad2ca;
  --color-on-primary: #0d1c1b;
  --color-brand-teal: #4fc0b8;
  --color-brand-violet: #9b83d6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); letter-spacing: -0.01em; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space-5); }
@media (min-width: 768px) { .wrap { padding-inline: var(--space-8); } }

section { padding-block: clamp(var(--space-16), 9vw, var(--space-32)); }

.eyebrow {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.lead { font-size: var(--text-base); color: var(--color-text-muted); max-width: 62ch; }
.section-head { max-width: 66ch; margin-bottom: clamp(var(--space-10), 5vw, var(--space-16)); }
.section-head p { margin-top: var(--space-4); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
  padding: var(--space-3) var(--space-6); min-height: 48px;
  border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn--primary:hover { background: var(--color-primary-hover); }
.btn--ghost { border-color: var(--color-border); color: var(--color-text); background: transparent; }
.btn--ghost:hover { border-color: var(--color-text-muted); }
.btn--onDark { border-color: rgba(233, 232, 229, 0.32); color: var(--color-deep-text); background: transparent; }
.btn--onDark:hover { border-color: rgba(233, 232, 229, 0.7); }
.btn--wa { background: #1f7a45; color: #fff; }
.btn--wa:hover { background: #196637; }
.btn--full { width: 100%; }

:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: var(--radius);
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.header--scrolled { border-bottom-color: var(--color-divider); box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; gap: var(--space-4); min-height: 72px; }
.brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; margin-right: auto; }
.brand__mark { flex: none; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.1; }
.brand__sub { display: block; font-family: var(--font-body); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-faint); }

.nav { display: none; gap: var(--space-6); }
.nav a { font-size: var(--text-sm); text-decoration: none; color: var(--color-text-muted); font-weight: 500; transition: color 0.2s var(--ease); }
.nav a:hover { color: var(--color-text); }
.header__cta { display: none; }
@media (min-width: 900px) {
  .nav { display: flex; align-items: center; }
  .header__cta { display: inline-flex; }
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  background: transparent; color: var(--color-text); cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--color-text-muted); }
.icon-btn svg { width: 18px; height: 18px; }
[data-theme='dark'] .icon-sun { display: none; }
:root:not([data-theme='dark']) .icon-moon { display: none; }

/* ---------- Hero ---------- */
.hero { background: var(--color-deep); color: var(--color-deep-text); padding-block: 0; position: relative; }
.hero__grid { display: grid; gap: 0; }
.hero__body { padding-block: clamp(var(--space-12), 8vw, var(--space-24)); }
.hero h1 { color: #fff; max-width: 16ch; }
.hero__sub { margin-top: var(--space-6); color: #c5bed6; max-width: 52ch; font-size: var(--text-base); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.hero__actions .btn { flex: 1 1 200px; }
.hero__eyebrow { color: #5fc9c1; }
.hero__media { position: relative; min-height: 260px; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(39, 28, 60, 0.72) 0%, rgba(39, 28, 60, 0.15) 45%);
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr 1fr; align-items: stretch; }
  .hero__media { min-height: 100%; }
  .hero__media::after { background: linear-gradient(90deg, rgba(39, 28, 60, 0.92) 0%, rgba(39, 28, 60, 0.05) 45%); }
  .hero__actions .btn { flex: 0 0 auto; }
}

.factbar { border-top: 1px solid rgba(234, 231, 241, 0.14); background: var(--color-deep-2); color: var(--color-deep-text); }
.factbar ul { list-style: none; margin: 0; padding: var(--space-6) 0; display: grid; gap: var(--space-4); }
.factbar li { display: block; font-size: var(--text-sm); color: #c5bed6; line-height: 1.45; }
.factbar li span { display: block; margin-top: 2px; }
.factbar strong { color: #fff; font-weight: 600; }
@media (min-width: 700px) { .factbar ul { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Cards ---------- */
.cards { display: grid; gap: var(--space-5); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { border-color: color-mix(in oklab, var(--color-primary) 45%, var(--color-border)); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card__num { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.16em; color: var(--color-primary); }
.card p { color: var(--color-text-muted); font-size: var(--text-sm); }
.card ul { margin: 0; padding-left: 1.1em; color: var(--color-text-muted); font-size: var(--text-sm); }
.card li { margin-top: var(--space-1); }

/* ---------- Split ---------- */
.split { display: grid; gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split__media { order: -1; }
}
.split__media img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.split__body p + p { margin-top: var(--space-4); }
.split__body .lead { margin-top: var(--space-4); }

.checklist { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.checklist li { display: flex; gap: var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
.checklist svg { flex: none; width: 18px; height: 18px; color: var(--color-primary); margin-top: 3px; }

.band { background: var(--color-surface-offset); }

/* ---------- Steps ---------- */
.steps { display: grid; gap: var(--space-6); counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { border-top: 2px solid var(--color-primary); padding-top: var(--space-5); }
.step h3 { margin-bottom: var(--space-2); }
.step p { color: var(--color-text-muted); font-size: var(--text-sm); }
.step__idx { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.16em; color: var(--color-text-faint); }

/* ---------- Standort ---------- */
.places { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); padding: 0; list-style: none; }
.places li {
  font-size: var(--text-xs); font-weight: 500; padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-muted);
}

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; gap: clamp(var(--space-8), 5vw, var(--space-12)); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.15fr; align-items: start; } }

.infocard {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6);
}
.infocard + .infocard { margin-top: var(--space-5); }
.infocard h3 { font-size: var(--text-base); font-family: var(--font-body); font-weight: 700; }
.contact-list { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-4); }
.contact-list a, .contact-list span { text-decoration: none; display: block; }
.contact-list a:hover { color: var(--color-primary); }
.contact-list .label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-text-faint); display: block; margin-bottom: 2px; }
.contact-list .value { font-size: var(--text-sm); font-weight: 600; }

.form { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: clamp(var(--space-5), 4vw, var(--space-8)); }
.field { display: block; margin-bottom: var(--space-5); }
.field > span { display: block; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: var(--space-2); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--text-base);
  padding: var(--space-3) var(--space-4); min-height: 48px;
  color: var(--color-text); background: var(--color-bg);
  border: 1px solid var(--color-border); border-radius: var(--radius);
  transition: border-color 0.2s var(--ease);
}
.field textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-primary); outline-offset: 1px; }
.field-row { display: grid; gap: 0; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; gap: var(--space-5); } .field-row .field { margin-bottom: var(--space-5); } }

.consent { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-5); }
.consent input { width: 20px; height: 20px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--color-primary); }
.consent a { color: var(--color-primary); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form__note { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-4); text-align: center; }
.form__status { margin-top: var(--space-4); font-size: var(--text-sm); border-radius: var(--radius); padding: var(--space-3) var(--space-4); display: none; }
.form__status[data-state='ok'] { display: block; background: color-mix(in oklab, #1f7a45 14%, var(--color-surface)); color: var(--color-text); border: 1px solid color-mix(in oklab, #1f7a45 45%, var(--color-border)); }
.form__status[data-state='err'] { display: block; background: color-mix(in oklab, var(--color-primary) 12%, var(--color-surface)); color: var(--color-text); border: 1px solid color-mix(in oklab, var(--color-primary) 45%, var(--color-border)); }

/* ---------- Footer ---------- */
.footer { background: var(--color-deep); color: #b7afc9; padding-block: var(--space-16) var(--space-8); }
.footer a { color: #d8d2e6; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; gap: var(--space-8); }
@media (min-width: 800px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h4 { font-family: var(--font-body); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.14em; color: #8b83a1; margin: 0 0 var(--space-4); font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-size: var(--text-sm); }
.footer .brand__name { color: #fff; }
.footer__bottom { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid rgba(234,231,241,0.14); font-size: var(--text-xs); color: #8b83a1; display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; }

/* ---------- Projekte / Galerie ---------- */
.gallery { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface-offset); }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform 0.5s var(--ease); }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-6) var(--space-4) var(--space-3);
  font-size: var(--text-xs); font-weight: 600; color: #fff;
  background: linear-gradient(180deg, rgba(30, 21, 48, 0) 0%, rgba(30, 21, 48, 0.85) 70%);
}
.gallery .span-2 { grid-column: span 2; }
.gallery .span-2 img { aspect-ratio: 16 / 9; }
@media (min-width: 800px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery .span-2 { grid-column: span 2; }
}

/* ---------- Sticky mobile action bar ---------- */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: var(--space-2); padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--color-bg) 94%, transparent);
  backdrop-filter: blur(12px); border-top: 1px solid var(--color-divider);
}
.actionbar .btn { flex: 1; padding-inline: var(--space-3); }
@media (min-width: 900px) { .actionbar { display: none; } }
@media (max-width: 899px) { body { padding-bottom: 84px; } }

/* ---------- Legal pages ---------- */
.legal { max-width: 74ch; }
.legal h1 { margin-bottom: var(--space-8); font-size: var(--text-xl); }
.legal h2 { font-size: var(--text-lg); margin-top: var(--space-10); margin-bottom: var(--space-3); }
.legal p, .legal li { color: var(--color-text-muted); font-size: var(--text-sm); }
.legal p + p { margin-top: var(--space-4); }
.legal address { font-style: normal; margin-top: var(--space-4); color: var(--color-text); font-size: var(--text-sm); line-height: 1.9; }
.legal ul { padding-left: 1.1em; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
