/* Layout & UI system */
*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  overflow-x: hidden !important;
  max-width: 100vw;
  margin: 0;
  padding: 0;
}

body {
  position: relative;
  min-height: 100vh;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

section,
header,
footer,
main {
  max-width: 100%;
  box-sizing: border-box;
}

ul, ol { margin: 0; padding: 0; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 0.85rem; }

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}
.container--wide {
  width: min(100% - 2rem, var(--container-wide));
  margin-inline: auto;
}
.container--narrow {
  width: min(100% - 2rem, 760px);
  margin-inline: auto;
}

.section {
  padding-block: var(--section-space);
}
.section--alt { background: var(--surface-alt); }
.section--surface { background: var(--surface); }
.section--primary {
  background: linear-gradient(160deg, #1a3d32 0%, #1f5c45 55%, #245a68 100%);
  color: #e8f0ec;
}
.section--primary h2,
.section--primary h3 { color: #fff; }
.section--primary .muted,
.section--primary p { color: #c5d5cc; }
.section--primary .btn--secondary {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}
.section--primary .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.section-head {
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
  max-width: 40rem;
}
.section-head--center {
  text-align: center;
  margin-inline: auto;
}

.grid-2 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.grid-3 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.grid-4 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-2--lg { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 2.5rem; }
}

.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .split--reverse > :first-child { order: 2; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.15rem;
}
.nav-desktop a {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.55rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--primary);
  background: var(--primary-soft);
}

.header-cta { display: none; }

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: background var(--transition);
}
.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition);
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg-warm);
  z-index: 999;
  padding: 1.25rem 1rem 2rem;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0.28s;
}
.nav-mobile.is-open {
  transform: translateX(0);
  visibility: visible;
}
.nav-mobile a {
  display: block;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.1rem;
  color: var(--text-strong);
  text-decoration: none;
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid var(--border);
  min-height: 48px;
}
.nav-mobile .btn { width: 100%; margin-top: 1.25rem; }

body.nav-open { overflow: hidden; }

@media (min-width: 1100px) {
  .burger { display: none; }
  .nav-desktop { display: flex; }
  .header-cta { display: inline-flex; }
  .nav-mobile { display: none !important; }
}

/* Hero */
.hero {
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(ellipse 80% 60% at 90% 10%, rgba(196, 163, 90, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 80%, rgba(31, 92, 69, 0.08), transparent 50%),
    var(--bg);
}
.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 3rem; }
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}
.hero-value {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* Trust strip */
.trust-strip {
  background: var(--surface);
  border-block: 1px solid var(--border);
  padding: 1.25rem 0;
}
.trust-strip ul {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .trust-strip ul { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .trust-strip ul { grid-template-columns: repeat(4, 1fr); }
}
.trust-strip li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text-strong);
}
.trust-strip .dot {
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* Flow steps */
.flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  max-width: 420px;
}
.flow li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  position: relative;
  padding-bottom: 1.25rem;
}
.flow li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--border-strong);
}
.flow-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}
.flow strong {
  display: block;
  font-family: var(--font-display);
  color: var(--text-strong);
  margin-bottom: 0.15rem;
}
.flow span { font-size: 0.9rem; color: var(--muted); }

/* Process numbered */
.process-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}
.process-item {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: auto 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.process-item .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
  min-width: 2.5rem;
}
@media (min-width: 768px) {
  .process-list { grid-template-columns: 1fr 1fr; }
}

/* Pricing */
.pricing-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.pricing-card--featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  position: relative;
}
.pricing-card--featured::before {
  content: "Häufig gewählt";
  position: absolute;
  top: -0.65rem;
  left: 1.25rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.pricing-card ul {
  list-style: none;
  margin: 1rem 0 1.5rem;
  flex: 1;
}
.pricing-card li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.25rem;
  font-size: 0.925rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.pricing-card li:last-child { border-bottom: 0; }
.pricing-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

/* FAQ */
.faq-list { list-style: none; display: grid; gap: 0.65rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1.1rem 1.25rem;
  min-height: 52px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 650;
  color: var(--text-strong);
  overflow-wrap: break-word;
  hyphens: auto;
}
.faq-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  line-height: 1;
  transition: transform var(--transition);
}
.faq-btn[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}
.faq-panel.is-open { grid-template-rows: 1fr; }
.faq-panel > div {
  overflow: hidden;
  min-height: 0;
}
.faq-panel p {
  padding: 0 1.25rem 1.2rem;
  color: var(--muted);
  font-size: 0.975rem;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
}
.form-field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
  color: var(--text-strong);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 92, 69, 0.15);
}
.form-privacy {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.75rem 0 1rem;
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Page hero (inner) */
.page-hero {
  padding-block: clamp(2.25rem, 4vw, 3.5rem);
  background:
    linear-gradient(180deg, var(--surface-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--border-strong);
}

/* Article */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.prose {
  max-width: 720px;
}
.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol {
  margin: 0 0 1.25rem 1.25rem;
  color: var(--muted);
}
.prose li { margin-bottom: 0.4rem; }
.prose p { color: var(--text); }

/* Ratgeber cards */
.article-card .img-ph { margin-bottom: 1rem; }
.article-card .badge { margin-bottom: 0.65rem; }

/* Footer */
.footer-top {
  padding-block: 3rem 2rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-col h3 {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a {
  text-decoration: none;
  font-size: 0.925rem;
}
.footer-contact p {
  font-size: 0.925rem;
  margin-bottom: 0.35rem;
  color: #c5cdc8;
}
.footer-bottom {
  padding-block: 1.25rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* Legal */
.legal-content h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}
.legal-content h3 {
  margin-top: 1.25rem;
  font-size: 1.05rem;
}
.legal-content p,
.legal-content li {
  color: var(--muted);
  font-size: 0.975rem;
}
.legal-content ul { margin: 0 0 1rem 1.2rem; }
.placeholder-note {
  font-size: 0.8rem;
  color: var(--muted-light);
  font-style: italic;
}

/* Utility */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.icon-list {
  list-style: none;
  display: grid;
  gap: 0.85rem;
}
.icon-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}
.icon-list .ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 10050;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.contact-break,
.footer-contact a,
.legal-content a[href^="mailto:"],
.legal-content a[href^="https://moonery.info"] {
  overflow-wrap: anywhere;
  word-break: break-word;
}

[hidden],
[data-contact][hidden] {
  display: none !important;
}

/* Real media images */
.media {
  margin: 0;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-muted);
}
.media--hero {
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 10;
}
.media--landscape { aspect-ratio: 16 / 10; }
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 4 / 5; }
.media--card { aspect-ratio: 16 / 10; }
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.media--hero img { object-position: 68% center; }
.media--doc img { object-position: center 16%; }
.media--doc-wide img { object-position: center 20%; }
.media--battery img { object-position: center center; }
.media--install img { object-position: center 28%; }
.media--service img { object-position: center 22%; }
.media--eco img { object-position: center 42%; }
.article-card .media { margin-bottom: 1rem; }
@media (max-width: 640px) {
  .media--hero img { object-position: 55% center; }
  .media--doc img,
  .media--doc-wide img { object-position: center 10%; }
  .media--install img { object-position: center 32%; }
}

html,
body {
  overflow-x: hidden !important;
  max-width: 100vw;
}
