/* Elektro Nordmann · Beispielprojekt von Holterhaus Automation */

:root {
  --paper: #FFFFFF;
  --ink: #111827;
  --ink-2: #1F2937;
  --muted: #4B5563;
  --line: #E5E7EB;
  --accent: #EAB308;
  --dark: #111827;
  --dark-deep: #0B1220;
  --dark-muted: #9CA3AF;
  --dark-line: rgba(255, 255, 255, 0.14);
  --max: 1200px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* height:auto ist Pflicht, sonst behält das Bild die im HTML gesetzte Pixel-Höhe,
   während max-width die Breite staucht, Kreise werden dann zu Ovalen. */
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 800; margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }

.container { max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.8rem 1.2rem; font-weight: 800;
}
.skip-link:focus { left: 0; }

/* ----- Label & Überschriften ----- */
.label {
  display: flex; align-items: center; gap: 0.6rem; margin: 0;
  text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.78rem; color: var(--muted);
}
.label::before { content: ""; width: 9px; height: 9px; background: var(--accent); flex: none; }
.label-light { color: rgba(255, 255, 255, 0.88); }

h2 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); letter-spacing: -0.02em; line-height: 1.04; margin-top: 0.9rem; }
.section-sub { margin: 1rem 0 0; color: var(--muted); max-width: 56ch; font-size: 1.05rem; }

.section-head { position: relative; }
.rule {
  margin-top: 1.8rem; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.9s var(--ease-out) 0.1s;
}
.rule.in-view { transform: scaleX(1); }
.rule-dark { background: var(--accent); }

/* ----- Reveal-System ----- */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.5s ease, transform 0.55s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.in-view { opacity: 1; transform: none; }

/* ----- CTAs ----- */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1.5rem; border: 0; border-radius: 2px; cursor: pointer;
  font: 800 0.95rem/1.2 "Manrope", sans-serif; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.cta:hover { transform: translateY(-2px); filter: brightness(1.04); }
.cta:active { transform: translateY(0); }
.cta-light { background: #fff; color: var(--ink); }
.cta-dark { background: var(--ink); color: #fff; }
.cta-accent, .cta-notdienst { background: var(--accent); color: var(--ink); }

/* ----- Header ----- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; color: #fff;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.header-inner {
  max-width: var(--max); margin-inline: auto; padding: 0.9rem var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 1.8rem; width: 100%;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.95rem; text-decoration: none; color: currentColor;
}
.mark { width: 16px; height: 16px; fill: var(--accent); flex: none; }
.main-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.main-nav a {
  font-size: 0.9rem; text-decoration: none; opacity: 0.85;
  text-underline-offset: 7px; text-decoration-color: var(--accent); text-decoration-thickness: 2px;
}
.main-nav a:hover { opacity: 1; text-decoration-line: underline; }
.notdienst-pill {
  background: var(--accent); color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.5rem 0.9rem; border-radius: 2px; flex: none;
  transition: filter 0.2s ease, transform 0.18s ease;
}
.notdienst-pill:hover { filter: brightness(1.06); transform: translateY(-1px); }
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.94); color: var(--ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.burger {
  /* min. 44x44 Tippfläche, dieser Button schließt das Menü auch wieder */
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
}
.burger span { width: 24px; height: 2px; background: currentColor; transition: transform 0.3s ease; }
.burger.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ----- Mobiles Menü ----- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 40; background: var(--dark); color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem var(--pad) 3rem;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.35s var(--ease-out), visibility 0.35s;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { background: transparent; color: #fff; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.mobile-menu nav a {
  display: block; font-size: clamp(1.8rem, 7vw, 2.5rem); font-weight: 800;
  text-decoration: none; padding: 0.4rem 0; letter-spacing: -0.01em;
}
.mobile-menu nav a:hover { color: var(--accent); }
.mobile-menu .cta-notdienst { margin-top: 2rem; align-self: flex-start; }
.menu-foot { color: var(--dark-muted); font-size: 0.85rem; margin: 2.5rem 0 0; }

/* ----- Hero ----- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  color: #fff; background: var(--dark); overflow: hidden;
}
.hero-media { position: absolute; inset: 0; will-change: transform; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.07);
  transition: opacity 0.6s ease, transform 1.4s var(--ease-out);
}
.hero.loaded .hero-media img { opacity: 1; transform: scale(1); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.5) 0%, rgba(17, 24, 39, 0.12) 38%, rgba(17, 24, 39, 0.84) 100%);
}
.hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: var(--max);
  margin-inline: auto; padding: 8rem var(--pad) clamp(5rem, 11vh, 7.5rem);
}
.hero h1 {
  font-size: clamp(3.1rem, 10vw, 7.5rem); line-height: 0.96; letter-spacing: -0.03em;
  margin: 0.9rem 0 2.2rem;
}
.hero .dot { color: var(--accent); }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-label, .hero h1, .hero-ctas {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.6s var(--ease-out);
}
.hero.loaded .hero-label { opacity: 1; transform: none; transition-delay: 0.1s; }
.hero.loaded h1 { opacity: 1; transform: none; transition-delay: 0.22s; }
.hero.loaded .hero-ctas { opacity: 1; transform: none; transition-delay: 0.38s; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 1.6rem; z-index: 2; width: 1px; height: 52px;
  background: linear-gradient(180deg, transparent, #fff);
  animation: cue 2s ease-in-out infinite;
}
@keyframes cue { 0%, 100% { opacity: 0.25; transform: scaleY(0.6); transform-origin: top; } 50% { opacity: 0.9; transform: scaleY(1); } }

/* ----- Sektionen ----- */
.services, .refs, .why, .process, .contact { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }

/* ----- Leistungen: Kacheln ----- */
.tiles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); margin-top: 3rem;
}
.tile { background: #fff; padding: 2.4rem 2rem 2.6rem; position: relative; }
.tile::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.tile:hover::after { transform: scaleX(1); }
.tile .num {
  display: block; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.16em;
  color: var(--dark-muted); margin-bottom: 1.5rem;
}
.icon {
  width: 46px; height: 46px; margin-bottom: 1.3rem; color: var(--ink);
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  transition: color 0.3s ease;
}
.tile:hover .icon { color: var(--accent); }
.icon * {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.5, 0, 0.3, 1);
}
.tile.in-view .icon * { stroke-dashoffset: 0; transition-delay: calc(var(--d, 0ms) + 250ms); }
.tile h3 { font-size: 1.16rem; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 0.55rem; }
.tile p { color: var(--muted); font-size: 0.95rem; line-height: 1.65; }

.tile-notdienst {
  grid-column: 1 / -1; background: var(--dark); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.tile-notdienst .icon { color: var(--accent); margin: 0; flex: none; }
.tile-notdienst:hover .icon { color: var(--accent); }
.tile-notdienst .num { color: var(--dark-muted); margin-bottom: 1rem; }
.tile-notdienst p { color: var(--dark-muted); max-width: 52ch; }
.notdienst-text { display: flex; align-items: flex-start; gap: 1.6rem; flex: 1 1 32rem; }
.tile-notdienst .cta { flex: none; }

/* ----- Photovoltaik (dunkel) ----- */
.pv { padding: clamp(4.5rem, 9vw, 7.5rem) 0; background: var(--dark); color: #E5E7EB; }
.pv .label { color: var(--dark-muted); }
.pv h2 { color: #fff; }
.pv .section-sub { color: var(--dark-muted); }
.pv-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start; margin-top: 3.2rem;
}
.pv-text p { color: #D1D5DB; font-size: 1.05rem; }
.checklist { list-style: none; margin: 2rem 0 2.6rem; padding: 0; display: grid; gap: 0.95rem; }
.checklist li { position: relative; padding-left: 2.1rem; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 0.5em; width: 13px; height: 7px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}
.pv-media figure { margin: 0; }
.pv-media img { width: 100%; height: auto; }
.pv-media-offset {
  width: 46%; margin: -22% 0 0 auto; position: relative;
  border: 8px solid var(--dark); border-right: 0; border-bottom: 0;
}

/* ----- Referenzen ----- */
.refs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.ref { border: 1px solid var(--line); background: #fff; transition: border-color 0.3s ease; }
.ref:hover { border-color: var(--ink); }
.ref figure { margin: 0; overflow: hidden; aspect-ratio: 3 / 2; }
.ref img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.ref:hover img { transform: scale(1.04); }
.ref-body { padding: 1.5rem 1.5rem 1.7rem; }
.ref-meta {
  display: flex; align-items: center; gap: 0.5rem;
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.7rem;
  color: var(--muted); margin-bottom: 0.7rem;
}
.ref-meta::before { content: ""; width: 7px; height: 7px; background: var(--accent); flex: none; }
.ref h3 { font-size: 1.12rem; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.ref-body > p:not(.ref-meta) { color: var(--muted); font-size: 0.93rem; line-height: 1.65; }

/* ----- Warum Nordmann ----- */
.numbers {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line); margin-top: 3rem;
}
.number { padding: 2.4rem 1.5rem 2.4rem 0; }
.number + .number { border-left: 1px solid var(--line); padding-left: 2rem; }
.number .count, .number .static {
  display: block; font-weight: 800; font-size: clamp(2.3rem, 4.5vw, 3.4rem);
  letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums;
}
.number small {
  display: block; margin-top: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.18em; font-size: 0.72rem; color: var(--muted);
}
.why-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center; margin-top: clamp(3rem, 6vw, 4.5rem);
}
.why-grid figure { margin: 0; }
.why-text p { color: var(--ink-2); font-size: 1.05rem; }
.why-text blockquote { margin: 2rem 0 0; padding-left: 1.4rem; border-left: 3px solid var(--accent); }
.why-text blockquote p { font-weight: 800; font-size: 1.15rem; line-height: 1.5; letter-spacing: -0.01em; }
.why-text cite {
  display: block; margin-top: 0.6rem; font-style: normal;
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.72rem; color: var(--muted);
}

/* ----- Ablauf ----- */
.steps {
  list-style: none; margin: 3rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  counter-reset: step;
}
.steps li { border-top: 2px solid var(--ink); padding-top: 1.3rem; }
.steps .num { display: block; font-weight: 800; font-size: 0.9rem; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 0.9rem; }
.steps h3 { font-size: 1.14rem; margin-bottom: 0.5rem; }
.steps p { color: var(--muted); font-size: 0.95rem; line-height: 1.65; }

/* ----- Kontakt ----- */
.contact-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem);
  margin-top: 3rem; align-items: start;
}
address { font-style: normal; font-size: 1.05rem; line-height: 1.7; }
.contact-links { margin-top: 1.2rem; line-height: 2; }
.contact-links a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 4px; }
.contact-links a:hover { text-decoration-color: var(--accent); }
.hours { margin: 1.8rem 0 0; }
.hours div { display: flex; gap: 1.5rem; border-top: 1px solid var(--line); padding: 0.7rem 0; }
.hours dt { width: 90px; color: var(--muted); flex: none; }
.hours dd { margin: 0; }
.notdienst-box {
  margin-top: 2.4rem; border: 2px solid var(--accent);
  background: rgba(234, 179, 8, 0.06); padding: 1.5rem 1.7rem;
}
.notdienst-box p { margin: 0.6rem 0 0; color: var(--ink-2); font-size: 0.98rem; }
.notdienst-number {
  display: inline-block; margin-top: 0.5rem; font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 1.9rem); letter-spacing: 0.01em;
  color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums;
}
.notdienst-number:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.field { margin-bottom: 1.3rem; }
.field label {
  display: block; margin-bottom: 0.45rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem;
}
.field .optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; border: 1px solid #D1D5DB; border-radius: 2px; background: #fff;
  padding: 0.85rem 1rem; font: 400 1rem/1.5 "Manrope", sans-serif; color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.35);
}
textarea { resize: vertical; }
.form-note { margin-top: 0.9rem; font-size: 0.85rem; color: var(--muted); }
.form-success { border: 2px solid var(--accent); background: rgba(234, 179, 8, 0.06); padding: 1.4rem 1.6rem; }
.map { margin: clamp(3rem, 6vw, 4.5rem) 0 0; aspect-ratio: 21 / 9; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.04); }

/* ----- Footer ----- */
.site-footer { background: var(--dark-deep); color: var(--dark-muted); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-footer .wordmark { color: #fff; margin: 0; }
.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-nav a { font-size: 0.9rem; text-decoration: none; color: var(--dark-muted); }
.footer-nav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--dark-line); margin-top: 2.5rem; padding-top: 1.8rem; display: grid; gap: 0.8rem; }
.demo-note { font-size: 0.85rem; margin: 0; }
.demo-note a { color: #E5E7EB; text-underline-offset: 3px; }
.demo-note a:hover { color: var(--accent); }
.legal { font-size: 0.8rem; margin: 0; }
.legal a { text-decoration: none; color: var(--dark-muted); }
.legal a:hover { color: #fff; }

/* ----- Responsive ----- */
@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .refs-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .number { padding: 1.8rem 1rem 1.8rem 0; }
  .number + .number { border-left: 0; padding-left: 0; }
  .pv-grid, .why-grid, .contact-grid { grid-template-columns: 1fr; }
  .pv-media { max-width: 640px; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  /* Burger sitzt rechts: Pill schiebt sich per auto-Margin nach rechts, der Burger folgt.
     Fällt die Pill unter 640px weg, hält justify-content:space-between den Burger rechts. */
  .burger { display: flex; }
  .notdienst-pill { margin-left: auto; }
}
@media (max-width: 640px) {
  .tiles, .refs-grid, .steps { grid-template-columns: 1fr; }
  .notdienst-pill { display: none; }
  .tile-notdienst { flex-direction: column; align-items: flex-start; }
  .notdienst-text { flex-direction: column; gap: 1rem; }
  .hero-ctas .cta { width: 100%; }
  .map { aspect-ratio: 4 / 3; }
}

/* ----- Reduzierte Bewegung ----- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .rule, .hero-label, .hero h1, .hero-ctas, .hero-media img, .icon * {
    transition: none !important; animation: none !important;
    opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important;
  }
  .scroll-cue { animation: none; }
  .ref img, .cta, .notdienst-pill { transition: none; }
}
