/* =============================================================
   Static Site Template — stylesheet
   Warm paper palette with a gold/charcoal accent. Design tokens
   (colors, fonts, spacing) are CSS custom properties in :root
   below — edit those to re-theme the whole site.
   ============================================================= */

:root {
  /* --- base palette --- */
  --beige: #f3eadf;
  --sand: #d8c2aa;
  --gray: #5f625f;
  --light: #faf8f5;
  --white: #ffffff;

  /* --- brand tokens (filled by scripts/fill.py from a preset / config.env) --- */
  /* These five are the single source of truth for the theme; presets/*.env set
     them. Derived shades below (gold-soft/-bright) stay in CSS, not tokens. */
  --paper: #F4F1EA;       /* warm drawing paper for plates */
  --gold: #A9824A;       /* accent — metallic gold by default */
  --gold-text: #735427;  /* darker brass for small text — passes AA (≥4.5:1) on all brand bgs */
  --ink-black: #202020;     /* near-black home for the logo */

  /* --- extensions drawn from the actual logo (gold on black) --- */
  --paper-line: #e7dccb;     /* hairline rules on paper */
  --gold-soft: #cba65d;      /* mid gold */
  --gold-bright: #e6cd8f;    /* gold highlight */
  --sage: #8A8F82;        /* secondary accent — sage grey (Spec §4) */
  --greige: #D8D0C3;      /* surface tone — ton-greige (Spec §4) */
  --sage-soft: #a7ac9f;   /* lighter sage for hairlines/hover */
  --ink: #2a2520;            /* warm near-black text on dark */
  --charcoal: #3f4045;       /* logo background / footer */

  --shadow: 0 18px 45px rgba(45, 34, 25, 0.12);
  --shadow-soft: 0 10px 30px rgba(45, 34, 25, 0.08);
  --shadow-lift: 0 28px 60px rgba(45, 34, 25, 0.18);
  --radius: 22px;
  --radius-lg: 30px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --header-height: 107px;  /* header (83px) + breathing room (24px) */

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

main {
  flex: 1;
}

/* Warm paper grain over the whole page for atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

img {
  width: 100%;
  display: block;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--gold-bright);
  color: var(--ink);
}

.container {
  width: min(1180px, 92%);
  margin: auto;
  position: relative;
  z-index: 2;
}

/* ---------- shared type helpers ---------- */
.eyebrow,
.plate,
.section-head > span {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-optical-sizing: auto;
}

/* =============================================================
   NAV
   ============================================================= */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(250, 248, 245, 0.78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease),
    background 0.4s var(--ease);
}

header.scrolled {
  border-bottom-color: rgba(138, 90, 54, 0.14);
  box-shadow: 0 10px 30px rgba(45, 34, 25, 0.06);
}

.nav {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand .nav-logo {
  height: 62px;
  width: auto;
  flex: none;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray);
}

.nav-links a:not(.btn) {
  position: relative;
  padding: 4px 0;
  transition: color 0.25s var(--ease);
}

.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:not(.btn):hover {
  color: var(--gold);
}

.nav-links a:not(.btn):hover::after {
  transform: scaleX(1);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  background:  var(--gold-soft);
  box-shadow: var(--shadow);
}

.btn .arrow {
  transition: transform 0.25s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: var(--ink-black);
}

.btn--gold:hover {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%);
}

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative;
  padding: 150px 0 90px;
  overflow: hidden;
}

/* faint architectural grid behind the hero */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(138, 90, 54, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 90, 54, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 35%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 35%, #000 30%, transparent 75%);
}

/* hero background video (HERO_MEDIA=video) — sits behind the hero grid.
   Needs muted + playsinline + loop in the markup for mobile autoplay; the
   static hero image is its poster so LCP and the validate.py poster check hold. */
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Accessibility: respect reduced-motion — hide the autoplaying loop (matches
   the hero-anim motion sensitivity). The poster image remains visible. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* Recurring logo-initial recognition mark (BRAND_MARK_ENABLED). Decorative —
   the markup carries aria-hidden so it never pollutes the a11y tree. */
.brand-mark {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1;
  color: var(--gold);
  opacity: 0.45;
  margin-bottom: 12px;
  user-select: none;
}

/* Multi-page mode (SITE_MODE=multi): mark the active page's nav link. */
.nav-links a[aria-current="page"],
.drawer-link[aria-current="page"] { color: var(--gold); }

.hero .container {
  width: min(1400px, 92%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-text);
  margin-bottom: 26px;
}

.hero .eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--gold-text);
}

.hero h1 {
  font-size: clamp(2.9rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 26px;
}

.hero h1 em {
  font-style: italic;
  font-variation-settings: "SOFT" 60;
  color: var(--gold);
}

.hero-lead {
  font-size: 1.14rem;
  color: var(--gray);
  margin-bottom: 36px;
}

.hero-meta {
  margin-top: 46px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
}

.hero-meta .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--gold);
}

.hero-meta .stat span {
  font-size: 0.86rem;
  color: var(--gray);
}

/* framed hero drawing — like a plate pinned to a studio wall */
.hero-plate {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--paper-line);
  box-shadow: var(--shadow-lift);
  padding: 22px 22px 18px;
}

.hero-plate::after {
  /* corner registration tick, draftsman detail */
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 16px;
  height: 16px;
  border-top: 1.5px solid var(--gold);
  border-right: 1.5px solid var(--gold);
  opacity: 0.7;
}

.hero-plate .drawing {
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper);
}

.hero-plate .drawing img {
  mix-blend-mode: normal;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-plate .plate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  color: var(--gold-text);
  opacity: 0.75;
}

.hero-plate .plate span:last-child {
  letter-spacing: 0.1em;
}


/* =============================================================
   SECTION SCAFFOLD
   ============================================================= */
section {
  padding: 110px 0;
  position: relative;
}

#leistungen, #ueber-uns, #kontakt {
  scroll-margin-top: 107px;
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.section-head > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-text);
}

.section-head > span::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold-text);
}

.section-head h1,
.section-head h2 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 16px 0 18px;
  color: var(--ink);
}

.section-head h1 em,
.section-head h2 em {
  font-style: italic;
  color: var(--gold);
}

.lead {
  color: var(--gray);
  font-size: 1.08rem;
}

/* =============================================================
   SERVICES
   ============================================================= */
.services {
  background:
    radial-gradient(120% 120% at 0% 0%, #fbf4ea 0%, var(--beige) 55%);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--paper-line);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--gold) 22%, transparent);
}

.service-figure {
  position: relative;
  background: var(--paper);
  height: 230px;
  overflow: hidden;
  border-bottom: 1px solid var(--paper-line);
}

.service-figure img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.service-card:hover .service-figure img {
  transform: scale(1.04);
}

.service-content {
  padding: 26px 26px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-content h3 {
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--ink);
}

.service-content p {
  color: var(--gray);
  font-size: 0.97rem;
}



/* =============================================================
   ABOUT
   ============================================================= */
.about-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 64px;
  align-items: center;
}

.about-figure {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--paper-line);
  box-shadow: var(--shadow);
  padding: 24px;
}

.about-figure .img-wrap {
  border-radius: 18px;
  overflow: hidden;
}

.about-figure img {
  object-fit: cover;
  aspect-ratio: 5 / 4;
}

.about-figure .stamp {
  position: absolute;
  bottom: -22px;
  right: 26px;
  background: var(--charcoal);
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.about-text p {
  color: var(--gray);
  margin-bottom: 18px;
  font-size: 1.04rem;
}

.about-text p:first-of-type {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--ink);
}

.about-list {
  list-style: none;
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.about-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink);
  font-weight: 500;
}

.about-list svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--gold);
  margin-top: 2px;
}

/* =============================================================
   CONTACT  (light / gold — mirrors Leistungen)
   ============================================================= */
.contact {
  background:
    radial-gradient(120% 120% at 0% 0%, #fbf4ea 0%, var(--beige) 55%);
}

.contact .lead {
  color: var(--gray);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: stretch;
}

.contact-box:first-child {
  display: flex;
  flex-direction: column;
}

.contact-lines {
  margin-top: auto;
}

.contact-box {
  background: var(--white);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 36px;
}


.contact-line {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--paper-line);
  color: var(--ink);
  transition: color 0.2s var(--ease);
}

.contact-line:hover {
  color: var(--gold);
}

.contact-line .ico {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  color: var(--gold);
}

.contact-line .ico svg { width: 20px; height: 20px; }

.contact-line .label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  display: block;
}

.contact-line .value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.contact-line:hover .value { color: var(--gold); }

/* boss portrait in contact box */
.contact-person {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
}

.contact-portrait {
  flex: none;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold-soft);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--gold) 12%, transparent);
  margin-bottom: 20px;
}

.contact-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-person-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.contact-person-role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-text);
}

/* form */
form {
  display: grid;
  gap: 16px;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 8px;
}

.field:has(input[required]) label::after,
.field:has(textarea[required]) label::after {
  content: " *" / "";
  color: var(--gold);
}

input, textarea {
  width: 100%;
  border: 1px solid var(--paper-line);
  border-radius: 14px;
  padding: 15px 16px;
  font: inherit;
  font-size: 0.98rem;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

input::placeholder, textarea::placeholder {
  color: var(--sand);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--light);
}

textarea {
  min-height: 200px;
  resize: vertical;
}

form .btn { margin-top: 6px; }

/* Formspree feedback banners */
.fs-banner {
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.fs-error {
  border: 1px solid rgba(220, 80, 80, 0.6);
  background: rgba(220, 80, 80, 0.08);
  color: var(--ink);
}

.fs-field-error {
  display: block;
  font-size: 0.75rem;
  color: rgba(220, 80, 80, 0.9);
  margin-top: 5px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* Contact form success card */
#form-success-card {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  gap: 20px;
  animation: form-success-in 0.5s var(--ease) both;
  min-height: 300px;
}

.form-success-icon {
  flex: none;
}

.form-success-icon circle {
  stroke: var(--gold);
  stroke-width: 2;
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  animation: stroke-draw 0.6s var(--ease) 0.1s both;
}

.form-success-icon path {
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke-draw 0.35s ease 0.7s both;
}

.form-success-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}

.form-success-body {
  color: var(--gray);
  font-size: 1.02rem;
  max-width: 34ch;
  line-height: 1.65;
}

@keyframes form-success-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* =============================================================
   FOOTER
   ============================================================= */
footer {
  background: var(--charcoal);
  color: rgba(247, 241, 232, 0.6);
  padding: 64px 0 40px;
  text-align: center;
}

footer .foot-links {
  display: flex;
  gap: 26px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

footer .foot-links a:hover { color: var(--gold-bright); }

footer .foot-rule {
  width: 100%;
  max-width: 520px;
  height: 1px;
  margin: 0 auto 22px;
  background: linear-gradient(90deg, transparent, rgba(231, 205, 143, 0.3), transparent);
}

footer .copy {
  font-size: 0.84rem;
  color: #C0B8AC;  /* warm off-white on charcoal — AA 5.27:1 */
  line-height: 1.6;
}

/* =============================================================
   SCROLL REVEAL
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* staggered hero entrance on load */
.hero-anim {
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.9s var(--ease) forwards;
}
.hero-anim.d1 { animation-delay: 0.05s; }
.hero-anim.d2 { animation-delay: 0.18s; }
.hero-anim.d3 { animation-delay: 0.31s; }
.hero-anim.d5 { animation-delay: 0.57s; }

.hero-plate.hero-anim {
  transform: translateY(28px) scale(0.985);
  animation-name: riseplate;
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}
@keyframes riseplate {
  to { opacity: 1; transform: none; }
}
@keyframes stroke-draw {
  to { stroke-dashoffset: 0; }
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-plate { max-width: 560px; margin-inline: auto; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-links a:not(.btn):not(.nav-cta) { display: none; }
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .about-figure { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  section { padding: 84px 0 40px; }
  .hero { padding-top: 130px; }
}

@media (max-width: 620px) {
  .service-grid { grid-template-columns: 1fr; }
  .contact-box { padding: 26px; }
  .hero-meta { gap: 26px; }
  .nav .btn { padding: 12px 18px; }
}

/* =============================================================
   HAMBURGER
   ============================================================= */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 1px solid color-mix(in srgb, var(--gold) 20%, transparent);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
  flex: none;
}

.hamburger:hover {
  background: color-mix(in srgb, var(--gold) 6%, transparent);
  border-color: var(--gold-soft);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  transform-origin: center;
}

.drawer-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.drawer-open .hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.drawer-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =============================================================
   MOBILE OVERLAY
   ============================================================= */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.55);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.drawer-open .mobile-overlay {
  opacity: 1;
}

/* =============================================================
   MOBILE DRAWER
   ============================================================= */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: var(--light);
  z-index: 60;
  padding: 80px 48px 48px;
  flex-direction: column;
  gap: 28px;
  transform: translateX(-100%);
  transition: transform 0.35s var(--ease);
}

.drawer-open .mobile-drawer {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 28px;
  right: 20px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid color-mix(in srgb, var(--gold) 20%, transparent);
  border-radius: 8px;
  color: var(--gray);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.drawer-close:hover {
  background: color-mix(in srgb, var(--gold) 6%, transparent);
  border-color: var(--gold-soft);
  color: var(--ink);
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.drawer-link {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  padding: 14px 0;
  border-bottom: 1px solid var(--paper-line);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.drawer-link:first-child {
  border-top: 1px solid var(--paper-line);
}

.drawer-link:hover {
  color: var(--gold);
  padding-left: 6px;
}
.drawer-link[aria-current="page"] {
  padding-left: 6px;
}

/* =============================================================
   MOBILE SECTION PAGING  (≤860px only)
   ============================================================= */
@media (max-width: 860px) {
  /* show hamburger, hide desktop nav CTA */
  .hamburger { display: flex; }
  .nav-cta { display: none; }

  /* prevent bounce/rubber-band scroll on iOS and Android; also suppresses
     pull-to-refresh on Android Chrome — intentional for a static marketing site */
  html, body { overscroll-behavior: none; }

  /* show overlay and drawer on mobile */
  .mobile-overlay { display: block; pointer-events: none; }
  .drawer-open .mobile-overlay { pointer-events: auto; }
  .mobile-drawer { display: flex; }

  /* hide ALL sections by default */
  .hero,
  section {
    display: none;
  }

  /* show active section */
  .hero.is-active { display: block; }
  section.is-active { display: block; }

  /* mini footer: always visible on mobile — hide chrome, keep copyright */
  footer {
    padding: 14px 0;
  }
  footer .foot-links,
  footer .foot-rule,
  footer .copy-services {
    display: none;
  }
}

/* =============================================================
   REDUCED MOTION
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-anim, .hero-plate.hero-anim { opacity: 1; transform: none; }
}

/* =============================================================
   IMPRESSUM (standalone legal page)
   ============================================================= */
.impressum-content {
  padding: 130px 0 90px; /* clear the fixed header */
}

.impressum-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.impressum-content .impressum-intro {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--gold);
  margin-bottom: 48px;
}

.impressum-section {
  margin-bottom: 40px;
}

.impressum-section h2 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.impressum-section p,
.impressum-section a {
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--ink);
  line-height: 1.8;
}

.impressum-section a {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.25s var(--ease);
}

.impressum-section a:hover {
  color: var(--gold-bright);
}

.impressum-rule {
  width: 100%;
  max-width: 520px;
  height: 1px;
  margin: 40px 0;
  background: linear-gradient(90deg, var(--sand), transparent);
}

/* ============================================================
   STOLL — brand "O" mark + page-specific sections
   ============================================================ */

/* Single-color O mark; inherits color via fill:currentColor in the SVG. */
.o-mark { display: inline-block; line-height: 0; color: var(--gold); }
.o-mark svg { display: block; width: 100%; height: 100%; }

/* Large faint background watermark (5–10% opacity). Decorative. */
.o-watermark {
  position: absolute; pointer-events: none; user-select: none;
  z-index: 0; color: var(--gold); opacity: 0.07;
  width: clamp(220px, 40vw, 560px); aspect-ratio: 236 / 316;
}
.o-watermark svg { width: 100%; height: 100%; display: block; }

/* Section divider: centered O between large content blocks. */
.o-divider { display: flex; align-items: center; justify-content: center; gap: 18px; margin: clamp(48px, 8vw, 96px) 0; }
.o-divider::before, .o-divider::after { content: ""; height: 1px; flex: 1; max-width: 160px; background: linear-gradient(90deg, transparent, var(--paper-line), transparent); }
.o-divider .o-mark { width: 30px; height: 40px; opacity: 0.85; }

/* O as bullet replacement in value lists. */
.o-list { list-style: none; display: grid; gap: 14px; padding: 0; margin: 0; }
.o-list li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start; }
.o-list .o-mark { width: 18px; height: 24px; margin-top: 3px; opacity: 0.9; }

/* Hover-reveal O in the corner of gallery / teaser cards. */
.service-card .o-corner, .teaser-card .o-corner {
  position: absolute; top: 14px; right: 14px; width: 20px; height: 27px;
  color: var(--gold); opacity: 0; transition: opacity .35s var(--ease);
}
.service-card:hover .o-corner, .teaser-card:hover .o-corner { opacity: 0.8; }

/* Wohnen one-pager: alternating media+text areas. */
.wohnen-area { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; margin: clamp(40px, 7vw, 88px) 0; position: relative; }
.wohnen-area:nth-child(even) .wohnen-media { order: 2; }
.wohnen-media { border-radius: var(--radius-lg); overflow: hidden; background: var(--paper); box-shadow: var(--shadow); }
.wohnen-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wohnen-copy h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
@media (max-width: 860px) { .wohnen-area { grid-template-columns: 1fr; } .wohnen-area:nth-child(even) .wohnen-media { order: 0; } }

/* Teaser cards (home → Wohnen / Über). */
.teaser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.teaser-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 320px; display: flex; align-items: flex-end; color: var(--white); box-shadow: var(--shadow); }
.teaser-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.teaser-card .teaser-body { position: relative; z-index: 1; padding: 28px; background: linear-gradient(180deg, transparent, rgba(32,32,32,.72)); width: 100%; }
.teaser-card h3 { font-family: var(--font-display); color: var(--white); font-size: 1.6rem; }
@media (max-width: 720px) { .teaser-grid { grid-template-columns: 1fr; } }

/* Greige band used to separate major home sections. */
.band-greige { background: var(--greige); }

/* Editorial body copy: comfortable measure + line-height for narrative text. */
.prose { max-width: 64ch; }
.prose p { line-height: 1.75; margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }

/* Inline text CTA (teaser cards) — mono, tracked, with arrow that nudges on hover. */
.btn-text {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold-bright);
}
.btn-text .arrow { transition: transform .3s var(--ease); }
.teaser-card:hover .btn-text .arrow { transform: translateX(4px); }
