/* BernauBox – Custom CSS, mobile-first */

/* Montserrat (variable, self-hosted) — single file covers weights 100–900 */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f4f2;
  --color-text: #1d1d1b;
  --color-text-muted: #555555;
  --color-border: #e5e3df;
  --color-primary: #1d1d1b;
  --color-accent: #1f5d3f;        /* heraldisches Bernau-Grün */
  --color-accent-hover: #174832;
  --color-accent-text: #ffffff;
  --color-gold: #c9a227;          /* heraldisches Gold, sparsamer Highlight */
  --color-success: #1f5d3f;
  --color-error: #b3261e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --radius-lg: 14px;
  --container: 1140px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 6rem;
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  /* Type scale (rem, root = 16px) */
  --fs-xs: 0.8125rem;    /* 13px – badges, hints, errors, footnote, eyebrow, price qualifiers */
  --fs-sm: 0.875rem;     /* 14px – captions, footer meta, trust list */
  --fs-base: 1rem;       /* 16px – buttons, secondary text, form fields */
  --fs-md: 1.0625rem;    /* 17px – body copy, section lead, faq question */
  --fs-lg: 1.125rem;     /* 18px – benefit title */
  --fs-xl: 1.25rem;      /* 20px – h3, price, lead max */
  --fs-2xl: 1.5rem;      /* 24px – size-card area */
  --fs-h2: clamp(1.5rem, 2.5vw + 1rem, 2.25rem);
  --fs-h1: clamp(2rem, 5vw + 1rem, 3.25rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 767px) {
  body.has-sticky-cta { padding-bottom: 80px; }
}

img, svg { max-width: 100%; height: auto; display: block; }

a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { color: var(--color-accent-hover); }

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 var(--space-4);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); margin-bottom: var(--space-5); }
h3 { font-size: var(--fs-xl); }

p { margin: 0 0 var(--space-4); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; padding: var(--space-3) var(--space-4);
  background: var(--color-primary); color: #fff; z-index: 1000;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0.85rem 1.4rem; min-height: 48px;
  background: var(--color-accent); color: var(--color-accent-text);
  border: 2px solid var(--color-accent); border-radius: var(--radius);
  font-weight: 600; font-size: var(--fs-base); text-decoration: none;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover, .btn:focus-visible {
  background: var(--color-accent-hover); border-color: var(--color-accent-hover);
  color: var(--color-accent-text);
}
.btn:active { transform: translateY(1px); }
.btn-text-short { display: none; }
.btn-text-full { display: inline; }
@media (max-width: 599px) {
  .site-header__actions .btn {
    padding: 0.6rem 1rem;
    min-height: 42px;
    font-size: var(--fs-sm);
  }
  .site-header__actions .btn-text-full { display: none; }
  .site-header__actions .btn-text-short { display: inline; }
}
.btn--ghost {
  background: transparent; color: var(--color-text); border-color: var(--color-text);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  background: var(--color-text); color: #fff;
}
.btn--block { width: 100%; }

/* Header — full-width sticky bar aligned to the page grid */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: var(--space-3) 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
}
.site-header__logo svg { width: auto; height: 38px; }
.site-header__actions { display: flex; align-items: center; gap: var(--space-3); }
.site-header__phone {
  display: none; font-weight: 600; text-decoration: none;
}
@media (min-width: 600px) {
  .site-header__phone { display: inline-flex; align-items: center; gap: var(--space-2); }
  .site-header__logo svg { height: 44px; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: var(--space-8) 0 var(--space-10);
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}
.hero__grid {
  display: grid; gap: var(--space-6);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .hero { padding: var(--space-10) 0 var(--space-12); }
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-8); }
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-4);
  color: var(--color-accent);
  font-size: var(--fs-base); font-weight: 600;
  letter-spacing: 0.02em;
}
.hero__eyebrow svg {
  width: 20px; height: 20px; flex-shrink: 0;
}
.hero h1 { margin-bottom: var(--space-5); }
.hero__lead {
  font-size: clamp(var(--fs-md), 1vw + 1rem, var(--fs-xl));
  color: var(--color-text-muted); max-width: 56ch;
  margin-bottom: var(--space-6);
}
.hero__cta { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-6); }
.hero__trust {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-5);
  font-size: var(--fs-sm); color: var(--color-text-muted);
}
.hero__trust li { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero__trust svg { width: 18px; height: 18px; flex: none; color: var(--color-text); }

.hero__visual {
  position: relative;
}
@media (max-width: 599px) {
  .hero__visual { display: none; }
}

.hero-3d {
  width: 100%; height: auto;
  max-width: 320px;
  margin: var(--space-4) auto 0;
  display: block;
}
@media (min-width: 900px) {
  .hero-3d {
    max-width: 420px;
    margin: 0 0 0 auto;
  }
}

.hero-3d__cube {
  transform-box: fill-box;
  transform-origin: center;
  animation-name: hero-3d-drop;
  animation-duration: 0.35s;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}
.hero-3d__cube--1 { animation-delay: 0.05s; }
.hero-3d__cube--2 { animation-delay: 0.10s; }
.hero-3d__cube--3 { animation-delay: 0.15s; }
.hero-3d__cube--4 { animation-delay: 0.20s; }
.hero-3d__cube--5 { animation-delay: 0.25s; }
.hero-3d__cube--6 { animation-delay: 0.30s; }
.hero-3d__cube--7 { animation-delay: 0.35s; }
.hero-3d__cube--8 { animation-delay: 0.40s; }
.hero-3d__cube--9 { animation-delay: 0.45s; }

@keyframes hero-3d-drop {
  0%   { transform: translateY(-360px); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

.hero-3d__shadow {
  transform-box: fill-box;
  transform-origin: center;
  animation: hero-3d-shadow-in 0.4s ease-out 0.4s both;
}
@keyframes hero-3d-shadow-in {
  0%   { opacity: 0; transform: scale(0.4); }
  100% { opacity: 0.16; transform: scale(1); }
}

/* Reveal-on-scroll — JS adds .reveal as start state, .is-visible flips it */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-3d__cube, .hero-3d__shadow, .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Standort photo strip — full-bleed image with captioned container below */
.standort-strip {
  position: relative;
  background: var(--color-bg-alt);
}
.standort-strip__img {
  display: block;
  width: 100%;
  height: auto;
}
.standort-strip__caption {
  margin: 0;
  padding: var(--space-3) 0;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  text-align: center;
}

/* Section */
.section { padding: var(--space-10) 0; }
.section--alt { background: var(--color-bg-alt); }
.section__header { max-width: 60ch; margin-bottom: var(--space-6); }
.section__header::before {
  content: "";
  display: block;
  width: 56px; height: 4px;
  margin-bottom: var(--space-3);
  background: var(--color-accent);
  border-radius: 2px;
}
.section__lead { color: var(--color-text-muted); font-size: var(--fs-md); }

/* Hover-revealed permalink on section headings */
.heading-anchor {
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
}
h2:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 0.75;
  outline: none;
}
.heading-anchor:hover { opacity: 1; transform: translateX(2px); }

/* Benefits grid */
.benefits {
  display: grid; gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .benefits { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .benefits { grid-template-columns: repeat(4, 1fr); } }

.benefit {
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.benefit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}
.benefit__title { margin: 0 0 var(--space-2); font-size: var(--fs-lg); }
.benefit__text { margin: 0; color: var(--color-text-muted); font-size: var(--fs-base); }

/* Box-Icon: full 3-layer brand motif (outer + rotated panel + centered glyph) */
.box-icon {
  display: inline-block;
  width: 64px; height: 64px;
  margin-bottom: var(--space-4);
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.08));
}
.box-icon svg { width: 100%; height: 100%; display: block; }

/* Sizes grid */
.sizes {
  display: grid; gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .sizes { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .sizes { grid-template-columns: repeat(4, 1fr); } }

.size-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none; color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.size-card:hover, .size-card:focus-visible {
  transform: translateY(-3px); box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  outline: none;
}

/* Size-Tag: solid square with letter, plus subtle rotated inset (echoes logo) */
.size-card__label {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  margin-bottom: var(--space-4);
  background: var(--color-text);
  color: #fff;
  border-radius: 6px;
  font-size: var(--fs-base); font-weight: 800;
  letter-spacing: 0.02em;
  align-self: flex-start;
  z-index: 0;
}
.size-card__label::before {
  content: "";
  position: absolute;
  inset: 7px;
  background: rgba(255,255,255,0.10);
  border-radius: 2px;
  transform: rotate(-5deg);
  z-index: -1;
}
.size-card__area { font-size: var(--fs-2xl); font-weight: 700; margin: 0 0 var(--space-2); }
.size-card__example { color: var(--color-text-muted); font-size: var(--fs-base); margin: 0 0 var(--space-4); flex: 1; }
.size-card__footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.size-card__price {
  font-weight: 700; color: var(--color-text);
  font-size: var(--fs-xl); line-height: 1.1;
  white-space: nowrap;
}
.size-card__price-from {
  font-size: var(--fs-xs); font-weight: 500;
  color: var(--color-text-muted);
}
.size-card__price-unit {
  font-size: var(--fs-xs); font-weight: 500;
  color: var(--color-text-muted);
}
.size-card--featured .size-card__price { color: var(--color-accent); }

.sizes__footnote {
  margin: var(--space-5) 0 0;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-align: center;
}

/* Featured size card — heraldic green border + gold ribbon */
.size-card--featured {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}
.size-card--featured .size-card__label {
  background: var(--color-accent);
}
.size-card__badge {
  position: absolute;
  top: -10px; right: var(--space-4);
  padding: 0.25rem 0.6rem;
  background: var(--color-gold); color: var(--color-text);
  border-radius: 4px;
  font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Location */
.location-grid {
  display: grid; gap: var(--space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 800px) { .location-grid { grid-template-columns: 1fr 1.2fr; } }

.map-col { display: flex; flex-direction: column; gap: var(--space-3); }
.map-wrap {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--color-border); background: var(--color-bg-alt);
}
.map-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-links {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  font-size: var(--fs-base);
}
.map-links a {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--color-accent-hover); text-decoration: none;
  font-weight: 600;
}
.map-links a:hover, .map-links a:focus-visible { text-decoration: underline; }
.map-links svg { width: 16px; height: 16px; flex: none; }

.address-block { font-style: normal; line-height: 1.7; }
.address-block__row { display: flex; gap: var(--space-3); margin-bottom: var(--space-3); }
.address-block__row svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--color-accent-hover); }

/* FAQ */
.faq { display: grid; gap: var(--space-3); }
.faq__item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.faq__item[open] {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}
.faq__question {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  font-weight: 600; font-size: var(--fs-md);
  cursor: pointer; list-style: none;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question::marker { content: ""; }
.faq__icon {
  flex: none;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: var(--fs-xl); font-weight: 400; line-height: 1;
  transition: transform 0.2s, background 0.15s, color 0.15s, border-color 0.15s;
}
.faq__item[open] .faq__icon {
  transform: rotate(45deg);
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.faq__answer {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--color-text-muted);
}
.faq__answer p { margin: 0 0 var(--space-3); }
.faq__answer p:last-child { margin-bottom: 0; }

/* Form */
.contact-form {
  display: grid; gap: var(--space-4);
  background: #fff; padding: var(--space-6);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.field { display: grid; gap: var(--space-2); }
.field label { font-weight: 600; font-size: var(--fs-base); }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%; padding: 0.7rem 0.85rem; min-height: 44px;
  font: inherit; color: inherit;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--color-accent); outline-offset: 1px;
  border-color: var(--color-accent);
}

.field--check {
  display: flex; gap: var(--space-3); align-items: flex-start;
  font-size: var(--fs-sm); color: var(--color-text-muted); font-weight: 400;
  cursor: pointer;
}
.field--check input[type="checkbox"] {
  flex: none; width: 20px; height: 20px; margin: 2px 0 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}
.field--check span { line-height: 1.5; }
.field--check a { color: var(--color-text); }
.field--row { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 600px) { .field--row { grid-template-columns: 1fr 1fr; } }
.field__hint { font-size: var(--fs-xs); color: var(--color-text-muted); }
.field__error { font-size: var(--fs-xs); color: var(--color-error); display: none; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--color-error); }
.field.is-invalid .field__error { display: block; }
.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.form-status { padding: var(--space-3) var(--space-4); border-radius: var(--radius); display: none; }
.form-status.is-success { display: block; background: #e7f4ee; color: var(--color-success); border: 1px solid #c9e6d6; }
.form-status.is-error { display: block; background: #fbeae9; color: var(--color-error); border: 1px solid #f1c5c2; }

/* Footer */
.site-footer {
  background: var(--color-text); color: #d6d4cf;
  padding: var(--space-8) 0 var(--space-5);
}
.site-footer a { color: #fff; }
.site-footer__grid {
  display: grid; gap: var(--space-6);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-6);
}
@media (min-width: 700px) { .site-footer__grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer__title { color: #fff; font-size: var(--fs-base); margin-bottom: var(--space-3); }
.site-footer__list { list-style: none; padding: 0; margin: 0; }
.site-footer__list li { margin-bottom: var(--space-2); }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  padding-top: var(--space-5); border-top: 1px solid #2e2e2c;
  font-size: var(--fs-sm); color: #a09e99;
  justify-content: space-between;
}

/* Legal pages */
.legal { padding: var(--space-8) 0 var(--space-10); }
.legal h2 { margin-top: var(--space-6); }
.legal p, .legal li { color: var(--color-text); }

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; gap: var(--space-2);
  padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom, 0));
  background: rgba(255,255,255,0.97);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 40;
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta .btn { flex: 1; min-width: 0; padding-left: var(--space-3); padding-right: var(--space-3); }
@media (min-width: 768px) { .sticky-cta { display: none; } }

/* Inline form success */
.form-success {
  display: none;
  text-align: center;
  padding: var(--space-8) var(--space-5);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.form-success.is-shown { display: block; }
.form-success__box {
  display: inline-block;
  width: 88px; height: 88px;
  margin-bottom: var(--space-5);
}
.form-success__box svg { width: 100%; height: 100%; display: block; }
.form-success h2 { margin: 0 0 var(--space-3); }
.form-success p { color: var(--color-text-muted); max-width: 50ch; margin: 0 auto var(--space-5); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
