/* Native section snapping. Card selectors never own page scrolling. */
.section-flow {
  --section-header: 90px;
  --section-controls: 0px;
  --section-height: calc(100svh - var(--section-header) - var(--section-controls));
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scroll-padding-top: var(--section-header);
  scroll-padding-bottom: var(--section-controls);
}
/* The enhanced gesture controller is the only snap owner. Native snapping
   remains a fallback, rather than pulling back before a second animation. */
.section-flow.section-snap-managed { scroll-snap-type: none; }
.section-flow main { padding-top: var(--section-header); overflow-anchor: none; }
.section-flow body > #footer { overflow-anchor: none; }
.section-flow main > section,
.section-flow body > #footer {
  /* The full section is the snap area: oversized content remains scrollable.
     Header clearance belongs to the root snapport, so do not add it twice. */
  scroll-margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: var(--section-height);
}
.section-flow #main-content > section {
  min-height: var(--section-height);
  padding: clamp(40px, 6vh, 72px) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: visible;
}
.section-flow #main-content > #hero {
  padding-inline: 24px;
}
.section-flow [hidden] { display: none !important; }
.section-flow [data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; }
.section-flow .section-title { padding-bottom: 28px; }
.section-flow #hero .hero-headline { font-size: clamp(2.4rem, 5.5vw, 5.5rem); }
.section-flow #hero .hero-text { margin-bottom: 28px; }
.section-flow .company-pillars__scroll-track,
.section-flow .company-pillars__sticky,
.section-flow .about-story__track,
.section-flow .about-story__stage,
.section-flow .why-process__track,
.section-flow .why-process__stage {
  position: relative; top: auto; height: auto; min-height: 0; padding: 0; width: 100%;
}
/* Invisible alternatives share a grid cell, keeping selection height stable. */
.section-flow #services .row > [aria-hidden="true"] {
  visibility: hidden; opacity: 0; pointer-events: none;
}
.section-flow .company-pillars__intro { margin-bottom: 28px; }
.section-flow .company-pillars__intro h2 { font-size: clamp(1.8rem, 3.2vw, 2.8rem); }
.section-flow .company-pillars__stage,
.section-flow .company-pillars__details,
.section-flow .company-pillars__panel { min-height: 0; }
.section-flow .company-pillars__panel { padding: clamp(24px, 4vw, 44px); }
.section-flow .company-pillars__panel-header { margin-bottom: 20px; }
.section-flow .company-pillars__experience { grid-template-columns: 1fr; gap: 20px; max-width: 960px; }
.section-flow .company-pillars__sidebar { padding: 0; background: none; border: 0; box-shadow: none; }
.section-flow .company-pillars__stage { display: block; }
.section-flow .about-story__stage {
  display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1120px; padding-inline: 24px; margin-inline: auto;
}
.section-flow .about-story__intro { grid-area: 1 / 1; margin-bottom: 32px; }
.section-flow .about-story__title { font-size: clamp(2rem, 3.5vw, 3.2rem) !important; }
.section-flow .about-story__feature-block { grid-area: 2 / 1; align-self: center; grid-template-columns: 1fr 1.2fr; gap: 36px; }
.section-flow .about-story__copy-column { gap: 24px; }
.section-flow .about-story__copy-item { font-size: 1.1rem; }
.about-story__quote-panel { --quote-open: "“"; --quote-close: "”"; }
.about-story__quote-panel:lang(de) { --quote-open: "„"; --quote-close: "“"; }
.about-story__quote-panel:lang(es) { --quote-open: "«"; --quote-close: "»"; }
.about-story__quote-mark::before { content: var(--quote-open); }
.about-story__quote-close {
  align-self: flex-end;
  transition: opacity 160ms ease;
}
.about-story__quote-close::after { content: var(--quote-close); }
#about[data-about-intro] .about-story__quote-close { opacity: 0; }
#about[data-about-quote-complete] .about-story__quote-close,
#about[data-about-intro="revealed"] .about-story__quote-close { opacity: 1; }
.about-story__continue {
  grid-area: 3 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 24px 0 0;
  color: var(--default-color);
  opacity: .65;
  font-size: .76rem;
}
.about-story__continue > [aria-hidden] { font-size: 1.25rem; line-height: 1.2; }
#about[data-about-intro] .about-story__copy-column,
#about[data-about-intro] .about-story__continue { transition: opacity 300ms ease, transform 300ms ease; }
#about[data-about-intro="waiting"] .hero-typewriter-letter { animation-play-state: paused; }
#about[data-about-intro="revealed"] .hero-typewriter-letter { animation: none; opacity: 1; }
#about[data-about-intro="waiting"] .about-story__copy-column,
#about[data-about-intro="typing"] .about-story__copy-column,
#about[data-about-intro="waiting"] .about-story__continue,
#about[data-about-intro="typing"] .about-story__continue {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
}
.section-flow .why-process__panel { height: auto; min-height: 0; }
.section-flow .why-process { display: block; }
.section-flow .why-process__panels { display: grid; }
.section-flow .why-us .section-title { padding-bottom: 28px; }
.section-flow #services .row { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; }
.section-flow #services .row > div { grid-area: 1 / 1; width: min(100%, 760px); margin-inline: auto; padding: 0; }
.section-flow .testimonials-carousel .swiper-wrapper { display: block; transform: none !important; }
.section-flow .testimonials-carousel .swiper-slide { width: 100%; }
.section-flow .testimonials-carousel .swiper-pagination { display: none; }
.section-flow #contact .container { max-width: 1040px; }
.section-flow body > #footer { padding: 48px 24px 32px; }
.section-flow #footer .footer-top { padding-top: 0; }
/* Native scrolling supplies the vertical slide. The view timeline only softens
   a section's arrival; it neither changes geometry nor captures input. */
@supports (animation-timeline: view()) {
  .section-flow main > section:not(#hero) {
    animation: section-arrival linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 25%;
  }
  @keyframes section-arrival { from { opacity: .76; } to { opacity: 1; } }
}
@media (max-width: 1199.98px) {
  .section-flow { --section-header: 76px; --section-controls: calc(76px + env(safe-area-inset-bottom, 0px)); }
  /* The mobile header already occupies document space. Keep its height stable
     while scrolling so anchors and resize bookmarks share the same inset. */
  .section-flow main { padding-top: 0; }
  .section-flow .header,
  .section-flow body.scrolled .header { height: var(--section-header); padding: 10px 0; }
}
@media (max-width: 767.98px) {
  .section-flow { --section-header: 68px; }
  .section-flow #main-content > section { padding-block: 40px; justify-content: flex-start; }
  .section-flow #main-content > #hero { justify-content: center; padding-inline: 12px; }
  .section-flow .about-story__stage { padding-inline: 16px; }
  .section-flow .about-story__feature-block { grid-template-columns: 1fr; gap: 24px; }
  .section-flow .about-story__quote-panel { min-height: 0; }
  .section-flow .why-process__panel { padding: 24px; }
  .section-flow .why-us .section-title h2 { font-size: 1.65rem; }
  .section-flow .why-process__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .section-flow .why-process__tab { min-height: 62px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
  .section-flow .why-process__tab-text { font-size: .85rem; line-height: 1.2; hyphens: none; }
  .section-flow .why-process__tab-badge { position: static; opacity: 1; transform: none; padding: 0; border: 0; background: none; font-size: .6rem; }
  .section-flow .company-pillars__panel { padding: 24px; }
  .section-flow .company-pillars__intro h2 { font-size: 1.7rem; }
  .section-flow .company-pillars__intro p { font-size: .94rem; }
  .section-flow .company-pillars__panel-header { margin-bottom: 18px; }
  .section-flow body > #footer { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .section-flow { scroll-behavior: auto; }
  .section-flow *, .section-flow *::before, .section-flow *::after { animation: none !important; transition: none !important; }
  #about[data-about-intro] .about-story__copy-column,
  #about[data-about-intro] .about-story__continue { opacity: 1; visibility: visible; transform: none; }
  #about[data-about-intro] .about-story__quote-close { opacity: 1; }
}
