/* RHaa – Ferien- & Seminarhaus Altach
   Farben aus dem bestehenden Auftritt (Off-White, Taupe, Anthrazit),
   Taupe für Flächen mit Text so abgedunkelt, dass WCAG AA erfüllt ist. */

:root {
  color-scheme: light;
  --bg: #f8faf9;
  --bg-alt: #efeae3;
  --surface: #ffffff;
  --text: #3a3636;
  --text-muted: #6b6461;
  --accent: #7a6a5d;        /* Buttons: weiße Schrift 5,0:1 */
  --accent-hover: #5f5248;
  --taupe: #aa9788;         /* nur dekorativ */
  --line: #ddd5cb;
  --focus: #2b5f8a;
  --error: #a23b2a;
  --success: #3d6b45;

  --font-sans: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1.03rem, 1rem + 0.15vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.4vw, 1.45rem);
  --step-2: clamp(1.55rem, 1.35rem + 0.9vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 1.8vw, 3.2rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);

  --radius: 6px;
  --radius-lg: 12px;
  --wrap: 72rem;
  --header-h: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 var(--space-2); color: #2c2929; text-wrap: balance; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 var(--space-2); max-width: 66ch; }
ul, ol { margin: 0 0 var(--space-2); padding-left: 1.2em; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
@media (min-width: 48rem) { .wrap { width: min(100% - 4rem, var(--wrap)); } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-1);
}
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--text); }
.muted { color: var(--text-muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--text); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.7rem 1.4rem;
  border: 1.5px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: #fff;
  font: 600 1rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--text); }
.btn--ghost:hover { background: var(--text); border-color: var(--text); color: #fff; }
.btn--small { min-height: 40px; padding: 0.5rem 1.1rem; font-size: 0.95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(248 250 249 / 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand img { width: 44px; height: auto; }
.brand span { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.3; color: var(--text); }
.brand span b { display: block; font-weight: 700; letter-spacing: 0.14em; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .9rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: 600 0.95rem var(--font-sans); color: var(--text); cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }
.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; inset: var(--header-h) 0 auto 0;
  background: var(--bg); border-bottom: 1px solid var(--line); padding: 0.5rem 1rem 1.25rem;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 0.8rem 0.25rem; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.site-nav .btn { display: flex; margin-top: 1rem; width: 100%; border-bottom: 0; color: #fff; }

@media (min-width: 60rem) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; position: static; padding: 0; border: 0; background: none; }
  .site-nav ul { display: flex; align-items: center; gap: 0.25rem; }
  .site-nav a { border: 0; padding: 0.5rem 0.8rem; border-radius: 999px; font-size: 0.98rem; }
  .site-nav a:not(.btn):hover { background: var(--bg-alt); color: var(--text); }
  .site-nav a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }
  .site-nav .btn { margin: 0 0 0 0.5rem; width: auto; padding: 0.5rem 1.1rem; min-height: 42px; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--space-5); }
.section--alt { background: var(--bg-alt); }
.section__head { margin-bottom: var(--space-4); max-width: 46rem; }
.section__head p:last-child { margin-bottom: 0; }

/* ---------- Hero ---------- */
.hero { padding-block: var(--space-3) var(--space-5); }
.hero__grid { display: grid; gap: var(--space-4); align-items: center; }
.hero__text .lead { margin-bottom: var(--space-3); }
.hero__media { position: relative; }
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }
.hero__caption { margin-top: .5rem; font-size: var(--step--1); color: var(--text-muted); }
@media (min-width: 60rem) {
  .hero { padding-top: var(--space-4); }
  .hero__grid { grid-template-columns: 1.05fr 1fr; gap: var(--space-5); }
  .hero__media img { aspect-ratio: 5 / 6; }
}

.facts {
  list-style: none; padding: 0; margin: var(--space-4) 0 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.facts li { background: var(--bg); padding: 1rem 1.1rem; }
.facts strong { display: block; font-size: var(--step-2); line-height: 1.1; font-weight: 600; color: #2c2929; }
.facts span { font-size: var(--step--1); color: var(--text-muted); }
@media (min-width: 48rem) { .facts { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Split (Text + Bild) ---------- */
.split { display: grid; gap: var(--space-4); align-items: center; }
.split__media img { width: 100%; border-radius: var(--radius-lg); object-fit: cover; aspect-ratio: 4 / 5; }
.split__media--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.split__media--pair img { aspect-ratio: 3 / 4; }
.split__media--pair img:last-child { margin-top: 2.5rem; }
@media (min-width: 60rem) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-5); }
  .split--reverse .split__media { order: -1; }
}

.checklist { list-style: none; padding: 0; margin: var(--space-3) 0; display: grid; gap: 0.6rem; }
.checklist li { position: relative; padding-left: 1.75rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 0.9rem; height: 0.5rem;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* ---------- Häuser / Karten ---------- */
.cards { display: grid; gap: var(--space-3); }
@media (min-width: 48rem) { .cards--2 { grid-template-columns: repeat(2, 1fr); } .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-3); display: flex; flex-direction: column; }
.card h3 { margin-bottom: 0.4rem; }
.card p { font-size: 0.98rem; }
.card .btn { margin-top: auto; align-self: flex-start; }
.card--featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.card__tag { display: inline-block; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; background: var(--bg-alt); color: var(--text); padding: .2rem .55rem; border-radius: 999px; margin-bottom: .75rem; align-self: flex-start; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0 0 var(--space-3); font-size: .95rem; }
.card dt { color: var(--text-muted); }
.card dd { margin: 0; }

/* Raumprogramm */
.rooms { display: grid; gap: var(--space-3); }
@media (min-width: 48rem) { .rooms { grid-template-columns: repeat(3, 1fr); } }
.room { border-top: 2px solid var(--taupe); padding-top: var(--space-2); }
.room h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.room ul { padding-left: 1.1em; margin: 0; }
.room li { margin-bottom: .3rem; }

/* Lage */
.travel { list-style: none; margin: var(--space-3) 0 0; padding: 0; border-top: 1px solid var(--line); }
.travel li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.travel span:last-child { font-family: var(--font-mono); font-size: .95rem; white-space: nowrap; color: var(--text); }

/* ---------- Bewertungen ---------- */
.reviews { display: grid; gap: var(--space-3); }
@media (min-width: 60rem) { .reviews { grid-template-columns: repeat(3, 1fr); } }
.review { margin: 0; background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-3); border: 1px solid var(--line); display: flex; flex-direction: column; }
.review blockquote { margin: 0 0 var(--space-3); font-size: 0.98rem; }
.review blockquote p { margin: 0; }
.review figcaption { margin-top: auto; font-size: .92rem; }
.review figcaption strong { display: block; }
.review figcaption span { color: var(--text-muted); font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-weight: 600; font-size: 1.05rem; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .4rem; top: 1.45rem; width: .6rem; height: .6rem;
  border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.7rem; }
.faq .faq__body { padding: 0 0 1.2rem; }

/* ---------- CTA-Band ---------- */
.cta-band { background: #2f2b2b; color: #f3efea; border-radius: var(--radius-lg); padding: var(--space-4) var(--space-3); display: grid; gap: var(--space-3); align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { margin: 0; color: #d9d2ca; }
.cta-band .btn { background: #fff; color: #2f2b2b; border-color: #fff; }
.cta-band .btn:hover { background: var(--bg-alt); border-color: var(--bg-alt); color: #2f2b2b; }
.cta-band .btn--ghost { background: transparent; color: #fff; border-color: #fff; }
.cta-band .btn--ghost:hover { background: #fff; color: #2f2b2b; }
.cta-band :focus-visible { outline-color: #fff; }
@media (min-width: 60rem) { .cta-band { grid-template-columns: 1fr auto; padding: var(--space-4); } }

/* ---------- Seitenkopf Unterseiten ---------- */
.page-head { padding-block: var(--space-4) var(--space-3); }
.breadcrumb { font-size: var(--step--1); color: var(--text-muted); margin-bottom: var(--space-2); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }
.breadcrumb a { color: var(--text-muted); }

/* ---------- Galerie ---------- */
.gallery { columns: 2; column-gap: 0.75rem; }
@media (min-width: 60rem) { .gallery { columns: 3; } }
.gallery__item { break-inside: avoid; margin: 0 0 0.75rem; }
.gallery__btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.gallery__btn img { width: 100%; transition: transform .4s ease; }
.gallery__btn:hover img { transform: scale(1.03); }
.gallery__item figcaption { font-size: var(--step--1); color: var(--text-muted); padding: .35rem .1rem 0; }

.lightbox { border: 0; padding: 0; background: rgb(20 18 18 / .96); max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgb(20 18 18 / .92); }
.lightbox__inner { position: relative; width: 100%; height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 3.5rem 1rem 1rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; border-radius: var(--radius); }
.lightbox p { color: #eee; margin: .75rem 0 0; text-align: center; font-size: .95rem; }
.lightbox button { position: absolute; width: 48px; height: 48px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .4); background: rgb(0 0 0 / .4); color: #fff; font-size: 1.4rem; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: rgb(255 255 255 / .15); }
.lightbox button:focus-visible { outline-color: #fff; }
.lightbox__close { top: .75rem; right: .75rem; }
.lightbox__prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: .75rem; top: 50%; transform: translateY(-50%); }

/* ---------- Formular ---------- */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; gap: 1.1rem; }
@media (min-width: 40rem) { .form__row--2 { grid-template-columns: 1fr 1fr; } .form__row--3 { grid-template-columns: 1fr 1fr 1fr; } }
.field label, .field legend { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.field .hint { font-weight: 400; color: var(--text-muted); font-size: .88rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem;
  border: 1.5px solid #b9afa4; border-radius: var(--radius); background: var(--surface);
  font: inherit; font-size: 1rem; color: var(--text);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__error { color: var(--error); font-size: .88rem; margin: .35rem 0 0; }
.field__error:empty { display: none; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.choice { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice label { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .4rem .9rem; border: 1.5px solid #b9afa4; border-radius: 999px; background: var(--surface); font-weight: 500; cursor: pointer; margin: 0; }
.choice input { width: 1.1rem; height: 1.1rem; min-height: 0; accent-color: var(--accent); margin: 0; }
.choice label:has(input:checked) { border-color: var(--accent); background: #f3eee8; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400 !important; }
.check input { width: 1.2rem; height: 1.2rem; min-height: 0; margin-top: .2rem; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { border-radius: var(--radius); padding: 1rem 1.1rem; }
.form-status:empty { display: none; }
.form-status--ok { background: #e7f0e8; color: var(--success); border: 1px solid #b9d3bd; }
.form-status--err { background: #f8e9e6; color: var(--error); border: 1px solid #e6c1b9; }
.form-note { font-size: .88rem; color: var(--text-muted); margin: 0; }

.contact-grid { display: grid; gap: var(--space-4); }
@media (min-width: 60rem) { .contact-grid { grid-template-columns: 1.4fr 1fr; gap: var(--space-5); } }
.aside-box { background: var(--bg-alt); border-radius: var(--radius-lg); padding: var(--space-3); }
.aside-box + .aside-box { margin-top: var(--space-3); }
.aside-box h2 { font-size: var(--step-1); }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.link-list a { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: .6rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.link-list a:hover { border-color: var(--accent); color: var(--text); }
.link-list small { font-weight: 400; color: var(--text-muted); }

/* ---------- Rechtstexte ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: var(--step-1); margin-top: var(--space-4); }
.prose h3 { font-size: 1.05rem; margin-top: var(--space-3); }
.prose dl { display: grid; grid-template-columns: minmax(10rem, auto) 1fr; gap: .4rem 1.5rem; }
.prose dt { color: var(--text-muted); }
.prose dd { margin: 0; }
@media (max-width: 40rem) { .prose dl { grid-template-columns: 1fr; } .prose dd { margin-bottom: .6rem; } }

/* ---------- Footer ---------- */
.site-footer { background: #2f2b2b; color: #d9d2ca; padding-block: var(--space-5) var(--space-3); margin-top: var(--space-5); font-size: .95rem; }
.site-footer a { color: #f3efea; }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.site-footer h2 { color: #fff; font-size: 1rem; font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; margin-bottom: .8rem; }
.footer-grid { display: grid; gap: var(--space-4); }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.site-footer li a { display: inline-block; padding: .3rem 0; }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-bottom { border-top: 1px solid #4a4545; margin-top: var(--space-4); padding-top: var(--space-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; font-size: .85rem; color: #b8afa6; }
.section + .site-footer, .section--alt + .site-footer { margin-top: 0; }
