/* Agency4intelligence – Stylesheet
   Ganzflächige Videos als Hintergrund, Inhalte in hellgrauen Rahmen,
   Überschriften petrolblau als Gegenpol zu den rötlichen Bildern.
   Schrift lokal eingebunden, keine externen Dienste. */

@font-face { font-family: "Nudica Mono"; src: url("../fonts/NudicaMono-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Nudica Mono"; src: url("../fonts/NudicaMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Nudica Mono"; src: url("../fonts/NudicaMono-RegularItalic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Nudica Mono"; src: url("../fonts/NudicaMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Nudica Mono"; src: url("../fonts/NudicaMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --teal: #16507E;       /* Überschriften, Buttons (Petrolblau) */
  --teal-dark: #0F3A5C;  /* Hover */
  --orange: #E55A2D;     /* nur die 4 im Namen */
  --text: #2B201C;
  --bg: #F6F6F6;         /* Seitenhintergrund, Header */
  --frame: #ECECEC;      /* Grau 1: Rahmen */
  --foot: #34373A;       /* Grau 2: Footer */
  --foot-muted: #B8BCBF;
  --muted: #5E6062;
  --header-h: 4.5rem;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 76rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Nudica Mono", ui-monospace, Menlo, monospace; font-size: 1rem; line-height: 1.65; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
img, svg, video { display: block; max-width: 100%; }

.skip { position: absolute; left: -999px; top: 0; z-index: 30; background: var(--text); color: var(--bg); padding: .5rem 1rem; }
.skip:focus { left: 1rem; }

h1, h2, h3 { color: var(--teal); font-weight: 500; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 1rem; text-wrap: balance; }
p, ul, ol { margin: 0 0 1rem; }

.brand { font-weight: 700; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { color: var(--orange); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0 var(--pad); background: var(--bg); border-bottom: 1px solid #DCDCDC; }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.75rem; }
.site-nav a { text-decoration: none; font-size: .9rem; }
.site-nav a[aria-current="page"] { color: var(--teal); text-decoration: underline; }
.lang { display: flex; font-size: .8rem; font-weight: 500; border: 1px solid var(--text); border-radius: 999px; overflow: hidden; }
.lang > * { padding: .25rem .75rem; text-decoration: none; }
.lang .active { background: var(--text); color: var(--bg); }
.nav-toggle { display: none; }

/* ---------- Videobühne ---------- */
.stage { position: relative; min-height: calc(100svh - var(--header-h)); display: flex; align-items: flex-end; overflow: hidden; background: #6b4a35; }
.bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .8s ease; }
.stage-inner { position: relative; z-index: 2; width: 100%; padding: clamp(6rem, 18vh, 12rem) var(--pad) clamp(2rem, 6vh, 4rem); }

.panel { max-width: 42rem; background: rgba(242, 242, 242, .48); -webkit-backdrop-filter: blur(22px) saturate(1.15); backdrop-filter: blur(22px) saturate(1.15); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: 6px; }
.panel h1 { font-size: clamp(1.75rem, 3.2vw, 2.55rem); }
.panel p { max-width: 36rem; }
.panel .note { font-size: .85rem; color: var(--text); margin-bottom: .75rem; }

.video-toggle { position: absolute; z-index: 3; right: var(--pad); bottom: 1.25rem; font: inherit; font-size: .75rem; color: var(--text); background: rgba(242, 242, 242, .6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 0; border-radius: 999px; padding: .4rem .9rem; cursor: pointer; }
.video-toggle:hover { background: var(--bg); }

/* Quiz: Frage 2 bekommt das Fluss-Video */
.v-step2 { opacity: 0; }
#frage-2 { display: none; }
html:not(.js) #frage-2:target { display: block; }
html:not(.js) .stage:has(#frage-2:target) #frage-1 { display: none; }
html:not(.js) .stage:has(#frage-2:target) .v-step2 { opacity: 1; }
html.js .quiz #frage-1 { display: block; }
html.js .quiz #frage-2 { display: none; }
html.js .stage.show-2 #frage-1 { display: none; }
html.js .stage.show-2 #frage-2 { display: block; }
html.js .stage .v-step2 { opacity: 0; }
html.js .stage.show-2 .v-step2 { opacity: 1; }
.panel-quiz h1 { font-size: clamp(1.9rem, 4vw, 3.2rem); }
.panel-quiz .h-q2 { font-size: clamp(1.6rem, 3.2vw, 2.6rem); }

.answers { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; }
.answer { display: inline-block; padding: .85rem 1.6rem; border: 1.5px solid var(--teal); border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--teal); background: transparent; transition: background .15s, color .15s; }
.answer:hover, .answer.primary { background: var(--teal); color: #fff; }
.answer.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.back { display: inline-block; margin-top: 1.25rem; font-size: .85rem; color: var(--text); }

/* ---------- Buttons & Formular ---------- */
.btn { display: inline-block; background: var(--teal); color: #fff; text-decoration: none; padding: .8rem 1.5rem; border-radius: 999px; font-weight: 500; font-size: .95rem; border: 1.5px solid var(--teal); }
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--teal); }
.btn.ghost:hover { background: var(--teal); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }

.lead-form { margin-top: 1.5rem; max-width: 40rem; }
.lead-form label[for] { display: block; font-size: .85rem; color: var(--text); margin-bottom: .4rem; }
.lead-form .row { display: flex; gap: .5rem; flex-wrap: wrap; }
.lead-form input[type="email"] { flex: 1 1 14rem; font: inherit; color: var(--text); background: rgba(255, 255, 255, .85); border: 1.5px solid #BDBDBD; border-radius: 999px; padding: .75rem 1.2rem; }
.lead-form input[type="email"]:focus { outline: none; border-color: var(--teal); }
.lead-form button { cursor: pointer; font-family: inherit; }
.lead-form .consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .78rem; margin-top: .9rem; line-height: 1.5; }
.lead-form .consent input { margin-top: .2rem; accent-color: var(--teal); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { display: none; color: #A3261D; font-size: .9rem; margin-top: 1rem; }
.form-error:target { display: block; }

/* ---------- Textseiten ---------- */
.page { max-width: var(--max); margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) var(--pad) clamp(3rem, 8vw, 6rem); }
.page p, .page ul { max-width: 62rem; }
.page-head h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); margin-bottom: .5rem; }
.page-head .sub { font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--muted); margin-bottom: 2rem; }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); font-weight: 300; line-height: 1.6; }
.page-body { margin-top: clamp(2.5rem, 6vw, 4rem); }
.page-body h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); max-width: 50rem; }
.page-body h3 { font-size: 1.1rem; margin-top: 2rem; }

.frame { background: var(--frame); border-radius: 6px; padding: clamp(1.5rem, 4vw, 3rem); margin-top: clamp(2.5rem, 6vw, 4rem); }
.frame h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); margin-top: 2.5rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.5rem 2.5rem; margin: 0; }
.facts dt { font-size: .85rem; color: var(--muted); }
.facts dd { margin: .2rem 0 0; font-weight: 500; }
.facts .wide { grid-column: 1 / -1; }

.diagram { margin: 2rem auto 0; max-width: 60rem; }
.diagram-svg { width: 100%; height: auto; }

.legal { max-width: 56rem; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 2.5rem; }
.legal h3 { font-size: 1rem; color: var(--text); font-weight: 700; margin-top: 1.75rem; }
.legal p, .legal li { font-size: .95rem; }
.legal address { font-style: normal; margin-bottom: 1rem; }
mark { background: #FCE2D7; color: var(--text); padding: 0 .2em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--foot); color: var(--bg); padding: clamp(2.5rem, 6vw, 4rem) var(--pad) 1.5rem; font-size: .88rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; max-width: var(--max); margin: 0 auto; }
.site-footer h2 { color: var(--foot-muted); font-size: .8rem; font-weight: 400; letter-spacing: 0; margin-bottom: .6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { font-size: 1.05rem; display: inline-block; margin-bottom: .6rem; }
.site-footer p { color: var(--foot-muted); margin: 0; }
.site-footer :focus-visible { outline-color: var(--bg); }
.site-footer .copy { max-width: var(--max); margin: 2.5rem auto 0; padding-top: 1.25rem; border-top: 1px solid #4A4E52; color: var(--foot-muted); font-size: .8rem; }

/* ---------- Mobil ---------- */
@media (max-width: 52rem) {
  .nav-toggle { display: inline-flex; background: none; border: 1px solid var(--text); border-radius: 999px; color: var(--text); font: inherit; font-size: .85rem; padding: .35rem .9rem; cursor: pointer; }
  .site-nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid #DCDCDC; flex-direction: column; align-items: flex-start; padding: 1rem var(--pad) 1.5rem; gap: 1.25rem; }
  .site-nav ul { flex-direction: column; gap: .9rem; }
  .site-nav a { font-size: 1.05rem; }
  html.js .site-nav { display: none; }
  html.js .site-nav.open { display: flex; }
  html:not(.js) .nav-toggle { display: none; }

  /* Oben bleibt das Video frei sichtbar, der Rahmen sitzt unten */
  .bg-video { inset: 0 0 auto 0; height: 46svh; }
  .stage { background: var(--frame); }
  .stage-inner { padding: 46svh 0 0; }
  .panel { max-width: none; border-radius: 0; padding: 1.5rem var(--pad) 3.5rem; background: var(--frame); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .video-toggle { top: 1rem; bottom: auto; }
  .answers .answer { flex: 1 1 100%; text-align: center; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-video { transition: none; }
}

/* Rahmen-Seite je nach Motiv; Video-Schalter auf die freie Seite */
@media (min-width: 52.01rem) {
  .panel { max-width: 36rem; }
  .stage-right .stage-inner { display: flex; justify-content: flex-end; }
  .stage-right .video-toggle { right: auto; left: var(--pad); }
}

/* Rahmen weiter oben (Libelle) */
@media (min-width: 52.01rem) {
  .stage-high .stage-inner { padding-bottom: clamp(5rem, 18vh, 11rem); }
}
