/* Bengals di Casa Tara — globale Regeln. Layout und Farben stehen (wie in
   der Design-Vorlage) direkt im Markup von index.html. */

html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: #F1E9DC; color: #4A392B; font-family: 'EB Garamond', Georgia, serif; -webkit-font-smoothing: antialiased; }
a { color: #4A392B; text-decoration: none; transition: color .2s, background-color .2s, border-color .2s; }
a:hover { color: #7E312B; }
::selection { background: #8F7355; color: #FBF7EF; }

/* Kopfzeile */
.kopf { position: sticky; top: 0; z-index: 50; background: rgba(241,233,220,0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(74,57,43,0.14); }
.kopf-innen { position: relative; max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px,4vw,40px); min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.kopf-marke { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding: 14px 0; }
.kopf-raute { width: 8px; height: 8px; border: 1px solid #7E312B; transform: rotate(45deg); }
.kopf-name { white-space: nowrap; font-family: 'Jost', sans-serif; font-weight: 300; font-size: 16px; letter-spacing: .3em; text-transform: lowercase; color: #4A392B; }
.menu { display: flex; align-items: center; gap: clamp(18px,2.2vw,34px); white-space: nowrap; font-family: 'Jost', sans-serif; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.btn-nav { border: 1px solid #4A392B; padding: 11px 20px; border-radius: 2px; }
.btn-nav:hover { background: #4A392B; color: #F1E9DC; }
.menu-knopf { display: none; }

@media (max-width: 1180px) {
  .kopf-innen { min-height: 64px; }
  .kopf-name { font-size: 14px; letter-spacing: .22em; }
  .menu-knopf { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-right: -10px; padding: 0; background: none; border: 0; cursor: pointer; color: #4A392B; }
  .menu-striche { position: relative; display: block; width: 24px; height: 14px; }
  .menu-striche span { position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor; transition: transform .3s cubic-bezier(.2,.7,.3,1), opacity .2s, top .3s cubic-bezier(.2,.7,.3,1); }
  .menu-striche span:nth-child(1) { top: 0; }
  .menu-striche span:nth-child(2) { top: 6px; }
  .menu-striche span:nth-child(3) { top: 12px; }
  .menu-offen .menu-striche span:nth-child(1) { top: 6px; transform: rotate(45deg); }
  .menu-offen .menu-striche span:nth-child(2) { opacity: 0; }
  .menu-offen .menu-striche span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

  .menu { position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - 64px); height: calc(100dvh - 64px); flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 24px clamp(20px,4vw,40px) 40px; background: #F1E9DC; border-top: 1px solid rgba(74,57,43,0.14); overflow-y: auto; font-size: 13px; letter-spacing: .24em;
          visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .3s cubic-bezier(.2,.7,.3,1), visibility 0s .3s; }
  .menu a { padding: 20px 2px; border-bottom: 1px solid rgba(74,57,43,0.12); }
  .menu .btn-nav { margin-top: 28px; padding: 17px 20px; text-align: center; border-bottom: 1px solid #4A392B; }
  .menu-offen .menu { visibility: visible; opacity: 1; transform: none; transition: opacity .25s, transform .3s cubic-bezier(.2,.7,.3,1), visibility 0s; }
  .kopf.menu-offen { background: #F1E9DC; }

}


/* Buttons */
.btn-fill, .btn-line { display: inline-block; }
.btn-fill { background: #5C4835; color: #F1E9DC; }
.btn-fill:hover { background: #7E312B; color: #FBF7EF; }
.btn-line { border: 1px solid rgba(74,57,43,0.35); }
.btn-line:hover { border-color: #4A392B; }

/* Fotos und Videos fuellen ihren Rahmen */
.media { display: block; width: 100%; height: 100%; object-fit: cover; background: #EBE1D1; }

/* Bildraster: feste Spaltenzahl, damit nichts halb umbricht */
.raster { display: grid; gap: 14px; }
.raster-4 { grid-template-columns: repeat(4, 1fr); }
.raster-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) {
  .raster-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .raster-3 { grid-template-columns: 1fr; }
  .zitat-zelle .kachel { aspect-ratio: 4/3 !important; }
}
.kachel { position: relative; overflow: hidden; border-radius: 2px; }
.zitat-zelle { background: #4A392B; }

/* Fotos zum Vergroessern */
img.media.zoombar { cursor: zoom-in; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.kachel:hover img.media.zoombar { transform: scale(1.03); }

/* Galerie */
.g-filterleiste { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 32px; }
.g-filter { font-family: 'Jost', sans-serif; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #4A392B; background: transparent; border: 1px solid rgba(74,57,43,0.3); border-radius: 2px; padding: 10px 16px; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.g-filter span { color: #685C4D; margin-left: 4px; letter-spacing: .06em; }
.g-filter:hover { border-color: #4A392B; }
.g-filter.aktiv { background: #4A392B; border-color: #4A392B; color: #F1E9DC; }
.g-filter.aktiv span { color: #C3AA87; }
.g-raster { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 1000px) { .g-raster { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px)  { .g-raster { grid-template-columns: repeat(3, 1fr); gap: 6px; } }
@media (max-width: 460px)  { .g-raster { grid-template-columns: repeat(2, 1fr); } }
.g-item { position: relative; display: block; padding: 0; border: 0; margin: 0; aspect-ratio: 1/1; overflow: hidden; border-radius: 2px; background: #E2D6C3; cursor: zoom-in; }
.g-item[hidden] { display: none; }
.g-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1), filter .3s; }
.g-item:hover img { transform: scale(1.04); filter: brightness(1.04); }
.g-video { cursor: pointer; }
.g-play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(74,57,43,0.72); border: 1px solid rgba(251,247,239,0.6); transition: background-color .2s; }
.g-play::after { content: ""; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 10px 0 10px 15px; border-color: transparent transparent transparent #FBF7EF; }
.g-video:hover .g-play { background: #7E312B; }

/* Vollbild-Ansicht */
.lb-video { display: none; }
.lb.ist-video .lb-bild { display: none; }
.lb.ist-video .lb-video { display: block; max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); background: #000; }
@media (max-width: 700px) { .lb.ist-video .lb-video { max-width: 100vw; max-height: calc(100vh - 170px); } }
.lb { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(38,29,22,0.94); }
.lb.offen { display: flex; }
.lb-bild { max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.4); user-select: none; }
.lb-zahl { position: absolute; top: 26px; left: 30px; font-family: 'Jost', sans-serif; font-size: 11px; letter-spacing: .28em; color: #D9C6A8; }
.lb button { position: absolute; background: none; border: 1px solid rgba(251,247,239,0.3); color: #FBF7EF; width: 52px; height: 52px; border-radius: 2px; cursor: pointer; font-family: 'Jost', sans-serif; font-weight: 300; font-size: 26px; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background-color .2s, border-color .2s; }
.lb button:hover { background: #7E312B; border-color: #7E312B; }
.lb-zu { top: 16px; right: 20px; }
.lb-zurueck { left: 24px; top: 50%; margin-top: -26px; }
.lb-vor { right: 24px; top: 50%; margin-top: -26px; }
@media (max-width: 700px) {
  .lb-bild { max-width: 100vw; max-height: calc(100vh - 170px); }
  .lb-zurueck, .lb-vor { top: auto; bottom: 20px; margin: 0; }
}

/* Schalter, um ein laufendes Video anzuhalten */
.video-halt { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(251,247,239,0.5); border-radius: 50%; background: rgba(74,57,43,0.6); cursor: pointer; transition: background-color .2s; }
.video-halt:hover { background: #7E312B; }
.video-halt::before, .video-halt::after { content: ""; position: absolute; top: 12px; width: 4px; height: 15px; background: #FBF7EF; }
.video-halt::before { left: 15px; }
.video-halt::after { right: 15px; }
.video-halt:not(.laeuft)::before { left: 15px; width: 0; height: 0; top: 11px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #FBF7EF; background: none; }
.video-halt:not(.laeuft)::after { display: none; }

/* Sprungmarke fuer Tastatur und Screenreader */
.sprung { position: absolute; left: -9999px; top: 0; z-index: 200; background: #4A392B; color: #F1E9DC; font-family: 'Jost', sans-serif; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; padding: 14px 20px; }
.sprung:focus { left: 0; color: #F1E9DC; }

/* Fusszeile (Inhalt kommt aus werkzeug/seiten.py) */
.fuss { position: relative; background: #5C4835; color: #E7DCCA; padding: 64px clamp(20px,4vw,40px) 54px; }
.fuss-innen { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 48px; }
.fuss-marke { font-family: 'Jost', sans-serif; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: #FBF7EF; margin-bottom: 16px; }
.fuss-label { font-family: 'Jost', sans-serif; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: #D9C6A8; margin-bottom: 14px; }
.fuss-text { margin: 0; font-size: 17px; line-height: 1.8; }
.fuss-text a { color: #F3ECE0; text-decoration: underline; text-underline-offset: 3px; }
.fuss-text a:hover { color: #FBF7EF; }
.fuss-hinweis { margin: 18px 0 0; font-family: 'Jost', sans-serif; font-size: 12px; line-height: 1.7; letter-spacing: .04em; color: #D9C6A8; }

/* Rechtstexte und Fehlerseite */
.menu-schlicht { gap: clamp(18px,3vw,30px); }
.recht { display: block; max-width: 760px; margin: 0 auto; padding: clamp(56px,8vw,88px) clamp(20px,4vw,40px) clamp(64px,9vw,96px); font-size: 18px; line-height: 1.75; color: #5C4835; }
.recht-kicker { font-family: 'Jost', sans-serif; font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: #7E312B; margin: 0 0 18px; }
.recht h1 { font-family: 'EB Garamond', serif; font-weight: 400; font-size: clamp(32px,4vw,44px); line-height: 1.18; margin: 0 0 20px; color: #4A392B; }
.recht h2 { font-family: 'EB Garamond', serif; font-weight: 400; font-size: clamp(23px,2.4vw,28px); line-height: 1.3; margin: 44px 0 12px; color: #4A392B; }
.recht-vor { font-size: 20px; line-height: 1.7; color: #6B5843; margin: 0 0 8px; }
.recht p { margin: 0 0 14px; }
.recht ul { margin: 0 0 14px; padding-left: 22px; }
.recht li { margin-bottom: 10px; }
.recht a { text-decoration: underline; text-underline-offset: 3px; }
.recht-pruefen { background: #EBE1D1; border-left: 3px solid #615F34; padding: 18px 22px; }
.recht-stand { margin-top: 48px; font-family: 'Jost', sans-serif; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #685C4D; }
.recht-knopf { display: inline-block; margin-top: 10px; padding: 15px 30px; border-radius: 2px; font-family: 'Jost', sans-serif; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }

/* Logo: Bildhintergrund ist bereits auf die Seitenfarbe #F1E9DC gerechnet */
.logo { display: block; width: clamp(240px, 32vw, 400px); height: auto; }

/* Scroll-Einblendung */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
[data-reveal] { animation: rise .85s cubic-bezier(.2,.7,.3,1) both; animation-play-state: paused; }
[data-reveal].sichtbar, body.alles-sichtbar [data-reveal] { animation-play-state: running; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], h1 { animation: none !important; }
}

:focus-visible { outline: 2px solid #7E312B; outline-offset: 3px; }

/* Auf Touch-Geraeten grosszuegigere Tippflaechen (mindestens 44 px hoch) */
@media (max-width: 760px) {
  .g-filter { min-height: 46px; padding: 12px 16px; }
  #kontakt a, .fuss-text a { display: inline-block; padding: 11px 0; }
  .recht a:not(.recht-knopf) { padding: 2px 0; }
}

/* "Unsere Geschichte": links klebt der Block mit Cleo/Cindy neben dem langen
   Text. Sobald beide Spalten untereinander stehen (Handy, schmales Tablet),
   darf er nicht kleben - sonst schiebt er sich ueber den Text. */
@media (max-width: 760px) {
  #geschichte > div { grid-template-columns: 1fr !important; }
  .geschichte-links { position: static !important; }
}
