/* ==========================================================================
   galabau-grasberg.de — M. Heißenbüttel Garten- und Landschaftsbau e.K.
   Statisch, self-hosted, keine Inline-Styles (strikte CSP).
   Tokens dokumentiert in notes/design-tokens.md
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fraunces-600.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: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400.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: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600.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;
}

/* Metrik-angepasste Fallbacks gegen Layout-Shift beim Font-Swap
   (Werte aus hmtx-Vermessung der woff2 vs. Georgia/Arial, siehe notes/design-tokens.md) */
@font-face {
  font-family: "Fraunces-fallback";
  src: local("Georgia");
  size-adjust: 108.64%;
  ascent-override: 90.02%;
  descent-override: 23.47%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter-fallback";
  src: local("Arial");
  size-adjust: 105.36%;
  ascent-override: 91.95%;
  descent-override: 22.89%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #faf8f3;
  --bg-sand: #f2ede2;
  --surface: #ffffff;
  --ink: #24301f;
  --ink-soft: #4a5544;
  --green: #689818;
  --green-dark: #41660d;
  --green-deep: #2e4a09;
  --earth: #6b431f;
  --line: #e3dccb;
  --error: #a4351f;
  --footer-bg: #24301f;
  --footer-ink: #e8ebe2;
  --footer-green: #c9dba8;
  --radius: 10px;
  --radius-s: 6px;
  --shadow: 0 2px 24px rgba(36, 48, 31, 0.08);
  --container: 1140px;
  --pad-x: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
  --font-display: "Fraunces", "Fraunces-fallback", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Inter-fallback", Arial, system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 4.5vw + 1rem, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 2.5vw + 0.8rem, 2.3rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--green-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green-deep);
}

:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--green);
  color: #fff;
}

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

section {
  padding-block: var(--section-y);
  /* Anker landen unterhalb des Sticky-Headers */
  scroll-margin-top: 5.5rem;
}

.section-sand {
  background: var(--bg-sand);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip-Link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--green-dark);
  color: #fff;
  padding: 0.7em 1.2em;
  border-radius: 0 0 var(--radius-s) 0;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

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

.brand img {
  width: 118px;
  height: 56px;
  object-fit: contain;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.4em 0.1em;
}

.site-nav a:hover {
  color: var(--green-dark);
}

.nav-cta {
  background: var(--green-dark);
  color: #fff;
  border-radius: var(--radius-s);
  padding: 0.55em 1.1em;
}

.site-nav a.nav-cta {
  color: #fff;
  padding: 0.55em 1.1em;
}

.site-nav a.nav-cta:hover {
  background: var(--green-deep);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--green-dark);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius-s);
  padding: 0.85em 1.5em;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--green-deep);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--green-dark);
  box-shadow: inset 0 0 0 2px var(--green-dark);
}

.btn-ghost:hover {
  background: rgba(104, 152, 24, 0.1);
  color: var(--green-deep);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}

/* ---------- Eyebrow / Sektionsköpfe ---------- */
.eyebrow {
  display: block;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--earth);
  margin-bottom: 0.9em;
}

.section-head {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}

.section-head p {
  color: var(--ink-soft);
}

/* ---------- Grüner Faden (Signatur-Element) ---------- */
.thread {
  display: flex;
  justify-content: center;
  background: inherit;
}

.thread svg {
  width: 56px;
  height: 128px;
  overflow: visible;
}

.thread path {
  stroke: var(--green);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s ease-out;
}

.thread.is-drawn path {
  stroke-dashoffset: 0;
}

.thread .leaf {
  fill: var(--green);
  stroke: none;
  opacity: 0;
  transition: opacity 0.5s ease-out 1.2s;
}

.thread.is-drawn .leaf {
  opacity: 1;
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero h1 {
  margin-bottom: 0.5em;
}

.hero-sub {
  font-size: 1.1875rem;
  color: var(--ink-soft);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.8rem 0 1.6rem;
}

.hero-claims {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 600;
}

.hero-claims li {
  display: flex;
  align-items: center;
  gap: 0.45em;
}

.hero-claims li::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--green);
}

.hero-media {
  position: relative;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 1.4rem -1.4rem -1.4rem 1.4rem;
  background: var(--bg-sand);
  border-radius: var(--radius);
  z-index: 0;
}

.hero-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-swoosh {
  width: min(260px, 60%);
  height: 26px;
  margin-top: 0.4rem;
}

.hero-swoosh path {
  stroke: var(--green);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.4s ease-out 0.3s;
}

.hero-swoosh.is-drawn path {
  stroke-dashoffset: 0;
}

/* ---------- Über uns ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 40%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-media figcaption {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}

/* ---------- Leistungen ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  list-style: none;
  max-width: 62rem;
  margin: 0;
  padding: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}

.card-body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body p {
  color: var(--ink-soft);
  font-size: 0.9875rem;
}

.card-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.card-list li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 0.45em;
  font-size: 0.9875rem;
}

.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 1em;
  height: 1em;
  background-color: var(--green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M8 1c3 2 6 2 6 6.5S10.5 15 8 15 2 12 2 7.5 5 3 8 1zm0 2.4C6 4.6 4 5.6 4 7.5 4 11 6 13 8 13s4-2 4-5.5c0-1.9-2-2.9-4-4.1zM7.3 6h1.4v6H7.3z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M8 1c3 2 6 2 6 6.5S10.5 15 8 15 2 12 2 7.5 5 3 8 1zm0 2.4C6 4.6 4 5.6 4 7.5 4 11 6 13 8 13s4-2 4-5.5c0-1.9-2-2.9-4-4.1zM7.3 6h1.4v6H7.3z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.card-note {
  margin-top: auto;
  padding-top: 0.9rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* ---------- Referenzen / Galerie ---------- */
.gallery {
  columns: 3;
  column-gap: 1rem;
}

.gallery figure {
  margin: 0 0 1rem;
  break-inside: avoid;
}

.gal-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
}

.gal-item img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gal-item:hover img {
  transform: scale(1.015);
  box-shadow: var(--shadow);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(24, 32, 20, 0.92);
  padding: 1rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox figure {
  margin: 0;
  max-width: min(920px, 100%);
  text-align: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  margin-inline: auto;
  border-radius: var(--radius-s);
}

.lightbox figcaption {
  color: #e8ebe2;
  font-size: 0.9375rem;
  margin-top: 0.8rem;
}

.lb-btn {
  position: absolute;
  background: rgba(250, 248, 243, 0.12);
  color: #fff;
  border: 1px solid rgba(250, 248, 243, 0.35);
  border-radius: 50%;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-btn:hover {
  background: rgba(250, 248, 243, 0.28);
}

.lb-close {
  top: 1rem;
  right: 1rem;
}

.lb-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 50rem;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0.2rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--green-dark);
  transition: transform 0.25s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list .faq-body {
  padding: 0 0.2rem 1.3rem;
  color: var(--ink-soft);
  max-width: 44rem;
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-info address {
  font-style: normal;
  margin-bottom: 1.4rem;
}

.contact-list {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.55rem;
}

.contact-list .label {
  display: inline-block;
  min-width: 5.2em;
  font-weight: 600;
  color: var(--ink);
}

.contact-area {
  color: var(--ink-soft);
}

/* ---------- Formular ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 3vw, 2.2rem);
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
}

.field .optional {
  font-weight: 400;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.7em 0.9em;
}

.field input:focus,
.field textarea:focus {
  outline: 3px solid var(--green-dark);
  outline-offset: 1px;
  border-color: var(--green-dark);
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--error);
}

.field-error {
  display: none;
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.3rem;
}

.field.has-error .field-error {
  display: block;
}

/* Honeypot: für Menschen unsichtbar, für Bots ein normales Feld */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  border-radius: var(--radius-s);
  padding: 0.85em 1em;
  margin-bottom: 1rem;
  font-size: 0.9875rem;
  display: none;
}

.form-status.is-ok {
  display: block;
  background: #eaf2da;
  border: 1px solid var(--green);
  color: var(--green-deep);
}

.form-status.is-fail {
  display: block;
  background: #f9ece8;
  border: 1px solid var(--error);
  color: var(--error);
}

.form-privacy {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin: 0.9rem 0 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding-block: 3.5rem 2rem;
  margin-top: var(--section-y);
}

.site-footer a {
  color: var(--footer-green);
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.site-footer address {
  font-style: normal;
}

.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--footer-green);
  margin-bottom: 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(232, 235, 226, 0.2);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.9375rem;
}

/* ---------- Unterseiten (Impressum/Datenschutz/Danke/404) ---------- */
.page-main {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.page-main .container {
  max-width: 50rem;
}

.page-main h1 {
  font-size: clamp(1.9rem, 3vw + 1rem, 2.6rem);
}

.page-main h2 {
  font-size: 1.35rem;
  margin-top: 2em;
}

.page-main h3 {
  font-size: 1.1rem;
  margin-top: 1.6em;
}

.legal-block address {
  font-style: normal;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .thread path,
  .hero-swoosh path {
    stroke-dashoffset: 0;
  }

  .thread .leaf {
    opacity: 1;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-media {
    max-width: 620px;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .gallery {
    columns: 2;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem var(--pad-x) 1.2rem;
  }

  .site-nav li {
    border-bottom: 1px solid var(--line);
  }

  .site-nav li:last-child {
    border-bottom: 0;
    padding-top: 0.8rem;
  }

  .site-nav a {
    display: block;
    padding: 0.85em 0.2em;
    font-size: 1.0625rem;
  }

  .site-nav a.nav-cta {
    text-align: center;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .lb-prev {
    left: 0.4rem;
  }

  .lb-next {
    right: 0.4rem;
  }
}

@media (max-width: 560px) {
  .gallery {
    columns: 1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .hero-media::before {
    inset: 1rem -0.6rem -0.6rem 1rem;
  }
}
