/* ==========================================================================
   Gottfried Gstrein — Glaserei · Bilder · Gästehaus
   Design tokens are pulled from the real brand mark (black circle "G" +
   cursive signature + tilted overlapping squares in sky blue) and from the
   stained-glass family crest used on the Glaserei chronicle page.
   ========================================================================== */

:root {
  /* brand blues — light tint straight from the old site + a deepened,
     accessible version for text/buttons on white */
  --sky: #8fd0f0;
  --sky-tint: #eaf6fc;
  --sky-deep: #1c6f96;
  --sky-deep-dark: #114d69;

  /* stained-glass accent palette, used sparingly on Glaserei pages */
  --glass-amber: #d99a34;
  --glass-red: #b6483f;
  --glass-cobalt: #2c4f8c;

  --ink: #1a1c1e;
  --ink-soft: #52585f;
  --ink-faint: #868d94;
  --paper: #ffffff;
  --paper-alt: #f5f7f8;
  --line: #e3e7ea;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 24px;

  --shadow-s: 0 1px 2px rgba(20, 24, 28, 0.06), 0 1px 1px rgba(20, 24, 28, 0.04);
  --shadow-m: 0 12px 28px -12px rgba(20, 24, 28, 0.22);
  --shadow-l: 0 24px 56px -20px rgba(20, 24, 28, 0.28);

  --container: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Per-section accent, applied as a class on <body> so cards/links/underlines
   in each business area pick up a distinct, brand-consistent tint. */
body.section-glaserei { --section-accent: var(--glass-cobalt); }
body.section-bilder   { --section-accent: var(--glass-amber); }
body.section-gaestehaus { --section-accent: #3f8f6f; }
body { --section-accent: var(--sky-deep); }

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--ink-soft); }
button { font: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  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 {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-s); z-index: 200; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--section-accent);
}
.eyebrow::before {
  content: ""; width: 18px; height: 3px; border-radius: 2px; background: currentColor;
}
h1 { font-size: clamp(1.9rem, 4vw + 0.7rem, 2.9rem); }
h2 { font-size: clamp(1.5rem, 2.2vw + 0.7rem, 2.1rem); }
h3 { font-size: 1.2rem; }
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--section-accent); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--section-accent); color: var(--section-accent); }
.btn-block { width: 100%; }

/* ==========================================================================
   Header / primary nav
   ========================================================================== */
.site-header {
  /* solid background, no filter/backdrop-filter here: either would turn this
     element into a CSS containing block for its position:fixed descendant
     (.nav-menu below), trapping the mobile menu inside the header's own
     box instead of letting it cover the full viewport. */
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--line);
}
.navbar { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  /* No border/shadow here on purpose: the header is already white, and the
     logo file itself has a plain white background, so a bordered "chip"
     just draws an odd box around it instead of letting it sit on the page. */
  height: 48px; width: 74px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: none;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

/* On the dark footer, the logo's own white background does need to be set
   off from the page, so restore a light chip there only. */
.footer-brand .brand-mark {
  background: #fff; border-radius: var(--radius-s); padding: 4px;
  border: 1px solid rgba(255,255,255,0.14); box-shadow: var(--shadow-s);
}
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name strong { font-size: 1.02rem; font-weight: 700; }
.brand-name span { font-size: 0.74rem; color: var(--ink-faint); letter-spacing: 0.02em; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: #fff; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 20px; margin: 0 auto; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
  position: fixed; inset: 76px 0 0 0; background: var(--paper);
  display: flex; flex-direction: column; padding: 12px 20px 28px;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
  overflow-y: auto;
}
.nav-menu.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav-menu a {
  display: block; padding: 16px 4px; font-size: 1.15rem; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.nav-menu a.is-active { color: var(--section-accent); }
.nav-menu .nav-contact { margin-top: 20px; color: var(--ink-soft); font-size: 0.92rem; }
.nav-menu .nav-contact a { font-weight: 500; border: 0; padding: 4px 0; display: inline; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static; inset: auto; transform: none; opacity: 1; pointer-events: auto;
    flex-direction: row; align-items: center; padding: 0; overflow: visible;
  }
  .nav-menu a { padding: 8px 0; font-size: 0.98rem; border-bottom: 0; margin-left: 34px; position: relative; }
  .nav-menu a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
    background: var(--section-accent); transform: scaleX(0); transform-origin: left; transition: transform .15s ease;
  }
  .nav-menu a:hover::after, .nav-menu a.is-active::after { transform: scaleX(1); }
  .nav-menu a.is-active { color: var(--section-accent); }
  .nav-menu .nav-contact { display: none; }
}

/* secondary sub-navigation (per-section subpages) */
.subnav-wrap { background: var(--paper-alt); border-bottom: 1px solid var(--line); }
.subnav { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; -ms-overflow-style: none; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  flex: none; padding: 8px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  color: var(--ink-soft); background: #fff; border: 1px solid var(--line);
}
.subnav a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.subnav a:hover:not(.is-active) { border-color: var(--section-accent); color: var(--section-accent); }

/* breadcrumb-y page title band */
.page-head { padding: 40px 0 28px; }
.page-head h1 { margin-bottom: 6px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: 44px 0 8px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-copy .eyebrow { margin-bottom: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.hero-figure { position: relative; }
.hero-shape {
  position: absolute; inset: 10% -8% auto auto; width: 78%; aspect-ratio: 1;
  background: var(--sky); opacity: 0.5; border-radius: var(--radius-l);
  transform: rotate(8deg); z-index: 0;
}
.hero-figure img {
  position: relative; z-index: 1; border-radius: var(--radius-l);
  box-shadow: var(--shadow-l); width: 100%; aspect-ratio: 4/3; object-fit: cover;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid.reverse .hero-figure { order: -1; }
}

/* home hero: bigger, centered intro above the three business cards */
.home-hero { text-align: center; padding: 56px 0 16px; }
.home-hero .eyebrow { justify-content: center; }
.home-hero .lede { margin: 0 auto; }
.home-crest { width: 64px; height: auto; margin: 0 auto 18px; display: block; }

/* ==========================================================================
   Sections / cards
   ========================================================================== */
.section { padding: 56px 0; }
.section-alt { background: var(--paper-alt); }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }

.card-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 620px) { .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }

.business-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow-s);
  transition: transform .18s ease, box-shadow .18s ease;
}
.business-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); }
.business-card figure { margin: 0; aspect-ratio: 4/3; overflow: hidden; background: var(--paper-alt); }
.business-card img { width: 100%; height: 100%; object-fit: cover; }
.business-card .card-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.business-card .card-body p { flex: 1; }
.business-card .card-cta { font-weight: 700; color: var(--section-accent); display: inline-flex; align-items: center; gap: 6px; }
.business-card .card-cta::after { content: "→"; transition: transform .15s ease; }
.business-card:hover .card-cta::after { transform: translateX(4px); }

.info-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 24px; box-shadow: var(--shadow-s);
}

/* ==========================================================================
   Opening hours
   ========================================================================== */
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td { padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 0.96rem; }
.hours-table tr:last-child td { border-bottom: 0; }
.hours-table td:first-child { font-weight: 700; color: var(--ink); width: 55%; }
.hours-table td:last-child {
  color: var(--ink-soft); text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.hours-table td:last-child span { white-space: nowrap; }
.hours-note { margin-top: 14px; font-size: 0.9rem; color: var(--ink-faint); }

/* ==========================================================================
   Gallery + lightbox
   ========================================================================== */
.gallery-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.gallery-item {
  position: relative; border: 0; padding: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 4/3;
  box-shadow: var(--shadow-s);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed; inset: 0; background: rgba(15,17,19,0.92); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 28px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 84vh; border-radius: var(--radius-s); box-shadow: var(--shadow-l); }
.lightbox-caption { color: #fff; text-align: center; margin-top: 12px; font-size: 0.9rem; opacity: 0.85; }
.lightbox-close {
  position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff; border: 0; font-size: 1.4rem; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ==========================================================================
   Timeline (Firmenchronik)
   ========================================================================== */
.timeline { position: relative; margin: 0; padding: 0; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line);
}
.timeline-item { position: relative; padding: 0 0 28px 34px; }
.timeline-item::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--section-accent);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-year { font-weight: 700; color: var(--section-accent); font-size: 0.95rem; margin-bottom: 2px; }
.timeline-item p { margin: 0; }

.timeline-figure { border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow-s); margin-bottom: 10px; }
.timeline-figure figcaption {
  padding: 8px 12px; font-size: 0.82rem; color: var(--ink-soft); background: var(--paper-alt);
  border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-m) var(--radius-m);
}

.baustellen-table { width: 100%; border-collapse: collapse; }
.baustellen-table th { text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.baustellen-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.baustellen-table td:first-child { font-weight: 700; white-space: nowrap; }

/* ==========================================================================
   Location / map
   ========================================================================== */
.location-grid { display: grid; gap: 24px; }
@media (min-width: 860px) { .location-grid { grid-template-columns: 1.1fr 1.4fr; align-items: start; } }
.map-embed { border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow-m); border: 1px solid var(--line); }
.map-embed iframe { width: 100%; height: 420px; border: 0; display: block; }
.address-block address { font-style: normal; color: var(--ink-soft); }
.address-block .addr-name { color: var(--ink); font-weight: 700; font-size: 1.05rem; display: block; margin-bottom: 4px; }
.contact-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.contact-list a { font-weight: 600; }
.contact-list .ci-label { color: var(--ink-faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .04em; display: block; }

/* ==========================================================================
   Contact form
   ========================================================================== */
.contact-form { display: grid; gap: 18px; max-width: 620px; }
.form-row { display: grid; gap: 18px; }
@media (min-width: 560px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.86rem; font-weight: 700; }
.field .optional { font-weight: 400; color: var(--ink-faint); }
.field input, .field textarea {
  font: inherit; padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: #fff; color: var(--ink); resize: vertical;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--section-accent); outline-offset: 1px; }
.field-check { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; color: var(--ink-soft); }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.alert { padding: 14px 18px; border-radius: var(--radius-s); font-weight: 600; font-size: 0.94rem; margin-bottom: 4px; }
.alert-success { background: #e6f5ea; color: #1f6b3a; border: 1px solid #bfe3c9; }
.alert-error { background: #fbeaea; color: #9c2b2b; border: 1px solid #f0c6c6; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: #cfd3d7; margin-top: 40px; }
.footer-top { padding: 56px 0 32px; display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-top { grid-template-columns: 1.1fr repeat(3, 1fr); gap: 24px; } }
.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-brand p { color: #9aa0a6; font-size: 0.88rem; margin-top: 8px; }
.footer-col h4 { color: #fff; font-size: 0.86rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.footer-col address { font-style: normal; font-size: 0.92rem; line-height: 1.7; }
.footer-col a { display: inline-block; margin-top: 2px; color: #cfd3d7; }
.footer-col a:hover { color: var(--sky); }
.footer-col .foot-hours { font-size: 0.88rem; color: #9aa0a6; margin-top: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 0; display: flex;
  flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 0.82rem; color: #9aa0a6;
}
.footer-bottom a { color: #cfd3d7; }
.footer-bottom a:hover { color: var(--sky); }
.footer-legal-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   Misc
   ========================================================================== */
.divider-shape {
  width: 46px; height: 46px; background: var(--sky); opacity: 0.55; border-radius: var(--radius-s);
  transform: rotate(10deg); margin: 0 auto 18px;
}
.two-col { display: grid; gap: 28px; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1fr 1fr; } }
.crest-figure { text-align: center; }
.crest-figure img { max-width: 220px; margin: 0 auto; }
