/* HAHN – Startseite (Onepager). Basis-Styles: base.css */

  :root {
    --tw: min(512px, 26.7vw);              /* Breite des „A“ – alles Weitere leitet sich davon ab */
    --hero-h: clamp(56.25vw, 100svh, 60vw); /* Seitenverhältnis des Hero: 16:9 (56,25 vw) bis höchstens 5:3 (60 vw), dazwischen füllt er das Fenster */
  }

  /* Typografie */
  :where(.hahn-front) h2 { font-weight: 300; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.1; letter-spacing: .1em; text-transform: uppercase; margin: 0; }
  :where(.hahn-front) h2 + .rule { display: block; height: 3px; margin: 20px 0 24px; width: 100%; max-width: 390px; }
  :where(.hahn-front) p { font-size: clamp(18px, 1.5vw, 24px); line-height: 1.34; margin: 0 0 1em; }
  .copy > :last-child, .leistungen p:last-of-type { margin-bottom: 0; }
  .rule { background: var(--gold); }
  hr.divider { width: 390px; max-width: 70%; height: 2px; border: 0; margin: 0 auto;
    background: linear-gradient(to right, rgba(99,99,98,0), #636362 30%, #636362 70%, rgba(99,99,98,0)); }

  /* Header */
  .site-header { position: fixed; inset: 0 0 auto 0; height: 122px; z-index: 50;
    background: rgba(255,255,255,.45); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
  .site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
  .site-header .logo { position: relative; width: 348px; aspect-ratio: 348 / 60; display: block; }
  .logo img { width: 100%; height: auto; }
  .burger { background: none; border: 0; padding: 8px; cursor: pointer; width: 56px; }
  .burger img { width: 40px; height: auto; }
  .burger svg path { transition: transform .3s ease, opacity .2s ease; transform-box: fill-box; transform-origin: center; }
  .burger[aria-expanded="true"] .b1 { transform: translateY(11px) rotate(45deg); }
  .burger[aria-expanded="true"] .b2 { opacity: 0; }
  .burger[aria-expanded="true"] .b3 { transform: translateY(-11px) rotate(-45deg); }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-header { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

  /* Vollbild-Menü */
  .nav { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.94); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
  .nav.open { opacity: 1; visibility: visible; }
  .nav ul { list-style: none; margin: 0; padding: 0; text-align: center; }
  .nav a { position: relative; display: inline-block; text-decoration: none; color: var(--text);
    font-size: clamp(26px, 3.6vw, 52px); font-weight: 300; line-height: 1.25; padding: 12px 4px; }
  .nav a::before { content: attr(data-label); display: block; height: 0; overflow: hidden; visibility: hidden; font-weight: 700; } /* reserviert die Breite der fetten Schrift, nichts springt */
  .nav a:hover, .nav a:focus-visible { font-weight: 700; outline: none; }
  .nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 3px; background: var(--gold); transform: scaleX(0); transition: transform .3s ease; }
  .nav a.active::after { transform: scaleX(1); }

  /* Hero */
  .hero { position: relative; height: var(--hero-h); overflow: hidden;
    background: #cfcfcf center / cover no-repeat; } /* Bild: Customizer › Kopfbereich › Standbild */
  .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  /* „A“: gleiche Milchglas-Optik wie der Header (Blur 22,5 px + 45 % Weiß), zugeschnitten auf die A-Form */
  .hero .triangle { position: absolute; left: 0; bottom: 0; width: var(--tw); aspect-ratio: 512 / 436;
    background: rgba(255,255,255,.45);
    backdrop-filter: blur(22.5px); -webkit-backdrop-filter: blur(22.5px);
    clip-path: url(#a-form); }
  .scroll-link { position: absolute; left: 50%; bottom: 6%; width: clamp(26px, 5vw, 51px); transform: translateX(-50%); display: block; }
  .scroll-link svg { width: 100%; height: auto; overflow: visible; display: block; }
  .scroll-link path { opacity: 0; animation: scroll-hint 1.8s ease-in-out infinite; }
  .scroll-link path:nth-child(2) { animation-delay: .3s; }
  @keyframes scroll-hint {
    0%   { opacity: 0; transform: translateY(-10px); }
    35%  { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(10px); }
  }
  @media (prefers-reduced-motion: reduce) { .scroll-link path { animation: none; opacity: 1; } }

  /* Sektionen */
  section { padding-block: 0; }
  .intro { padding: 113px 0 100px; }
  .split { display: grid; grid-template-columns: 60% 1fr; gap: 0; align-items: center; }
  .split.rev { grid-template-columns: 1fr 60%; }
  .photo-wrap { background: #dcdcdc; }
  .split img.photo { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
  .split .copy { width: min(427px, 100% - 48px); margin-inline: auto; }
  .intro .copy { padding-top: 0; }
  .intro .copy { grid-column: 2; }

  .zuhause { padding: 100px 0 100px; }
  .zuhause .photo-wrap { position: relative; }
  .play-btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
  .play-btn .play { transition: transform .25s ease; }
  .play-btn:hover .play, .play-btn:focus-visible .play { transform: translate(-50%, -50%) translateY(-30px) scale(1.08); }
  .film.playing { background: #000; }
  .film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
  .zuhause .play { position: absolute; left: 50%; top: 50%; width: 91px; transform: translate(-50%, -50%) translateY(-30px); }

  /* Leistungen */
  .leistungen { padding: 100px 0 90px; }
  .leistungen .grid { display: grid; grid-template-columns: 520px 1fr; gap: 20px; align-items: start; }
  .leistungen .grid > div:first-child { max-width: 520px; }
  .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 20px; }
  .tile { text-align: center; color: var(--grey); }
  .tile h3 { font-weight: 700; font-size: 22px; line-height: 28px; margin: 18px 0 6px; }
  .tile p { font-size: 18px; line-height: 28px; margin: 0; }
  .tile a { font-size: 18px; line-height: 28px; }
  .tile a { font-style: italic; font-weight: 600; text-decoration: none; display: inline-block; margin-top: 6px; font-size: 18px; }
  .tile .icon { height: 108px; display: flex; align-items: flex-end; justify-content: center; }
  .tile .icon img { width: auto; height: auto; max-height: 108px; }
  .t4 .icon img { width: 96px; height: auto; } /* optisch an die anderen Icons angeglichen (etwas kleiner = feinere Linien) */
  .t1 { grid-column: 1; } .t2 { grid-column: 2; } .t3 { grid-column: 2; grid-row: 2; } .t4 { grid-column: 3; grid-row: 2; }

  /* Kontakt */
  .kontakt { background: var(--bg-contact); padding: 66px 0 90px; }
  .kontakt .cols { display: grid; grid-template-columns: 521px 1fr; column-gap: 62px; row-gap: 0; align-items: start; }
  .kontakt .cols > div:first-child { display: contents; }
  .kontakt h2 { grid-column: 1; grid-row: 1; }
  .kontakt .rule { grid-column: 1; grid-row: 2; }
  .kontakt form { grid-column: 1; grid-row: 3; }
  .kontakt h2 + .rule { max-width: 312px; margin-bottom: 40px; }
  .field { margin-bottom: 14px; }
  .field label { display: block; font-size: 18px; line-height: 32px; }
  .field input, .field textarea { width: 100%; border: 1px solid var(--text); background: #fff; font: inherit; font-size: 18px; padding: 6px 10px; height: 38px; }
  .field textarea { height: 331px; resize: vertical; }
  .legal, .spam { font-size: 16px; line-height: 21px; color: var(--ink); }
  .check { display: flex; align-items: center; gap: 12px; font-size: 18px; line-height: 32px; color: var(--ink); margin: 14px 0; }
  .check input { width: 26px; height: 26px; border: 1px solid #000; accent-color: var(--gold); margin: 0; }
  .btn { background: var(--gold); color: #fff; border: 0; border-radius: 16px; width: 256px; height: 50px; font: inherit; font-weight: 400; font-size: 20px; cursor: pointer; margin-top: 20px; }
  .altcha { font-size: 16px; color: var(--ink); margin-top: 14px; }
  .contact-info { grid-column: 2; grid-row: 3; margin-top: 32px; } /* 32px = Höhe des Labels „Name*“ → Oberkante auf Höhe des Eingabekastens */
  .contact-info .name { font-weight: 700; font-size: 20px; color: var(--ink); margin-bottom: 8px; }
  .contact-info .row { display: flex; align-items: center; gap: 22px; font-weight: 600; font-size: 20px; margin-bottom: 8px; }
  .contact-info .row svg { flex: none; }
  .contact-info .addr { margin-top: 20px; font-size: 20px; line-height: 30px; }
  .contact-info .addr b { font-weight: 600; display: block; }
  .contact-info .line { line-height: 30px; }
  .contact-info a.maps { display: block; font-style: italic; font-weight: 400; font-size: 18px; text-decoration: none; margin-top: 2px; }


  /* Startposition wie im Design: 24/512 vom linken Rand, Unterkante 168/512 über dem Hero-Ende; danach bleibt der Button stehen */
  .contact-fab { position: fixed; z-index: 40; width: calc(var(--tw) * .2129);
    left: calc(var(--tw) * .0469);
    top: calc(var(--hero-h) - var(--tw) * .328 - var(--tw) * .2129); }
  .contact-fab img { width: 100%; height: auto; }

  @media (max-width: 1000px) {
    .site-header { height: 88px; }
    .site-header .logo { width: 220px; }
    .split, .split.rev, .intro .split { grid-template-columns: 1fr; gap: 28px; }
    .intro .copy { grid-column: 1; }
    .split .copy { width: 100%; margin: 0; }
    .split.rev .photo-wrap { order: -1; }
    .leistungen .grid, .kontakt .cols { grid-template-columns: 1fr; }
    .tiles { grid-template-columns: 1fr 1fr; }
    .t1, .t2, .t3, .t4 { grid-column: auto; grid-row: auto; }
    .kontakt h2, .kontakt .rule, .kontakt form { grid-column: auto; grid-row: auto; }
    .contact-info { grid-column: auto; grid-row: auto; margin-top: 40px; }
    :root { --tw: 46vw; }
    /* Imagefilm: Abspielknopf auf Mobil exakt mittig und etwas kleiner */
    .zuhause .play { width: clamp(56px, 16vw, 91px); transform: translate(-50%, -50%); }
    .play-btn:hover .play, .play-btn:focus-visible .play { transform: translate(-50%, -50%) scale(1.08); }
  }

  /* --- WordPress-Ergänzungen --- */
  .admin-bar .site-header { top: 32px; }
  .admin-bar .nav { top: 32px; }
  @media (max-width: 782px) { .admin-bar .site-header { top: 46px; } .admin-bar .nav { top: 46px; } }
  .contact-info a { text-decoration: none; }
  .contact-info a.maps { text-decoration: none; }
  .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  .pow-status { font-size: 15px; color: var(--grey); }
  .pow-status.ok { color: #3b7a3b; }
  .pow-status.err { color: #a12a2a; }
  .btn[disabled] { opacity: .6; cursor: progress; }
  .form-status, .form-message { font-size: 18px; line-height: 1.4; padding: 12px 16px; margin: 0 0 18px; background: #fff; border-left: 4px solid var(--gold); }
  .form-message { margin: 20px 0 0; }
  .form-status.is-error, .form-message.is-error { border-left-color: #a12a2a; }
  .form-status.is-success, .form-message.is-success { border-left-color: #3b7a3b; }
  .field input:focus-visible, .field textarea:focus-visible, .check input:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  .burger:focus-visible, .contact-fab:focus-visible, .scroll-link:focus-visible, .play-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
  /* Customizer-Vorschau: Platz für die Bearbeiten-Stifte */
  .customize-partial-edit-shortcut button { z-index: 60; }

  /* --- Einblenden beim Scrollen (nur mit JavaScript, nicht bei „Bewegung reduzieren“) --- */
  .hahn-js :is(.intro .photo-wrap, .zuhause .photo-wrap, .split .copy > h2, .split .copy > p,
    .leistungen .grid > div:first-child > h2, .leistungen .grid > div:first-child > p, .tile,
    .kontakt h2, .kontakt form, .contact-info) {
    opacity: 0; transform: translateY(42px);
    transition: opacity .9s cubic-bezier(.22,.61,.36,1), transform 1.1s cubic-bezier(.22,.61,.36,1);
    transition-delay: var(--reveal-delay, 0s); will-change: opacity, transform; }
  .hahn-js h2 + .rule { transform: scaleX(0); transform-origin: left center;
    transition: transform 1.1s cubic-bezier(.22,.61,.36,1); transition-delay: calc(var(--reveal-delay, 0s) + .25s); }
  .hahn-js hr.divider { opacity: 0; transform: scaleX(.3); transition: opacity 1s ease, transform 1.2s cubic-bezier(.22,.61,.36,1); }
  .hahn-js .is-visible { opacity: 1 !important; transform: none !important; }
  @media (prefers-reduced-motion: reduce) {
    .hahn-js :is(.intro .photo-wrap, .zuhause .photo-wrap, .split .copy > h2, .split .copy > p,
      .leistungen .grid > div:first-child > h2, .leistungen .grid > div:first-child > p, .tile,
      .kontakt h2, .kontakt form, .contact-info, h2 + .rule, hr.divider) { opacity: 1; transform: none; transition: none; }
  }
