@font-face {
  font-family: "Juneo";
  src: url("/fonts/Juneo-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Juneo";
  src: url("/fonts/Juneo-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Juneo";
  src: url("/fonts/Juneo-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Juneo";
  src: url("/fonts/Juneo-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1d1d1b;
  --font-display: "Juneo", Helvetica, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Juneo", Helvetica, "Helvetica Neue", Arial, sans-serif;
  --band: #f1f1f1;
  --line: #dbdbdb;
  --green: #96be1e;
  --magenta: #a03488;
  --cyan: #0196c1;
  --teal: #005f72;
  /* Logo red (strawberry); used for the Kontakt email mouseover (Korrektur
     29-06-26). */
  --strawberry: #e3001b;
  --white: #ffffff;
  /* Desktop design, authored 1:1 at the 16px root (1rem = 16px) — no zoom.
     1140px page frame (modern standard) with ~50px side margins -> 1040px
     content column. Mobile narrows the gutters and collapses to one column.
     See docs/rfcs/0002-layout-spacing.md. */
  --site-width: 1140px;
  --container: 1040px;
  --gutter: 100px; /* total left+right; ~50px each side */
  /* Tall enough to keep balanced whitespace above/below the 5rem logo. */
  --header-height: 7rem;
  --shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.08);
}

html {
  scroll-behavior: smooth;
}

html,
body {
  /* Prevent stray horizontal overflow (e.g. negatively positioned buttons),
     which otherwise widens the layout and shows a white border when zoomed
     out on mobile. */
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font-body);
  /* Lauftext is Light (300) by default; headings/buttons/menu override. */
  font-weight: 300;
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

main {
  overflow: clip;
}

.site-frame {
  max-width: var(--site-width);
  margin: 0 auto;
  background: var(--white);
}

.container {
  width: min(calc(100% - var(--gutter)), var(--container));
  margin: 0 auto;
}

.page-section {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.section-heading {
  /* Pull the heading group up by the h2's top half-leading so the gap
     from the preceding image/banner to the cap height reads correctly.
     Placed on the container (not on h2) so it works in both normal flow
     (intro section) and grid-item context (content sections where
     .section-heading is a grid item and margin can't collapse out).
     Modern browsers use text-box-trim instead (see @supports below). */
  margin-top: -0.44rem;
}

.section-heading h1,
.section-heading h2 {
  font-family: var(--font-display);
  margin: 0;
  /* Headline: 24pt = 32px = 2rem, Bold (Korrektur 28-06-26). */
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
}

.section-heading p {
  /* Headline -> subheadline gap: 20px = 1.25rem (Korrektur).
     Fallback: subtract top/bottom half-leading of the subheadline so the
     visual gaps headline->sub (20px) and sub->text (36px) are correct. */
  margin: 0.42rem 0 0;
  /* Subheadline: 18pt = 24px = 1.5rem, Light (Korrektur). */
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.25;
  /* Even out multi-line leads (e.g. Kontakt) so the last line isn't a runt.
     Single-line leads in the other sections are unaffected. */
  text-wrap: balance;
}

/* Kontakt lead is body size (not subhead), first line Medium, rest Light
   (Korrektur). Heading → lead gap is 36px (same as subheadline → text
   elsewhere). Fallback subtracts top/bottom half-leading (~0.83rem). */
.section-heading .contact-intro {
  margin-top: 1.42rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.4;
}

.contact-intro__name {
  font-weight: 500;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--ink);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-height);
  box-sizing: border-box;
}

.site-header__brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.site-header__brand img {
  width: 5rem;
}

.site-header__nav {
  margin-left: auto;
}

.site-header__nav ul {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header__nav a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  /* Menu: body size = 1rem, Regular (Korrektur). */
  font-size: 1rem;
  font-weight: 400;
}

.site-header__nav a:hover,
.site-header__nav a:focus-visible {
  /* Menu mouseover: green (Korrektur). */
  color: var(--green);
}

.site-footer__meta a:hover,
.site-footer__meta a:focus-visible {
  color: var(--green);
}

.site-header__toggle {
  display: none;
  margin-left: auto;
  width: 3rem;
  height: 3rem;
  padding: 0.65rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-header__toggle span {
  display: block;
  width: 100%;
  height: 0.18rem;
  margin: 0.26rem 0;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header__toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(0.44rem) rotate(45deg);
}

.site-header__toggle[aria-expanded="true"] span:nth-child(3) {
  opacity: 0;
}

.site-header__toggle[aria-expanded="true"] span:nth-child(4) {
  transform: translateY(-0.44rem) rotate(-45deg);
}

.hero {
  background: var(--band);
}

.hero__inner {
  width: 100%;
}

.hero__image {
  width: 100%;
  height: auto;
}

.intro {
  padding: 3.2rem 0 2rem;
}

.intro__body {
  /* subheadline -> text gap: 36px = 2.25rem (Korrektur 29-06-26).
     Fallback: subtract sub bottom + body top leading (~0.77rem). */
  margin-top: 1.48rem;
  column-count: 2;
  column-gap: 1rem;
}

/* Shared body copy: intro, content sections and words all use the same
   measured 16.8pt -> ~13.5px / 0.85rem leading (per Infos PDF). */
.intro__body p,
.content-section__copy p,
.words__copy p {
  margin: 0;
  /* Lauftext: 12pt = 16px = 1rem, Light, leading 16.8pt -> 1.4 (Korrektur). */
  font-size: 1rem;
  line-height: 1.4;
}

.intro__body p {
  hyphens: auto;
}

.legal-page__content p,
.legal-page__content li {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.content-section__copy,
.words__copy {
  display: grid;
  gap: 1rem;
}

/* Kontakt: address and email under the intro, each group on its own line
   group, separated from the intro and each other by one blank line. */
.contact-details {
  display: grid;
  gap: 1.4rem;
  margin-top: 1.4rem;
}

.contact-details p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.contact-details a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-details a:hover,
.contact-details a:focus-visible {
  /* Email turns red on mouseover (Korrektur 29-06-26). */
  color: var(--strawberry);
}

.content-section__copy a {
  color: inherit;
  text-decoration: none;
}

.separator {
  /* Banner image -> next section's headline should total 40px. The next
     section contributes 1.25rem (20px) top padding; the banner adds the
     matching 1.25rem below it (consistent with the image->headline rule). */
  margin-bottom: 1.25rem;
}

.separator img {
  width: 100%;
  display: block;
}

.content-section {
  /* Stacked sections: a section's trailing image -> the next section's
     headline is 40px. Each section contributes 20px top + 20px bottom
     (Korrektur 29-06-26). */
  padding: 1.60rem 0;
}

.content-section__intro {
  /* Copy sits in a ~27rem column on the left; the button column follows
     directly to its right (not flush with the container edge), matching
     the source PDF. */
  display: grid;
  column-gap: 1.5rem;
  /* subheadline -> text gap: 36px = 2.25rem (Korrektur 29-06-26).
     Fallback: subtract sub bottom + copy top leading (~0.77rem). */
  row-gap: 1.48rem;
  /* Left copy column matches the width of the first (left) column of the
     intro "Was macht Juni Mut?" section, which uses a 2-column CSS
     `column-count` layout with a 0.875rem gap -> (100% - gap) / 2. */
  grid-template-columns: calc((100% - 0.875rem) / 2) auto;
  margin-bottom: 2.5rem;
}

.content-section__intro > .section-heading {
  /* Heading + lead span the full width, above both columns. */
  grid-column: 1 / -1;
}

.content-section__copy {
  grid-column: 1 / 2;
}

.content-section__actions {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  /* Button at the optical middle vertically (slightly above geometric
     centre) relative to the copy block, and horizontally centred
     within the right column (Korrektur). */
  align-self: center;
  justify-self: center;
  transform: translateY(-30%);
}

.button {
  /* Layout buttons are compact pills: text box ~95pt wide / ~29pt tall with
     the label wrapping to two lines. See docs/rfcs/0002-layout-spacing.md. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  white-space: pre-line;
  /* Softly rounded pill (~16px radius). */
  border-radius: 1.2rem;
  color: var(--white);
  /* Button text: Bold, body size 1rem (Korrektur). No shadow (Korrektur). */
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
  text-decoration: none;
  transition: transform 0.3s ease, filter 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: rotate(5deg);
  filter: brightness(1.05);
}

.button--green {
  background: var(--green);
}

.button--magenta {
  background: var(--magenta);
}

.button--cyan {
  background: var(--cyan);
}

.button--teal {
  background: var(--teal);
}

.slider {
  position: relative;
  display: flex;
  align-items: center;
}

.slider__viewport {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 1rem;
  width: 100%;
  overflow-x: auto;
  padding: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.slider__viewport::-webkit-scrollbar {
  display: none;
}

.slider__slide {
  margin: 0;
  scroll-snap-align: start;
}

.slider__slide img {
  width: 100%;
  aspect-ratio: 728 / 515;
  object-fit: cover;
  background: var(--band);
}

.slider__control {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.slider__chevron {
  width: 1.5rem;
  height: auto;
}

.slider__control--prev .slider__chevron {
  transform: scaleX(-1);
}

.slider__control--prev {
  left: -0.35rem;
}

.slider__control--next {
  right: -0.35rem;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* Gap between logo images: ~16px = 1rem (Korrektur). */
  gap: 1rem;
}

.logo-grid__item {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 11rem;
}

.logo-grid__item img {
  max-height: 11rem;
  object-fit: contain;
}

/* "Wort und Text": keep the image in the right column beside the copy, but
   lift it so its top edge aligns with the subheadline rather than the body
   copy. */
.words__media {
  position: relative;
  display: grid;
  gap: 1rem;
  justify-items: end;
  margin-left: 0;
  justify-self: stretch;
  /* Override the optical-middle centering from .content-section__actions:
     the image top must align with the subheadline (per source PDF). */
  align-self: start;
  transform: none;
  /* Lift so the image top aligns with the subheadline: pull it up by the grid
     row-gap plus the subheadline's line box (1.5rem × 1.25). */
  margin-top: calc(-1.48rem - 1.5rem * 1.25);
}

.words__link {
  display: block;
  width: 100%;
  /* The image stands still — no hover wobble (Korrektur 29-06-26). */
}

.words__media img {
  max-width: 100%;
  height: auto;
}

/* Layout shows a cyan "Text lesen" pill anchored to the column's right edge,
   so it overhangs the image's lower-right corner (per source PDF). */
.words__button {
  position: absolute;
  right: -2.0rem;
  bottom: 1.2rem;
}

/* Image popup opened by the "Text lesen" button (and the preview image),
   showing fluegge_text_gr.jpg in a white frame (per Infos PDF). */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.7);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__dialog {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  /* white frame around the image */
  background: var(--white);
  padding: 1rem;
  border-radius: 0.25rem;
  box-shadow: var(--shadow);
}

.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  width: auto;
  height: auto;
}

.lightbox__close {
  position: absolute;
  top: -1rem;
  right: -1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}

body.has-lightbox {
  overflow: hidden;
}

.site-footer {
  background: var(--band);
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 0;
}

.site-footer__brand img {
  width: 7rem;
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  /* PDF gaps are uneven: ~44pt (2.75rem) between the legal links, with a
     wider ~97pt run after the copyright. See 0002-layout-spacing.md. */
  gap: 2.75rem;
  align-items: center;
  /* Footer text/links: body size 1rem, Bold (Korrektur). */
  font-size: 1rem;
  font-weight: 700;
}

.site-footer__meta a:first-of-type {
  margin-left: 3.3rem;
}

.site-footer__meta p {
  margin: 0;
}

.site-footer__meta a {
  text-decoration: none;
}

.legal-page {
  padding: 3rem 0 4rem;
}

.legal-page__content {
  display: grid;
  gap: 1rem;
  max-width: 46rem;
  margin-top: 1.5rem;
}

.legal-page__content h2 {
  margin: 1rem 0 0;
  font-size: 1.2rem;
}

/* Leading trim — supported in Chrome 133+, Safari 18.2+.  Removes the
   invisible space above caps / below baseline so every gap matches the
   Korrektur spec exactly (40 / 20 / 36 px).  Placed after the fallback
   rules so it wins the cascade. */
@supports (text-box-trim: trim-both) {
  .section-heading {
    margin-top: 0;
  }
  .section-heading h1,
  .section-heading h2 {
    margin: 0;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
  }
  .section-heading p {
    margin: 1.25rem 0 0;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
  }
  .section-heading .contact-intro {
    margin-top: 2.25rem;
  }
  .intro__body {
    margin-top: 2.25rem;
  }
  .intro__body p:first-child,
  .content-section__copy p:first-child,
  .words__copy p:first-child {
    text-box-trim: trim-start;
    text-box-edge: cap alphabetic;
  }
  .content-section__intro {
    row-gap: 2.25rem;
  }
}

@media (max-width: 52em) {
  :root {
    --header-height: 6.25rem;
  }

  .site-header__brand img {
    width: 4.5rem;
  }

  .site-header__toggle {
    display: inline-block;
  }

  .site-header__nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    padding: 0 1rem 1rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .site-header__nav.is-open {
    display: block;
  }

  .site-header__nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 0;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .site-header__nav li,
  .site-header__nav a {
    width: 100%;
  }

  .site-header__nav a {
    display: block;
    padding: 0.9rem 1rem;
  }

  .content-section__intro,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .intro__body {
    column-count: 1;
  }

  .intro__body p {
    font-size: 1rem;
    line-height: 1.55;
  }

  /* Lift body copy to the ~16px mobile readability floor across all
     sections (kept global, never per-section). */
  .content-section__copy p,
  .words__copy p,
  .legal-page__content p,
  .legal-page__content li {
    font-size: 1rem;
    line-height: 1.55;
  }

  .content-section__actions {
    grid-column: auto;
    grid-row: auto;
    /* Buttons centered under the text in small view (Korrektur). */
    justify-self: center;
    align-self: auto;
    transform: none;
    margin-left: 0;
    /* Lauftext -> button is 40px in mobile: the single-column row-gap supplies
     36px, this tops it up to 40px (Korrektur 29-06-26). */
    margin-top: 0.25rem;
    text-align: center;
  }

  /* "Wort und Text": image + button drop below the text in small view
     (Korrektur). */
  .words__media {
    justify-items: center;
    /* Stacked below the text on small screens: no upward lift. */
    margin-top: 0;
  }

  .words__button {
    position: static;
    margin-top: 1rem;
  }

  .site-footer__inner {
    display: grid;
    align-items: start;
  }

  .site-footer__brand {
    order: 2;
    justify-self: end;
  }
}

@media (max-width: 43.75em) {
  .container {
    /* ~16px gutters per side (mobile convention) instead of ~10px. */
    width: min(calc(100% - 2rem), var(--container));
  }

  /* Touch targets >= 44px (Apple HIG / WCAG 2.5.5). */
  .button {
    min-height: 2.75rem;
  }

  .intro,
  .legal-page {
    padding-top: 2.7rem;
    padding-bottom: 2.5rem;
  }

  /* Keep the 40px image -> next headline gap on mobile too (Korrektur
     29-06-26): 20px bottom + 20px top across the section boundary. */
  .content-section {
    padding-top: 1.60rem;
    padding-bottom: 1.60rem;
  }

  .logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Drop Logo_07 when the grid is no longer 3 columns (Korrektur). */
  .logo-grid__item:nth-child(7) {
    display: none;
  }

  .logo-grid__item {
    min-height: 8rem;
  }

  .slider__control {
    width: 2.75rem;
    height: 2.75rem;
  }

  .slider__chevron {
    width: 1.35rem;
  }
}

@media (max-width: 30em) {
  /* Keep two logos per row even on narrow phones (e.g. Fairphone 4). */
  .section-heading h1,
  .section-heading h2 {
    font-size: 1.85rem;
  }

  .site-footer__meta {
    gap: 1rem;
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .site-header__toggle span {
    transition: none;
  }

  .button:hover,
  .button:focus-visible {
    transform: none;
  }
}
