/* ==========================================================================
   Arminius Medienagentur – Platzhalter
   ========================================================================== */

/* ---------- Fonts (lokal gehostet, keine Anfragen an Google; Lizenz: SIL OFL 1.1) ---------- */
@font-face { font-family: "Merriweather"; src: url("../fonts/merriweather-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Merriweather"; src: url("../fonts/merriweather-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Merriweather"; src: url("../fonts/merriweather-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --brand: #306376;
  --brand-deep: #173643;
  --brand-ink: #0f262f;
  --accent: #9fd3e0;
  --white: #ffffff;
  --white-70: rgba(255, 255, 255, .72);
  --white-15: rgba(255, 255, 255, .15);
  --white-08: rgba(255, 255, 255, .08);

  --serif: "Merriweather", "Georgia", "Times New Roman", serif;
  --sans: "Fira Sans", "Helvetica Neue", "Segoe UI", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--brand-deep);
  color: var(--white);
  font-family: var(--sans);
  font-size: clamp(15px, 1.05vw + 10px, 18px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Hintergrund-Slider ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--brand-deep);
}

.bg__slides { position: absolute; inset: -3%; transition: transform 1.2s var(--ease-out); }

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.8s var(--ease-in-out);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  transform: scale(1.04);
  will-change: transform;
}

.slide.is-active { opacity: 1; }
.slide.is-active img { animation: kenburns 9s linear forwards; }
.slide:nth-child(even).is-active img { animation-name: kenburns-alt; }

@keyframes kenburns {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.16) translate3d(-1.5%, -1%, 0); }
}
@keyframes kenburns-alt {
  from { transform: scale(1.16) translate3d(1.5%, 1%, 0); }
  to   { transform: scale(1.04) translate3d(0, 0, 0); }
}

/* Farbfläche in Markenfarbe über den Fotos */
.bg__tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(48, 99, 118, .35) 0%, transparent 60%),
    linear-gradient(115deg, rgba(23, 54, 67, .96) 0%, rgba(48, 99, 118, .86) 45%, rgba(48, 99, 118, .55) 100%);
}

/* Feine Körnung für einen filmischen Look */
.bg__grain {
  position: absolute;
  inset: -50%;
  opacity: .09;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* Großes Emblem als Wasserzeichen */
.bg__mark {
  position: absolute;
  right: -8vw;
  bottom: -6vw;
  width: min(62vw, 900px);
  color: var(--white);
  opacity: 0;
  animation: mark-in 2.4s 1s var(--ease-out) forwards;
}
@keyframes mark-in { to { opacity: .06; } }

/* ---------- Layout ---------- */
.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(env(safe-area-inset-top), clamp(20px, 4vh, 44px))
    max(env(safe-area-inset-right), var(--gutter))
    max(env(safe-area-inset-bottom), clamp(20px, 3.5vh, 40px))
    max(env(safe-area-inset-left), var(--gutter));
}

/* ---------- Header ---------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo { display: block; width: clamp(170px, 18vw, 250px); color: var(--white); }
.logo svg { display: block; width: 100%; height: auto; overflow: visible; }

.header__cta {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .6em 1.1em;
  border: 1px solid var(--white-15);
  border-radius: 999px;
  background: var(--white-08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: .85em;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background .3s, border-color .3s;
}
.header__cta:hover { background: var(--white-15); border-color: rgba(255, 255, 255, .35); }

/* ---------- Hauptbereich ---------- */
.main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1280px;
  padding: clamp(40px, 8vh, 96px) 0 clamp(32px, 6vh, 72px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75em;
  align-self: flex-start;
  margin: 0 0 clamp(18px, 3vh, 30px);
  font-size: .78em;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.eyebrow__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s var(--ease-out) infinite;
}
@keyframes pulse {
  0%   { transform: scale(1); opacity: .8; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* ---------- Headline ---------- */
.headline {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.8vw, 4.6rem);
  line-height: 1.14;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.headline__static { display: block; }

/* Alle Varianten liegen übereinander → keine Höhensprünge beim Wechsel */
.rotator {
  display: grid;
  margin-top: .08em;
}

.rotator__item {
  grid-area: 1 / 1;
  display: block;
  visibility: hidden;
}
.rotator__item.is-active,
.rotator__item.is-leaving { visibility: visible; }

.rotator__item em {
  font-style: italic;
  color: var(--accent);
}

.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  /* Platz für Unterlängen und Kursiv-Überhang */
  padding: 0 .08em .14em 0;
  margin: 0 -.08em -.14em 0;
}

.word__inner {
  display: inline-block;
  transform: translate3d(0, 110%, 0) rotate(4deg);
  transform-origin: 0 100%;
  opacity: 0;
  filter: blur(6px);
}

.rotator__item.is-active .word__inner {
  animation: word-in .9s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 70ms);
}
.rotator__item.is-leaving .word__inner {
  transform: none;
  opacity: 1;
  filter: none;
  animation: word-out .55s var(--ease-in-out) forwards;
  animation-delay: calc(var(--i) * 40ms);
}

@keyframes word-in {
  to { transform: translate3d(0, 0, 0) rotate(0); opacity: 1; filter: blur(0); }
}
@keyframes word-out {
  to { transform: translate3d(0, -105%, 0) rotate(-3deg); opacity: 0; filter: blur(6px); }
}

/* Fortschrittslinie unter der Headline */
.rotator-progress {
  position: relative;
  width: min(220px, 40vw);
  height: 2px;
  margin-top: clamp(20px, 3.4vh, 34px);
  background: var(--white-15);
  border-radius: 2px;
  overflow: hidden;
}
.rotator-progress span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.rotator-progress span.is-running { animation: progress var(--dur, 4s) linear forwards; }
@keyframes progress { to { transform: scaleX(1); } }

.lead {
  max-width: 34em;
  margin: clamp(20px, 3.4vh, 34px) 0 0;
  color: var(--white-70);
  font-size: 1.05em;
}

/* ---------- Countdown ---------- */
.countdown {
  margin-top: clamp(28px, 5vh, 52px);
}

.countdown__label {
  margin: 0 0 14px;
  font-size: .78em;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--white-70);
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 16px);
  max-width: 560px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.unit {
  position: relative;
  padding: clamp(12px, 1.8vw, 20px) 6px clamp(10px, 1.4vw, 16px);
  border: 1px solid var(--white-15);
  border-radius: clamp(10px, 1.2vw, 16px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-align: center;
  overflow: hidden;
}

/* Glanzlicht, das einmal pro Sekunde über die Sekunden-Box läuft */
.unit--sec::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .14) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shine 1s var(--ease-in-out) infinite;
}
@keyframes shine { to { transform: translateX(100%); } }

.unit__value {
  position: relative;
  display: block;
  height: 1.1em;
  overflow: hidden;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.4vw, 3.4rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
}

.unit__num {
  position: absolute;
  inset: 0;
  display: block;
}
.unit__num.is-in  { animation: num-in .6s var(--ease-out) both; }
.unit__num.is-out { animation: num-out .6s var(--ease-out) both; }
@keyframes num-in  { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes num-out { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-100%); opacity: 0; } }

.unit__label {
  display: block;
  margin-top: 4px;
  font-size: clamp(.62rem, 1vw, .78rem);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--white-70);
}

/* ---------- Kontakt-Buttons ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 5vh, 48px);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .95em 1.5em;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform .4s var(--ease-out), box-shadow .4s, color .4s;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn--primary { background: var(--white); color: var(--brand); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45); }
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform .45s var(--ease-out);
}
.btn--primary:hover::before { transform: translateY(0); }
.btn--primary:hover { color: var(--brand-ink); }

.btn--ghost { border: 1px solid rgba(255, 255, 255, .35); }
.btn--ghost:hover { background: var(--white-08); }

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 32px;
  padding-top: 22px;
  border-top: 1px solid var(--white-15);
  font-size: .85em;
  color: var(--white-70);
}

.footer address { font-style: normal; line-height: 1.6; }
.footer address strong { color: var(--white); font-weight: 500; }

.footer__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.footer__links { display: flex; gap: 20px; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .3);
  text-underline-offset: 4px;
  transition: color .3s, text-decoration-color .3s;
}
.link-btn:hover { color: var(--white); text-decoration-color: var(--accent); }

.dots { display: flex; gap: 6px; }
.dots button {
  position: relative;
  width: 28px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.dots button::before,
.dots button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
  background: var(--white-15);
}
.dots button::after { background: var(--white); transform: scaleX(0); transform-origin: 0 50%; }
.dots button.is-active::after { animation: progress var(--slide-dur, 7s) linear forwards; }

/* ---------- Intro-Animationen ---------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.is-ready .reveal { opacity: 1; transform: none; }

.logo .emblem {
  transform-box: fill-box;
  transform-origin: 50% 60%;
  transform: scale(.4) rotate(-12deg);
  opacity: 0;
  transition: transform 1.4s var(--ease-out), opacity .8s;
}
.logo .wordmark {
  transform: translateX(-12px);
  opacity: 0;
  transition: transform 1.2s .25s var(--ease-out), opacity 1s .25s;
}
.is-ready .logo .emblem,
.is-ready .logo .wordmark { transform: none; opacity: 1; }

/* ---------- Impressum / Datenschutz ---------- */
.modal {
  width: min(680px, calc(100vw - 32px));
  max-height: min(84vh, 84svh);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--brand-ink);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .6);
}
.modal::backdrop { background: rgba(15, 38, 47, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in .5s var(--ease-out); }
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }

.modal__inner { padding: clamp(24px, 5vw, 44px); }

.modal h2 {
  margin: 0 0 .8em;
  padding-right: 48px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  color: var(--brand);
}
.modal h3 { margin: 1.6em 0 .4em; font-size: 1em; font-weight: 700; color: var(--brand); }
.modal p { margin: 0 0 .9em; font-size: .95em; }
.modal a { color: var(--brand); }

.modal__close {
  position: sticky;
  top: 14px;
  float: right;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 14px 14px 0 0;
  border: 0;
  border-radius: 50%;
  background: #eef4f6;
  color: var(--brand);
  cursor: pointer;
  transition: background .3s, transform .4s var(--ease-out);
}
.modal__close:hover { background: #dcebef; transform: rotate(90deg); }
.modal__close svg { width: 18px; height: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .header__cta span { display: none; }
  .header__cta { padding: .7em; }
  .headline { font-size: clamp(1.7rem, 8vw, 2.5rem); }
  .actions .btn { flex: 1 1 100%; justify-content: center; }
  .footer { flex-direction: column; align-items: flex-start; }
  .footer__right { width: 100%; justify-content: space-between; }
  .bg__mark { width: 120vw; right: -40vw; bottom: 10vh; }
}

@media (max-height: 700px) and (min-width: 641px) {
  .main { padding: 32px 0; }
  .headline { font-size: clamp(1.8rem, 4vw, 3.6rem); }
}

/* ---------- Weniger Bewegung, wenn gewünscht ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .bg__grain, .unit--sec::before { display: none; }
}

.logo .sub { fill: currentColor; opacity: .85; }
