/*
Theme Name: Hohenlohe Air
Theme URI: https://drohne-hohenlohe.de/
Author: Rolf Hartbrich
Author URI: https://hartbrich.de/
Description: Block-Theme für Drohne Hohenlohe – Luftbild, Video, virtuelle 360°-Touren und Photogrammetrie aus Künzelsau. Handgebaut, ohne Page-Builder, mit lokal eingebundenen Schriften und strukturierten Daten für die lokale Suche.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Version: 0.6.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hohenlohe-air
Tags: block-theme, full-site-editing, photography, business, custom-colors, custom-menu, wide-blocks
*/

/* ------------------------------------------------------------------
   Nur das, was theme.json nicht ausdrücken kann.
   Farben und Schriften kommen ausschließlich aus theme.json.
   ------------------------------------------------------------------ */

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Sichtbarer Fokus – wird von vielen Themes vergessen */
:where(a, button, input, select, textarea, .wp-block-button__link):focus-visible {
  outline: 3px solid var(--wp--preset--color--accent);
  outline-offset: 3px;
}

/* ---------- Kopfbereich ---------- */
.ha-header {
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
  background: color-mix(in srgb, var(--wp--preset--color--paper) 90%, transparent);
  border-bottom: 1px solid var(--wp--preset--color--line);
}
/* Weichzeichner bewusst auf dem Pseudo-Element: laege er auf .ha-header selbst,
   wuerde das Overlay des Handy-Menues auf die Kopfzeile zusammenschrumpfen. */
.ha-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(10px);
  pointer-events: none;
}
.admin-bar .ha-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ha-header { top: 46px; } }

.ha-logo img {
  display: block;
  width: auto;
  height: 26px;
}

.ha-header .wp-block-navigation__responsive-container-open,
.ha-header .wp-block-navigation__responsive-container-close {
  color: var(--wp--preset--color--ink);
}
.ha-header .wp-block-navigation .wp-block-navigation-item__content:hover {
  text-decoration: underline;
  text-decoration-color: var(--wp--preset--color--accent);
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* WooCommerce-Warenkorb im Kopfbereich einpassen */
.ha-header .wc-block-mini-cart__button {
  color: var(--wp--preset--color--ink);
  padding: 0.3rem;
}
.ha-header .wc-block-mini-cart__badge { background: var(--wp--preset--color--accent); color: #fff; }
.ha-header .wp-block-woocommerce-customer-account { display: none; }

/* ---------- Kopfbereich auf dem Handy ---------- */
@media (max-width: 781px) {
  /* Eine Zeile: Name links, Burger rechts. Schaltflaeche und Warenkorb
     waeren hier nur Hoehe - die Anfrage steht gleich darunter im Hero. */
  .ha-header .wp-block-buttons,
  .ha-header .wp-block-woocommerce-mini-cart { display: none; }
  .ha-header > .wp-block-group { flex-wrap: nowrap; }
  .ha-header .ha-logo img { height: 22px; }
}

/* ---------- Aufgeklapptes Menue auf dem Handy ---------- */
.wp-block-navigation__responsive-container.is-menu-open {
  padding: 4.5rem 1.5rem 3rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  width: 100%;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  width: 100%;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.2rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  text-align: left;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  color: #fff;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.2;
  padding: 0.62rem 0;
  display: block;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
  width: 100%;
  align-items: stretch;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
}
.wp-block-navigation__responsive-container-close { padding: 0.4rem; }

/* ---------- Eyebrow / technische Kleinschrift ---------- */
.ha-eyebrow {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 700;
  font-size: var(--wp--preset--font-size--tiny);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wp--preset--color--horizon);
  margin-bottom: 0.9rem;
}
.ha-eyebrow--light { color: #9fc4ce; }

/* ---------- Hero: Kinoauftritt ----------
   Bildschirmfüllend, langsame Kamerafahrt über dem Standbild, Farbverlauf
   von oben und unten statt flacher Abdunklung. Läuft ein Hintergrundfilm
   (assets/video/hero.mp4), gilt dasselbe Bildkonzept. */
.ha-hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: clip;
}
.ha-hero > .wp-block-cover__background { z-index: 1; background: none !important; }
.ha-hero .wp-block-cover__image-background,
.ha-hero .wp-block-cover__video-background {
  z-index: 0;
  object-fit: cover;
  transform-origin: 58% 45%;
  animation: ha-flug 34s ease-in-out infinite alternate;
}

/* Kinoabstufung: dunkel oben für die Kopfzeile, dunkel unten für die Schrift,
   Mitte offen, damit das Motiv sichtbar bleibt. */
.ha-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(9, 12, 17, 0.78) 0%,
      rgba(9, 12, 17, 0.30) 26%,
      rgba(9, 12, 17, 0.18) 46%,
      rgba(9, 12, 17, 0.76) 82%,
      rgba(9, 12, 17, 0.94) 100%),
    linear-gradient(to right,
      rgba(9, 12, 17, 0.55) 0%,
      rgba(9, 12, 17, 0.10) 55%,
      rgba(9, 12, 17, 0.00) 100%);
}
/* Leichte Randabdunklung – wie eine Optik, nicht wie ein Filter. */
.ha-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.42) 100%);
}
.ha-hero .wp-block-cover__inner-container { position: relative; z-index: 2; width: 100%; }

.ha-hero h1 {
  max-width: 19ch;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
}
.ha-hero .wp-block-cover__inner-container > p { max-width: 46ch; }

@keyframes ha-flug {
  from { transform: scale(1.0) translate3d(0, 0, 0); }
  to   { transform: scale(1.11) translate3d(-1.2%, -1.4%, 0); }
}

/* Aufblende der Textebene – gestaffelt, kurz, ohne Zappeln. */
.ha-rise {
  opacity: 0;
  transform: translateY(18px);
  animation: ha-rise 0.9s cubic-bezier(0.22, 0.68, 0.24, 1) forwards;
}
.ha-hero .ha-rise:nth-child(1) { animation-delay: 0.15s; }
.ha-hero .ha-rise:nth-child(2) { animation-delay: 0.30s; }
.ha-hero .ha-rise:nth-child(3) { animation-delay: 0.45s; }
.ha-hero .ha-rise:nth-child(4) { animation-delay: 0.60s; }
.ha-hero .ha-rise:nth-child(5) { animation-delay: 0.78s; }
@keyframes ha-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Hinweis zum Weiterscrollen */
.ha-scrollcue {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: var(--wp--preset--spacing--40);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-family: var(--wp--preset--font-family--display);
  font-weight: 700;
  font-size: var(--wp--preset--font-size--tiny);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  animation: ha-rise 0.9s ease 1.1s forwards;
}
.ha-scrollcue__line {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), #fff);
  transform-origin: top;
  animation: ha-cue 2.4s ease-in-out infinite;
}
@keyframes ha-cue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50%      { transform: scaleY(1);   opacity: 1; }
}
.ha-scrollcue:hover { color: #fff; }

/* Auf dem Handy bleibt der Auftritt hoch, aber nicht erdrückend. */
@media (max-width: 781px) {
  .ha-hero { min-height: 92svh; }
  .ha-hero h1 { max-width: 100%; }
  .ha-scrollcue { display: none; }
}

/* Datenleiste unter dem Hero */
.ha-flightdata {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 1.1rem;
}
.ha-flightdata .wp-block-column {
  border-left: 2px solid var(--wp--preset--color--accent);
  padding-left: 0.85rem;
}
.ha-flightdata dt,
.ha-flightdata .ha-key {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--tiny);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9fc4ce;
  margin: 0 0 0.15rem;
}
.ha-flightdata .ha-val {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  font-size: var(--wp--preset--font-size--medium);
  color: #fff;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* ---------- Leistungskarten ---------- */
.ha-card {
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--line);
  height: 100%;
}
.ha-card h3 { margin-top: 0; }
.ha-num {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 800;
  font-size: var(--wp--preset--font-size--tiny);
  letter-spacing: 0.14em;
  color: var(--wp--preset--color--accent);
}

/* ---------- Anklickbare Tour-Vorschau ---------- */
.ha-tourvorschau { margin-left: auto; margin-right: auto; }
.ha-tourvorschau a { display: block; overflow: hidden; }
.ha-tourvorschau img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 260ms ease, filter 260ms ease;
}
.ha-tourvorschau a:hover img,
.ha-tourvorschau a:focus-visible img {
  transform: scale(1.015);
  filter: brightness(1.05);
}
.ha-tourvorschau figcaption {
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--muted);
  margin-top: 0.7rem;
}

/* ---------- Referenzband ---------- */
.ha-ref img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.ha-ref figure { margin: 0; }

/* Kacheln: langsame Heranfahrt beim Überfahren, kein Springen. */
.ha-shot {
  overflow: clip;
  background: #0b0e13;
}
.ha-shot img {
  transition: transform 1.2s cubic-bezier(0.22, 0.68, 0.24, 1), filter 0.6s ease;
  filter: saturate(0.92) contrast(1.04);
}
.ha-ref .wp-block-column:hover .ha-shot img,
.ha-ref .wp-block-column:focus-within .ha-shot img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.06);
}

/* Leitprojekt im Breitbild */
.ha-feature {
  position: relative;
  isolation: isolate;
  overflow: clip;
  align-items: flex-end;
  min-height: clamp(22rem, 62vh, 40rem);
}
.ha-feature > .wp-block-cover__background { background: none !important; }
.ha-feature .wp-block-cover__image-background {
  object-fit: cover;
  transition: transform 1.6s cubic-bezier(0.22, 0.68, 0.24, 1);
}
.ha-feature:hover .wp-block-cover__image-background { transform: scale(1.04); }
.ha-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(9, 12, 17, 0.92) 0%,
    rgba(9, 12, 17, 0.55) 38%,
    rgba(9, 12, 17, 0.10) 72%,
    rgba(9, 12, 17, 0.28) 100%);
}
.ha-feature .wp-block-cover__inner-container { position: relative; z-index: 2; }
.ha-feature h3 { max-width: 20ch; }
.ha-feature p { max-width: 52ch; }

/* Abschnitte fahren beim Scrollen kurz auf – nur wenn das Skript greift. */
.ha-observed .ha-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.68, 0.24, 1);
  will-change: opacity, transform;
}
.ha-observed .ha-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Ausklappbare Fragen (FAQ) ---------- */
.wp-block-details {
  border-top: 1px solid var(--wp--preset--color--line);
  padding: 1.1rem 0;
}
.wp-block-details summary {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  font-size: var(--wp--preset--font-size--medium);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
  content: "+";
  color: var(--wp--preset--color--accent);
  font-weight: 700;
  flex: none;
}
.wp-block-details[open] summary::after { content: "\2013"; }
.wp-block-details p { margin-bottom: 0; }
.wp-block-details.ha-step { border-top-width: 1px; padding-top: 1.1rem; }

/* ---------- Ablauf ---------- */
.ha-step {
  border-top: 2px solid var(--wp--preset--color--ink);
  padding-top: 1rem;
}
.ha-step .ha-num { display: block; margin-bottom: 0.5rem; }

/* ---------- Kontaktformular ---------- */
.ha-form { margin-top: var(--wp--preset--spacing--40); }

.ha-form__falle {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ha-form__reihe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.2rem;
}
@media (max-width: 600px) {
  .ha-form__reihe { grid-template-columns: 1fr; }
}

.ha-form__feld { margin: 0 0 1.1rem; }

.ha-form label {
  display: block;
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  font-size: var(--wp--preset--font-size--small);
  margin-bottom: 0.35rem;
}
.ha-form label span[aria-hidden] { color: var(--wp--preset--color--accent); }

.ha-form input[type="text"],
.ha-form input[type="email"],
.ha-form select,
.ha-form textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 2px;
  padding: 0.7rem 0.85rem;
}
.ha-form input:focus,
.ha-form select:focus,
.ha-form textarea:focus {
  border-color: var(--wp--preset--color--horizon);
}
.ha-form textarea { resize: vertical; min-height: 9rem; }

.ha-form__einwilligung { margin: 0 0 1.4rem; }
.ha-form__einwilligung label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  font-family: inherit;
  font-weight: 400;
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.5;
  color: var(--wp--preset--color--muted);
}
.ha-form__einwilligung input { margin-top: 0.25rem; }

.ha-form__senden {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 700;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  background: var(--wp--preset--color--accent);
  color: #fff;
  padding: 0.85rem 1.7rem;
}
.ha-form__senden:hover { background: var(--wp--preset--color--ink); }

.ha-form__hinweis {
  border-left: 3px solid var(--wp--preset--color--horizon);
  background: var(--wp--preset--color--surface);
  padding: 1rem 1.2rem;
  margin: 0 0 1.4rem;
}
.ha-form__hinweis--ok { border-left-color: var(--wp--preset--color--horizon); }
.ha-form__hinweis--fehler { border-left-color: var(--wp--preset--color--accent); }

/* ---------- Fußbereich ---------- */
.ha-footer a { color: inherit; }
.ha-footer .wp-block-navigation { font-size: var(--wp--preset--font-size--small); }

/* Soziale Kanäle im Fußbereich */
.ha-footer .wp-block-social-links { gap: 0.6rem; }
.ha-footer .wp-block-social-link { opacity: 0.85; transition: opacity 180ms ease; }
.ha-footer .wp-block-social-link:hover { opacity: 1; }

/* ---------- Beitragslisten ---------- */
.wp-block-post-title a { text-decoration: none; }
.wp-block-post-title a:hover { text-decoration: underline; }

/* ---------- WooCommerce: nur Grundlegendes ---------- */
.woocommerce .button,
.woocommerce a.button,
.woocommerce button.button {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 700;
  border-radius: 2px;
  background: var(--wp--preset--color--accent);
  color: #fff;
}
.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background: var(--wp--preset--color--ink);
  color: #fff;
}

/* ---------- Bewegung sparsam ---------- */
@media (prefers-reduced-motion: reduce) {
  .ha-hero .wp-block-cover__image-background,
  .ha-hero .wp-block-cover__video-background,
  .ha-scrollcue__line { animation: none !important; }
  .ha-rise, .ha-scrollcue { opacity: 1 !important; transform: none !important; }
  .ha-observed .ha-reveal { opacity: 1 !important; transform: none !important; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
