/* ==========================================================================
   Arvenna main stylesheet
   Swiss grid, restrained colour, big type, real photography.
   One accent: "signal", the deep Swiss red. Demos carry their own embedded CSS.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
  --ink: #101418;
  --ink-soft: #2A3038;
  --muted: #565C64;
  --paper: #FAFAF7;
  --surface: #FFFFFF;
  --surface-alt: #F2F1EC;
  --line: #E2E0D9;
  --line-strong: #C4C1B7;

  /* Signal red, the default */
  --accent: #B3122F;
  --accent-dark: #8E0E25;
  --accent-wash: #FBF0F2;
  --accent-rgb: 179, 18, 47;

  --font: "Instrument Sans", "Inter", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --step-hero: clamp(2.75rem, 1.2rem + 6.4vw, 6.5rem);
  --step-h2: clamp(1.9rem, 1.25rem + 2.7vw, 3.5rem);
  --step-h3: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
  --step-lead: clamp(1.0625rem, 0.99rem + 0.5vw, 1.375rem);
  --step-body: 1.0625rem;
  --step-small: 0.9375rem;
  --step-micro: 0.8125rem;

  --gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  --section-y: clamp(4.5rem, 3rem + 8vw, 10rem);
  --radius: 4px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(16, 20, 24, 0.05);
  --shadow-md: 0 14px 36px -14px rgba(16, 20, 24, 0.18);
  --shadow-lg: 0 30px 70px -26px rgba(16, 20, 24, 0.32);
  --shadow-xl: 0 50px 110px -40px rgba(16, 20, 24, 0.45);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, iframe { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  line-height: 1.06;
  letter-spacing: -0.028em;
  font-weight: 700;
  text-wrap: balance;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: #fff; }

/* --- Layout ------------------------------------------------------------- */

.wrap { width: min(100% - 2.5rem, 1240px); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 900px); margin-inline: auto; }

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--surface-alt); }
.section--dark { background: var(--ink); color: #EDEEF0; }
.section--dark .lead, .section--dark .muted { color: #A9B0B8; }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }

.section-head { max-width: 48rem; margin-bottom: clamp(2.5rem, 2rem + 2.5vw, 4.5rem); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step-micro);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.eyebrow::before {
  content: "";
  width: 1.9rem;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
}

.section-head--center .eyebrow::before { display: none; }
.section--dark .eyebrow { color: #fff; }
.section--dark .eyebrow::before { background: var(--accent); }

h2.section-title { font-size: var(--step-h2); margin-bottom: 1.2rem; }

.lead {
  font-size: var(--step-lead);
  color: var(--muted);
  line-height: 1.5;
  max-width: 44rem;
  text-wrap: pretty;
}

.section-head--center .lead { margin-inline: auto; }

/* --- Photography -------------------------------------------------------- */

/* Wrapper carries the blurred placeholder inline as a background-image.
   The real photo fades in on top once decoded. */
.ph {
  position: relative;
  overflow: hidden;
  background: var(--surface-alt) center / cover no-repeat;
  isolation: isolate;
}

.ph > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Only hide the photo when JS can bring it back. */
.js .ph > img { opacity: 0; transition: opacity 0.9s var(--ease-out); }
.js .ph > img.is-loaded { opacity: 1; }

/* Scrim layers, so text over photography stays readable.
   Alpha values are not cosmetic. Worst case is a pure white photo pixel: at
   alpha 0.44 white text clears 3:1 (large text), at 0.57 it clears 4.5:1 (body).
   Headline copy starts around 14% down on mobile, so the gradient has to be
   dark from near the top, not only at the bottom. */
.ph--scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(16, 20, 24, 0.50) 0%, rgba(16, 20, 24, 0.66) 45%, rgba(16, 20, 24, 0.90) 100%);
}

.ph--scrim-soft::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(16, 20, 24, 0) 40%, rgba(16, 20, 24, 0.65) 100%);
}

/* Accent wash tying photography to the active theme */
.ph--wash::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(var(--accent-rgb), 0.16);
  mix-blend-mode: multiply;
}

.ph--kb > img { animation: kenburns 26s var(--ease) infinite alternate; }

@keyframes kenburns {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(0, -2%, 0); }
}

/* Photo that scales inside a fixed frame on hover */
.ph--zoom > img { transition: transform 0.9s var(--ease-out); }
.ph--zoom:hover > img, a:hover .ph--zoom > img { transform: scale(1.055); }

.figure-note {
  font-size: var(--step-micro);
  color: var(--muted);
  margin-top: 0.6rem;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--step-small);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease),
    color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.3s var(--ease);
}

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 12px 28px -10px rgba(var(--accent-rgb), 0.6); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); transform: translateY(-2px); }

.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--ink-soft); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn--onphoto { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.5); backdrop-filter: blur(6px); }
.btn--onphoto:hover { background: #fff; color: var(--ink); border-color: #fff; transform: translateY(-2px); }

.btn--wide { width: 100%; }
.btn--lg { padding: 1.15rem 2.1rem; font-size: 1rem; }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: var(--step-small);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

.link-arrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.link-arrow:hover::after { transform: scaleX(1); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 250, 247, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 4.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.035em;
}

.brand svg { width: 30px; height: 30px; flex: none; }
.brand .mark-bg { fill: var(--accent); transition: fill 0.4s var(--ease); }

.nav { display: none; }
.nav ul { display: flex; align-items: center; gap: clamp(1rem, 0.3rem + 1.2vw, 1.9rem); }

.nav a {
  text-decoration: none;
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding-block: 0.4rem;
  transition: color 0.2s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 0.85rem; }

/* Four language codes plus separators crowd the header on a phone, so the
   switch moves into the mobile menu below 620px. */
.lang-switch { display: none; align-items: center; gap: 0.28rem; font-size: var(--step-micro); font-weight: 600; }
.lang-switch a { text-decoration: none; color: var(--muted); padding: 0.15rem 0.1rem; transition: color 0.2s var(--ease); }
.lang-switch a:hover, .lang-switch [aria-current="true"] { color: var(--ink); }
.lang-switch [aria-current="true"] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.lang-switch .sep { color: var(--line-strong); }

@media (min-width: 620px) { .lang-switch { display: flex; } }

/* Language row inside the mobile menu */
.mobile-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.mobile-lang a {
  display: inline-flex;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--step-small);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
}

.mobile-lang a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

@media (min-width: 620px) { .mobile-lang { display: none; } }

.header-cta { display: none; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span { display: block; height: 1.5px; background: var(--ink); transition: transform 0.35s var(--ease), opacity 0.2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--paper); padding-block: 1rem 2rem; }
.mobile-nav.is-open { display: block; }

.mobile-nav a {
  display: block;
  padding: 0.9rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.mobile-nav .btn { margin-top: 1.5rem; }

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(94vh, 900px);
  display: flex;
  align-items: flex-end;
  padding-block: clamp(5rem, 4rem + 8vw, 9rem) clamp(3rem, 2rem + 4vw, 5rem);
  overflow: hidden;
  color: #fff;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg .ph { width: 100%; height: 100%; }

/* Faint Swiss grid over the photo, structure you feel more than see */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 104px 104px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 0%, transparent 75%);
}

.hero .wrap { position: relative; z-index: 4; width: min(100% - 2.5rem, 1240px); }
.hero-content { max-width: 56rem; }

.hero h1 { font-size: var(--step-hero); letter-spacing: -0.045em; margin-bottom: 1.75rem; color: #fff; }

/* Underline that sweeps in under the key phrase. Painted as a background so it
   follows the text across line breaks; nowrap would clip the headline at 320px. */
.hero h1 .accent {
  color: #fff;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 0.09em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: sweep 1.1s var(--ease-out) 0.65s forwards;
}

@keyframes sweep { to { background-size: 100% 0.09em; } }

.hero-lead {
  font-size: var(--step-lead);
  color: rgba(255, 255, 255, 0.92);
  max-width: 40rem;
  margin-bottom: 2.5rem;
  text-wrap: pretty;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.75rem; }

.hero-proof { display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem; }

.hero-proof li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step-small);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

.hero-proof svg { width: 18px; height: 18px; flex: none; color: #fff; }

.hero-scroll {
  position: absolute;
  bottom: 1.75rem;
  right: max(1.25rem, calc((100vw - 1240px) / 2));
  z-index: 4;
  display: none;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.hero-scroll i { display: block; width: 1px; height: 40px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), transparent); }

/* Entry animation for the hero block */
.js .hero-anim { opacity: 0; transform: translateY(26px); animation: heroIn 1s var(--ease-out) forwards; }
.js .hero-anim:nth-child(1) { animation-delay: 0.1s; }
.js .hero-anim:nth-child(2) { animation-delay: 0.22s; }
.js .hero-anim:nth-child(3) { animation-delay: 0.34s; }
.js .hero-anim:nth-child(4) { animation-delay: 0.46s; }

@keyframes heroIn { to { opacity: 1; transform: none; } }

/* --- Trust bar ---------------------------------------------------------- */

.trust { border-bottom: 1px solid var(--line); background: var(--surface); }
.trust ul { display: grid; grid-template-columns: repeat(2, 1fr); }

.trust li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.6rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.trust li:nth-child(odd) { border-right: 1px solid var(--line); }
.trust li:nth-child(n + 3) { border-bottom: 0; }
.trust svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 2px; }
.trust strong { display: block; font-size: var(--step-small); font-weight: 600; }
.trust span { display: block; font-size: var(--step-micro); color: var(--muted); line-height: 1.45; }

/* --- Cards -------------------------------------------------------------- */

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

.grid > *, .plans > *, .team-grid > *, .footer-grid > *, .field-row > *,
.contact-grid > *, .split > *,
/* Grid children default to min-width:auto. A single long unbreakable word
   (German compounds, French words joined by U+2019) can then blow the track
   wider than its share and push the page sideways. */
.trust ul > *, .demo-thumbs > *, .steps > * { min-width: 0; }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 1.2rem + 1.2vw, 2.35rem);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

/* Accent hairline that draws across the top on hover */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent-wash);
  color: var(--accent);
  margin-bottom: 1.5rem;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.card:hover .card-icon { background: var(--accent); color: #fff; }
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: var(--step-h3); margin-bottom: 0.7rem; }
.card p { color: var(--muted); font-size: var(--step-small); text-wrap: pretty; }

.card-list { margin-top: 1.2rem; display: grid; gap: 0.5rem; }
.card-list li { position: relative; padding-left: 1.2rem; font-size: var(--step-small); color: var(--muted); }
.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Split photo sections ----------------------------------------------- */

.split { display: grid; gap: clamp(2rem, 1.5rem + 3vw, 4rem); align-items: center; }
.split .ph { border-radius: var(--radius-lg); aspect-ratio: 4 / 5; }
.split--wide .ph { aspect-ratio: 3 / 2; }

/* --- Branch selector and live demo preview ------------------------------ */

.branch-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.25rem;
}

.branch-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.branch-chip svg { width: 17px; height: 17px; color: var(--accent); transition: color 0.25s var(--ease); }
.branch-chip:hover { transform: translateY(-2px); border-color: var(--ink); }
.branch-chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.branch-chip[aria-selected="true"] svg { color: #fff; }
.branch-chip--ghost { border-style: dashed; color: var(--muted); }

.stage-wrap { display: grid; gap: 1.5rem; }

.stage {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.stage-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}

.stage-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex: none; }

.stage-url {
  margin-left: 0.6rem;
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: var(--step-micro);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-viewport {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-alt);
}

/* The iframe renders the real demo at desktop width, then scales down.
   pointer-events are off so the page still scrolls over it. */
.stage-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 900px;
  border: 0;
  transform-origin: top left;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

.stage-frame.is-ready { opacity: 1; }

.stage-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: var(--step-small);
}

.stage-loading.is-hidden { display: none; }

.stage-spin {
  width: 26px;
  height: 26px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Invisible overlay so the whole preview is one big click target */
.stage-hit {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  text-decoration: none;
  background: rgba(16, 20, 24, 0);
  transition: background-color 0.35s var(--ease);
}

.stage-hit span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: var(--step-small);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.stage-hit:hover { background: rgba(16, 20, 24, 0.35); }
.stage-hit:hover span, .stage-hit:focus-visible span { opacity: 1; transform: none; }

.stage-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem 1.25rem; }
.stage-meta h3 { font-size: var(--step-h3); }
.stage-meta .branch-label { font-size: var(--step-micro); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.stage-meta p { font-size: var(--step-small); color: var(--muted); flex: 1 1 20rem; }

.demo-thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 0.5rem; }

/* Phones: two columns make each preview about 160px wide, which reads as a
   stamp rather than a website. One swipeable row shows one demo at a time. */
@media (max-width: 619px) {
  .stage-viewport { aspect-ratio: 4 / 5; }

  .demo-thumbs {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1.25rem;
    -webkit-overflow-scrolling: touch;
    /* Let the row bleed to both screen edges so it reads as scrollable. */
    margin-inline: calc(1.25rem * -1);
    padding-inline: 1.25rem;
    padding-bottom: 0.4rem;
  }

  .demo-thumb {
    flex: 0 0 78%;
    scroll-snap-align: center;
  }

  .demo-thumb:hover { transform: none; }
}

.demo-thumb {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: none;
  padding: 0;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.demo-thumb .ph { position: absolute; inset: 0; }
.demo-thumb figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 0.5rem 0.6rem;
  font-size: var(--step-micro);
  font-weight: 600;
  color: #fff;
  text-align: left;
  /* Must stay above 0.57 alpha across the whole text run, otherwise white
     caption text drops under 4.5:1 over a bright photo. */
  background: linear-gradient(to top, rgba(16, 20, 24, 0.94) 0%, rgba(16, 20, 24, 0.80) 70%, rgba(16, 20, 24, 0.42) 100%);
}

.demo-thumb:hover { transform: translateY(-3px); border-color: var(--ink); }
.demo-thumb[aria-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.35); }

/* Belegtes Ergebnis aus einem Projekt. */
.proof-note {
  margin-top: 2.5rem;
  padding: 1.25rem 1.4rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--step-small);
  color: var(--muted);
  max-width: 56rem;
}

.proof-note strong { color: var(--ink); }

/* --- Prozess ------------------------------------------------------------ */

.steps { display: grid; counter-reset: step; position: relative; }

.step {
  display: grid;
  gap: 0.5rem 1.75rem;
  grid-template-columns: auto 1fr;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  position: relative;
}

.step:last-child { border-bottom: 1px solid var(--line); }

.step-num {
  counter-increment: step;
  font-size: var(--step-micro);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding-top: 0.4rem;
  min-width: 2.5rem;
}

.step-num::before { content: "0" counter(step); }
.step h3 { font-size: var(--step-h3); margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: var(--step-small); max-width: 42rem; }

.step-time {
  grid-column: 2;
  font-size: var(--step-micro);
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  justify-self: start;
  margin-top: 0.65rem;
}

/* --- Preise ------------------------------------------------------------- */

.price-anchor {
  max-width: 46rem;
  margin: 0 auto clamp(2.5rem, 2rem + 2vw, 3.5rem);
  padding: 1.15rem 1.4rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  font-size: var(--step-small);
  color: var(--muted);
}

.price-anchor strong { color: var(--ink); font-weight: 600; }

.plans { display: grid; gap: var(--gap); align-items: start; }

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 1.3rem + 1.4vw, 2.4rem);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.plan--featured {
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
}

.plan-badge {
  position: absolute;
  top: -0.8rem;
  left: clamp(1.75rem, 1.3rem + 1.4vw, 2.4rem);
  background: var(--accent);
  color: #fff;
  font-size: var(--step-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
}

.plan-name { font-size: var(--step-micro); font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.plan-price { display: flex; align-items: baseline; gap: 0.4rem; font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.plan-price .cur { font-size: 0.46em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan-monthly { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--line); font-size: var(--step-small); color: var(--muted); }
.plan-monthly strong { color: var(--ink); font-weight: 600; }
.plan-perday { display: block; margin-top: 0.3rem; font-size: var(--step-micro); color: var(--muted); }
.plan-desc { margin: 1.15rem 0 1.5rem; font-size: var(--step-small); color: var(--muted); min-height: 3rem; }
.plan-features { display: grid; gap: 0.65rem; margin-bottom: 2rem; }
.plan-features li { display: grid; grid-template-columns: 18px 1fr; gap: 0.65rem; font-size: var(--step-small); line-height: 1.5; }
.plan-features svg { width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.plan-features .muted { color: var(--muted); }
.plan .btn { margin-top: auto; }

.price-note { margin-top: 2.5rem; display: grid; gap: 0.65rem; font-size: var(--step-small); color: var(--muted); max-width: 56rem; margin-inline: auto; text-align: center; }
.price-note strong { color: var(--ink); font-weight: 600; }

/* --- Team --------------------------------------------------------------- */

.team-grid { display: grid; gap: var(--gap); }
.member { display: grid; grid-template-columns: auto 1fr; gap: 1.35rem; align-items: start; }

.avatar {
  width: 78px;
  height: 78px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  overflow: hidden;
}

.avatar svg { width: 78px; height: 78px; }

/* An avatar slot can hold a real portrait instead of the drawn mark. */
.avatar > .ph { width: 100%; height: 100%; border-radius: 50%; background-size: cover; }
.member h3 { font-size: var(--step-h3); margin-bottom: 0.2rem; }
.member-role { font-size: var(--step-micro); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.7rem; }
.member p { font-size: var(--step-small); color: var(--muted); }

/* --- FAQ ---------------------------------------------------------------- */

.faq { max-width: 54rem; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.6rem 0;
  background: none;
  border: 0;
  text-align: left;
  font-size: var(--step-h3);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  cursor: pointer;
  color: var(--ink);
  transition: color 0.25s var(--ease);
}

.faq-q:hover { color: var(--accent); }
.faq-icon { position: relative; width: 20px; height: 20px; flex: none; color: var(--accent); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: currentColor; transition: transform 0.35s var(--ease), opacity 0.3s var(--ease); }
.faq-icon::before { left: 0; top: 9px; width: 20px; height: 1.5px; }
.faq-icon::after { left: 9px; top: 0; width: 1.5px; height: 20px; }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: rotate(90deg); opacity: 0; }

.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.faq-a > div { overflow: hidden; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a p { color: var(--muted); font-size: var(--step-small); padding-bottom: 1.7rem; max-width: 48rem; text-wrap: pretty; }

/* --- Kontakt ------------------------------------------------------------ */

.contact-grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 4rem); }
.contact-aside p { color: var(--muted); margin-bottom: 2rem; text-wrap: pretty; }

/* Named contact person. A real face next to the form is the strongest trust
   signal on the page, so it sits above the fold of the contact block. */
.contact-person {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  margin-bottom: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.contact-person .ph {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  flex: none;
  border: 1px solid var(--line);
}

.contact-person p { margin: 0; }
.contact-person .cp-name { font-size: var(--step-h3); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; }

.contact-person .cp-role {
  font-size: var(--step-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0.2rem 0 0.45rem;
}

.contact-person .cp-line { font-size: var(--step-small); color: var(--muted); line-height: 1.45; }
.contact-points { display: grid; gap: 1.4rem; }
.contact-point { display: grid; grid-template-columns: 22px 1fr; gap: 0.9rem; }
.contact-point svg { width: 22px; height: 22px; color: var(--accent); margin-top: 3px; }
.contact-point strong { display: block; font-size: var(--step-small); font-weight: 600; }
.contact-point span, .contact-point a { font-size: var(--step-small); color: var(--muted); }
.contact-point a { text-decoration: none; }
.contact-point a:hover { color: var(--accent); text-decoration: underline; }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); }
.field { margin-bottom: 1.25rem; }
.field-row { display: grid; gap: 1.25rem; }
.field label { display: block; font-size: var(--step-small); font-weight: 600; margin-bottom: 0.45rem; }
.field .req { color: var(--accent); }
.field .muted { color: var(--muted); font-weight: 400; }

.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: var(--step-small);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14);
}

.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--accent); }
.field-error { display: none; margin-top: 0.35rem; font-size: var(--step-micro); font-weight: 500; color: var(--accent-dark); }
.field-error.is-visible { display: block; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.form-foot p { font-size: var(--step-micro); color: var(--muted); flex: 1 1 14rem; }

.form-status { display: none; margin-top: 1.25rem; padding: 0.95rem 1.1rem; border-radius: var(--radius); font-size: var(--step-small); font-weight: 500; }
.form-status.is-visible { display: block; }
.form-status.is-ok { background: #EDF6EF; color: #1E5B2E; border: 1px solid #BFE0C7; }
.form-status.is-err { background: var(--accent-wash); color: var(--accent-dark); border: 1px solid rgba(var(--accent-rgb), 0.28); }

/* --- CTA band ----------------------------------------------------------- */

.cta-band { position: relative; overflow: hidden; color: #fff; }
.cta-band .ph { position: absolute; inset: 0; z-index: 0; }
.cta-band .wrap { position: relative; z-index: 3; text-align: center; padding-block: clamp(4rem, 3rem + 6vw, 7rem); }
.cta-band h2 { font-size: var(--step-h2); color: #fff; margin-bottom: 1.1rem; }
.cta-band p { font-size: var(--step-lead); color: rgba(255, 255, 255, 0.9); max-width: 40rem; margin: 0 auto 2.25rem; }

/* --- Footer ------------------------------------------------------------- */

.site-footer { background: var(--ink); color: #B4BAC2; padding-block: clamp(3.5rem, 2.5rem + 4vw, 5.5rem) 2.5rem; }
.site-footer a { color: #B4BAC2; text-decoration: none; transition: color 0.2s var(--ease); }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }

.footer-grid { display: grid; gap: 2.5rem; margin-bottom: 3rem; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.7rem; color: #fff; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.035em; }
.footer-brand svg { width: 30px; height: 30px; }
.footer-about { margin-top: 1.1rem; font-size: var(--step-small); max-width: 26rem; line-height: 1.6; }
.footer-col h4 { font-size: var(--step-micro); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem; }
.footer-col ul { display: grid; gap: 0.65rem; font-size: var(--step-small); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: var(--step-micro); }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.5rem; }

/* --- Legal pages -------------------------------------------------------- */

.page-head { padding-block: clamp(3rem, 2rem + 4vw, 5rem) clamp(2rem, 1.5rem + 2vw, 3rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--step-h2); }
.prose { max-width: 46rem; padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.prose h2 { font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.7rem); margin: 2.75rem 0 0.9rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-h3); margin: 1.75rem 0 0.6rem; }
.prose p, .prose li { color: var(--ink-soft); font-size: var(--step-small); line-height: 1.7; }
.prose p { margin-bottom: 1rem; }
.prose ul { display: grid; gap: 0.5rem; margin-bottom: 1.25rem; }
.prose ul li { position: relative; padding-left: 1.2rem; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.prose a { color: var(--accent); }
.prose .todo { background: #FFF8E1; border: 1px dashed #D9B44A; border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-bottom: 1.25rem; font-size: var(--step-micro); color: #6B5310; }

/* --- Reveal and motion -------------------------------------------------- */

/* Scoped to .js so a blocked main.js leaves everything visible. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Children arrive in sequence, --i set by JS */
.js .stagger > * { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.js .stagger.is-visible > * { opacity: 1; transform: none; }

/* Headline that wipes up from behind a mask */
.js .wipe { display: block; overflow: hidden; }
.js .wipe > span { display: block; transform: translateY(105%); transition: transform 0.9s var(--ease-out); }
.js .wipe.is-visible > span { transform: none; }

.parallax { will-change: transform; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: var(--step-small);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 1rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- Breakpoints -------------------------------------------------------- */

@media (min-width: 620px) {
  .demo-thumbs { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .trust ul { grid-template-columns: repeat(4, 1fr); }
  .trust li { border-bottom: 0; border-right: 1px solid var(--line); }
  .trust li:last-child { border-right: 0; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .field-row { grid-template-columns: repeat(2, 1fr); }
  .step { grid-template-columns: 5rem 1fr; }
  .split { grid-template-columns: 1fr 1fr; }
  .hero-scroll { display: flex; flex-direction: column; }
}

@media (min-width: 1080px) {
  .nav { display: block; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 0.85fr 1.15fr; }
  .stage-wrap { grid-template-columns: 1fr; }
}

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal, .js .stagger > * { opacity: 1; transform: none; }
  .js .wipe > span { transform: none; }
  .js .hero-anim { opacity: 1; transform: none; animation: none; }
  .hero h1 .accent { background-size: 100% 0.09em; animation: none; }
  .ph--kb > img { animation: none; }
  .parallax { transform: none !important; }
}
