:root {
  --color-primary: #5f3ca6;
  --color-navy: #121933;
  --color-logo: #4a356a; /* dark purple of the balloon.dev wordmark, measured from logo.png */
  --color-text: #555;
  --color-heading: #121933;
  --color-bg: #fff;
  --color-tint: #f5f4ff;
  --color-tint-2: #fef4f6;
  --color-accent: #ffc9ad;
  --color-launch: #c0263f; /* crimson of the countdown pill near lift off; white text on it 5.9:1 */
  --band-overlay: rgb(95 60 166 / 45%);
  --glass-fill: rgb(18 25 51 / 62%);
  --glass-fill-solid: rgb(18 25 51 / 92%);
  --glass-border: rgb(255 255 255 / 35%);
  --glass-blur: 28px;
  --glass-radius: 1.25rem;
  --radius-control: 1.75rem; /* buttons and the hero portrait share this value */
  --glass-shadow: 0 16px 48px rgb(18 25 51 / 35%);
  --wrap: 74rem; /* about the old site's 1190 px content width */
  --gutter: clamp(1rem, 4vw, 3rem);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

h1,
h2,
h3 {
  color: var(--color-heading);
  line-height: 1.2;
}

a {
  color: var(--color-primary);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  color: #fff;
  background: var(--color-navy);
}

.skip-link:focus {
  top: 1rem;
}

/* header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  padding: 1.15rem var(--gutter); /* about 10 % taller bar */
}

.site-header__logo img {
  display: block;
  width: min(260px, 50vw);
  height: auto;
}

.site-nav {
  margin-inline-start: auto;
}

.site-nav ul,
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav ul {
  gap: 0.25rem;
  align-items: center;
}

.site-nav a {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.9rem;
  font-weight: 500;
  color: var(--color-heading);
  text-decoration: none;
  border-radius: var(--radius-control);
  transition: background-color 150ms ease-out, color 150ms ease-out;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-primary);
  background: var(--color-tint);
}

.site-nav .nav-cta {
  margin-left: 0.5rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  color: #fff;
  background: var(--color-logo);
}

.site-nav .nav-cta svg {
  flex: none;
}

/* language switcher: three flag links, the active language is ringed */
.lang {
  display: flex;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.lang a {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  opacity: 0.55;
  transition: opacity 150ms ease-out, background-color 150ms ease-out;
}

.lang a:hover,
.lang a:focus-visible {
  background: var(--color-tint);
  opacity: 1;
}

.lang a[aria-current] {
  opacity: 1;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--color-primary);
}

.flag {
  width: 22px;
  height: 22px;
  clip-path: circle(50%);
}

@media (width < 63rem) {
  /* below 1008 px the desktop row does not fit in every language (German needs 1000 px; the flags would wrap under the logo): logo and language
     switcher share the first row, the menu takes its own row (owner request 2026-09-17) */
  .site-header {
    gap: 0.75rem 1rem;
    justify-content: space-between;
  }

  .lang {
    order: 2;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-inline-start: 0;
  }

  .site-nav ul {
    justify-content: center;
  }

  .site-header__logo img {
    width: min(180px, 46vw); /* leaves room for four flags on the same row */
  }

  .lang a {
    width: 2rem;
    height: 2rem;
  }

  .flag {
    width: 20px;
    height: 20px;
  }
}

/* bands with decorative background video */
.band {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: 3rem var(--gutter);
  color: #fff;
}

/* scroll-driven grow-in: the band starts as an inset card and fills the width as it enters */
@keyframes band-grow {
  from {
    clip-path: inset(4% 4% round var(--glass-radius));
  }

  to {
    clip-path: inset(0 round 0);
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .band--grow {
      animation: band-grow linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
  }
}

.band__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--color-navy);
}

.band__media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--band-overlay);
}

.band__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band__content {
  position: relative;
  max-width: 42rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

.band__content h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-accent);
}

/* hero: one glass card with the portrait on the left and the text on the right */
.hero {
  min-height: 80vh;
  border-top: 3px solid var(--color-logo); /* wordmark purple, same as the footer */
}

/* soft fade from the video into the white profile section */
.hero .band__media::before {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 6rem;
  content: "";
  background: linear-gradient(to bottom, rgb(255 255 255 / 0%), rgb(255 255 255 / 90%));
}

.hero__card {
  --glass-blur: 21.25px; /* hero card: was 25 px; owner decision 2026-09-17: 15 % less blur (below the 24 px minimum of the glass guideline) */
  --glass-fill: rgb(18 25 51 / 62%); /* was 56 %; owner decision 2026-09-17: 10 % less transparent (56 x 1.1 = 61.6) */

  display: grid;
  gap: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  align-items: center;
}

/* stage: the card and the countdown under it as the one grid item of the hero band, so the pair stays centred */
.hero__stage {
  position: relative; /* above the video layer and the fades */
  z-index: 2;
  width: 100%;
  max-width: 68rem;
}

/* on page load the hero card zooms in where it stands over 0.8 s (owner request 2026-09-21): it fades in
   during the first 40 % and grows from 85 % to full size at a steadily decreasing speed with a non-zero end
   speed (ease-out-quad), so it stops instead of creeping; skipped under reduced motion */
@keyframes zoom-in {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }

  40% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__card {
    animation: zoom-in 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  }
}

/* countdown under the hero card (owner request 2026-09-20): once the card has zoomed in, site.js shows
   5 4 3 2 1 and "Lift off", one step per second, while the pill turns from navy to red (--heat, set per step);
   "Lift off" blinks three times (0.4 s on, 0.4 s off), then the card launches out of the top and stays away
   until the view has been below the hero section (.is-parked).
   Only with JavaScript and without reduced motion; otherwise the pill takes no space and the card stays */
.hero__countdown {
  display: none;
}

.hero__count {
  grid-area: 1 / 1; /* all steps share one cell: the pill keeps the width of the longest step */
  visibility: hidden;
}

@keyframes countdown-tick {
  0% {
    opacity: 0;
    transform: scale(1.4);
  }

  25% {
    opacity: 1;
    transform: scale(1);
  }
}

/* "Lift off": 0.4 s on, 0.4 s off; step-end keeps each value until the next keyframe */
@keyframes countdown-blink {
  0% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes countdown-out {
  to {
    opacity: 0;
  }
}

/* short dip as a run-up, then an accelerating climb by the card's own height plus more than one viewport */
@keyframes lift-off {
  0% {
    transform: translateY(0);
  }

  14% {
    transform: translateY(0.5rem);
  }

  100% {
    transform: translateY(calc(-100% - 120vh));
  }
}

@media (prefers-reduced-motion: no-preference) {
  html[data-js] .hero__countdown {
    display: grid;
    width: max-content;
    min-width: 3.5rem;
    padding: 0.3rem 1.1rem;
    margin: 1rem auto 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    position: relative; /* stacking context for the red layer */
    z-index: 0;
    overflow: hidden;
    visibility: hidden; /* keeps its place from the start, so nothing shifts when the count begins */
    background: rgb(18 25 51 / 72%); /* solid navy pill, no blur: readable on the video and on the white fade */
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-control);
  }

  /* red layer between the navy fill and the text: site.js raises --heat from 0.2 at "5" to 1 at "1" */
  html[data-js] .hero__countdown::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: var(--color-launch);
    opacity: var(--heat, 0);
    transition: opacity 1s linear;
  }

  html[data-js] .hero__countdown.is-running {
    visibility: visible;
  }

  html[data-js] .hero__countdown.is-done {
    animation: countdown-out 600ms ease-in 2.4s forwards;
  }

  .hero__count.is-current {
    visibility: inherit;
    animation: countdown-tick 1s ease-out both;
  }

  .hero__count--liftoff.is-current {
    animation: countdown-blink 0.8s step-end 3; /* its end starts the launch (site.js) */
  }

  .hero__card.is-launched {
    animation: lift-off 0.9s cubic-bezier(0.6, 0, 0.9, 0.3) forwards;
  }

  /* a keyboard focus inside the launched card brings it back, so the focus is never on something out of sight */
  .hero__card.is-launched:focus-within {
    animation: none;
  }

  /* owner request 2026-09-21: once the view has been below the hero section, the card waits hidden in its
     place; site.js removes the class when the card comes into view, which starts zoom-in again */
  .hero__card.is-parked {
    opacity: 0;
    animation: none;
  }
}

.hero__text h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  color: #fff;
}

.hero__kicker {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  text-transform: uppercase;
}

.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  list-style: none;
}

.hero__points li {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--color-accent);
}

.hero__icon {
  flex: none;
  color: #fff;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0;
}

.hero__portrait {
  justify-self: center;
  width: min(100%, 8rem);
  margin: 0;
  text-align: center;
}

.hero__portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-control);
}

.hero__portrait figcaption {
  padding-top: 0.6rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

@media (width < 48rem) {
  /* portrait phones: kicker and title first, then portrait beside the stacked terms, then centred buttons */
  .hero__card {
    grid-template-columns: 1fr 1fr; /* portrait ends and terms start at the centre line */
    grid-template-areas:
      "kicker kicker"
      "title title"
      "portrait points"
      "actions actions";
    gap: 1rem 2.5rem; /* doubled column gap between the portrait and the four terms */
    align-items: center;
  }

  .hero__text {
    display: contents; /* lets kicker, title, terms and buttons take their own grid areas */
  }

  .hero__kicker {
    grid-area: kicker;
    margin: 0;
  }

  .hero__text h1 {
    grid-area: title;
    margin: 0;
  }

  .hero__portrait {
    grid-area: portrait;
    justify-self: end;
    width: 8rem;
    margin-top: 0.25rem; /* measured: makes the title-to-portrait gap 27 px, like kicker-to-title */
  }

  .hero__portrait figcaption {
    display: none; /* name and role are dropped on portrait phones */
  }

  .hero__points {
    grid-area: points;
    flex-direction: column;
    gap: 0.5rem;
    justify-self: start;
    margin: 0;
  }

  .hero__actions {
    grid-area: actions;
    justify-content: center;
    margin-top: 0.625rem; /* measured: makes the portrait-to-buttons gap 27 px as well */
  }
}

@media (width >= 48rem) {
  .hero__card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2.5rem;
  }

  .hero__portrait {
    width: 10.5rem;
  }

}

.band__content h2 {
  margin-top: 0;
  color: #fff;
}

.band__content p:last-child {
  margin-bottom: 0;
}

.band .lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

/* glass panel: solid by default, frosted where backdrop-filter exists, solid again on request */
.glass {
  color: #fff;
  background: var(--glass-fill-solid);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .glass {
    background: var(--glass-fill);

    /* stylelint-disable-next-line property-no-vendor-prefix -- Safari before 18 needs the prefix */
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    backdrop-filter: blur(var(--glass-blur)) saturate(120%);
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .glass {
    background: var(--glass-fill-solid);
    border-color: rgb(255 255 255 / 60%);

    /* stylelint-disable-next-line property-no-vendor-prefix -- Safari before 18 needs the prefix */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* one-time entrance reveal; the hidden start state exists only with JS and without reduced motion */
@media (prefers-reduced-motion: no-preference) {
  html[data-js] [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 300ms ease-out,
      transform 300ms ease-out;
    transition-delay: calc(var(--reveal-index, 0) * 60ms);
  }

  html[data-js] [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }

  /* owner requests 2026-09-17 and 2026-09-21: the contact card starts invisible and fades in over 4 s once
     30 % of it is in view (site.js; no movement); the texts and the form inside keep their own 300 ms reveals */
  html[data-js] .contact__card[data-reveal] {
    transform: none;
    transition: opacity 4s ease-out;
    transition-delay: 0s;
  }
}

.button {
  display: inline-block;
  padding: 0.9rem 1.6rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--color-primary);
  border-radius: var(--radius-control);
}

.band .button {
  color: var(--color-primary);
  background: #fff;
}

.band .button--ghost {
  color: #fff;
  background: transparent;
  border: 1px solid rgb(255 255 255 / 70%);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}

/* soft fades: from the white FAQ section into the contact video at the top, into the purple footer at the bottom */
.contact::before {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 6rem;
  pointer-events: none;
  content: "";
  background: linear-gradient(to bottom, rgb(255 255 255 / 90%), rgb(255 255 255 / 0%));
}

.contact .band__media::before {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 6rem;
  content: "";
  background: linear-gradient(to bottom, rgb(74 53 106 / 0%), rgb(74 53 106 / 90%)); /* --color-logo */
}

/* contact band: one light glass card holding the text and the form */
.glass--light {
  --glass-fill: rgb(255 255 255 / 25%); /* owner decision 2026-09-17: 50 % more transparent than the 50 % the guideline measured; contrast at the darkest spot drops below 4.5:1 */
  --glass-blur: 14px; /* owner decision 2026-09-17: half of the default 28 px, below the 24 px minimum of the glass guideline */
  --glass-fill-solid: rgb(255 255 255 / 96%);
  --glass-border: rgb(255 255 255 / 85%);

  color: #222; /* body text: measured 5.0:1 at the darkest spot on the earlier 50 % fill */
}

.glass--light h2,
.glass--light h3 {
  color: var(--color-heading);
}

.contact__card {
  position: relative; /* above the video layer and the top fade */
  z-index: 2;
  display: grid;
  gap: 2.5rem;
  width: 100%;
  max-width: 68rem; /* same width as the hero card */
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

/* owner request 2026-09-17: a clearly visible drop shadow under the two glass cards (the default glass shadow is too faint on the video) */
.hero__card,
.contact__card {
  box-shadow:
    0 24px 60px rgb(18 25 51 / 55%),
    0 4px 12px rgb(18 25 51 / 35%);
}

.contact__text h2 {
  margin-top: 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.contact-form__title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.glass--light .contact-form__title {
  color: var(--color-primary); /* same purple as the submit button */
}

/* floating labels: the label sits inside the field and moves up on focus or when the field has text */
.field {
  position: relative;
  margin: 0 0 1rem;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 1.55rem 1rem 0.6rem;
  font: inherit;
  font-size: 1.05rem;
  color: var(--color-heading);
  background: #fff;
  border: 1px solid rgb(95 60 166 / 55%); /* thin, lighter purple outline; full purple on focus */
  border-radius: 0.75rem;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field label {
  position: absolute;
  top: 0;
  left: 1rem;
  font-size: 1.05rem;
  color: #6b6b7b;
  pointer-events: none;
  transform: translateY(1.05rem);
  transform-origin: left top;
  transition:
    transform 150ms ease-out,
    font-size 150ms ease-out,
    color 150ms ease-out;
}

.field input:focus + label,
.field textarea:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  transform: translateY(0.45rem);
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--color-primary);
  outline: 3px solid rgb(95 60 166 / 25%);
  outline-offset: 0;
}

.field--submit {
  margin-top: 1.5rem;
}

.button--block {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: 0;
}

.contact-form .button {
  color: #fff; /* the light card needs the filled purple button, not the band's white one */
  background: var(--color-primary);
}

.contact-form__privacy {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  text-align: center;
}

.contact-form__alt {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  text-align: center;
}

/* honeypot: kept in the form for bots but moved off-screen (not display:none, which some bots skip) */
.field--hp {
  position: absolute;
  left: -200vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__status {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  text-align: center;
}

.contact-form__status [data-state="sent"] {
  font-weight: 600;
  color: var(--color-primary);
}

.contact-form .button:disabled {
  cursor: default;
  opacity: 0.6;
}

@media (width < 48rem) {
  /* portrait phones: horizontal divider above the form, same style as the vertical one on desktop */
  .contact-form {
    padding-top: 2rem;
    border-top: 1px solid rgb(18 25 51 / 12%);
  }
}

@media (width >= 48rem) {
  .contact__card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* owner request 2026-09-20: Next Steps and the form take half of the card each */
    gap: 0; /* no gap, so the divider sits exactly in the middle; both halves keep 3 rem to it */
    align-items: start;
  }

  .contact__text {
    padding-right: 3rem;
  }

  .contact-form {
    padding-left: 3rem;
    border-left: 1px solid rgb(18 25 51 / 12%);
  }
}

/* plain content sections on white */
.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.section h2 {
  margin-top: 0;
}

.section p {
  max-width: 42rem;
}

.profile__body p {
  max-width: none; /* the right column already limits the line length */
}

.profile__body p strong {
  color: var(--color-primary);
}

.profile__body h2,
.services__intro h2,
.faq h2 {
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* services: rows with line icons on the left, illustration on the right, soft tinted background */
.services {
  padding-top: 2.5rem; /* with the profile section's 2.5 rem bottom padding: 5 rem above the headline */
  background: linear-gradient(130deg, var(--color-tint) 0%, var(--color-tint-2) 100%);
}

.profile {
  padding-bottom: 2.5rem;
}

.services__grid {
  display: grid;
  gap: 2rem 3rem;
}

.services__intro p {
  max-width: none;
}

.services__list {
  display: grid;
  gap: 1.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.service {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.service__icon {
  width: 4rem;
  height: 4rem;
}

.service h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem; /* same style as the expert and project sub-headlines */
  letter-spacing: 0.04em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.service p {
  margin: 0;
}

/* framed services video: the 1920x820 clip is taller than the square frame is wide, so it pans
   slowly left and back (ping-pong) to follow the assembly line; static and centred under reduced motion */
.services__frame {
  position: relative;
  width: min(100%, 26rem);
  aspect-ratio: 1;
  margin-inline: auto;
  overflow: hidden;
  background: var(--color-navy);
  border-radius: var(--radius-control);
  box-shadow: var(--glass-shadow);
}

.services__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* the 1920:820 clip fills the frame's height and overflows horizontally */
  object-position: 50% 50%; /* centred when the pan does not run */
}

@keyframes pan-left {
  from {
    object-position: 0% 50%; /* left edge of the clip */
  }

  to {
    object-position: 100% 50%; /* right edge of the clip */
  }
}

@media (prefers-reduced-motion: no-preference) {
  .services__video {
    animation: pan-left 55s linear infinite alternate;
  }
}

@media (width < 48rem) {
  /* portrait phones: heading and intro, then the centred video frame, then the four rows */
  .services__intro {
    order: 1;
  }

  .services__frame {
    order: 2;
    margin: 0.2rem auto 2rem; /* centred; plus the 2 rem grid gap: 2.2 rem above, 4 rem below */
  }

  .services__list {
    order: 3;
  }
}

@media (width >= 48rem) {
  .services__grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    grid-template-rows: auto 1fr;
  }

  .services__intro {
    grid-column: 1 / -1; /* heading and intro span the full width, above both columns */
  }

  .services__list {
    grid-column: 1;
  }

  .services__frame {
    grid-row: 2; /* spans exactly the rows from Architecture to Operation */
    grid-column: 2;
    justify-self: end; /* narrower frame sits at the right edge, leaving more space next to the text */
    width: 75%;
    aspect-ratio: auto;
    margin: 0;
  }
}

/* profile: photo left, text and feature boxes right, certification badges in a row below */
.profile__grid {
  display: grid;
  gap: 2.5rem;
}

.profile__photo {
  width: min(100%, 14rem);
  margin: 0;
}

.profile__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-control);
}

.features {
  display: grid;
  gap: 1.5rem 2rem;
  padding: 0;
  margin: 2rem 0 0;
  list-style: none;
}

.feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--color-primary);
  background: var(--color-tint);
  border-radius: 0.75rem;
}

.feature__icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

.feature h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  text-transform: uppercase; /* all capitals, like the project tags */
}

.feature p {
  margin: 0;
}

/* project experience cards */
.projects {
  margin-top: 5rem; /* same distance as between the project cards and the services headline */
}

.projects h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); /* same size and spacing as the section headline */
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.projects__list {
  display: grid;
  gap: 1.25rem 2rem; /* same column gap as .features so the card edges line up with the feature columns */
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

.project {
  padding: 1.25rem;
  background: var(--color-tint);
  border: 1px solid #e6e4f2;
  border-radius: 1rem;
}

.project__tag {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem; /* same size and spacing as the feature headings in the expert section, in purple */
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.project p {
  max-width: none;
  margin: 0;
}

/* FAQ section below the services: three expanding boxes underneath each other, closed by default */
.faq h2 {
  margin-bottom: 1.5rem;
}

.faq__item {
  margin-top: 1rem;
  background: var(--color-tint);
  border: 1px solid #e6e4f2;
  border-radius: 0.75rem;
}

.faq__item summary {
  position: relative;
  padding: 1rem 3rem 1rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-primary); /* same style as the project card tags */
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  width: 0.6rem;
  height: 0.6rem;
  content: "";
  border-right: 2px solid currentcolor;
  border-bottom: 2px solid currentcolor;
  transform: translateY(-70%) rotate(45deg);
}

.faq__item[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq__body {
  padding: 0 1.25rem 1.25rem;
}

.faq__body p,
.faq__body ul {
  max-width: none;
  margin: 0 0 0.75rem;
}

/* owner request 2026-09-20: no bullet points; the labelled items read like the paragraphs of the other boxes */
.faq__body ul {
  padding-left: 0;
  list-style: none;
}

.faq__body li + li {
  margin-top: 0.75rem; /* same distance as between the paragraphs */
}

.faq__body :last-child {
  margin-bottom: 0;
}

.faq__body strong {
  color: var(--color-heading);
}

.badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
  gap: 1.5rem;
  padding: 0;
  margin: 3rem 0 0;
  list-style: none;
}

.badges img {
  display: block;
  width: 100%;
  max-width: 9.5rem;
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 16px 24px rgb(18 25 51 / 35%)); /* like the video frame's shadow, following the hexagon */
}

@media (width >= 40rem) {
  .features,
  .projects__list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (width >= 48rem) {
  .projects__list {
    grid-template-columns: repeat(3, 1fr); /* three tracks equal to the profile grid tracks */
  }
}

@media (width < 48rem) {
  /* portrait phones: heading, first paragraph, centred photo, lead-in paragraph, then the four claims */
  .profile__grid {
    gap: 0.5rem;
  }

  .profile__body {
    display: contents;
  }

  .profile__body > h2 {
    order: 1;
  }

  .profile__body > p:nth-of-type(1) {
    order: 2;
  }

  .profile__photo {
    order: 3;
    justify-self: center;
  }

  .profile__body > p:nth-of-type(2) {
    order: 4;
  }

  .profile__body > .features {
    order: 5;
  }
}

@media (width >= 48rem) {
  .profile__grid {
    grid-template-columns: repeat(3, 1fr); /* photo | feature col 1 | feature col 2, same tracks as the project cards */
    gap: 0 2rem; /* vertical rhythm comes from the element margins */
    align-items: start;
  }

  .profile__body {
    display: contents; /* heading, paragraphs and claims become grid items */
  }

  .profile__body > h2 {
    grid-row: 1;
    grid-column: 1 / -1; /* starts at the left edge like the services headline */
  }

  .profile__body > p,
  .profile__body > .features {
    grid-column: 2 / 4;
  }

  /* grid items do not collapse margins: keep the same rhythm as a normal text flow */
  .profile__body > p {
    margin: 0 0 1rem;
  }

  .profile__body > .features {
    margin-top: 1rem;
  }

  .profile__photo {
    grid-row: 2 / span 3; /* starts with the first paragraph, as on the old site */
    grid-column: 1;
    width: 100%;
    max-width: 19rem;
    margin-top: 0.4rem; /* half-leading of the first line: image top meets the glyphs */
  }

  .badges {
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    margin-top: 4rem;
  }
}

/* legal pages: uppercase title, intro line, tinted info cards like the project cards */
.legal {
  padding-block: 3rem 4rem;
}

.legal h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  hyphens: auto; /* long German titles on phones */
  overflow-wrap: anywhere;
}

.legal__intro {
  max-width: 48rem;
  margin: 0;
}

.legal__grid {
  display: grid;
  gap: 1.25rem 2rem;
  margin-top: 2rem;
}

.legal__item {
  padding: 1.25rem;
  background: var(--color-tint);
  border: 1px solid #e6e4f2;
  border-radius: 1rem;
}

.legal__item h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.legal__item p {
  max-width: none;
  margin: 0;
}

.legal__item strong {
  color: var(--color-heading);
}

.legal__note {
  max-width: 48rem;
  margin: 2rem 0 0;
}

/* long legal text: readable measure, purple uppercase section labels like the cards */
.legal__meta {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--color-primary);
}

.legal__text {
  max-width: 48rem;
  margin-top: 2rem;
}

.legal__text section + section {
  margin-top: 2rem;
}

.legal__text h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.legal__text p {
  max-width: none;
  margin: 0 0 0.75rem;
}

.legal__text ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.legal__text strong {
  color: var(--color-heading);
}

/* thank-you page: the failure variant shows only when the URL ends in #failed (no JavaScript needed) */
.contact-sent__failed {
  display: none;
}

.contact-sent__failed:target {
  display: block;
}

.contact-sent__failed:target ~ .contact-sent__ok {
  display: none;
}

.notfound__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

@media (width >= 40rem) {
  .legal__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  padding: 2rem var(--gutter);
  color: #fff;
  background: var(--color-logo);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important; /* reduced motion: disable nonessential motion everywhere */
  }
}
