/* ==========================================================================
   Blumenhaus Lindenblüte - main stylesheet
   Mobile first: base styles target small screens, media queries add
   layout for larger screens. Loaded after Bootstrap (self-hosted).
   Icons: Lucide (https://lucide.dev) - ISC License, see assets/icons/
   ========================================================================== */

/* -------- Root variables -------- */
:root {
  /* Brand colours - taken from the logo */
  --color-wine: #4a0a12;          /* logo lettering (burgundy) */
  --color-wine-dark: #2f0408;
  --color-wine-light: #6e1a26;
  --color-gold: #e0a356;          /* linden leaf / blossom */
  --color-gold-dark: #9a6420;     /* gold for text on light bg (AA) */
  --color-gold-soft: #f7ead6;
  --color-bark: #523a3b;          /* dark leaf / branch */
  --color-cream: #fbf7f1;
  --color-white: #ffffff;
  --color-text: #2b2022;
  --color-text-muted: #5f5254;
  --color-border: #e8ddd0;

  /* Fonts */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Spacing, radius, shadow */
  --space-section: 3.5rem;
  --radius: 0.75rem;
  --radius-sm: 0.375rem;
  --shadow-sm: 0 2px 8px rgba(47, 4, 8, 0.08);
  --shadow-md: 0 10px 30px rgba(47, 4, 8, 0.12);
  --header-height: 72px;

  /* DEMO: banner colours (neutral, not part of the client brand) */
  --color-demo-bg: #1f2937;
  --color-demo-text: #f9fafb;
  --color-demo-accent: #fbbf24;

  /* Bootstrap overrides */
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--color-text);
  --bs-body-bg: var(--color-white);
  --bs-link-color-rgb: 74, 10, 18;
  --bs-link-hover-color-rgb: 110, 26, 38;
  --bs-border-color: var(--color-border);
}

/* -------- Base -------- */
html {
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-wine);
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.125rem); }
h3 { font-size: 1.25rem; }

a {
  color: var(--color-wine);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-wine-light);
}

:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
}

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

.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  vertical-align: -0.2em;
}

/* Focus targets for skip link / scroll to top (not interactive) */
#main:focus,
.site-header:focus {
  outline: none;
}

/* -------- Skip link -------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background: var(--color-wine);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
  color: var(--color-white);
}

/* -------- Demo banner (DEMO: remove at go-live) -------- */
.demo-banner {
  background: var(--color-demo-bg);
  color: var(--color-demo-text);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
  padding: 0.6rem 1rem;
  border-bottom: 3px solid var(--color-demo-accent);
}

.demo-banner p {
  margin: 0;
}

.demo-banner strong {
  color: var(--color-demo-accent);
}

/* -------- Header & navigation -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-header .navbar {
  min-height: var(--header-height);
  padding-block: 0.5rem;
}

.navbar-brand {
  padding: 0;
  margin-right: 1rem;
}

.navbar-brand img {
  display: block;
  width: 140px;
  height: auto;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-wine);
}

.nav-toggle .icon {
  width: 26px;
  height: 26px;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: inline-block;
}

.site-nav .nav-link {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-bark);
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--color-border);
}

.site-nav .nav-item:last-child .nav-link {
  border-bottom: 0;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus-visible {
  color: var(--color-wine);
}

.site-nav .nav-link[aria-current="page"] {
  color: var(--color-wine);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

/* -------- Buttons -------- */
.btn-brand,
.btn-brand-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.65rem 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-brand {
  background: var(--color-wine);
  color: var(--color-white);
  border: 2px solid var(--color-wine);
}

.btn-brand:hover,
.btn-brand:focus-visible {
  background: var(--color-wine-light);
  border-color: var(--color-wine-light);
  color: var(--color-white);
}

.btn-brand-outline {
  background: transparent;
  color: var(--color-wine);
  border: 2px solid var(--color-wine);
}

.btn-brand-outline:hover,
.btn-brand-outline:focus-visible {
  background: var(--color-wine);
  color: var(--color-white);
}

.btn-on-dark {
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-on-dark:hover,
.btn-on-dark:focus-visible {
  background: var(--color-white);
  color: var(--color-wine);
}

/* -------- Sections -------- */
.section {
  padding-block: var(--space-section);
}

.section-cream {
  background: var(--color-cream);
}

.section-title {
  margin-bottom: 1.5rem;
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-bottom: 0.5rem;
}

.leaf-divider {
  display: block;
  width: 64px;
  height: 3px;
  margin: 1rem 0 1.5rem;
  background: linear-gradient(90deg, var(--color-gold), var(--color-wine));
  border-radius: 3px;
}

.text-center .leaf-divider {
  margin-inline: auto;
}

/* -------- Home hero -------- */
.hero {
  background: var(--color-cream);
  overflow: hidden;
}

.hero-media img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.hero-content {
  padding-top: 2.25rem;
  padding-bottom: 2.75rem;
}

.hero-content h1 {
  margin-bottom: 0.25rem;
}

.hero-sub {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 4vw, 1.625rem);
  font-style: italic;
  color: var(--color-bark);
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* -------- Notice (opening hours / Blumenautomat) -------- */
.notice {
  background: var(--color-wine);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.notice p {
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice-automat {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.notice-automat img {
  display: block;
  width: 100%;
  border-radius: var(--radius-sm);
  background: var(--color-white);
}

/* -------- Service cards -------- */
.service-grid {
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.service-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  padding: 1.1rem 1.25rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-gold-soft);
  color: var(--color-wine);
  flex-shrink: 0;
}

.service-icon .icon {
  width: 24px;
  height: 24px;
}

.service-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-wine);
  line-height: 1.3;
}

.service-card .chevron {
  margin-left: auto;
  color: var(--color-gold-dark);
}

/* -------- Page header (sub pages) -------- */
.page-header {
  background: var(--color-cream);
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  margin-bottom: 0;
}

.page-header .lead {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.1875rem;
  color: var(--color-bark);
  margin: 1rem 0 0;
  max-width: 42rem;
}

.breadcrumb {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  --bs-breadcrumb-divider-color: var(--color-text-muted);
  --bs-breadcrumb-item-active-color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-wine);
}

/* -------- Prose / content -------- */
.prose {
  max-width: 44rem;
  overflow-wrap: anywhere;
}

.prose p {
  margin-bottom: 1.15rem;
}

.prose h2 {
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

.prose h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.leaf-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.leaf-list li {
  position: relative;
  padding: 0.6rem 0 0.6rem 2rem;
  border-bottom: 1px dashed var(--color-border);
}

.leaf-list li:last-child {
  border-bottom: 0;
}

.leaf-list li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 1.05rem;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--color-gold);
  border-radius: 0 70% 0 70%;
}

.highlight-box {
  background: var(--color-gold-soft);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.25rem;
  margin: 1.5rem 0;
}

.highlight-box p:last-child {
  margin-bottom: 0;
}

.cta-band {
  background: var(--color-wine);
  color: var(--color-white);
  padding-block: 2.75rem;
}

.cta-band h2 {
  color: var(--color-white);
}

.cta-band p {
  color: rgba(255, 255, 255, 0.9);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* -------- Gallery -------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.gallery-item a,
.gallery-item > img {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-cream);
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item a:hover img,
.gallery-item a:focus-visible img {
  transform: scale(1.04);
}

/* Lightbox (native <dialog>) */
.lightbox {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 6, 8, 0.94);
  color: var(--color-white);
}

.lightbox::backdrop {
  background: rgba(20, 6, 8, 0.94);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-figure {
  margin: 0;
  padding: 4rem 0.75rem 5rem;
  text-align: center;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 10rem);
  max-height: calc(100dvh - 10rem);
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
}

.lightbox-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
}

.lightbox-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-white);
  cursor: pointer;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-btn .icon {
  width: 26px;
  height: 26px;
}

.lightbox-close { top: 0.75rem; right: 0.75rem; }
.lightbox-prev { bottom: 1rem; left: calc(50% - 60px); }
.lightbox-next { bottom: 1rem; right: calc(50% - 60px); }
.lightbox-prev .icon { transform: rotate(180deg); }

/* -------- Contact -------- */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.5rem 0;
}

.contact-list .icon {
  margin-top: 0.3rem;
  color: var(--color-gold-dark);
}

.info-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.info-card h2,
.info-card h3 {
  font-size: 1.375rem;
  margin-bottom: 1rem;
}

.hours {
  margin: 0;
}

.hours div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--color-border);
}

.hours div:last-child {
  border-bottom: 0;
}

.hours dt {
  font-weight: 700;
}

.hours dd {
  margin: 0;
  text-align: right;
}

/* Contact form */
.contact-form .form-label {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.contact-form .form-control {
  min-height: 48px;
  border-color: #cdbfae;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.contact-form .form-control:focus {
  border-color: var(--color-wine);
  box-shadow: 0 0 0 0.2rem rgba(224, 163, 86, 0.35);
}

.contact-form .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  border-color: #a89482;
}

.contact-form .form-check-input:checked {
  background-color: var(--color-wine);
  border-color: var(--color-wine);
}

.contact-form .form-check-label {
  padding-left: 0.35rem;
}

.required-mark {
  color: var(--color-wine-light);
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--color-gold-soft);
  border-left: 4px solid var(--color-gold);
}

.form-status[hidden] {
  display: none;
}

/* -------- Footer -------- */
.site-footer {
  background: var(--color-wine-dark);
  color: rgba(255, 255, 255, 0.88);
  padding-top: 3rem;
  font-size: 1rem;
}

.site-footer h2 {
  font-size: 1.25rem;
  color: var(--color-gold);
  margin-bottom: 1rem;
}

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

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--color-gold);
}

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

.site-footer .contact-list .icon {
  color: var(--color-gold);
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.site-footer .hours div {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.footer-bottom {
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* -------- Scroll to top -------- */
.scroll-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-wine);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover,
.scroll-top:focus-visible {
  background: var(--color-wine-light);
}

/* -------- 404 -------- */
.error-code {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 20vw, 7rem);
  line-height: 1;
  color: var(--color-gold);
}

/* ==========================================================================
   Larger screens
   ========================================================================== */
@media (min-width: 576px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .notice {
    padding: 2rem;
  }
}

@media (min-width: 768px) {
  :root {
    --space-section: 4.5rem;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .notice-automat {
    grid-template-columns: 1.2fr 1fr;
  }

  .page-header {
    padding: 3.5rem 0 3rem;
  }

  .lightbox-prev { top: 50%; bottom: auto; left: 1rem; transform: translateY(-50%); }
  .lightbox-next { top: 50%; bottom: auto; right: 1rem; transform: translateY(-50%); }
  .lightbox-prev .icon { transform: rotate(180deg); }
  .lightbox-figure { padding: 4rem 5rem; }
}

@media (min-width: 992px) {
  :root {
    --header-height: 92px;
  }

  .navbar-brand img {
    width: 180px;
  }

  .site-nav .nav-link {
    padding: 0.5rem 0.9rem;
    border-bottom: 0;
    position: relative;
  }

  .site-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.2rem;
    height: 2px;
    background: var(--color-gold);
    transform: scaleX(0);
    transition: transform 0.2s ease;
  }

  .site-nav .nav-link:hover::after,
  .site-nav .nav-link[aria-current="page"]::after {
    transform: scaleX(1);
  }

  .nav-cta {
    margin: 0 0 0 1rem;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .hero-media img {
    aspect-ratio: auto;
    height: 100%;
    max-height: 640px;
  }

  .hero-content {
    padding: 3rem 3rem 3rem 4rem;
    max-width: 36rem;
  }

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

  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .scroll-top {
    right: 1.5rem;
    bottom: 1.5rem;
  }
}

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