/* =====================================================================
   Hof Boyens – Monteurwohnungen am Bungsberg
   Design system / global styles
   No external requests (fonts, trackers) – privacy & speed friendly.
   ===================================================================== */

/* ---- Design tokens ------------------------------------------------- */
:root {
  /* Brand colours — teal-green sampled from the "Hof Boyens" logo */
  --green-900: #163f39;
  --green-800: #1c4d46;
  --green-700: #235a52;
  --green-600: #2f7167;
  --green-100: #e4eeeb;
  --sand-50:  #faf6ee;
  --sand-100: #f2ebdd;
  --sand-200: #e6dcc7;
  --ink:      #241f1a;
  --muted:    #6a6459;
  --accent:   #c98a3c;
  --accent-dark: #a86f2c;
  --white:    #ffffff;
  --line:     #e2dac8;
  --danger:   #a5433b;

  /* Typography */
  --font-head: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(31, 58, 46, 0.10);
  --shadow-sm: 0 2px 8px rgba(31, 58, 46, 0.08);
}

/* ---- Reset-ish ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; color: var(--green-900); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

/* ---- Utilities ----------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding-block: clamp(48px, 7vw, 88px); }
.section--alt { background: var(--sand-100); }
.eyebrow { font-family: var(--font-body); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--accent-dark); margin-bottom: .6rem; }
.lead { font-size: 1.14rem; color: var(--muted); max-width: 60ch; }
.center { text-align: center; margin-inline: auto; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--green-700); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--green-900); }
.btn--ghost { background: transparent; color: var(--green-900); border-color: var(--green-600); }
.btn--ghost:hover { background: var(--green-100); }
.btn--accent { background: var(--accent); color: #2b1c07; }
.btn--accent:hover { background: var(--accent-dark); color: var(--white); }
/* Outline button on dark hero: white text, amber border; hover = white bg + orange text */
.btn--hero-outline { background: transparent; color: #fff; border-color: #f0c489; }
.btn--hero-outline:hover { background: #fff; color: var(--accent-dark); border-color: #fff; }

/* ---- Header / nav -------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1.2rem; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { height: 70px; width: auto; display: block; }
.nav { padding-block: .3rem; }
.hero__logo { height: 96px; width: auto; margin-bottom: 1.2rem; }
.site-footer .brand img { height: 62px; }

/* Variant: text wordmark in header (logo moves into hero) */
.brand-word { font-family: var(--font-head); font-size: 1.4rem; font-weight: 600; color: var(--green-900); letter-spacing: .01em; }
.brand-word span { color: var(--accent-dark); font-weight: 400; }

/* Variant: logo shown on the hero card instead of a photo */
.hero__media.hero__media--logo { background: transparent; box-shadow: none; padding: 0; }
.hero__media--logo img { width: auto; max-width: 82%; max-height: 100%; filter: drop-shadow(0 10px 26px rgba(0,0,0,.28)); }
.nav__links { display: flex; gap: 1.1rem; margin-left: auto; font-size: .96rem; }
.nav__links a { color: var(--ink); }
.nav__links a:hover { color: var(--green-700); text-decoration: none; }

/* Language switcher */
.lang { position: relative; }
.lang__btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .8rem; font: inherit; font-size: .9rem; cursor: pointer; color: var(--ink); }
.lang__btn:hover { border-color: var(--green-600); }
.lang__menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: .35rem; min-width: 190px; display: none; }
.lang[open] .lang__menu, .lang.is-open .lang__menu { display: block; }
.lang__menu a { display: flex; align-items: center; gap: .55rem; padding: .5rem .6rem; border-radius: 7px; color: var(--ink); font-size: .95rem; }
.lang__menu a:hover { background: var(--green-100); text-decoration: none; }
.lang__menu a[aria-current="true"] { font-weight: 700; color: var(--green-700); }
.flag { font-size: 1.05rem; line-height: 1; }

/* ---- Hero ---------------------------------------------------------- */
.hero { position: relative; background: linear-gradient(180deg, var(--green-900), var(--green-700)); color: var(--white); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(1200px 400px at 80% -10%, rgba(201,138,60,.28), transparent 60%); pointer-events: none; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; padding-block: clamp(52px, 8vw, 96px); }
.hero h1 { color: var(--white); }
.hero .eyebrow { color: #f0c489; }
.hero__lead { color: #e7efe8; font-size: 1.18rem; max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero__media { aspect-ratio: 4/3; border-radius: var(--radius); background: var(--sand-200); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--muted); font-size: .9rem; text-align: center; padding: 1rem; }

/* Quick facts */
.facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 2.2rem; }
.facts__item { background: var(--sand-50); padding: 1.1rem 1rem; text-align: center; }
.facts__num { font-family: var(--font-head); font-size: 1.5rem; color: var(--green-800, var(--green-700)); font-weight: 600; }
.facts__label { font-size: .84rem; color: var(--muted); }

/* ---- Photo hero variant ------------------------------------------- */
.hero--photo { background: #1b2b25; }
.hero--photo::after { display: none; }
.hero__bg { position: absolute; inset: 0; z-index: 0; margin: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 72% top; }
.hero__scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(250,246,238,.97) 0%, rgba(250,246,238,.9) 26%, rgba(250,246,238,.55) 44%, rgba(250,246,238,.12) 58%, rgba(250,246,238,0) 70%); }
.hero--photo .hero__inner { position: relative; z-index: 2; display: flex; align-items: center; min-height: min(76vh, 620px); padding-block: 3rem; }
.hero__content { max-width: 540px; }
.hero__logo-img { height: 180px; width: auto; display: block; margin: 0 auto 1.4rem; }
.hero--photo .eyebrow { color: var(--accent-dark); }
.hero--photo h1 { color: var(--green-900); }
.hero--photo .hero__lead { color: var(--ink); }
@media (max-width: 760px) {
  .hero__bg img { object-position: 70% top; }
  .hero__scrim { background: linear-gradient(180deg, rgba(250,246,238,.94) 0%, rgba(250,246,238,.72) 42%, rgba(250,246,238,.4) 100%); }
  .hero--photo .hero__inner { min-height: 0; padding-block: 1.5rem 6.5rem; }
  .hero__content { max-width: 100%; }
  .hero__logo-img { height: 112px; }
}

/* ---- Hof-Lageplan (Übersichtskarte) ------------------------------- */
.hofmap { margin: 2rem 0 0; }
.hofmap__btn { display: block; width: 100%; max-width: 920px; margin-inline: auto; border: 0; padding: 0; background: none; cursor: pointer; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hofmap__btn img { width: 100%; height: auto; display: block; transition: transform .3s ease; }
.hofmap__btn:hover img { transform: scale(1.02); }
.hofmap__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- Apartment cards ---------------------------------------------- */
.grid-apts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.apt { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .14s ease, box-shadow .2s ease; }
.apt:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.apt__photo { position: relative; display: block; width: 100%; aspect-ratio: 3/2; background: var(--sand-200); border: 0; padding: 0; cursor: pointer; overflow: hidden; }
.apt__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.apt__photo:hover img { transform: scale(1.05); }
.apt__photo-badge { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: .35rem; background: rgba(22, 63, 57, .82); color: #fff; font-size: .8rem; font-family: var(--font-body); padding: .3rem .6rem; border-radius: 999px; backdrop-filter: blur(2px); }
.apt__photo:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.apt__body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.apt__head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.apt__title { font-family: var(--font-head); font-size: 1.25rem; color: var(--green-900); }
.apt__badge { font-size: .78rem; background: var(--green-100); color: var(--green-700); border-radius: 999px; padding: .2rem .6rem; font-weight: 600; }
.apt__meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .9rem; color: var(--muted); }
.apt__meta b { color: var(--ink); font-weight: 600; }
.apt__list { list-style: none; margin: 0; padding: 0; font-size: .92rem; color: var(--ink); }
.apt__list li { padding-left: 1.3rem; position: relative; margin-bottom: .2rem; }
.apt__list li::before { content: "✓"; position: absolute; left: 0; color: var(--green-600); font-weight: 700; }
.apt__foot { margin-top: auto; padding-top: .4rem; }

/* ---- Feature columns ---------------------------------------------- */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.card h3 { display: flex; align-items: center; gap: .5rem; }
.tick { list-style: none; margin: .4rem 0 0; padding: 0; }
.tick li { padding-left: 1.5rem; position: relative; margin-bottom: .4rem; }
.tick li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-dark); font-weight: 700; }

/* ---- Location table ----------------------------------------------- */
.loc { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.loc__map { aspect-ratio: 16/11; border-radius: var(--radius); background: var(--sand-200); display: grid; place-items: center; color: var(--muted); text-align: center; padding: 1rem; box-shadow: var(--shadow-sm); }
/* Leaflet map container */
#map.loc__map { display: block; padding: 0; min-height: 320px; z-index: 0; overflow: hidden; }
#map.loc__map .leaflet-tile, #map.loc__map img { max-width: none; }
.btn--route { margin-top: 1rem; }
.hof-pin { background: none; border: 0; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.dist { width: 100%; border-collapse: collapse; }
.dist td { padding: .7rem .4rem; border-bottom: 1px solid var(--line); }
.dist td:last-child { text-align: right; font-weight: 600; color: var(--green-700); white-space: nowrap; }
.dist tr:first-child td { font-weight: 700; }

/* ---- Calendar (availability) -------------------------------------- */
.cal-note { background: var(--green-100); border: 1px solid var(--green-600); color: var(--green-900); border-radius: var(--radius-sm); padding: 1rem 1.2rem; font-size: .95rem; }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.cal-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.cal-card h3 { margin-bottom: .3rem; }
.cal-embed { min-height: 130px; border-radius: var(--radius-sm); background: var(--sand-100); border: 1px dashed var(--sand-200); display: grid; place-items: center; color: var(--muted); font-size: .85rem; text-align: center; padding: .8rem; }
/* Belegungskalender (untereinander, volle Breite, je 3 Monate) */
.cal-legend { display: flex; gap: 1.4rem; margin-top: .9rem; font-size: .9rem; color: var(--muted); }
.cal-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: .35rem; }
.cal-sw--free { background: var(--green-100); border: 1px solid var(--green-600); }
.cal-sw--booked { background: #eccec9; border: 1px solid var(--danger); }
.cal-list { display: flex; flex-direction: column; gap: 2.2rem; margin-top: 1.6rem; }
.cal-apt { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.4rem 1.6rem 1.6rem; }
.cal-apt__head { margin-bottom: 1rem; }
.cal-apt__head h3 { margin: 0; }
.cal-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.cal-months--error { display: block; color: var(--muted); font-size: .95rem; padding: .4rem 0; }
.cal-month__name { text-align: center; font-family: var(--font-head); font-weight: 600; color: var(--green-900); text-transform: capitalize; margin-bottom: .5rem; }
.cal-grid7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: .72rem; color: var(--muted); font-weight: 600; padding-bottom: 2px; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: .82rem; border-radius: 6px; }
.cal-day--empty { background: transparent; }
.cal-day--free { background: #c4e8c9; color: #1c4d33; }
.cal-day--booked { background: #eccec9; color: #7d2c25; }
.cal-day--past { background: #ededed; color: #b1b1b1; }
.cal-day--today { box-shadow: inset 0 0 0 2px #4a4a4a; font-weight: 700; }
@media (max-width: 860px) { .cal-months { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cal-months { grid-template-columns: 1fr; max-width: 330px; margin-inline: auto; } }

/* ---- Contact ------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.2rem; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green-600); outline-offset: 1px; border-color: var(--green-600); }
.field textarea { resize: vertical; min-height: 120px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; }
.form-status--ok, .form-status--err { display: block; padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; font-size: .96rem; }
.form-status--ok { background: var(--green-100); color: var(--green-900); border: 1px solid var(--green-600); }
.form-status--err { background: #f8e5e3; color: #7d2c25; border: 1px solid var(--danger); }
.contact__info { background: var(--green-900); color: var(--sand-50); border-radius: var(--radius); padding: 1.6rem; }
.contact__info h3 { color: var(--white); }
.contact__info a { color: #f0c489; }
.info-row { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: 1rem; font-size: .96rem; }
.info-row .ico { font-size: 1.1rem; }

/* ---- Footer -------------------------------------------------------- */
.site-footer { background: var(--green-900); color: #c9d3c8; padding-block: 2.4rem; font-size: .9rem; }
.site-footer a { color: #e7efe8; }
.footer-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.footer-links { display: flex; gap: 1.2rem; }

/* ---- Legal / prose pages ------------------------------------------ */
.prose { max-width: 760px; }
.prose h1 { margin-bottom: 1.2rem; }
.prose h2 { font-size: 1.3rem; margin-top: 2rem; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 1.2rem; }
.prose .muted { color: var(--muted); font-size: .92rem; }
.prose address { font-style: normal; margin: .4rem 0 1rem; }
.legal-back { display: inline-block; margin-top: 2.5rem; }

/* ---- Lightbox / gallery ------------------------------------------- */
body.no-scroll { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: none; grid-template-rows: 1fr auto;
  background: rgba(18, 30, 26, .92); backdrop-filter: blur(4px);
  padding: clamp(12px, 3vw, 40px);
}
.lightbox.is-open { display: grid; }
.lightbox__stage { grid-row: 1; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; gap: .8rem; }
.lightbox__img { max-width: min(1100px, 94vw); max-height: 74vh; width: auto; height: auto; border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.5); object-fit: contain; }
.lightbox__cap { color: #d8e0d6; font-size: .9rem; font-family: var(--font-body); }
.lightbox__close {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 1.9rem; line-height: 1;
  display: grid; place-items: center; transition: background .2s;
}
.lightbox__close:hover { background: rgba(255,255,255,.25); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 2rem; line-height: 1;
  display: grid; place-items: center; transition: background .2s;
}
.lightbox__nav:hover { background: rgba(255,255,255,.28); }
.lightbox__prev { left: 14px; }
.lightbox__next { right: 14px; }
.lightbox__counter { position: absolute; top: 20px; left: 20px; color: #fff; font-family: var(--font-body); font-size: .9rem; background: rgba(0,0,0,.3); padding: .25rem .7rem; border-radius: 999px; }
.lightbox__thumbs { grid-row: 2; display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; padding-top: 1rem; }
.lightbox__thumb { width: 72px; height: 52px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: none; opacity: .6; transition: opacity .2s, border-color .2s; }
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lightbox__thumb.is-active, .lightbox__thumb:hover { opacity: 1; border-color: var(--accent); }

@media (max-width: 620px) {
  .lightbox { padding: 0; }
  .lightbox__img { max-width: 100vw; max-height: 66vh; border-radius: 0; }
  .lightbox__nav { width: 44px; height: 44px; font-size: 1.6rem; }
  .lightbox__thumbs { padding: .8rem .5rem calc(.8rem + env(safe-area-inset-bottom)); }
}

/* ---- Responsive ---------------------------------------------------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .grid-apts, .cols { grid-template-columns: repeat(2, 1fr); }
  .loc, .contact { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav__links { display: none; }
  .grid-apts, .cols, .form-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
}
