/* Strolz Mechanik GmbH — Design System: Swiss Industrial Precision */

:root {
  --bg: #0D0D0D;
  --surface: #0D0D0D;
  --surface-variant: #1A1A1A;
  --primary: #BD2B0B;
  --primary-hover: #F25648;
  --text: #F2EDE6;
  --text-muted: #8A8A82;
  --outline: #2A2A2A;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;
  --max: 1280px;
  --margin: clamp(20px, 5vw, 40px);
  --stack-lg: clamp(56px, 9vw, 96px);
  --stack-md: 48px;
  --stack-sm: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--margin); }
.accent { color: var(--primary); }

h1, h2, h3, h4 { font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.1; }

/* ---------- Technical / mono accents (precision-engineering identity, replaces generic sans-everywhere) ---------- */
.kicker, .nav-links a, .nav-phone, .stat-num, .stat-label, .service-link,
.team-role, .footer-links a, .footer-copy, .hours-row, .contact-block h4,
.machine-cat, .machine-status, .filter-btn, .detail-spec-row span:first-child, .back-link {
  font-family: var(--font-mono);
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.rd1 { transition-delay: .1s; }
.reveal.rd2 { transition-delay: .2s; }
.reveal.rd3 { transition-delay: .3s; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,13,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--margin);
  height: 76px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img { height: 28px; width: auto; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { color: var(--primary); border-bottom: 2px solid var(--primary); padding-bottom: 4px; }
.nav-phone { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; color: var(--primary); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 28px; position: relative; z-index: 10; }
.nav-toggle span { height: 2px; background: var(--text); display: block; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links { position: fixed; top: 76px; left: 0; right: 0; height: calc(100vh - 76px); height: calc(100dvh - 76px); background: var(--bg); flex-direction: column;
    justify-content: center; overflow-y: auto; padding: 40px var(--margin); gap: 28px; transform: translateX(100%);
    transition: transform .3s ease; }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .nav-phone { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: calc(100svh - 76px); display: flex; flex-direction: column;
  justify-content: flex-end; overflow: hidden; border-bottom: 1px solid var(--outline); background: #000;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease;
  background-size: cover; background-position: center;
}
.hero-slide.active { opacity: .55; }
.hero-gradient { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 5%, transparent 55%); }
.hero-content { position: relative; z-index: 2; padding: 0 var(--margin) 72px; max-width: var(--max); margin: 0 auto; width: 100%; }
.hero-content .kicker { color: var(--primary); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: 13px; display: block; margin-bottom: 16px; }
.hero-content h1 { font-size: clamp(1.9rem, 6vw, 4.5rem); color: #fff; max-width: 800px; margin-bottom: 28px; overflow-wrap: break-word; hyphens: auto; }
.hero-content h1 .no-hyphen { hyphens: none; white-space: nowrap; }
.hero-content p { font-size: 1.1rem; color: rgba(255,255,255,.85); max-width: 520px; margin-bottom: 36px; }
@media (max-width: 400px) { .hero-content h1 { font-size: 1.65rem; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 17px 38px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: #000; }

.hero-stats {
  position: relative; z-index: 2; border-top: 1px solid var(--outline); background: rgba(13,13,13,.95);
}
.hero-stats-inner { max-width: var(--max); margin: 0 auto; padding: 28px var(--margin);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hero-stats-inner > div:not(:first-child) { border-left: 1px solid var(--outline); padding-left: 24px; }
.stat-num { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; color: var(--primary); display: block; text-transform: uppercase; }
.hero-stats-inner > div:nth-child(n+2) .stat-num { color: #fff; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }

@media (max-width: 640px) { .hero-stats-inner { grid-template-columns: 1fr; gap: 16px; }
  .hero-stats-inner > div:not(:first-child) { border-left: none; border-top: 1px solid var(--outline); padding-left: 0; padding-top: 16px; } }

/* ---------- Section basics ---------- */
section { padding: var(--stack-lg) 0; }
/* Alternierende Sektions-Bänder für Rhythmus (nur Sections ohne surface-variant-Karten, damit nichts verschwimmt) */
#ueber-uns, #partner { background: var(--surface-variant); border-top: 1px solid var(--outline); border-bottom: 1px solid var(--outline); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 56px; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); border-left: 8px solid var(--primary); padding-left: 20px; }
.section-sub { color: var(--text-muted); max-width: 420px; font-size: .95rem; }

/* ---------- Leistungen ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--outline); }
.service-card { background: var(--surface-variant); padding: 44px 36px; display: flex; flex-direction: column; transition: background .2s; }
.service-card:hover { background: #201613; }
.service-icon { width: 52px; height: 52px; margin-bottom: 32px; color: var(--primary); }
.service-card h3 { font-size: 1.2rem; margin-bottom: 14px; }
.service-card p { color: var(--text-muted); font-size: .92rem; flex-grow: 1; margin-bottom: 32px; }
.service-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: -18px 0 24px; }
.service-tags a { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); border: 1px solid var(--outline); padding: 6px 12px; transition: color .2s, border-color .2s; }
.service-tags a:hover { color: var(--primary); border-color: var(--primary); }
@media (max-width: 860px) { .services-grid { grid-template-columns: 1fr; } }

/* ---------- Team / About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.about-portrait { position: relative; }
.about-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background-color: #000; background-size: cover; background-position: center; border-left: 6px solid var(--primary); filter: brightness(1.1); }
.about-quote { position: relative; }
.about-quote blockquote { font-size: clamp(1.5rem, 3.4vw, 2.2rem); text-transform: uppercase; font-weight: 800; margin-bottom: 28px; }
.about-rule { width: 72px; height: 4px; background: var(--primary); margin-bottom: 28px; }
.about-quote > p { color: var(--text-muted); max-width: 480px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

.team-header { text-align: center; margin-bottom: 56px; }
.team-header .kicker { color: var(--primary); text-transform: uppercase; letter-spacing: .15em; font-weight: 700; font-size: 12px; display: block; margin-bottom: 12px; }
.team-header p { color: var(--text-muted); max-width: 560px; margin: 12px auto 0; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--outline); max-width: 900px; margin: 0 auto; }
.team-card { position: relative; background: var(--surface-variant); overflow: hidden; }
.team-photo { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.team-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s ease; }
.team-photo img.base-img { filter: brightness(1.1); }
.team-photo img.hover-img { opacity: 0; }
.team-card:hover .team-photo img.base-img { opacity: 0; }
.team-card:hover .team-photo img.hover-img { opacity: 1; }
.team-info { padding: 16px 14px; }
.team-name { font-weight: 700; font-size: .82rem; text-transform: uppercase; }
.team-role { color: var(--text-muted); font-size: .72rem; margin-top: 3px; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 960px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Partner ---------- */
.partner-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--outline); border: 1px solid var(--outline); }
.partner-logo { min-width: 0; overflow: hidden; background: #F2EDE6; height: 110px; display: flex; align-items: center; justify-content: center; padding: 20px; }
.partner-logo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .6; transition: filter .25s, opacity .25s; }
.partner-logo:hover img { filter: grayscale(0); opacity: 1; }
.partner-logo.logo-lg { padding: 10px; }
.partner-logo.logo-boost img { filter: grayscale(1) brightness(.55) contrast(2.2); opacity: 1; }
.partner-logo.logo-boost:hover img { filter: grayscale(0); opacity: 1; }
@media (max-width: 860px) { .partner-grid { grid-template-columns: repeat(3, 1fr); } .partner-logo { height: 100px; } }
@media (max-width: 560px) { .partner-grid { grid-template-columns: repeat(2, 1fr); } .partner-logo { height: 88px; padding: 14px; } }

/* ---------- Contact ---------- */
.contact-head { text-align: center; margin-bottom: 64px; }
.contact-head .rule { width: 96px; height: 3px; background: var(--primary); margin: 18px auto 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-grid > div:last-child { display: flex; flex-direction: column; }
.contact-block h4 { color: var(--primary); font-size: 13px; letter-spacing: .1em; margin-bottom: 12px; }
.contact-block + .contact-block { margin-top: 44px; }
.contact-block p { color: var(--text-muted); font-size: 1.02rem; }
.contact-block p a:hover { color: var(--text); }
.hours-table { display: flex; flex-direction: column; gap: 6px; }
.hours-row { display: flex; justify-content: space-between; gap: 16px; font-size: .95rem; color: var(--text-muted); }
.hours-row span:first-child { color: var(--text); font-weight: 600; }
@media (max-width: 480px) { .hours-row { flex-direction: column; gap: 2px; } }
.contact-map { height: 260px; background: var(--surface-variant); border: 1px solid var(--outline); margin-top: 44px; display: flex; align-items: center; justify-content: center; }
.contact-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.92) contrast(.9); }

.form { flex: 1; background: var(--surface-variant); border: 1px solid var(--outline); padding: 48px; display: flex; flex-direction: column; gap: 26px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group-grow { flex: 1; }
.form-group-grow textarea { flex: 1; }
.form-group label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
  background: transparent; border: none; border-bottom: 1px solid var(--outline);
  color: var(--text); padding: 10px 2px; font-family: inherit; font-size: 1rem; outline: none;
  transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 100px; }
.hp-field { position: absolute; left: -9999px; }
.form-submit { width: 100%; }
.form-success { display: none; border: 1px solid var(--primary); background: rgba(189,43,11,.08); padding: 20px 24px; margin-bottom: 24px; }
.form-success.show { display: block; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .form { padding: 32px 24px; } }

/* ---------- Lightbox (Team-Foto + Personen-Karte) ---------- */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox-overlay.show { display: flex; }
.lightbox-overlay img { max-width: 100%; max-height: 90vh; object-fit: contain; filter: brightness(1.1); }
.lightbox-close { position: absolute; top: 24px; right: 24px; width: 44px; height: 44px; border: 1px solid var(--outline); color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; background: rgba(13,13,13,.85); transition: border-color .2s, color .2s; }
.lightbox-close:hover { border-color: var(--primary); color: var(--primary); }
.about-media { cursor: zoom-in; }
.team-card { cursor: pointer; }

.team-modal-card { position: relative; background: var(--surface-variant); border: 1px solid var(--outline); max-width: 400px; width: 100%; }
.team-modal-photo { aspect-ratio: 3/4; overflow: hidden; background: #000; }
.team-modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-modal-info { padding: 24px 28px 28px; }
.team-modal-name { font-size: 1.3rem; font-weight: 700; text-transform: uppercase; }
.team-modal-role { font-family: var(--font-mono); color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; margin-bottom: 22px; }
.team-modal-contact { display: flex; flex-direction: column; }
.team-modal-contact a { font-family: var(--font-mono); font-size: .9rem; color: var(--text); border-top: 1px solid var(--outline); padding: 12px 0; transition: color .2s; }
.team-modal-contact a:hover { color: var(--primary); }

/* ---------- Footer ---------- */
footer { background: #000; border-top: 1px solid var(--outline); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 48px var(--margin);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-logo img { height: 22px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 28px; }
.footer-links a { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); transition: color .2s; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }

/* ---------- Legal / Maschinen page shared ---------- */
.page-header { padding: 160px 0 60px; border-bottom: 1px solid var(--outline); }
.page-header h1 { font-size: clamp(2rem, 5vw, 3rem); border-left: 8px solid var(--primary); padding-left: 20px; }
.legal-content { max-width: 780px; padding: var(--stack-md) 0; }
.legal-content h3 { font-size: 1.05rem; margin: 32px 0 12px; text-transform: none; }
.legal-content h3:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: var(--text-muted); font-size: .95rem; margin-bottom: 14px; }
.legal-content a { color: var(--primary); }
.legal-content strong { color: var(--text); }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; margin-bottom: 32px; }

/* ---------- Maschinen catalog ---------- */
.machine-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 48px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-btn { border: 1px solid var(--outline); padding: 10px 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; transition: .2s; }
.filter-btn:hover { border-color: var(--primary); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.machine-search { position: relative; flex: 0 1 260px; }
.machine-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.machine-search input { width: 100%; background: var(--surface-variant); border: 1px solid var(--outline); color: var(--text); padding: 11px 14px 11px 38px; font-family: inherit; font-size: 13px; transition: border-color .2s; }
.machine-search input::placeholder { color: var(--text-muted); }
.machine-search input:focus { outline: none; border-color: var(--primary); }
@media (max-width: 640px) { .machine-search { flex-basis: 100%; } }
.machine-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--outline); }
.machine-card { background: var(--surface-variant); display: flex; flex-direction: column; cursor: pointer; transition: background .2s; }
.machine-card:hover { background: #201613; }
.machine-thumb { aspect-ratio: 4/3; overflow: hidden; background: #000; }
.machine-thumb img { width: 100%; height: 100%; object-fit: cover; }
.machine-info { padding: 16px 18px; }
.machine-cat { color: var(--primary); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.machine-name { font-size: .92rem; font-weight: 700; text-transform: uppercase; margin-top: 5px; line-height: 1.25; }
.machine-status { font-size: 10px; color: var(--text-muted); text-transform: uppercase; margin-top: 7px; }
@media (max-width: 1100px) { .machine-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .machine-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .machine-grid { grid-template-columns: 1fr; } }

.empty-state { border: 1px dashed var(--outline); padding: 64px 32px; text-align: center; }
.empty-state p { color: var(--text-muted); max-width: 440px; margin: 12px auto 28px; }

.machine-detail { display: none; }
.machine-detail.show { display: block; }
#machine-list-view.hidden { display: none; }
.detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.detail-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: var(--outline); }
.detail-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.detail-desc { color: var(--text-muted); font-size: 1.02rem; margin-bottom: 28px; }
.detail-specs { border-top: 1px solid var(--outline); }
.detail-spec-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--outline); font-size: .9rem; }
.detail-spec-row span:first-child { color: var(--text-muted); text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; }
.detail-cta { background: var(--surface-variant); border: 1px solid var(--outline); padding: 32px; margin-top: 28px; }
.detail-cta p { color: var(--text-muted); margin-bottom: 20px; font-size: .9rem; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } .detail-gallery { grid-template-columns: repeat(2, 1fr); } }
