/* Shared Agentur baseline: reuse the finished pages' content width and gutters. */
body.about-page :is(.about-hero,.about-section,.about-faq),
body.work-page :is(.work-main > section,.work-faq),
body.insights-page :is(.insights-featured-link,.insights-list),
body.insight-detail-page :is(.insight-hero,.insight-body,.insight-related),
body.legal-fakten :is(.legal-hero,.legal-body) {
  padding-inline:var(--ao-page-gutter,var(--ao-responsive-gutter,56px));
}
body.about-page :is(.about-inner,.about-hero-inner),
body.work-page .work-inner,
body.insights-page .insights-container,
body.insight-detail-page .insight-container,
body.legal-fakten .legal-wide-container {
  width:100%; max-width:1328px; margin-inline:auto;
}
body:is(.about-page,.work-page) :is(.about-faq,.work-faq) > :is(h2,.leistungen-faq-list) {
  width:100%; max-width:1328px; margin-inline:auto;
}
/* The centered introduction remains centered; its quotation keeps its reading measure. */
body.about-page .about-hero { height:auto; min-height:676px; padding-block:0; }
body.about-page .about-hero-inner {
  display:flex; flex-direction:column; min-height:676px; height:auto; padding-block:46px 48px;
}
body.about-page .about-hero-eyebrow { padding-top:0; }
body.about-page .about-hero-quote { width:100%; max-width:940px; }
body.about-page .about-hero-attribution { position:relative; inset:auto; margin-top:auto; padding-top:32px; padding-inline:0; }
body.about-page :is(.about-principles,.about-purpose,.about-clients,.about-thinking,.about-history,.about-facts) {
  height:auto; min-height:0;
}
body.about-page .about-thinking-header { height:auto; }
body.about-page .about-thinking-row:nth-child(n) h3 { height:auto; }
body.about-page .about-clients h2 { height:auto; }
body.about-page .about-principle {
  height:auto; min-height:460px; padding:266px 24px 26px;
}
body.about-page .about-principle :is(h3,.about-principle-subtitle,.about-principle-copy) {
  position:relative; inset:auto; width:100%;
}
body.about-page .about-principle-subtitle { margin-top:18px!important; }
body.about-page .about-principle-copy { margin-top:18px!important; }
body.about-page .about-purpose article { height:auto; min-height:0; }
body.about-page .about-purpose article > p:last-child { position:relative; inset:auto; margin-top:28px!important; }
body.about-page :is(.about-principle-grid,.about-purpose-grid,.about-history-row,.about-facts-grid) { gap:var(--ao-card-gap,40px); }
body.about-page .about-client-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
body.about-page .about-client { width:100%; }
body.about-page .about-client img { max-width:100%; }

/* Editorial modules flow without fixed coordinates between heading, copy and cards. */
body.work-page :is(.work-difference,.work-accompaniment) { height:auto; padding-block:56px 68px; }
body.work-page :is(.work-difference,.work-accompaniment) .work-inner { height:auto; }
body.work-page :is(.work-difference,.work-accompaniment) :is(.work-eyebrow,h2,.work-intro) { position:relative; inset:auto; }
body.work-page :is(.work-difference,.work-accompaniment) h2 { margin-top:12px; }
body.work-page :is(.work-difference,.work-accompaniment) .work-intro { margin-top:18px; }
body.work-page :is(.work-difference-grid,.work-accompaniment-grid) {
  position:relative; inset:auto; margin-top:48px; gap:var(--ao-card-gap,40px);
}
body.work-page .work-accompaniment-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
body.work-page .work-difference-card { height:auto; min-height:300px; padding:40px 26px; }
body.work-page .work-difference-card :is(h3,p) { position:relative; inset:auto; width:100%; }
body.work-page .work-difference-card p { margin-top:24px; }
body.work-page .work-accompaniment-card { height:auto; min-height:290px; padding:24px 26px 40px; max-width:none; }
body.work-page .work-accompaniment-card :is(p,h3) { position:relative; inset:auto; width:100%; }
body.work-page .work-accompaniment-card h3 { margin-top:24px; }
body.work-page .work-card-copy { margin-top:24px; }
body.work-page .work-accompaniment-card :is(.work-card-shadow,.work-card-surface) { inset:6px; width:auto; height:auto; }
body.work-page .work-accompaniment-card:is(:hover,:focus-visible) :is(.work-card-shadow,.work-card-surface) { width:auto; height:auto; }

body.insights-page .insights-featured { height:auto; min-height:540px; }
body.insights-page .insights-featured-content {
  display:flex; flex-direction:column; justify-content:center;
  min-height:540px; padding-block:64px;
}
body.insights-page .insights-article { height:auto; min-height:166px; }
/* Full-width outer grid; the article column retains its intentional 780px reading measure. */
body.insight-detail-page .insight-hero { height:auto; }
body.insight-detail-page .insight-hero-inner {
  display:grid; grid-template-columns:minmax(0,1fr) 425px;
  min-height:540px; height:auto; padding-block:64px; align-content:start;
  column-gap:40px; align-items:start;
}
body.insight-detail-page :is(.insight-category,.insight-hero h1,.insight-deck,.insight-meta) {
  position:relative; inset:auto; width:100%; max-width:100%; min-width:0; grid-column:1;
}
body.insight-detail-page .insight-hero-copy { min-width:0; }
body.insight-detail-page .insight-hero h1 { margin-top:12px; }
body.insight-detail-page .insight-deck { margin-top:24px; }
body.insight-detail-page .insight-meta { margin-top:20px; }
body.insight-detail-page .insight-hero-visual {
  position:relative; inset:auto; grid-column:2; grid-row:auto; align-self:start;
  width:100%; max-width:425px; height:auto; aspect-ratio:425 / 390; margin:0;
}
body.insight-detail-page .insight-reading-layout { grid-template-columns:224px minmax(0,780px); gap:var(--ao-card-gap,40px); }
body.insight-detail-page .insight-related { height:auto; padding-block:56px 64px; }
body.insight-detail-page .insight-related-inner { height:auto; }
body.insight-detail-page :is(.insight-related-eyebrow,.insight-related h2,.insight-related-grid) { position:relative; inset:auto; }
body.insight-detail-page .insight-related h2 { margin-top:12px; }
body.insight-detail-page .insight-related-grid { grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:32px; gap:var(--ao-card-gap,40px); }
body.insight-detail-page .insight-related-card { height:auto; min-height:170px; padding:24px 28px 56px; }
body.insight-detail-page :is(.insight-related-category,.insight-related-card h3) { position:relative; inset:auto; width:100%; max-width:100%; }
body.insight-detail-page .insight-related-card h3 { margin-top:10px; }
body.insight-detail-page .insight-related-arrow { top:auto; bottom:24px; }
body:is(.about-page,.work-page,.insights-page,.insight-detail-page) main :is(h1,h2,h3,p) { overflow-wrap:break-word; }

@media (orientation:portrait) and (min-width:701px) and (max-width:1199px) {
  body.about-page .about-principle-grid,
  body.work-page .work-accompaniment-grid,
  body.insight-detail-page .insight-related-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  body.about-page .about-principle,
  body.work-page .work-accompaniment-card,
  body.insight-detail-page .insight-related-card { grid-column:span 2; }
  body.about-page .about-principle:last-child:nth-child(odd),
  body.work-page .work-accompaniment-card:last-child:nth-child(odd),
  body.insight-detail-page .insight-related-card:last-child:nth-child(odd) { grid-column:2 / 4; }
  body:is(.about-page,.work-page) .leistungen-faq-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:850px), (orientation:portrait) and (max-width:1199px) {
  body.insight-detail-page .insight-hero-inner { grid-template-columns:minmax(0,1fr); }
  body.insight-detail-page .insight-hero-visual { grid-column:1; grid-row:auto; margin-top:32px; }
  body.insight-detail-page .insight-reading-layout { grid-template-columns:minmax(0,780px); }
}
@media (max-width:700px), (orientation:landscape) and (max-height:500px) and (max-width:1100px) {
  body.about-page .about-hero-inner { min-height:0; padding-block:36px 40px; }
  body.about-page .about-hero h1 { font-size:clamp(32px,8.8vw,40px); line-height:1.15; transform:none; }
  body.about-page .about-hero-quote { margin-top:30px!important; }
  body.about-page .about-principle-grid,
  body.work-page .work-accompaniment-grid,
  body.insight-detail-page .insight-related-grid { grid-template-columns:minmax(0,1fr); }
  body.about-page .about-principle { min-height:0; padding:220px 24px 30px; }
  body.about-page .about-client-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.work-page :is(.work-difference,.work-accompaniment) { padding-block:48px; }
  body.work-page .work-accompaniment-card { min-height:0; padding:30px 24px; }
  body.insights-page .insights-featured-content { min-height:0; padding-block:56px 64px; }
  body.insight-detail-page .insight-hero-inner { display:flex; flex-direction:column; min-height:0; padding-block:48px; }
  body.insight-detail-page .insight-hero h1 { font-size:clamp(30px,8.2vw,36px); line-height:1.2; overflow-wrap:anywhere; }
  body.insight-detail-page .insight-reading-layout { grid-template-columns:minmax(0,1fr); }
}
/* Keep article jump links comfortably tappable in responsive layouts. */
@media (max-width:1199px), (pointer:coarse) {
  body.insight-detail-page .insight-rail a { display:flex; align-items:center; min-height:44px; }
}

/* Desktop history keeps the original alternating text/image rows. */
body.about-page .about-history-row {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--ao-card-gap,40px); min-height:250px;
}
body.about-page .about-history-origin { margin-top:32px; }
body.about-page .about-history-founding { margin-top:48px; }
body.about-page .about-history-image { width:100%; height:250px; min-height:250px; }
body.about-page .about-history-copy { margin-top:30px!important; }
body.about-page .about-history-founding .about-history-copy { margin-top:12px!important; }
/* Tablet/phone stories read intro, image, then explanatory paragraph. */
@media (max-width:1199px) {
  body.about-page .about-history-stories { display:flex; flex-direction:column; gap:40px; margin-top:32px; }
  body.about-page .about-history-row { display:flex; flex-direction:column; gap:24px; min-width:0; min-height:0; margin:0; }
  body.about-page .about-history-text { display:contents; }
  body.about-page .about-history-intro { order:0; min-height:0; }
  body.about-page .about-history-image { order:1; width:100%; max-width:640px; height:auto; min-height:0; aspect-ratio:3 / 2; }
  body.about-page .about-founder-image { aspect-ratio:4 / 3; }
  body.about-page .about-history-image img { inset:0; width:100%; height:100%; object-fit:cover; }
  body.about-page .about-founder-image img { object-position:50% 0%; }
  body.about-page .about-archive-image img { object-position:54% 35%; }
  body.about-page .about-history-row .about-history-copy { order:2; margin:0!important; }
}
@media (min-width:1200px) and (max-width:1400px) {
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-history-stories { display:flex; flex-direction:column; gap:40px; margin-top:32px; }
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-history-row { display:flex; flex-direction:column; gap:24px; min-width:0; min-height:0; margin:0; }
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-history-text { display:contents; }
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-history-intro { order:0; min-height:0; }
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-history-image { order:1; width:100%; max-width:640px; height:auto; min-height:0; aspect-ratio:3 / 2; }
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-founder-image { aspect-ratio:4 / 3; }
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-history-image img { inset:0; width:100%; height:100%; object-fit:cover; }
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-founder-image img { object-position:50% 0%; }
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-archive-image img { object-position:54% 35%; }
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-history-row .about-history-copy { order:2; margin:0!important; }
}
body.about-page .about-logo-bleed { width:100%; max-width:1328px; margin-inline:auto; }
@media (orientation:portrait) and (min-width:701px) and (max-width:1199px) {
  body.about-page .about-principle-grid { grid-template-columns:minmax(0,1fr); gap:24px; }
  body.about-page .about-principle {
    grid-column:1; min-height:230px; padding:24px 32px;
    display:flex; flex-direction:column; justify-content:center;
  }
  body.about-page .about-principle-gradient {
    background:linear-gradient(to bottom, rgba(5,20,36,.05) 20%, rgba(5,20,36,.35) 55%, rgba(5,20,36,.88));
  }
  body.about-page .about-principle:last-child:nth-child(odd) { grid-column:1; }
  body.about-page .about-principle h3 { font-size:28px; line-height:34px; }
  body.about-page .about-principle-subtitle { margin-top:10px!important; }
  body.about-page .about-principle-copy { margin-top:8px!important; }
  body.about-page .about-principle-visual img { object-fit:cover; object-position:center; }
  body.about-page .about-principle:nth-child(1) .about-principle-visual img { object-position:center 20%; }
  body.about-page .about-principle:nth-child(2) .about-principle-visual img { object-position:center 10%; }
  body.about-page .about-principle:nth-child(3) .about-principle-visual img { object-position:center 40%; }
  body.about-page .about-history-stories { grid-template-columns:minmax(0,1fr); gap:40px; }
  body.about-page .about-history-image { max-width:640px; }
  body.about-page .about-history-intro { min-height:0; }
}
@media (max-width:700px), (orientation:landscape) and (max-height:500px) and (max-width:1100px) {
  body.about-page .about-history-stories { grid-template-columns:minmax(0,1fr); gap:40px; }
  body.about-page .about-history-intro { min-height:0; }
  body.about-page .about-clients { padding-inline:0; overflow:hidden; }
  body.about-page .about-clients > .about-inner {
    padding-inline:var(--ao-page-gutter,var(--ao-responsive-gutter,24px));
  }
  body.about-page .about-logo-bleed { max-width:none; overflow:hidden; }
  body.about-page .about-client-grid.about-client-marquees { display:flex; flex-direction:column; gap:24px; }
  .about-logo-window { width:100%; overflow:hidden; }
  .about-logo-track { display:flex; width:max-content; animation:about-logo-flow 75s linear infinite; }
  .about-logo-window:nth-child(2) .about-logo-track { animation-duration:83s; animation-direction:reverse; }
  .about-logo-sequence { display:flex; align-items:center; gap:28px; padding-right:28px; flex-shrink:0; }
  body.about-page .about-logo-sequence .about-client { flex:0 0 152px; width:152px; height:64px; }
  body.about-page .about-logo-sequence .about-client img { max-width:152px; max-height:64px; object-fit:contain; }
  body.about-page .about-logo-sequence .about-client:hover img { transform:none; }
}
@keyframes about-logo-flow { to { transform:translateX(-50%); } }
@media (prefers-reduced-motion:reduce) {
  body.about-page .about-logo-track { animation:none; }
  body.about-page .about-logo-window { overflow-x:auto; scrollbar-width:none; }
  body.about-page .about-logo-window::-webkit-scrollbar { display:none; }
  body.about-page .about-logo-sequence[aria-hidden="true"] { display:none; }
}

/* Compact centered value-card groups only in portrait tablet and phone layouts. */
@media (orientation:portrait) and (max-width:1199px),
       (max-width:700px),
       (orientation:landscape) and (max-height:500px) and (max-width:1100px) {
  body.about-page .about-principle-grid { grid-auto-rows:1fr; }
  body.about-page .about-principle {
    display:flex; flex-direction:column; align-items:center; justify-content:center;
  }
  body.about-page .about-principle :is(h3,.about-principle-subtitle,.about-principle-copy) {
    width:100%; text-align:center;
  }
  body.about-page .about-principle-subtitle { margin-top:10px!important; }
  body.about-page .about-principle-copy { margin-top:8px!important; }
  body.about-page .about-principle-gradient {
    background:linear-gradient(to bottom, rgba(5,20,36,.25), rgba(5,20,36,.5) 50%, rgba(5,20,36,.75));
  }
}
@media (max-width:700px),
       (orientation:landscape) and (max-height:500px) and (max-width:1100px) {
  body.about-page .about-principle { min-height:260px; padding:24px; }
}

/* Fill the existing history frame without distorting the original photo. */
body.about-page .about-history-image.about-archive-image img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}

/* Two balanced history rows: founding/portrait, then archive/background and 2022. */
body.about-page .about-history-row { align-items:center; }
body.about-page .about-history-row .about-history-text {
  display:flex; flex-direction:column; gap:24px; width:100%; min-width:0;
}
body.about-page .about-history-milestone { min-width:0; }
body.about-page .about-history-milestone-copy > .about-eyebrow { margin-top:2px; }
body.about-page .about-history-milestone-copy > h3 {
  margin-top:10px; font-size:24px; font-weight:700; line-height:30px;
}
body.about-page .about-history-row .about-history-copy { margin:0!important; }
body.about-page .about-history-milestone-copy > .about-history-copy { margin-top:12px!important; }
@media (max-width:1199px) {
  body.about-page .about-history-origin .about-history-text { order:0; }
  body.about-page .about-history-founding .about-history-text { order:2; }
}
@media (min-width:1200px) and (max-width:1400px) {
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-history-origin .about-history-text { order:0; }
  html:is([data-ao-tablet],[data-ao-tablet-header]) body.about-page .about-history-founding .about-history-text { order:2; }
}

body.about-page .about-history-text > .about-history-copy { order:0; }
