/* ==========================================================================
   Ratschöl – The Stelvio Hideaway
   Gestaltung nach Corporate Design Manual 2026:
   GFS Didot (Headlines) · Inter 400/500 (Text) · Anthrazit, Weiß, Naturweiß, Waldgrün
   Layout: große Bildflächen, viel Weißraum, klare typografische Hierarchie.
   ========================================================================== */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/Inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/Inter-Medium.woff") format("woff"); }
/* GFS Didot: wird in inc/render.php eingebunden – nur die Datei, die in assets/fonts/ wirklich liegt (vermeidet 404-Fehler) */

:root {
  --anthrazit: #474747;
  --weiss: #ffffff;
  --natur: #f6f5f2;
  --wald: #263f35;
  --ink: #2f2f2f;          /* Fließtext, minimal dunkler als Anthrazit für Lesbarkeit */
  --muted: #6b6b68;
  --line: #dcdad4;

  --serif: "Ratschoel Didot", "GFS Didot", "Didot", "Bodoni 72", "Bodoni MT", "Libre Bodoni", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;

  --gutter: max(20px, 5vw);
  --wrap: 1320px;
  --space: clamp(72px, 11vw, 160px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--weiss); color: var(--ink);
  font: 400 17px/1.7 var(--sans); font-feature-settings: "kern", "calt";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--wald); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--anthrazit); color: #fff; padding: 10px 16px; }
.skip:focus { top: 16px; }

/* ---------- Typografie ---------- */
.display { font-family: var(--serif); font-weight: 400; color: var(--anthrazit); letter-spacing: .01em; line-height: 1.12; text-wrap: balance; margin: 0 0 .6em; }
h2.display { font-size: clamp(32px, 4.2vw, 54px); }
h3.display { font-size: clamp(24px, 2.2vw, 30px); margin-bottom: .4em; }
.eyebrow { font: 500 12px/1.4 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.lead { font-size: clamp(18px, 1.5vw, 20px); }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { padding-left: 1.1em; margin: 0 0 1.1em; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.center { text-align: center; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: calc(760px + 2 * var(--gutter)); }

/* ---------- Buttons & Links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 500 13px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  padding: 18px 30px; border: 1px solid var(--anthrazit); background: var(--anthrazit); color: #fff;
  cursor: pointer; transition: background .3s, color .3s, border-color .3s; margin-top: 28px;
}
.btn:hover { background: var(--wald); border-color: var(--wald); }
.btn-small { padding: 12px 18px; margin: 0; font-size: 12px; }
.btn-light { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn-light:hover { background: #fff; color: var(--wald); border-color: #fff; }
.link {
  display: inline-block; margin-top: 26px; font: 500 12px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; color: var(--anthrazit); padding-bottom: 6px; border-bottom: 1px solid currentColor;
  transition: color .3s;
}
.link:hover { color: var(--wald); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; color: var(--anthrazit); transition: background .4s, color .4s, box-shadow .4s; }
.site-header .bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 22px var(--gutter); padding-top: calc(22px + env(safe-area-inset-top, 0px));
  transition: padding .4s var(--ease);
}
.has-hero .site-header:not(.is-solid):not(.is-open) { color: #fff; }
.site-header.is-solid { background: rgba(255,255,255,.97); box-shadow: 0 1px 0 var(--line); }
.site-header.is-solid .bar { padding-top: calc(14px + env(safe-area-inset-top, 0px)); padding-bottom: 14px; }
.no-hero .site-header { background: #fff; box-shadow: 0 1px 0 var(--line); }

.brand { justify-self: center; display: block; padding: 10px 14px; margin: -10px -14px; transition: opacity .4s, background-color .4s; }
.brand img { width: clamp(150px, 15vw, 210px); }
/* Über dem Kopfbild: Wortmarke auf leicht transparentem Anthrazit-Feld (wie das große Logo der Startseite) */
.has-hero .site-header:not(.is-solid):not(.is-open) .brand {
  background: rgba(71, 71, 71, .62);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  padding: clamp(10px, 1.1vw, 16px) clamp(14px, 1.6vw, 24px);
  margin: 0;
}
.brand-dark { display: none !important; }
.site-header.is-solid .brand-light, .no-hero .brand-light, .site-header.is-open .brand-light { display: none !important; }
.site-header.is-solid .brand-dark, .no-hero .brand-dark, .site-header.is-open .brand-dark { display: block !important; }
/* Auf der Startseite steht oben das große Logo – die Wortmarke im Header erscheint erst beim Scrollen */
.home-top .site-header:not(.is-solid):not(.is-open) .brand { opacity: 0; pointer-events: none; }

.nav-main ul, .langs, .plain { list-style: none; margin: 0; padding: 0; }
.nav-main ul { display: flex; gap: clamp(18px, 2.4vw, 36px); }
.nav-main a, .langs a { font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav-main a:hover, .nav-main a[aria-current] { border-bottom-color: currentColor; }
.nav-aside { justify-self: end; display: flex; align-items: center; gap: 22px; }
.langs { display: flex; gap: 12px; }
.langs a { opacity: .65; }
.langs a[aria-current], .langs a:hover { opacity: 1; }
.has-hero .site-header:not(.is-solid):not(.is-open) .btn-small { background: transparent; border-color: rgba(255,255,255,.75); }
.has-hero .site-header:not(.is-solid):not(.is-open) .btn-small:hover { background: #fff; color: var(--anthrazit); }

.burger { display: none; width: 44px; height: 44px; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; position: relative; }
.burger span:not(.sr) { position: absolute; left: 10px; right: 10px; height: 1px; background: currentColor; transition: transform .35s var(--ease); }
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobile-nav[hidden] { display: none; }
.mobile-nav { background: #fff; min-height: calc(100dvh - 80px); padding: 32px var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.mobile-nav ul:first-child { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mobile-nav ul:first-child a { font: 400 clamp(30px, 8vw, 44px)/1.3 var(--serif); text-decoration: none; color: var(--anthrazit); }
.mobile-nav .langs a { font-size: 12px; }
.site-header.is-open { background: #fff; color: var(--anthrazit); }

@media (max-width: 980px) {
  .site-header .bar { grid-template-columns: auto 1fr; }
  .nav-main { display: none; }
  .brand { justify-self: start; grid-column: 1; grid-row: 1; }
  .brand img { width: 140px; }
  .nav-aside { grid-column: 2; gap: 10px; }
  .nav-aside .langs { display: none; }
  .burger { display: block; }
}
@media (max-width: 420px) { .nav-aside .btn-small { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 520px; max-height: 1100px; color: #fff; overflow: hidden; background: var(--anthrazit); }
.hero:not(.hero-home) { height: 78svh; min-height: 440px; }
.hero-media, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; transition: opacity 1.6s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.slide.is-active img { animation: kenburns 12s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(30,30,30,.45) 0%, rgba(30,30,30,0) 28%, rgba(30,30,30,0) 55%, rgba(30,30,30,.5) 100%); }
.hero-home::after { background: linear-gradient(180deg, rgba(30,30,30,.4) 0%, rgba(30,30,30,.16) 40%, rgba(30,30,30,.16) 60%, rgba(30,30,30,.45) 100%); }
.hero-content { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--gutter) clamp(56px, 9vh, 110px); max-width: var(--wrap); margin: 0 auto; }
.hero-content .display { color: #fff; font-size: clamp(42px, 7vw, 96px); margin: 0; }
.hero-content .eyebrow { color: rgba(255,255,255,.85); }
/* Logo im oberen Viertel (Mitte bei ca. 3/4 der Bildhöhe), damit das Foto Raum bekommt */
.hero-home .hero-content { justify-content: flex-start; align-items: center; padding-bottom: 0; padding-top: max(110px, calc(25svh - 64px)); }
/* CI: mind. 320 px Logobreite, 10 % Schutzraum, keine Effekte */
/* Logo auf leicht transparentem Anthrazit-Feld (CI: Negativ-Logo auf Anthrazit) – Feld = Schutzraum */
.hero-logo {
  --pad-y: clamp(18px, 2.4vw, 34px); --pad-x: clamp(18px, 3vw, 44px);
  margin: 0; padding: var(--pad-y) var(--pad-x);
  background: rgba(71, 71, 71, .62);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  max-width: calc(100vw - 2 * var(--gutter));
  animation: logo-in 1.4s var(--ease) both;
}
.hero-logo img { width: min(clamp(320px, 26vw, 420px), calc(100vw - 2 * var(--gutter) - 2 * var(--pad-x))); }
@keyframes logo-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero-dots { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 10px; }
.hero-dots button { width: 34px; height: 20px; padding: 0; background: none; border: 0; cursor: pointer; position: relative; }
.hero-dots button::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255,255,255,.45); transition: background .3s; }
.hero-dots button[aria-current]::after { background: #fff; height: 2px; }
.hero-scroll { position: absolute; z-index: 3; right: var(--gutter); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: 28px; height: 52px; display: block; }
.hero-scroll span { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.7); overflow: hidden; }
.hero-scroll span::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: drip 2.4s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

.page-head { padding: calc(160px + env(safe-area-inset-top, 0px)) var(--gutter) 40px; max-width: calc(760px + 2 * var(--gutter)); margin: 0 auto; text-align: center; }
.page-head .display { font-size: clamp(38px, 5vw, 64px); }

/* ---------- Blöcke ---------- */
.block { padding: var(--space) 0; }
.bg-white { background: var(--weiss); }
.bg-natur { background: var(--natur); }
.bg-green { background: var(--wald); color: #e9ece9; }
.bg-dark  { background: var(--anthrazit); color: #e8e8e6; }
.bg-green .display, .bg-dark .display { color: #fff; }
.bg-green .eyebrow, .bg-dark .eyebrow { color: rgba(255,255,255,.7); }
.bg-green .link, .bg-dark .link { color: #fff; }
/* zwei gleichfarbige Abschnitte hintereinander: Abstand nicht verdoppeln */
.bg-white + .bg-white, .bg-natur + .bg-natur { padding-top: 0; }
.block-wide_image { padding: 0; }
.block-wide_image + .block { padding-top: var(--space); }

.block-intro .btn { margin-top: 36px; }

.split { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split.img-right { grid-template-columns: 5fr 7fr; }
.split.img-right .split-media { order: 2; }
.split-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split-text { min-width: 0; max-width: 520px; }
@media (max-width: 860px) {
  .split, .split.img-right { grid-template-columns: 1fr; }
  .split.img-right .split-media { order: 0; }
}

.teasers { display: grid; gap: clamp(28px, 3.5vw, 56px); }
.teasers.cols-2 { grid-template-columns: repeat(2, 1fr); }
.teasers.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .teasers.cols-2, .teasers.cols-3 { grid-template-columns: 1fr; } }
.teaser { min-width: 0; }
.teaser-link { display: block; text-decoration: none; color: inherit; }
.teaser figure { overflow: hidden; margin-bottom: 26px; }
.teaser img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1.2s var(--ease); }
.teaser-link:hover img { transform: scale(1.04); }
.teaser-link:hover .link { color: var(--wald); }
.teaser .link { margin-top: 20px; }

.wide img { width: 100%; height: clamp(320px, 78vh, 900px); object-fit: cover; }
.wide figcaption { font-size: 14px; color: var(--muted); padding-top: 16px; padding-bottom: 0; }

.block-quote blockquote { margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.25; }
.block-quote blockquote::before, .block-quote blockquote::after { content: ""; display: block; width: 48px; height: 1px; background: var(--line); margin: 0 auto 40px; }
.block-quote blockquote::after { margin: 40px auto 0; }

.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; }
.cta-inner .display { margin-bottom: .2em; }
.cta-inner p { margin: 0; }
.cta-inner .btn { margin: 0; }
.block-cta { padding: clamp(56px, 7vw, 96px) 0; }

.block-text .prose { font-size: 16px; }

/* ---------- Galerie ---------- */
.gallery { columns: 3 300px; column-gap: 16px; }
.gallery-item { display: block; margin: 0 0 16px; break-inside: avoid; overflow: hidden; background: var(--natur); }
.gallery-item img { width: 100%; transition: transform 1s var(--ease), opacity .4s; }
.gallery-item:hover img { transform: scale(1.03); }
.block-gallery { padding-top: clamp(48px, 6vw, 96px); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(28,28,28,.96); display: flex; align-items: center; justify-content: center; padding: 56px 64px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font: 300 42px/1 var(--sans); width: 56px; height: 56px; cursor: pointer; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox { padding: 64px 8px; } .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; } }

/* ---------- Formular ---------- */
.inquiry { display: grid; gap: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font: 500 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--anthrazit); }
.field input, .field textarea {
  width: 100%; font: 400 17px/1.5 var(--sans); color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 0; padding: 14px 16px; transition: border-color .2s;
  -webkit-appearance: none; appearance: none; min-height: 52px;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--anthrazit); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #a1362b; }
.field-err, .form-err { color: #a1362b; font-size: 14px; margin: 0; }
.form-err { padding: 14px 16px; border: 1px solid #a1362b; }
.field.check { grid-template-columns: auto 1fr; align-items: start; gap: 4px 14px; }
.field.check input { width: 20px; height: 20px; min-height: 0; padding: 0; margin-top: 3px; -webkit-appearance: checkbox; appearance: auto; accent-color: var(--wald); }
.field.check label { text-transform: none; letter-spacing: 0; font: 400 15px/1.55 var(--sans); color: var(--ink); }
.field.check .field-err { grid-column: 2; }
.req-note { font-size: 13px; color: var(--muted); margin: 0; }
.inquiry .btn { justify-self: start; margin-top: 8px; }
.hp { position: absolute; left: -9999px; }
.form-done { text-align: center; padding: 40px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--anthrazit); color: #dededc; padding: clamp(72px, 9vw, 128px) 0 calc(36px + env(safe-area-inset-bottom, 0px)); font-size: 15px; }
.footer-logo { width: clamp(320px, 30vw, 420px); max-width: 100%; padding: 4% 0; margin: 0 auto clamp(56px, 7vw, 96px); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,.18); }
.site-footer .eyebrow { color: rgba(255,255,255,.6); margin-bottom: 16px; }
.site-footer address { font-style: normal; margin-bottom: 12px; }
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.plain li { margin-bottom: 6px; }
.footer-legal { display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; padding-top: 28px; font-size: 13px; color: rgba(255,255,255,.6); }
.plain.inline { display: flex; gap: 24px; }

/* ---------- Bewegung ---------- */
.reveal { transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.pre { opacity: 0; transform: translateY(24px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide.is-active img, .hero-scroll span::after, .hero-logo { animation: none; }
  .slide img { transform: none; }
  .reveal, .js .reveal.pre { transition: none; opacity: 1; transform: none; }
}
