/* Ferienhaus Haas, Ruhpolding. Palette from the Chiemgau landscape:
   paper, slate ink, gentian blue, and the sand tone of the woodcut logo.
   Fonts are self-hosted (Alegreya / Alegreya Sans, SIL OFL). */

@font-face { font-family: "Alegreya"; src: url("fonts/alegreya-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #f7f5ef;
  --card: #ffffff;
  --ink: #1f2a33;
  --muted: #5c6670;
  --line: #e3dfd4;
  --accent: #2d4f86;
  --accent-ink: #ffffff;
  --sand: #efdcae;
  --sand-soft: #f6ecd2;
  --serif: "Alegreya", Georgia, "Times New Roman", serif;
  --sans: "Alegreya Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1120px;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14191e;
    --card: #1c232a;
    --ink: #e9e6de;
    --muted: #a3abb3;
    --line: #2c353e;
    --accent: #8fb0e6;
    --accent-ink: #10161c;
    --sand: #4a3f27;
    --sand-soft: #231f17;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 19px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-size: 24px; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.kicker { font-family: var(--sans); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6em; }
.lead { font-size: 22px; color: var(--ink); max-width: 46em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 64px; height: 46px; object-fit: cover; border-radius: 4px; }
.brand b { font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1; display: block; }
.brand small { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.nav a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 17px; white-space: nowrap; }
.nav a:hover { background: var(--sand-soft); }
.nav a[aria-current="page"] { color: var(--accent); }
.nav .cta a { background: var(--accent); color: var(--accent-ink); padding: 8px 16px; margin-left: 6px; }
.nav .cta a:hover { background: var(--accent); filter: brightness(1.1); }
.menu-toggle { display: none; }

@media (max-width: 1080px) {
  .site-header .wrap { flex-wrap: wrap; gap: 0; }
  .menu-toggle { display: block; margin-left: auto; }
  .menu-toggle summary { list-style: none; cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-weight: 500; }
  .menu-toggle summary::-webkit-details-marker { display: none; }
  .nav { display: none; width: 100%; margin: 0; padding: 0 0 12px; }
  .menu-toggle[open] + .nav { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; }
  .nav .cta a { margin: 6px 0 0; text-align: center; }
}

/* Hero */
.hero { position: relative; min-height: min(calc(100vh - 68px), 66.67vw); display: flex; align-items: flex-end; color: #fff; background: #2a3440; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
/* Home page: the hero images cross-fade slowly. */
.hero > img.slide { opacity: 0; transition: opacity 1.8s ease; }
.hero > img.slide.is-active { opacity: 1; }
.hero > img[src*="i179cde6"] { object-position: center 40%; }
/* Home page: the photo in its own 3:2 format, uncropped; text sits mid-left. */
.hero.full { min-height: auto; aspect-ratio: 3 / 2; align-items: center; }
.hero.full .wrap { padding-top: 40px; padding-bottom: 40px; }
.hero.full::after { background: linear-gradient(90deg, rgba(10,16,24,.55) 0%, rgba(10,16,24,.25) 45%, rgba(10,16,24,0) 70%); }
/* Winter view: crop so the church sits just above the "Ruhpolding" kicker line. */
.hero > img[src*="bgbaum"] { object-position: center 100%; }
/* Anreise: Ruhpolding station with clock and the Rauschberg. */
.hero > img[src*="bahnhof"] { object-position: center 55%; }
/* Ruhpolding slideshow: a taller strip, and a crop per photo. */
.hero.small[data-slides] { min-height: max(340px, min(72vh, 52vw)); }
.hero[data-slides] > img[src*="bggolf"] { object-position: center 12%; }
.hero > img[src*="i0a58cc5"] { object-position: center 12%; }
.hero > img[src*="ifb560ee"] { object-position: center 55%; }
.hero > img[src*="i920e787"] { object-position: center 4%; }
.hero > img[src*="loipe"] { object-position: center 62%; }
/* Bewertungen: our garden in the snow, mountains and garden hut in view. */
.hero > img[src*="gartenwinter"] { object-position: center 0%; }
@media (prefers-reduced-motion: reduce) { .hero > img.slide { transition: none; } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,24,0) 35%, rgba(10,16,24,.62) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 56px; }
.hero h1 { max-width: 15em; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero p { font-size: 22px; max-width: 32em; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.hero .kicker { color: rgba(255,255,255,.85); }
.hero.small { min-height: max(320px, min(56vh, 42vw)); }
/* The woodcut logo, presented as a card on the hero photo. */
.hero-logo { width: 240px; height: auto; margin-bottom: 28px; background: #fff; padding: 10px; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand img { width: 96px; height: 96px; border-radius: 4px; flex: none; }
.footer-brand button { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.hero-logo-link { display: inline-block; transition: transform .2s ease; }
.hero-logo-link:hover { transform: translateY(-2px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 18px; text-decoration: none; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.hero .btn { background: #fff; color: #1f2a33; border-color: #fff; }
.hero .btn.ghost { background: rgba(0,0,0,.18); color: #fff; border-color: rgba(255,255,255,.85); }
.btn:hover { filter: brightness(1.08); }

/* Facts strip */
.facts { background: var(--sand-soft); border-bottom: 1px solid var(--line); }
.facts ul { list-style: none; margin: 0 auto; padding: 22px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 20px; max-width: var(--wrap); }
.facts li { font-size: 16px; color: var(--muted); line-height: 1.35; }
.facts strong { display: block; font-family: var(--serif); font-size: 22px; color: var(--ink); font-weight: 600; }

/* Sections */
section.block { padding: 72px 0; }
section.block + section.block { padding-top: 0; }
.intro { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.intro figure { margin: 0; }
.intro img { border-radius: var(--radius); }

.room { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; padding: 48px 0; border-top: 1px solid var(--line); }
.room:first-of-type { border-top: 0; }
.room .text { position: sticky; top: 96px; }
.room .meta { color: var(--muted); font-size: 16px; }
.room h3 { font-size: 28px; }
.room.text-only { grid-template-columns: minmax(0, 46em); }
.room.text-only .text { position: static; }

/* Gallery grid: first image large, the rest small. */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gallery button { padding: 0; border: 0; background: var(--line); border-radius: 6px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; display: block; }
.gallery button:first-child { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery button:hover img { transform: scale(1.03); }
.gallery button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Close the last row: stretch trailing images so no grid cell stays empty. */
@media (min-width: 861px) {
.gallery:not(.even) button:not(:first-child):last-child:nth-child(4n),
.gallery:not(.even) button:not(:first-child):nth-child(4n+2):nth-last-child(2),
.gallery:not(.even) button:not(:first-child):nth-child(4n+3):last-child { grid-column: span 2; aspect-ratio: 8 / 3; }
.gallery:not(.even) button:not(:first-child):nth-child(4n+2):last-child { grid-column: span 4; aspect-ratio: 16 / 3; }
}
@media (max-width: 860px) {
.gallery:not(.even) button:not(:first-child):nth-child(2n):last-child { grid-column: span 2; aspect-ratio: 8 / 3; }
}
/* Single zoomable images outside a gallery grid. */
.intro [data-gallery] button, .plan [data-gallery] button { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; border-radius: var(--radius); overflow: hidden; }
.gallery.even button:first-child { grid-column: auto; grid-row: auto; }
.gallery.even { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Split blocks (text + image), alternating sides. */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 40px 0; }
.split:nth-of-type(even) .media { order: 2; }
.split .media button, .split .media > img { width: 100%; border-radius: var(--radius); overflow: hidden; }
.split .media button { padding: 0; border: 0; cursor: zoom-in; background: none; display: block; }
.split .media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split .media.portrait img { aspect-ratio: 3 / 4; max-height: 560px; }

/* HolidayCheck widget (original embed code) beside a short heading. */
.hc-widget { min-height: 120px; }
.contact-band .hc-widget { max-width: 100%; overflow: hidden; }
.contact-band .grid.with-rating { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-band .with-rating .reach { margin-top: 36px; display: grid; grid-template-columns: auto 1fr; gap: 4px 20px; align-items: baseline; }
.contact-band .with-rating .reach dt { margin: 0; }
.contact-band .with-rating .reach dd { font-size: 24px; }
.hc-fallback { width: 120px; padding: 5px; background: #0058a2; border-radius: 4px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.contact-band { background: var(--accent); color: var(--accent-ink); padding: 64px 0; }
.contact-band a { color: inherit; }
.contact-band .grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.contact-band .btn { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); }
.contact-band .btn.ghost { background: transparent; color: var(--accent-ink); border-color: var(--accent-ink); }
.reach { font-size: 22px; line-height: 1.5; margin: 0; }
.reach dt { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; opacity: .8; margin-top: 12px; }
.reach dd { margin: 0; font-family: var(--serif); font-size: 28px; }

.plan { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.plan table { border-collapse: collapse; width: 100%; font-size: 18px; }
.plan td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.plan tr.sum td { font-weight: 700; border-bottom: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card-grid .panel { padding: 24px; }
.card-grid ul { margin: 0; padding-left: 1.1em; }
.card-grid li { margin: 2px 0; }
.card-grid small { color: var(--muted); }
.note { color: var(--muted); font-size: 16px; }
.logo-link img { max-width: 336px; margin: 0 auto; border-radius: 6px; }

.badge-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.badge-row img { height: 120px; width: auto; border-radius: 6px; background: #fff; }

/* Click-to-load video: nothing is fetched from YouTube before the click. */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video .play { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 6px 30px rgba(0,0,0,.35); }
.video .play::before { content: ""; border-left: 26px solid #1f2a33; border-top: 16px solid transparent; border-bottom: 16px solid transparent; margin-left: 6px; }
.video .consent { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px; font-size: 15px; color: #fff; background: rgba(0,0,0,.55); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.prose { max-width: 46em; }
.prose h2 { margin-top: 1.4em; font-size: 28px; }
.prose h3 { margin-top: 1.2em; font-size: 22px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--muted); font-size: 16px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.site-footer a { color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer b { color: var(--ink); font-family: var(--serif); font-size: 20px; font-weight: 600; }

/* Lightbox */
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog.lightbox::backdrop { background: rgba(8,12,16,.92); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 72px 24px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); width: auto; height: auto; border-radius: 4px; }
.lightbox figcaption { color: #d8dde2; font-size: 15px; margin-top: 10px; text-align: center; }
.lightbox .lb-btn { position: fixed; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox .lb-btn:hover { background: rgba(255,255,255,.24); }
.lightbox .lb-btn[hidden] { display: none; }
.lightbox .lb-close { top: 14px; right: 14px; }
.lightbox .lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

@media (max-width: 860px) {
  body { font-size: 18px; }
  .intro, .split, .room, .contact-band .grid, .plan, .site-footer .wrap { grid-template-columns: 1fr; gap: 24px; }
  .contact-band .grid.with-rating { grid-template-columns: 1fr; gap: 36px; }
  .contact-band .with-rating .reach { display: block; }
  .contact-band .with-rating .reach dt { margin-top: 12px; }
  .split:nth-of-type(even) .media { order: 0; }
  .room .text { position: static; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  section.block { padding: 48px 0; }
  .lightbox figure { padding: 64px 8px 16px; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 14px; transform: none; }
  .hero { min-height: 72vh; }
  .hero.full { aspect-ratio: auto; min-height: 72vh; align-items: flex-end; }
  .hero.full::after { background: linear-gradient(180deg, rgba(10,16,24,0) 35%, rgba(10,16,24,.62) 100%); }
  .hero.small { min-height: 260px; }
  .hero-logo { width: 140px; margin-bottom: 20px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .brand small { display: none; }
  .hero p, .lead { font-size: 19px; }
  .reach dd { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .gallery img { transition: none; } }
