/* Section: Fonts (Roboto Slab, self-hosted variable font, weights 100 to 900) */
@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/roboto-slab-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/roboto-slab-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Section: Base */

/* Single source of truth for the type scale. Every typography class below
   reads these variables instead of hardcoding its own numbers.
   Sizes are fluid: clamp(min, preferred, max) grows smoothly from the mobile
   size at 375px screen width to the desktop size at 1280px, without jumps.
   Line heights are ratios, so they grow along with the font size. */
:root {
  /* Height of the fixed mobile header; also used for the hero offset and anchor jumps */
  --header-h: 70px;

  --fs-kicker: clamp(17px, 14.93px + 0.552vw, 22px);  /* same as the numbered lists (--fs-col-text) */
  --lh-kicker: 1.3;
  --fs-headline: clamp(32px, 14.18px + 4.751vw, 75px);
  --lh-headline: 1.2;
  --fs-text: clamp(17px, 9.54px + 1.989vw, 35px);
  --lh-text: 1.4;
  --fs-col-title: clamp(20px, 13.78px + 1.657vw, 35px);
  --lh-col-title: 1.3;
  --fs-col-text: clamp(17px, 14.93px + 0.552vw, 22px);
  --lh-col-text: 1.4;
  --fs-btn: clamp(16px, 12.27px + 0.994vw, 25px);
  --fs-fact-value: clamp(32px, 18.74px + 3.536vw, 64px);
  --fs-fact-label: clamp(15px, 12.93px + 0.552vw, 20px);
  --lh-fact-label: 1.3;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto Slab', serif;
}

/* Section: Layout */
section {
  padding: 100px 140px;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
}

/* .section-inner is the anchor for .lang-floating and .footer-links.fade-in */
.section-inner {
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

/* Neutral image band between color sections; keeps two colors from touching */
.divider {
  min-height: clamp(200px, 22vw, 340px);  /* grows with the screen width, so wide screens show more of the photo than a thin slice */
  background-size: cover;
  background-position: center;
  padding: 0;
}

/* Section: Fact band */
/* A divider that carries content. The color base is what makes the numbers
   readable; the photo only sits on top of it and is dimmed by ::before. If
   the image is slow or fails, nothing is lost. Uses .sky as its base tone so
   it still separates two different colors, like a plain .divider does. */
.factband {
  position: relative;
  background-color: #016d95;
  background-size: cover;
  background-position: center;
  color: #d8f2fc;
  padding: 70px 140px;
  overflow: hidden;
}
.factband::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(1, 109, 149, 0.82);
}

/* sits above ::before */
.factband-inner {
  position: relative;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.fact {
  flex: 1;
  min-width: 180px;
}
.fact-value {
  font-weight: 700;
  font-size: var(--fs-fact-value);
  line-height: 1.1;
  margin-bottom: 6px;
}
.fact-label {
  font-weight: 500;
  font-size: var(--fs-fact-label);
  line-height: var(--lh-fact-label);
  opacity: 0.8;
}

/* Section: Cover */
/* Full-height interstitial between hero and mission, following the reference:
   photo as backdrop, text in the right half. No overlay, no tint. The
   background-color only covers the case where the image never loads. */
.cover {
  background-color: #023347;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  align-items: center;
  position: relative;
  overflow: hidden;
}
/* The photo runs a second time on a layer 20% taller at top and bottom, so script.js
   can move it slowly while scrolling (parallax, like the image dividers) without
   ever showing an edge. --cover-shift is set by script.js. */
.cover::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  bottom: -20%;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  transform: translateY(var(--cover-shift, 0px));
  will-change: transform;
}
.cover .section-inner {
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}
.cover-text {
  width: 50%;
}
/* numbers stand out by weight only, never by a second color */
.cover .text strong {
  font-weight: 700;
}
/* on a photo the block has no background color to pair with, so this is the
   one place the button is white with dark text, like the reference */
.cover .btn { background: #ffffff; color: #023347; }

/* Section: Typography */
.kicker {
  font-weight: 400;         /* regular, so it does not merge with the bold headline below */
  font-size: var(--fs-kicker);
  line-height: var(--lh-kicker);
  margin: 0 0 8px 0;
}

.headline {
  font-weight: 700;
  font-size: var(--fs-headline);
  line-height: var(--lh-headline);
  margin: 0 0 30px 0;
}

/* Extra breathing room above/below the hero headline only */
.hero-headline {
  padding-top: 20px;
  margin-bottom: 80px;
}

.text {
  font-weight: 500;
  font-size: var(--fs-text);
  line-height: var(--lh-text);
  margin: 0 0 30px 0;
}

.col-title {
  font-weight: 700;
  font-size: var(--fs-col-title);
  line-height: var(--lh-col-title);
  margin: 0 0 16px 0;
}
.col-text {
  font-weight: 500;
  font-size: var(--fs-col-text);
  line-height: var(--lh-col-text);
}
.list-text {
  font-weight: 500;
  font-size: var(--fs-col-text);
  line-height: var(--lh-col-text);
  margin-bottom: 30px;
}

/* Example blocks: kicker + headline and text on the left, image on the right from the top.
   On mobile the image moves between headline and text (see media query). */
.example {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "head  image"
    "text  image";
  grid-template-rows: auto 1fr;
  column-gap: 40px;
}
.example-head  { grid-area: head; }
.example-text  { grid-area: text; }
.example-image { grid-area: image; }

/* Brand names as headlines, smaller than the other section headlines so they fit half the width */
.example-headline {
  font-size: clamp(32px, 16.07px + 4.248vw, 56px);
  line-height: 1.15;
}

/* Example images: phone mockups with transparent background, WebP (1200 x 1080) */
.example-shot {
  position: relative;  /* keeps the phone above the shapes */
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(2, 51, 71, 0.28));  /* follows the rounded phone shape */
}
/* Round badge (pin, check, star) sits as its own image on top of the phone, position set per example in page.php */
.example-image {
  position: relative;
}
/* Soft shapes behind the phone (a rounded rectangle and a circle), drawn in CSS so they take the section's color.
   Position and size per example are set in page.php. */
.example-deco {
  position: absolute;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
}
.ice .example-deco {
  background: rgba(2, 174, 234, 0.14);  /* white would vanish on the pale ice section */
}
.example-badge {
  position: absolute;
  width: 25%;
  height: auto;
  filter: drop-shadow(0 5px 12px rgba(2, 51, 71, 0.28));
}

/* Section: Buttons */
.btn {
  border: none;
  border-radius: 0;
  padding: 15px 40px;
  font-weight: 700;
  font-size: var(--fs-btn);
  line-height: 1.3;
  cursor: pointer;
  transition: 0.3s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Arrow icon slides in from width 0 on hover. This is the only hover effect:
   button colors stay the same on every section, so all buttons behave alike.
   The contact form buttons (.cf-btn) use the same arrow. */
.btn .arrow,
.cf-btn .arrow {
  display: inline-flex;
  align-items: center;
  width: 0;
  overflow: hidden;
  transition: width 0.3s ease;
  margin-left: 0;
}
.btn .arrow svg,
.cf-btn .arrow svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}
.btn:hover .arrow,
.cf-btn:hover .arrow {
  width: 26px;
  margin-left: 10px;
}

/* Section: Color classes */
/* Defined once per class: section background + text, button background + button text. Sections just switch classes, nothing else. */
.blue      { background: #02aeea; color: #04303f; }
.blue .btn { background: #04303f; color: #02aeea; }

.navy      { background: #023347; color: #d8f2fc; }
.navy .btn { background: #d8f2fc; color: #023347; }

.sky       { background: #016d95; color: #d8f2fc; }
.sky .btn  { background: #d8f2fc; color: #016d95; }

.ice       { background: #d8f2fc; color: #04303f; }
.ice .btn  { background: #04303f; color: #d8f2fc; }

/* Section: Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100px;
  margin-bottom: 24px;
}
nav .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
}
/* Logo links back to the start page of the current language */
nav .brand,
.mobile-header-brand {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}
nav .brand:hover,
.mobile-header-brand:hover {
  opacity: 0.6;
}
nav .signet {
  display: block;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  fill: currentColor;
}
nav .links {
  display: flex;
  gap: 36px;
  font-size: 22px;
  font-weight: 700;
}
nav .links a {
  color: inherit;
  cursor: pointer;
}

/* Sticky bar with a fixed background, independent of whatever section color
   is scrolled underneath it. Hidden on desktop, shown only on mobile. */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  padding: 0 24px;
  background: #02aeea;
  color: #04303f;
  box-shadow: none; /* shadow only appears once the page scrolls, see .is-scrolled */
  transition: box-shadow 0.3s ease;
  align-items: center;
  justify-content: space-between;
  z-index: 220;
}
.mobile-header.is-scrolled {
  box-shadow: 0 5px 11px rgba(0, 0, 0, 0.29);
}
.mobile-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}
.mobile-header .signet {
  display: block;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  fill: currentColor;
}

/* Sits inside .mobile-header, so its color is fixed rather than inherited
   from whichever section is currently scrolled behind it. */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: inherit; /* buttons don't inherit text color by default, so the bars were black */
  width: 28px;
  height: 20px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Dims and blurs the page behind the sliding nav panel */
.mobile-blur {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 20, 28, 0.7);
  z-index: 190;
}
.mobile-blur.open {
  display: block;
}

/* Slides in from the right, panel only covers part of the width like the reference */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}
.mobile-nav.open {
  display: block;
}

/* Left area of the overlay; clicking it closes the menu, same as the reference's .close layer */
.mobile-nav-close {
  position: absolute;
  inset: 0;
  right: 50vw;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: -100%;
  width: 50vw;
  height: 100vh;
  background: #023347;
  color: #d8f2fc;
  transition: right 0.3s ease;
}
.mobile-nav.open .mobile-nav-panel {
  right: 0;
}

/* Language list sits at the very bottom of the panel, below the main links */
.mobile-nav-lang {
  position: absolute;
  bottom: 7%;
  padding-left: 40px;
  display: flex;
  gap: 16px;
  font-size: 20px;
  font-weight: 700;
}

.mobile-nav-lang a {
  color: inherit;
}

/* Main links sit at the top of the panel, right below the fixed header */
.mobile-nav-links {
  position: absolute;
  top: 120px;
  padding-left: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mobile-nav-links a {
  color: inherit;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
}

/* Sits at the bottom-right of the hero, independent of nav, per the reference site's own layout (its language switch is not part of nav) */
.lang-floating {
  position: absolute;
  right: 0;
  bottom: 30px;
  display: flex;
  gap: 16px;
  font-size: 22px;
  font-weight: 700;
}
.lang-floating span {
  transition: opacity 0.3s ease;
  cursor: pointer;
}
.lang-floating span:last-child {
  opacity: 0.5;
}
.lang-floating span:hover {
  opacity: 1 !important;
}

/* Language switch in the hero. Sits in the normal flow at the same spot as
   the "back to top" row and borrows its layout, only larger. It deliberately
   does not use .fade-in: a language switch that appears and disappears with
   the scroll position is a trap. */
.lang-switch {
  font-size: var(--fs-btn);
}
.lang-switch span {
  cursor: default;
}

/* Section: Jump links: "Another example?" and "Back to top" */
.next-example {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: inherit;
}
.next-example svg {
  width: 18px;
  height: 18px;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  margin-top: 60px;
  font-size: 18px;
  font-weight: 700;
}
.footer-links span,
.footer-links a {
  cursor: pointer;
  color: inherit;
}

/* "Back to top" reuses the footer-links look and sits in normal flow right
   after each section's CTA button, fading in only while its own section is
   active in the viewport. Toggled by the IntersectionObserver in script.js. */
.footer-links.fade-in {
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.footer-links.fade-in.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Section: Text links */
/* One pattern for every small text link: navigation, language switch,
   "back to top", "another example" and the legal links. They always keep the
   full section color and are never dimmed. On hover they lift slightly, which
   fits the floating phones and shapes on the page. The underline only marks
   the current state: the active nav link and the current language. */
nav .links a,
.footer-links a,
.next-example,
.mobile-nav-lang a {
  text-decoration: none;
  transition: translate 0.25s ease;
}
nav .links a:hover,
.footer-links a:hover,
.next-example:hover,
.mobile-nav-lang a:hover {
  translate: 0 -3px;
}
/* .next-example also fades in via .reveal, which brings its own transition
   list; translate is added there without the reveal delay */
.anim .next-example.reveal {
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.25s ease;
  transition-delay: var(--d, 0s), var(--d, 0s), 0s;
}
/* current state, sizes in em so the line scales with each font size */
nav .links a:first-child,
.lang-switch span,
.mobile-nav-lang span {
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.35em;
}

/* Section: Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 51, 71, 0.85);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox-overlay.open {
  display: flex;
  opacity: 1;
}
.lightbox-box {
  background: #ffffff;
  color: #04303f;
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  /* the box itself never scrolls: a fixed row for the X on top, the text scrolls below it */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.lightbox-overlay.open .lightbox-box {
  transform: translateY(0);
}
/* The close button sits in its own fixed row above the scrolling text */
.lightbox-close {
  position: relative;
  flex: none;
  align-self: flex-end;
  width: 40px;
  height: 40px;
  margin: 20px 20px 0 0;
  background: #04303f;      /* same dark as the text, square like the buttons */
  color: #ffffff;
  font-size: 0;             /* hides the × character; the X is drawn below */
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.lightbox-close:hover {
  opacity: 0.8;
}
/* The X as two crossed lines, so it stays crisp and evenly thick */
.lightbox-close::before,
.lightbox-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.lightbox-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.lightbox-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Only one .lightbox-content is shown at a time; toggled by openLightbox() */
.lightbox-content {
  display: none;
}
/* Only the text scrolls; it fades out softly at the top and bottom edge instead of being cut off */
.lightbox-content.active {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 48px 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 20px, #000 calc(100% - 24px), transparent 100%);
}
.lightbox-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
}
.lightbox-content p {
  font-size: 16px;
  line-height: 1.7;
}

.lightbox-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 8px 0;
}
.lightbox-content a {
  color: inherit;
}

/* Standalone pages (legal.php for /impressum, /datenschutz etc. and error.php) share one
   layout: the signet links home on top, the content follows. They reuse the lightbox
   typography; short content (error page) sits vertically centered, long content just flows. */
.legal-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px 24px;
  background: #ffffff;
  color: #04303f;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.legal-page > a {
  color: inherit;           /* the signet link takes the text color, not the browser's link blue */
}
.legal-page .signet {
  display: block;
  width: 56px;
  height: 56px;
  fill: currentColor;
}
.legal-page > div {
  margin: auto 0;
  padding: 60px 0;
}
/* the lightbox's own padding, scroll area and fade are only needed inside the overlay */
.legal-page .lightbox-content.active {
  padding: 60px 0;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}
.legal-page .btn { background: #04303f; color: #ffffff; }
/* short headline and text break into lines of similar length instead of leaving a lone end */
.legal-page .headline,
.legal-page .text { text-wrap: balance; }

/* Section: Contact form (step by step, inside the "kontakt" lightbox) */
.cf-step {
  display: none;
}
.cf-step.active {
  display: flex;
  flex-direction: column;
  min-height: 290px;        /* height of the message step, so the box keeps its size from step to step */
}
/* the thank-you note ends the form, so the box may shrink there */
.cf-step[data-step="done"] {
  min-height: 0;
}
.lightbox-content .cf-label {
  display: block;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0 0 12px 0;
}
.cf-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  color: #04303f;
  background: #ffffff;
  border: 2px solid #04303f;
  border-radius: 0;
  box-sizing: border-box;
}
.cf-input:focus {
  outline: none;
  border-color: #02aeea;
}
.cf-input[aria-invalid="true"] {
  border-color: #c0392b;
}
.cf-textarea {
  min-height: 150px;
  resize: vertical;
}
.lightbox-content .cf-error {
  color: #c0392b;
  font-size: 15px;
  line-height: 1.5;
  min-height: 1.5em;
  margin: 8px 0 0 0;
}
.cf-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: auto;         /* buttons sit at the bottom, so "next" stays in the same spot on every step */
  padding-top: 16px;
}
.cf-btn {
  min-height: 44px;
  padding: 10px 24px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #d8f2fc;
  background: #04303f;
  border: none;
  border-radius: 0;          /* square like every other button on the page */
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
/* keyboard focus stays visible; hover only moves the arrow, see .btn .arrow */
.cf-btn:focus-visible {
  outline: 3px solid #02aeea;
  outline-offset: 2px;
}
.cf-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.cf-link {
  min-height: 44px;
  padding: 10px 0;
  font: inherit;
  font-size: 16px;
  color: #04303f;
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
}
.cf-review {
  margin: 0 0 16px 0;
}
.cf-review dt {
  font-weight: 700;
  font-size: 14px;
  margin-top: 12px;
}
.cf-review dd {
  margin: 4px 0 0 0;
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.lightbox-content .cf-note {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.lightbox-content .cf-note a,
.lightbox-content .cf-direct a {
  color: inherit;
}
.lightbox-content .cf-direct {
  font-size: 14px;
  margin: 32px 0 0 0;
}
/* Honeypot field stays off screen */
.cf-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Section: Animations (classes are added by script.js, only when reduced motion is not requested) */
.anim .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.anim .reveal.is-in {
  opacity: 1;
  transform: none;
}
/* start state is set without animation (see script.js) */
.anim-init .reveal,
.anim-init .hero-headline .w > span {
  transition: none !important;
}
/* the phone mockups travel a little further and settle softly */
.anim .example-shot.reveal {
  transform: translateY(48px) scale(0.98);
  transition-duration: 0.9s, 1.1s;
}
.anim .example-shot.reveal.is-in {
  transform: none;
}

/* Badge pops in after the phone has landed */
.anim .example-badge.reveal {
  transform: scale(0.4);
  transition-duration: 0.4s, 0.6s;
  transition-timing-function: ease, cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--d, 0s) + 0.6s);
}
.anim .example-badge.reveal.is-in {
  transform: none;
}

/* Afterwards phone and badge float gently, slightly out of step, which gives depth.
   Uses the separate "translate" property so it does not clash with the reveal transform. */
@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}
/* Background shapes drift slowly in their own directions, much calmer than the phone */
@keyframes drift-a {
  0%, 100% { translate: 0 0; }
  50%      { translate: 14px -10px; }
}
@keyframes drift-b {
  0%, 100% { translate: 0 0; }
  50%      { translate: -12px 12px; }
}
.anim .example-deco {
  animation: drift-a 12s ease-in-out infinite;
}
.anim .example-deco + .example-deco {
  animation: drift-b 14s ease-in-out -3s infinite;
}
/* the phone's shadow plays along: higher up it gets softer and lighter */
@keyframes float-shadow {
  0%, 100% { translate: 0 0;     filter: drop-shadow(0 10px 28px rgba(2, 51, 71, 0.28)); }
  50%      { translate: 0 -10px; filter: drop-shadow(0 20px 36px rgba(2, 51, 71, 0.18)); }
}
.anim .example-shot {
  animation: float-shadow 6s ease-in-out infinite;
}
.anim .example-badge {
  animation: float 4.5s ease-in-out -1.5s infinite;
}

/* Hero headline: each word slides up out of an invisible line */
.anim .hero-headline .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em; /* keeps descenders like g and p visible */
}
.anim .hero-headline .w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i) * 0.12s);
}
.anim .hero-headline.is-in .w > span {
  transform: none;
}

/* Section: Responsive: tablet (up to 1024px) */
@media (max-width: 1024px) {

  section {
  padding: 70px 60px;
  }

  .factband {
  padding: 50px 60px;
  }

  .cover-text {
  width: 62%;
  }

  .hero-headline {
  padding-top: 50px;
  margin-bottom: 50px;
  }

  .btn {
  padding: 13px 28px;
  }

  nav .links {
  gap: 22px;
  font-size: 18px;
  }
  nav .brand {
  font-size: 18px;
  }
  nav .signet {
  width: 46px;
  height: 46px;
  }
  .lang-floating {
  font-size: 18px;
  bottom: 24px;
  }
}

/* Section: Responsive: mobile (up to 640px) */
@media (max-width: 640px) {
  /* let content define section height once everything stacks */
  section {
  padding: 50px 24px;
  min-height: 0;
  }

  /* Extra space so the fixed mobile header never overlaps the hero */
  #start {
  padding-top: calc(var(--header-h) + 24px);
  }

  /* Kontakt is the last section; give the footer row real breathing room
   at the very bottom of the page instead of the default 50px */
  #kontakt {
  padding-bottom: 90px;
  }

  /* release the anchor for lang-floating / fade-in */
  .section-inner {
  position: static;
  }


  /* Four facts side by side would shrink to nothing; two per row instead */
  .factband {
  padding: 40px 24px;
  }
  .factband-inner {
  gap: 28px 20px;
  }
  .fact {
  flex: 0 0 calc(50% - 10px);
  min-width: 0;
  }

  /* half-width text over a photo is unreadable on a phone */
  .cover {
  padding: 90px 24px;
  }
  .cover .section-inner {
  display: block;
  }
  .cover-text {
  width: 100%;
  }

  .mobile-header {
  display: flex;
  }
  /* Anchor jumps stop below the fixed header instead of behind it */
  html {
  scroll-padding-top: var(--header-h);
  }
  .hamburger {
  display: flex;
  }

  /* The sticky mobile header fully replaces the in-section nav on mobile */
  nav {
  display: none;
  }

  /* Now live inside the hamburger overlay instead */
  .lang-floating,
  .lang-switch {
  display: none;
  }

  .headline {
  margin-bottom: 20px;
  }
  .hero-headline {
  padding-top: 20px;
  margin-bottom: 30px;
  }
  .text {
  margin-bottom: 20px;
  }

  .btn {
  padding: 10px 28px;
  width: 100%;
  justify-content: center;
  }
  /* the hover reveal makes no sense on touch devices */
  .btn .arrow,
  .cf-btn .arrow {
  display: none;
  }

  /* Multi-column rows (Method tiles) stack on small screens */
  section > .section-inner > div[style*="display:flex"] {
  flex-direction: column;
  }

  /* Example blocks stack: headline, image, text */
  .example {
  grid-template-columns: 1fr;
  grid-template-areas:
    "head"
    "image"
    "text";
  grid-template-rows: auto;
  }
  .example-image {
  margin-bottom: 24px;
  }

  .footer-links {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
  font-size: 16px;
  }
  .next-example {
  font-size: 16px;
  }

  .lightbox-content.active {
  padding: 20px 28px 28px 28px;
  }
  .lightbox-content h2 {
  font-size: 24px;
  }
}
/* Section: Print
   Browsers leave out background colors when printing, so the light text on the colored
   sections would print white on white. For paper: dark text on white, no navigation,
   no photo strips, and every animated element in its final, visible state. */
@media print {
  *,
  *::before,
  *::after {
  background: transparent !important;
  color: #000000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  }
  .mobile-header,
  .mobile-blur,
  .mobile-nav,
  nav .links,
  .divider,
  .btn,
  .next-example,
  .footer-links,
  .example-deco,
  .lightbox-overlay {
  display: none !important;
  }
  section {
  min-height: 0 !important;
  padding: 24px 0 !important;
  }
  .reveal,
  .hero-headline .w > span {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  }
  .example {
  break-inside: avoid;
  }
}