/* Immofabrik · Gutschein-Seite
   Gestaltung: dunkel, Navy und Sand, mit Bewegtbild im Kopfbereich (Klasse .thema-b auf <html>).
   Die Grundwerte in :root sind die helle Palette; sie gilt für den Gutschein selbst,
   der als helle Karte auf dem dunklen Grund liegt.
   Mobil zuerst: Besucher kommen über den QR-Code am Handy. */

@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("../assets/fonts/raleway-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
/* Zusatzzeichen wie das ć in „Tunjić“ – wird nur geladen, wo so ein Zeichen vorkommt */
@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../assets/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}

:root {
  --navy: #1B2944;
  --sand: #C9A57C;
  --sand-tief: #8A6740;
  --putz: #FBF6EE;
  --putz-2: #F1E7D8;
  --wiese: #3D6B3A;
  --rot: #A4372B;

  --grund: var(--putz);
  --flaeche: var(--putz-2);
  --schrift: var(--navy);
  --leise: #55607A;
  --linie: #E0D3BF;
  --akzent: var(--sand-tief);
  --logo-akzent: #D4AF6E;
  --logo-haupt: #1A1A1A;
  --knopf: var(--navy);
  --knopf-text: #fff;

  --kopf-h: 64px;
  --rand: 20px;
  --breite: 1120px;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;
}

.thema-b {
  --grund: #0E1218;
  --flaeche: #161F33;
  --schrift: #F4ECDF;
  --leise: #BDB6AA;
  --linie: #2B3650;
  --akzent: var(--sand);
  --logo-akzent: #D4AF6E;
  --logo-haupt: #FFFFFF;
  --knopf: var(--sand);
  --knopf-text: #141C2E;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--schrift);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-underline-offset: .18em; }
h1, h2, .ticket legend, .ticket-wort {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -.012em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.05rem, 5.4vw + .85rem, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.65rem, 2.6vw + 1.05rem, 2.5rem); line-height: 1.14; }
h3 { font-family: var(--sans); font-size: 1.2rem; font-weight: 600; line-height: 1.25; }

:focus-visible { outline: 3px solid var(--sand); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprung {
  position: absolute; left: 12px; top: -80px; z-index: 50;
  background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 8px;
}
.sprung:focus { top: 12px; }


/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px;
  border: 2px solid transparent; border-radius: 12px;
  font: 600 1.125rem/1.1 var(--sans); text-decoration: none; text-align: center;
  cursor: pointer; transition: transform .12s ease, background-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.knopf:active { transform: translateY(1px); }
.knopf-haupt { background: var(--knopf); color: var(--knopf-text); }
.knopf-haupt:hover { background: color-mix(in srgb, var(--knopf) 88%, #fff); }
.knopf-rand { background: transparent; color: var(--schrift); border-color: color-mix(in srgb, var(--schrift) 38%, transparent); }
.knopf-rand:hover { border-color: var(--schrift); }
.knopf-leise { background: transparent; color: var(--schrift); border-color: var(--linie); padding: 0 18px; font-weight: 500; }
.knopf[disabled] { opacity: .6; cursor: progress; }

/* ---------- Kopf ---------- */
.kopf {
  position: relative; z-index: 3;
  height: var(--kopf-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 var(--rand);
  max-width: calc(var(--breite) + 2 * var(--rand)); margin: 0 auto;
}
.marke { flex: none; }
.marke svg { width: 150px; height: auto; overflow: visible; }
/* Logo nach Spezifikation (Variante 3A): Maße und Proportionen stehen im SVG */
.marke .haus { fill: none; stroke: var(--logo-haupt); stroke-width: 1.4; stroke-linejoin: miter; stroke-linecap: butt; }
.marke .linie { stroke: var(--logo-haupt); stroke-width: .9; }
.marke text { font-family: "Raleway", var(--sans); font-size: 30px; letter-spacing: -.3px; font-kerning: none; }  /* ohne Unterschneidung, wie in der Vorgabe */
.marke .a { fill: var(--logo-akzent); font-weight: 400; }
.marke .m { fill: var(--logo-haupt); font-weight: 300; }
.anruf {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  border: 1.5px solid color-mix(in srgb, var(--schrift) 30%, transparent); border-radius: 999px;
  font-size: .98rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.anruf svg, .leiste-anruf svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ============================ HERO ============================ */
.hero { position: relative; padding: 14px var(--rand) 44px; }
.kulisse { display: none; }
.hero-innen {
  position: relative; z-index: 1;
  max-width: var(--breite); margin: 0 auto;
  display: grid; gap: 24px;
}
.hero-innen > * { min-width: 0; }
.hero-text .lead { margin-top: 14px; font-size: 1.16rem; line-height: 1.45; color: var(--leise); max-width: 34em; }

/* ---------- Der Gutschein (Formular) ---------- */
.ticket {
  --ky: 88px;            /* Höhe des Kopfteils = Lage der Perforation */
  --schrift: var(--navy);
  --leise: #55607A;
  --linie: #E0D3BF;
  --knopf: var(--navy);
  --knopf-text: #fff;
  position: relative;
  background: #fff; color: var(--navy);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1.5px var(--linie);
  scroll-margin-top: 12px;
  /* seitliche Kerben wie bei einer Eintrittskarte */
  -webkit-mask:
    radial-gradient(circle 11px at 0 var(--ky), #0000 10.5px, #000 11px),
    radial-gradient(circle 11px at 100% var(--ky), #0000 10.5px, #000 11px);
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle 11px at 0 var(--ky), #0000 10.5px, #000 11px),
    radial-gradient(circle 11px at 100% var(--ky), #0000 10.5px, #000 11px);
  mask-composite: intersect;
}
.ticket-kopf {
  height: var(--ky);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  background: var(--navy); color: #fff;
  border-radius: 16px 16px 0 0;
  border-bottom: 2px dotted rgba(255, 255, 255, .5);
}
.ticket-wort { font-size: 1.85rem; line-height: 1; color: var(--sand); }
.ticket-was { font-size: .93rem; line-height: 1.25; margin-top: 5px; white-space: nowrap; }

.ticket-rumpf { padding: 18px 22px 20px; }
.fortschritt { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--leise); }
.fortschritt-text { white-space: nowrap; }
.fortschritt-balken { flex: 1; height: 6px; border-radius: 3px; background: #EFE6D8; overflow: hidden; }
.fortschritt-balken i { display: block; height: 100%; width: var(--anteil, 25%); background: var(--sand-tief); border-radius: 3px; transition: width .3s ease; }

.ticket legend { font-size: 1.5rem; line-height: 1.18; padding: 0; margin: 14px 0 16px; outline: none; }
.schritt + .schritt { margin-top: 26px; }
html.js .schritt:not(.aktiv) { display: none; }
html.js .schritt + .schritt { margin-top: 0; }
html:not(.js) .fortschritt, html:not(.js) [data-weiter], html:not(.js) [data-zurueck] { display: none; }
html.js .ticket:not([data-letzter]) [data-senden], html.js .ticket[data-letzter] [data-weiter] { display: none; }

.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kacheln-liste { grid-template-columns: 1fr; }
.kachel {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 104px; padding: 14px 10px;
  border: 1.5px solid #D6C8B2; border-radius: 12px;
  font-size: 1.06rem; font-weight: 500; line-height: 1.2; text-align: center;
  cursor: pointer; background: #fff;
  transition: border-color .12s ease, background-color .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.kacheln-liste .kachel { min-height: 58px; flex-direction: row; justify-content: flex-start; text-align: left; padding: 12px 18px; }
.kachel input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kachel svg { width: 36px; height: 36px; fill: none; stroke: var(--navy); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kachel:hover { border-color: var(--navy); }
.kachel:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #F7F0E4; }
.kachel:has(input:focus-visible) { outline: 3px solid var(--sand); outline-offset: 2px; }

.feld { display: block; font-size: .95rem; font-weight: 500; color: var(--leise); }
.feld + .feld, .fehler + .feld { margin-top: 14px; }
.feld input {
  display: block; width: 100%; height: 54px; margin-top: 6px; padding: 0 14px;
  border: 1.5px solid #CFC1AB; border-radius: 10px; background: #fff;
  font: 400 1.125rem var(--sans); color: var(--navy);
}
.feld input:focus { outline: 3px solid color-mix(in srgb, var(--sand) 60%, transparent); outline-offset: 0; border-color: var(--navy); }
.feld input[aria-invalid="true"] { border-color: var(--rot); }
.freiwillig { font-weight: 400; color: #646C80; }
.freiwillig::before { content: "("; } .freiwillig::after { content: ")"; }

.haken { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-size: .92rem; line-height: 1.4; color: var(--leise); cursor: pointer; }
.haken input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--navy); }
.nicht-ausfuellen { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

.fehler { margin-top: 7px; font-size: .92rem; line-height: 1.35; color: var(--rot); font-weight: 500; }
.fehler-senden { margin-top: 16px; padding: 12px 14px; background: #FBEDEA; border-radius: 10px; }

.ticket-knoepfe { display: flex; gap: 10px; margin-top: 20px; }
.ticket-knoepfe .knopf-haupt { flex: 1; }

.ticket-fuss {
  margin: 0; padding: 12px 22px 14px;
  border-top: 1.5px dashed var(--linie);
  font-size: .86rem; line-height: 1.35; color: var(--leise); text-align: center;
}

.ticket-danke { padding: 26px 22px 24px; outline: none; }
.ticket-danke h2 { font-size: 1.9rem; margin: 16px 0 10px; }
.ticket-danke p + p { margin-top: 10px; }
.ticket-danke a { font-weight: 600; white-space: nowrap; }
.stempel {
  display: inline-block; padding: 6px 14px 5px;
  border: 2.5px solid var(--wiese); border-radius: 8px;
  color: var(--wiese); font-weight: 600; font-size: .95rem; letter-spacing: .16em; text-transform: uppercase;
  transform: rotate(-5deg); transform-origin: left center;
  animation: stempel .34s cubic-bezier(.2, .9, .3, 1.25) both;
}
@keyframes stempel { from { opacity: 0; transform: rotate(-5deg) scale(1.7); } to { opacity: 1; transform: rotate(-5deg) scale(1); } }

/* ============================ ABSCHNITTE ============================ */
.abschnitt { padding: 60px var(--rand); }
.abschnitt > * { max-width: var(--breite); margin-left: auto; margin-right: auto; }
.abschnitt p { max-width: 36em; }

/* Ablauf: echte Reihenfolge, daher nummeriert */
.ablauf { background: var(--flaeche); }
.schritte { list-style: none; counter-reset: s; margin-top: 30px; display: grid; gap: 26px; }
.schritte li { counter-increment: s; position: relative; padding-left: 58px; }
.schritte li::before {
  content: counter(s);
  position: absolute; left: 0; top: -6px;
  font: 600 2.6rem/1 var(--serif); color: var(--akzent);
}
.schritte p { margin-top: 6px; color: var(--leise); }

/* Inhalt des Gutscheins */
.inhalt { display: grid; gap: 30px; }
.inhalt > * { max-width: none; margin: 0; }
.haken-liste { list-style: none; margin: 24px 0 28px; display: grid; gap: 14px; }
.haken-liste li { position: relative; padding-left: 38px; line-height: 1.4; }
.haken-liste li::before {
  content: ""; position: absolute; left: 0; top: .12em; width: 24px; height: 24px; border-radius: 50%;
  background: var(--wiese) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 12.5 3.6 3.6 7.4-8'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.inhalt-bild { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 60% 50%; border-radius: 14px; }

/* Über Daniel */
.person { display: grid; gap: 28px; background: var(--flaeche); }
.person > * { max-width: none; margin: 0; }
.person-bild { position: relative; display: flex; justify-content: center; align-items: flex-end; margin: -20px 0 0; border-bottom: 1.5px solid var(--linie); }
.thema-b .person-bild { border-bottom: 0; }
.person-bild img { width: min(70vw, 330px); }
.thema-b .person-bild img { width: min(86vw, 420px); border-radius: 14px; }
.person-text p { margin-top: 14px; color: var(--leise); }
.person-text .unterschrift { margin-top: 20px; font: 600 1.35rem/1.2 var(--serif); color: var(--schrift); }

/* Fragen */
.fragen-liste { margin-top: 22px; max-width: 46em; border-top: 1.5px solid var(--linie); }
.fragen > * { max-width: 46em; }
details { border-bottom: 1.5px solid var(--linie); }
summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-size: 1.14rem; font-weight: 500; line-height: 1.3;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; font-size: 1.6rem; line-height: 1; font-weight: 300; color: var(--akzent); }
details[open] summary::after { content: "–"; }
details p { padding: 0 0 20px; color: var(--leise); }

/* Abschluss */
.abschluss { background: var(--navy); color: #fff; text-align: center; --schrift: #fff; --knopf: var(--sand); --knopf-text: #141C2E; }
.abschluss p { margin: 12px auto 0; color: #D5D9E3; }
.abschluss-knoepfe { display: grid; gap: 12px; margin-top: 26px; max-width: 420px; }

/* Fuß */
.fuss {
  padding: 34px var(--rand) 110px;
  display: grid; gap: 18px;
  max-width: calc(var(--breite) + 2 * var(--rand)); margin: 0 auto;
  font-size: .95rem; color: var(--leise);
}
.fuss strong { color: var(--schrift); font-weight: 600; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.fuss nav a, .fuss p a { display: inline-block; padding: 10px 0; }

/* Feste Leiste am Handy */
.leiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--grund) 94%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1.5px solid var(--linie);
}
.leiste[hidden] { display: none; }
.leiste .knopf-haupt { flex: 1; min-height: 52px; }
.leiste-anruf { min-height: 52px; width: 56px; padding: 0; }

/* ============================ THEMA B ============================ */
.thema-b .hero { margin-top: calc(-1 * var(--kopf-h)); padding-top: calc(var(--kopf-h) + 26px); }
.thema-b .kulisse {
  display: block; position: absolute; inset: 0; overflow: hidden;
  background: #0E1218 url("../assets/img/kremsmuenster-900.webp") 62% 0 / auto 62% no-repeat;
}
.thema-b .kulisse video {
  position: absolute; left: 0; top: 0; width: 100%; height: 62%; object-fit: cover; object-position: 62% 50%;
  opacity: 0; transition: opacity .8s ease;
}
.thema-b .kulisse video.laeuft { opacity: 1; }
.thema-b .kulisse::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 18, 24, .62) 0%, rgba(14, 18, 24, .5) 22%, rgba(14, 18, 24, .86) 46%, #0E1218 62%);
}
.thema-b .hero-text h1 { text-shadow: 0 1px 18px rgba(14, 18, 24, .55); }
.thema-b .hero-text .lead { color: #E6DFD3; }
.thema-b .ticket { box-shadow: none; }
.thema-b .schritte p, .thema-b .person-text p { color: var(--leise); }
.thema-b .abschluss { background: var(--flaeche); }
.thema-b .inhalt-bild { box-shadow: 0 0 0 1.5px var(--linie); }

/* Handys: Logo und Telefon-Knopf müssen nebeneinander in die Kopfzeile passen */
@media (max-width: 419px) {
  .marke svg { width: 140px; }
  .anruf { font-size: .9rem; padding: 0 12px; gap: 6px; }
}

/* Sehr schmale Handys */
@media (max-width: 359px) {
  :root { --rand: 16px; }
  .marke svg { width: 116px; }
  .anruf { font-size: .88rem; padding: 0 11px; gap: 6px; }
  .ticket-was { white-space: normal; font-size: .88rem; }
  .ticket-wort { font-size: 1.6rem; }
  .ticket-rumpf { padding-left: 16px; padding-right: 16px; }
}

/* ============================ AB TABLET / DESKTOP ============================ */
@media (min-width: 720px) {
  :root { --rand: 32px; }
  .schritte { grid-template-columns: repeat(3, 1fr); gap: 34px; }
  .schritte li { padding-left: 0; padding-top: 62px; border-top: 1.5px solid var(--linie); }
  .schritte li::before { top: 16px; }
  .abschluss-knoepfe { grid-template-columns: 1fr; margin-left: auto; margin-right: auto; }
  .fuss { grid-template-columns: 1fr auto; align-items: end; padding-bottom: 40px; }
}

@media (min-width: 960px) {
  :root { --kopf-h: 76px; }
  .marke svg { width: 184px; }
  .anruf { font-size: 1.05rem; padding: 0 18px; }
  .leiste { display: none; }

  .hero { padding: 26px var(--rand) 76px; }
  .hero-innen {
    grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr);
    grid-template-areas: "text ticket";
    column-gap: 56px; row-gap: 30px; align-items: start;
  }
  .hero-text { grid-area: text; padding-top: 12px; }
  .ticket { grid-area: ticket; }

  .abschnitt { padding: 92px var(--rand); }
  .inhalt { grid-template-columns: 1fr 1fr; align-items: center; column-gap: 64px; max-width: calc(var(--breite) + 2 * var(--rand)); margin: 0 auto; }
  .person { grid-template-columns: .8fr 1.2fr; align-items: center; column-gap: 64px; padding-left: max(var(--rand), calc((100vw - var(--breite)) / 2)); padding-right: max(var(--rand), calc((100vw - var(--breite)) / 2)); }
  .person-bild { margin: -40px 0 -92px; align-self: end; border-bottom: 0; }
  .person-bild img { width: 100%; max-width: 380px; }
  .thema-b .person-bild { margin: 0; }
  .thema-b .person-bild img { max-width: 440px; }

  .thema-b .hero { padding-top: calc(var(--kopf-h) + 54px); min-height: min(860px, 96vh); }
  .thema-b .hero-innen { grid-template-areas: "text ticket"; align-items: center; }
  .thema-b .kulisse { background-size: cover; background-position: 50% 40%; background-image: url("../assets/img/kremsmuenster-1600.webp"); }
  .thema-b .kulisse video { height: 100%; }
  .thema-b .kulisse::after {
    background:
      linear-gradient(180deg, rgba(14, 18, 24, .45) 0%, rgba(14, 18, 24, 0) 26%, rgba(14, 18, 24, 0) 62%, #0E1218 100%),
      linear-gradient(90deg, rgba(14, 18, 24, .82) 0%, rgba(14, 18, 24, .58) 46%, rgba(14, 18, 24, .34) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================ RECHTSTEXTE / DANKE ============================ */
.text-seite { max-width: 44em; margin: 0 auto; padding: 28px var(--rand) 80px; }
.text-seite h1 { font-size: clamp(1.9rem, 3vw + 1.1rem, 2.6rem); margin-bottom: 18px; }
.text-seite h2 { font-size: 1.4rem; margin: 34px 0 10px; }
.text-seite p, .text-seite ul { margin-top: 10px; color: var(--leise); }
.text-seite ul { padding-left: 1.2em; }
.text-seite .offen { background: #FFF1C9; color: #5B4400; padding: 1px 6px; border-radius: 4px; font-weight: 500; }
.entwurf { background: #FFF1C9; color: #5B4400; padding: 12px var(--rand); font-size: .95rem; text-align: center; }
