/* =========================================================
   Weheragama Viharaya – Stylesheet (Design A: Laterit & Safran)
   Farben und Abstände zentral über die Variablen unten ändern.
   ========================================================= */

/* ---------- Schriften (lokal eingebunden, keine Google-Verbindung) ---------- */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- Design-Variablen ---------- */
:root {
  --ink: #2B211B;          /* Haupttext */
  --ink-soft: #4A3A2E;     /* Fließtext */
  --muted: #6E5442;        /* Nebentext, Kicker */
  --bg: #F6F0E4;           /* Seitenhintergrund (Creme) */
  --bg-alt: #EFE5D2;       /* heller Sand-Abschnitt */
  --bg-sand: #E7D8BC;      /* dunklerer Sand-Abschnitt */
  --bg-support: #EADCC3;   /* Spendenbox */
  --line: #E2D6C0;
  --line-sand: #CDB892;
  --primary: #8A3B1F;      /* Laterit-Rot: Buttons, Kurzinfo-Leiste */
  --primary-dark: #5E2512;
  --label: #9C5418;        /* Safran, Überschriften-Labels */
  --accent: #B0611F;
  --footer: #3A2A20;
  --footer-ink: #E3D7C4;
  --footer-link: #F0B77A;

  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1240px;                                   /* maximale Inhaltsbreite */
  --px: max(5vw, calc((100vw - var(--max)) / 2));  /* seitlicher Rand */
  --py: clamp(56px, 8vw, 96px);                    /* Abstand oben/unten je Abschnitt */
  --radius: 4px;
  --radius-img: 2px;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.1; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--label); outline-offset: 3px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--primary); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; }

.section { padding: var(--py) var(--px); }
.section--alt { background: var(--bg-alt); }
.section--sand { background: var(--bg-sand); }
.section--flush-top { padding-top: 0; }

.label { font-size: 14px; letter-spacing: .18em; text-transform: uppercase; color: var(--label); font-weight: 600; }
.h2 { font-size: clamp(30px, 4vw, 48px); }
.lead { font-size: 18px; color: var(--ink-soft); }
.stack { display: flex; flex-direction: column; gap: 18px; }

.btn { display: inline-block; padding: 14px 24px; border-radius: var(--radius); font-weight: 600; text-decoration: none; border: 1px solid var(--primary); transition: background .2s, color .2s; }
.btn--solid { background: var(--primary); color: #fff; }
.btn--solid:hover { background: var(--primary-dark); color: #fff; }
.btn--ghost { color: var(--primary); background: transparent; }
.btn--ghost:hover { background: var(--primary); color: #fff; }

/* Bildrahmen: Seitenverhältnis über Klasse, Bild füllt den Rahmen */
.frame { overflow: hidden; border-radius: var(--radius-img); background: var(--bg-sand); }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.frame:hover img { transform: scale(1.05); }
.r-4-5 { aspect-ratio: 4 / 5; } .r-4-3 { aspect-ratio: 4 / 3; } .r-3-2 { aspect-ratio: 3 / 2; } .r-3-4 { aspect-ratio: 3 / 4; } .r-1-1 { aspect-ratio: 1 / 1; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.header.is-scrolled { box-shadow: 0 6px 24px rgba(43,33,27,.08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--px); }
.logo { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.logo__name { font-family: var(--font-head); font-size: 24px; font-weight: 500; line-height: 1; }
.logo__sub { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 22px; font-size: 16px; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--label); color: var(--ink); }
.header__tools { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; gap: 4px; font-size: 14px; }
.lang a, .lang span { min-width: 44px; padding: 10px 12px; text-align: center; border-radius: var(--radius); text-decoration: none; border: 1px solid var(--primary); }
.lang .is-active { background: var(--primary); color: #fff; }
.lang .is-disabled { color: var(--primary); opacity: .55; cursor: default; }
.menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); cursor: pointer; padding: 0; }

@media (max-width: 1080px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--px) 20px; box-shadow: 0 12px 24px rgba(43,33,27,.08); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
  .logo__name { font-size: 20px; }
}

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: var(--py) var(--px); }
.hero h1 { font-size: clamp(38px, 5vw, 68px); line-height: 1.04; }
.hero .lead { font-size: 19px; max-width: 34rem; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .frame img { animation: kenburns 16s ease-out both; }

/* ---------- Kurzinfo-Leiste ---------- */
.facts { background: var(--primary); color: #fff; padding: 32px var(--px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.facts strong { display: block; font-family: var(--font-head); font-weight: 500; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; }
.facts span { font-size: 14px; opacity: .92; }

/* ---------- Grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 36px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }

.trio__title { font-family: var(--font-head); font-size: clamp(30px, 3.4vw, 40px); color: var(--accent); line-height: 1.05; display: block; margin-bottom: 12px; }
.trio p { color: var(--ink-soft); }

.card { display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: 26px; line-height: 1.15; }
.card p { color: var(--ink-soft); }
.card__kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 36px; }
.section-head > div { max-width: 40rem; }
.section-head > p { max-width: 30rem; color: var(--ink-soft); }

/* ---------- Anreise ---------- */
.routes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.routes li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-sand); padding-bottom: 8px; }
.routes li span:last-child { text-align: right; white-space: nowrap; }
.map { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-img); overflow: hidden; background: repeating-linear-gradient(135deg, #D6C29E 0 14px, #CDB892 14px 28px); display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__consent { max-width: 26rem; background: rgba(246,240,228,.95); padding: 24px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 14px; align-items: center; font-size: 15px; }
.map__consent button { font: inherit; cursor: pointer; }

/* ---------- Spenden ---------- */
.support { margin: 0 var(--px) var(--py); padding: clamp(28px, 4vw, 56px); border-radius: var(--radius-img); background: var(--bg-support); display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.support h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 12px; }

/* ---------- Footer ---------- */
.footer { background: var(--footer); color: var(--footer-ink); padding: 48px var(--px); display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; font-size: 15px; }
.footer a { color: var(--footer-link); }
.footer__name { font-family: var(--font-head); font-size: 24px; color: #fff; display: block; margin-bottom: 6px; }
.footer__col { display: flex; flex-direction: column; gap: 6px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__credits { width: 100%; font-size: 13px; opacity: .75; }

/* ---------- Animationen ---------- */
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.up { animation: fadeUp .9s cubic-bezier(.2,.7,.2,1) both; }
.d1 { animation-delay: .15s; } .d2 { animation-delay: .3s; } .d3 { animation-delay: .45s; }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .up, .hero .frame img { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .frame img { transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Smartphone ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  :root { --px: 24px; }
  .hero, .split { grid-template-columns: 1fr; }
  .hero .frame { order: 2; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Erlebnisse als Wisch-Karussell */
  .carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(-1 * var(--px)); padding-right: var(--px); }
  .carousel > .card { flex: 0 0 82%; scroll-snap-align: start; }
  .split--media-last > .frame, .split--media-last > .map { order: 2; }
  .routes li { flex-direction: column; gap: 2px; }
  .routes li span:last-child { text-align: left; white-space: normal; color: var(--muted); }
}

/* Sehr schmale Displays: Logo kompakter */
@media (max-width: 420px) {
  .logo__name { font-size: 18px; }
  .logo__sub { display: none; }
}
