/* ════════════════════════════════════════════════════════════
   PARITY — page shell + shared primitives (key: page-shell)
   Live spec: sections/PageIntro.tsx, ui/Section.tsx (Section +
   SectionHeader), ui/Container.tsx, ui/Button.tsx, globals.css
   (.prose-content). Values copied from the compiled Tailwind CSS.
   Selectors deliberately use the SAME specificity as the style.css
   rules they replace (this file loads after it), so component-scoped
   rules from other parity files still win.
   ════════════════════════════════════════════════════════════ */

/* ── PageIntro band ──────────────────────────────────────────
   bg-gradient-to-br from-primary-50 via-surface-alt to-secondary-50
   pt-12 pb-12 sm:pt-16 sm:pb-16 lg:pt-20 lg:pb-16                 */
.page-intro {
  background-color: transparent;
  background-image: linear-gradient(to bottom right, var(--primary-50), var(--surface-alt), var(--secondary-50));
  padding: 3rem 0;
}
@media (min-width: 640px)  { .page-intro { padding: 4rem 0; } }
@media (min-width: 1024px) { .page-intro { padding: 5rem 0 4rem; } }

/* <div className="max-w-3xl"> */
.page-intro__inner { max-width: 48rem; }

/* inline-block mb-3 text-sm font-semibold uppercase tracking-wider text-primary-600 */
.page-intro__label {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-600);
}

/* text-4xl sm:text-5xl lg:text-6xl font-heading font-bold
   text-secondary-500 leading-tight tracking-tight lowercase
   (leading-tight beats the base text-4xl line-height; the responsive
   sizes bring their own line-heights: 3.25rem and 1.1)           */
.page-intro__heading {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 2.441rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--secondary-500);
  text-transform: lowercase;
  /* live never hyphenates; a word wider than the phone still wraps
     (base h1 overflow-wrap) instead of scrolling the page sideways */
  hyphens: manual;
  -webkit-hyphens: manual;
}
@media (min-width: 640px)  { .page-intro__heading { font-size: 3.052rem; line-height: 3.25rem; } }
@media (min-width: 1024px) { .page-intro__heading { font-size: 3.815rem; line-height: 1.1; } }

/* mt-5 text-lg sm:text-xl text-neutral-700 leading-relaxed */
.page-intro__desc {
  margin: 1.25rem 0 0;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--neutral-700);
}
@media (min-width: 640px) { .page-intro__desc { font-size: 1.25rem; line-height: 1.75rem; } }

/* ── Container (ui/Container) ────────────────────────────────
   default max-w-container (96vw) · narrow max-w-3xl · wide 98vw   */
.container--narrow { max-width: 48rem; }
.container--wide   { max-width: var(--container-wide); }

/* ── Section (ui/Section) ────────────────────────────────────
   padding standard py-16 sm:py-20 (no lg step) · compact py-12
   sm:py-16 · large py-20 sm:py-24 lg:py-28 · hero py-20 sm:py-24
   lg:py-32. Backgrounds white / alt / dark / primary / secondary.  */
.section { padding-block: 4rem; }
.wp-block-group.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
/* Group sections: the inner container is live's <Container> */
.wp-block-group.section > * {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .section { padding-block: 5rem; }
  .wp-block-group.section { padding-top: 5rem; padding-bottom: 5rem; }
  .wp-block-group.section > * { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .section { padding-block: 5rem; }
  .wp-block-group.section > * { padding-left: 2rem; padding-right: 2rem; }
}

/* backgrounds (editor: add the class to the Group block) */
.section--alt,
.wp-block-group.section--alt { background-color: var(--surface-alt); }
.section--dark,
.wp-block-group.section--dark { background-color: var(--surface-dark); color: var(--neutral-100); }
.section.section--primary,
.wp-block-group.section--primary { background-color: var(--primary-500); color: #fff; }
.section.section--secondary,
.wp-block-group.section--secondary { background-color: var(--secondary-600); color: #fff; }

/* padding variants */
.section.section--compact { padding-top: 3rem; padding-bottom: 3rem; }
.section.section--large,
.section.section--hero { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 640px) {
  .section.section--compact { padding-top: 4rem; padding-bottom: 4rem; }
  .section.section--large,
  .section.section--hero { padding-top: 6rem; padding-bottom: 6rem; }
}
@media (min-width: 1024px) {
  .section.section--large { padding-top: 7rem; padding-bottom: 7rem; }
  .section.section--hero  { padding-top: 8rem; padding-bottom: 8rem; }
}

/* width variants: Container size="narrow" / "wide" */
.wp-block-group.section.section--narrow > * { max-width: 48rem; }
.wp-block-group.section.section--wide > *   { max-width: var(--container-wide); }

/* ── Page body wrapper (page.php) ────────────────────────────
   Live <main> is a flush stack of sections: no gaps between them.  */
.page-content--sections > * { margin-bottom: 0; }
/* the old narrow wrapper needed this band to swallow its padding;
   the full-bleed body has no wrapper padding left to swallow */
.page-content--sections > .sic-amber-band:last-child { margin-bottom: 0; }

/* ── SectionHeader (ui/Section) ──────────────────────────────
   mb-10 max-w-3xl (+ mx-auto text-center when centred)            */
.section-header {
  max-width: 48rem;
  margin-bottom: 2.5rem;
}
.section-header--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
/* title: text-3xl sm:text-4xl lg:text-5xl leading-tight text-neutral-900 */
.section-header h1,
.section-header h2,
.section-header h3 {
  margin: 0;
  font-size: 1.953rem;
  line-height: 1.25;
  color: var(--neutral-900);
}
@media (min-width: 640px) {
  .section-header h1,
  .section-header h2,
  .section-header h3 { font-size: 2.441rem; line-height: 2.75rem; }
}
@media (min-width: 1024px) {
  .section-header h1,
  .section-header h2,
  .section-header h3 { font-size: 3.052rem; line-height: 3.25rem; }
}
/* description: mt-4 text-lg leading-relaxed text-neutral-600 */
.section-header p {
  max-width: none;
  margin: 1rem 0 0;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--neutral-600);
}
.section-header--center p { margin-inline: 0; }

/* label (SectionHeader / AboutPreview / PageIntro all share it):
   mb-3 inline-block text-sm font-semibold uppercase tracking-wider
   text-primary-600 */
.section-label,
.section-header .section-label {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-600);
}

/* inverse header on dark / coloured sections */
.section--dark .section-header h2,
.section--primary .section-header h2,
.section--secondary .section-header h2 { color: #fff; }
.section--dark .section-header p { color: var(--neutral-300); }
.section--dark .section-label { color: var(--primary-300); }

/* ── Button (ui/Button) ──────────────────────────────────────
   inline-flex items-center justify-center gap-2 font-medium
   rounded-md transition-all duration-base whitespace-nowrap
   sm px-3 py-1.5 text-sm h-9 · md px-5 py-2.5 text-base h-11 ·
   lg px-7 py-3 text-lg h-14                                       */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-weight: 500;
  border: 0 solid transparent;
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:focus-visible { border-radius: var(--radius-md); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--sm { height: 2.25rem; padding: 0.375rem 0.75rem; font-size: 0.875rem; line-height: 1.25rem; }
.btn--md { height: 2.75rem; padding: 0.625rem 1.25rem; font-size: 1rem;     line-height: 1.5rem; }
.btn--lg { height: 3.5rem;  padding: 0.75rem 1.75rem;  font-size: 1.125rem; line-height: 1.75rem; }

.btn--primary         { background-color: var(--primary-500); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.btn--primary:hover   { background-color: var(--primary-600); border-color: transparent; box-shadow: var(--shadow-md); }
.btn--primary:active  { background-color: var(--primary-700); border-color: transparent; }

.btn--secondary        { background-color: var(--secondary-500); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.btn--secondary:hover  { background-color: var(--secondary-600); border-color: transparent; box-shadow: var(--shadow-md); }
.btn--secondary:active { background-color: var(--secondary-700); }

.btn--outline        { background-color: transparent; color: var(--primary-600); border: 2px solid var(--primary-500); }
.btn--outline:hover  { background-color: var(--primary-50); color: var(--primary-600); }
.btn--outline:active { background-color: var(--primary-100); }

.btn--ghost        { background-color: transparent; color: var(--primary-600); }
.btn--ghost:hover  { background-color: var(--primary-50); }
.btn--ghost:active { background-color: var(--primary-100); }

/* Button block — the same primitive for editors.
   Base (every context): shape, weight, spacing, transition.        */
.wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* Variant + size for plain buttons: default = <Button variant="primary"
   size="lg">, the live in-page CTA. Bands that style their own button
   (CTA bands, about teaser) are left to their component styles.    */
.wp-block-button:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link {
  height: 3.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
  background-color: var(--primary-500);
  color: #fff;
  border: 0;
  box-shadow: var(--shadow-sm);
}
.wp-block-button:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link:hover {
  background-color: var(--primary-600);
  box-shadow: var(--shadow-md);
}
.wp-block-button:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link:active {
  background-color: var(--primary-700);
}
/* Styles: core "Outline", plus extra classes on the Button block
   ("is-style-secondary", "is-style-ghost") and sizes ("is-size-sm",
   "is-size-md")                                                     */
.wp-block-button.is-style-outline:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link {
  background-color: transparent;
  color: var(--primary-600);
  border: 2px solid var(--primary-500);
  box-shadow: none;
}
.wp-block-button.is-style-outline:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link:hover { background-color: var(--primary-50); }
.wp-block-button.is-style-outline:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link:active { background-color: var(--primary-100); }
.wp-block-button.is-style-secondary:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link { background-color: var(--secondary-500); }
.wp-block-button.is-style-secondary:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link:hover { background-color: var(--secondary-600); }
.wp-block-button.is-style-secondary:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link:active { background-color: var(--secondary-700); }
.wp-block-button.is-style-ghost:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link { background-color: transparent; color: var(--primary-600); box-shadow: none; }
.wp-block-button.is-style-ghost:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link:hover { background-color: var(--primary-50); }
.wp-block-button.is-size-sm:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link { height: 2.25rem; padding: 0.375rem 0.75rem; font-size: 0.875rem; line-height: 1.25rem; }
.wp-block-button.is-size-md:not(:where(.sic-amber-band *, .sic-cta *, .sic-dark-band *, .sic-warum-band *, .about-teaser *)) .wp-block-button__link { height: 2.75rem; padding: 0.625rem 1.25rem; font-size: 1rem; line-height: 1.5rem; }

/* ── Prose (globals.css .prose-content) ──────────────────────
   page.php falls back to Section + narrow Container + prose when a
   page body is loose blocks; editors can also put "prose-content"
   on a Group block.                                                 */
.page-content--prose,
.prose-content { max-width: 65ch; }
.page-content--prose > * { margin-bottom: 0; }
:is(.page-content--prose, .prose-content) p {
  max-width: none;
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--neutral-700);
}
:is(.page-content--prose, .prose-content) a:not(.wp-block-button__link) {
  color: var(--primary-600);
  text-decoration: underline;
  text-decoration-color: var(--primary-300);
  text-underline-offset: 2px;
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1), text-decoration-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
:is(.page-content--prose, .prose-content) a:not(.wp-block-button__link):hover {
  color: var(--primary-700);
  text-decoration-color: var(--primary-500);
}
:is(.page-content--prose, .prose-content) :is(ul, ol) {
  max-width: none;
  margin: 0 0 1rem 1.5rem;
  padding-left: 0;
  color: var(--neutral-700);
}
:is(.page-content--prose, .prose-content) ul { list-style: disc; }
:is(.page-content--prose, .prose-content) ol { list-style: decimal; }
:is(.page-content--prose, .prose-content) li { margin-bottom: 0; }
:is(.page-content--prose, .prose-content) li + li { margin-top: 0.5rem; }
:is(.page-content--prose, .prose-content) h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.953rem;
  line-height: 2.25rem;
}
:is(.page-content--prose, .prose-content) h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.563rem;
  line-height: 2rem;
}

/* ── Keyboard focus ring on buttons (live ui/Button.tsx: focus-visible:ring-2
   ring-offset-2 ring-offset-surface + ring-primary-500 / ring-secondary-500).
   The button variants set their own box-shadow, which would otherwise hide
   the global *:focus-visible ring, so the ring is composed with the shadow. */
.btn:focus-visible,
.wp-block-button .wp-block-button__link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary-500), var(--shadow-sm);
}
.btn--secondary:focus-visible,
.wp-block-button.is-style-secondary .wp-block-button__link:focus-visible,
.sic-amber-band .wp-block-button .wp-block-button__link:focus-visible {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--secondary-500), var(--shadow-sm);
}
.btn--outline:focus-visible,
.btn--ghost:focus-visible,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible,
.wp-block-button.is-style-ghost .wp-block-button__link:focus-visible {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary-500);
}
