/* GaLanFo – Garten · Landschaft · Forst */

:root {
  --forest: #1f4d32;
  --forest-dark: #15372a;
  --moss: #6f9a2c;
  --lime: #8fb339;
  --moss-text: #4f721c;
  --sand: #f6f1e7;
  --sand-dark: #ebe3d3;
  --ink: #1d2a22;
  --muted: #5b6b5f;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(21, 55, 42, 0.10);
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--forest); }
a:hover { color: var(--moss-text); }

h1, h2, h3 { overflow-wrap: break-word; hyphens: manual; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6em; color: var(--forest-dark); }
h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--forest); color: var(--white); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(31, 77, 50, 0.08);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand img { height: 46px; width: auto; }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--forest);
}
.nav-toggle svg { width: 28px; height: 28px; }

.site-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  text-decoration: none; font-weight: 600; color: var(--ink);
}
.site-nav a:hover { background: var(--sand-dark); color: var(--forest); }
.site-nav .nav-cta { background: var(--forest); color: var(--white); }
.site-nav .nav-cta:hover { background: var(--forest-dark); color: var(--white); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--sand);
    border-bottom: 1px solid rgba(31, 77, 50, 0.1);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 4px; }
  .site-nav a { padding: 12px 16px; border-radius: 12px; font-size: 1.1rem; }
  .site-nav .nav-cta { text-align: center; margin-top: 8px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 1rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--forest); color: var(--white); }
.btn-primary:hover { background: var(--forest-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--forest); box-shadow: inset 0 0 0 2px var(--forest); }
.btn-ghost:hover { background: var(--forest); color: var(--white); }
.btn-light { background: var(--sand); color: var(--forest-dark); }
.btn-light:hover { background: var(--white); color: var(--forest-dark); }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; padding: clamp(48px, 9vw, 110px) 0 0; }

.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--moss-text); margin-bottom: 14px;
}

.hero h1 span { color: var(--moss-text); }
.hero-lead { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-photo { margin: 0; border-radius: 200px 200px var(--radius) var(--radius); overflow: hidden; aspect-ratio: 5 / 4; box-shadow: var(--shadow); }
.hero-photo picture, .team-photo picture { display: block; height: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.hero-strip { margin-top: clamp(32px, 6vw, 64px); background: var(--forest); color: var(--sand); }
.hero-strip ul {
  list-style: none; margin: 0 auto; padding: 22px 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px;
  font-weight: 600;
}
.hero-strip li { display: flex; align-items: center; gap: 10px; }
.hero-strip li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { max-width: 520px; width: 100%; margin-inline: auto; border-radius: 140px 140px var(--radius) var(--radius); }
  .hero-strip ul { justify-content: flex-start; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 10vw, 110px) 0; }
.section-alt { background: var(--white); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* ---------- Services ---------- */

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

.card {
  background: var(--sand); border-radius: var(--radius); padding: 28px;
  border: 1px solid rgba(31, 77, 50, 0.06);
}
.section:not(.section-alt) .card { background: var(--white); box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; }

.icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--forest); color: var(--sand); margin-bottom: 18px;
}
.icon svg { width: 28px; height: 28px; }

@media (max-width: 960px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } }

/* ---------- Team ---------- */

.team-photo { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 9; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .team-photo { aspect-ratio: 4 / 3; } }

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

.person { display: flex; flex-direction: column; gap: 16px; }
.person-head { display: flex; align-items: center; gap: 16px; }
.avatar {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--moss-text), var(--forest));
  color: var(--white); font-weight: 800; font-size: 1.3rem;
}
.person h3 { margin: 0; }
.role { color: var(--moss-text); font-weight: 600; margin: 0; }
.person ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.person ul li { margin-bottom: 4px; }
.person-contact { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: auto; font-weight: 600; }

@media (max-width: 760px) { .team { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */

.gallery-group + .gallery-group { margin-top: 48px; }
.gallery-group h3 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.gallery-group h3 small { font-weight: 500; color: var(--muted); font-size: 1rem; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 600px) { .gallery { gap: 8px; } .gallery figure { border-radius: 10px; } }
.gallery a { display: block; height: 100%; }
.gallery figure { margin: 0; border-radius: 14px; overflow: hidden; background: var(--sand-dark); aspect-ratio: 4 / 3; }
.gallery picture { display: block; height: 100%; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery figure:hover img { transform: scale(1.04); }

/* ---------- Contact ---------- */

.contact {
  background: var(--forest); color: var(--sand);
  border-radius: calc(var(--radius) * 1.5);
  padding: clamp(32px, 6vw, 64px);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
}
.contact h2 { color: var(--white); }
.contact .eyebrow { color: #b5d16a; }
.contact :focus-visible, .hero-strip :focus-visible { outline-color: var(--lime); }
.contact p { color: rgba(246, 241, 231, 0.85); }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list a {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.08); color: var(--white); text-decoration: none; font-weight: 600;
  word-break: break-word;
}
.contact-list a:hover { background: rgba(255, 255, 255, 0.16); color: var(--white); }
.contact-list svg { flex: none; width: 22px; height: 22px; color: var(--lime); }
.contact-list small { display: block; font-weight: 500; color: rgba(246, 241, 231, 0.88); }

@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-footer { padding: 40px 0; color: var(--muted); font-size: 0.95rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-inner img { height: 36px; width: auto; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); }

/* ---------- Dialogs (lightbox + legal panes) ---------- */

html.lightbox-open { overflow: hidden; }

dialog { padding: 0; border: 0; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(10, 24, 16, 0.94); }

.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; margin: 0; max-height: none;
  background: transparent; color: var(--sand);
  display: grid; place-items: center;
}
.lightbox:not([open]) { display: none; }
.lightbox-figure {
  margin: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 64px 72px 24px;
}
.lightbox-img {
  max-width: 100%; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); width: auto; height: auto;
  object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  display: flex; gap: 16px; justify-content: space-between; width: min(100%, 900px);
  padding: 8px 14px; border-radius: 10px; background: rgba(10, 24, 16, 0.85); color: var(--sand); font-size: 0.95rem;
}
.lightbox-count { flex: none; font-variant-numeric: tabular-nums; }

.lightbox-btn, .legal-close {
  position: fixed; display: grid; place-items: center;
  width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: var(--white);
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox-btn svg, .legal-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox :focus-visible { outline-color: var(--lime); }

@media (max-width: 600px) {
  .lightbox-figure { padding: 64px 12px 88px; }
  .lightbox-img { max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
}

.legal-dialog {
  width: min(100% - 32px, 820px); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); margin: auto;
  border-radius: var(--radius); background: var(--white); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); overflow-y: auto; overscroll-behavior: contain;
}
.legal-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; background: var(--sand-dark); color: var(--forest-dark); }
.legal-close:hover { background: var(--sand); }
.legal-body { padding: clamp(24px, 5vw, 48px); overflow-wrap: break-word; }
.legal-body h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin-right: 48px; }
.legal-body h3 { font-size: 1.2rem; margin-top: 1.8em; margin-right: 48px; scroll-margin-top: 16px; }
.legal-body h4 { font-size: 1.05rem; margin-top: 1.4em; }
.legal-body p, .legal-body li { font-size: 0.98rem; }
.legal-body ul { padding-left: 1.2em; }
.legal-body .seal { margin-top: 2em; font-size: 0.85rem; color: var(--muted); }
.legal-body .seal a { color: var(--muted); }

/* Without JS: #impressum / #datenschutz show the text inline */
.legal-dialog:target:not([open]) { display: block; position: static; margin: 24px auto; box-shadow: var(--shadow); max-height: none; }
.legal-dialog:target:not([open]) .legal-close { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
