/* ==========================================================================
   style.css — STRUKTUR. Bleibt bei jeder Person gleich.
   Farben, Schrift und Rollen kommen aus theme.css. Jede Rolle hat hier einen
   Fallback auf die Berg-Grammatik (Kopf = Fläche, Banner = Blatt, eine
   Schrift), damit ein theme.css nur die Rollen setzen muss, die abweichen.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --outer-spacing: 0.75rem;
  --sheet-pad: 1.25rem;
  --sheet-pad-top: 1.5rem;   /* mehr Luft über der Blatt-Überschrift als darunter */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 350px) {
  :root { --outer-spacing: 1.25rem; }
}

@media (min-width: 500px) {
  :root {
    --outer-spacing: 2.5rem;
    --sheet-pad: 1.5rem;
    --sheet-pad-top: 1.875rem;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--ground);
  color: var(--ground-ink);
  font-family: var(--font-sans);
  font-weight: var(--weight-body);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  -webkit-tap-highlight-color: transparent;
  color: currentColor;
}

::selection {
  background-color: var(--active);
  color: var(--active-ink);
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* Skip-Link: unsichtbar, bis die Tastatur ihn erreicht — dann ein Block in der Berührungsfarbe */
.skip-link {
  left: -999px;
  position: absolute;
  top: 0;
}

.skip-link:focus {
  background-color: var(--active);
  color: var(--active-ink);
  font-size: 0.9rem;
  font-weight: var(--weight-strong);
  left: 0.5rem;
  letter-spacing: 0.08em;
  outline-offset: 0;
  padding: 0.9rem 1.1rem;
  position: fixed;
  text-decoration: none;
  text-transform: uppercase;
  top: 0.5rem;
  z-index: 10;
}

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

/* --------------------------------------------------------------------------
   Kopf — Name als Versal-Logo, daneben die Sektionsmarke (wie Header der Website)
   -------------------------------------------------------------------------- */

.header {
  align-items: center;
  background-color: var(--header, var(--ground));
  border-bottom: 1px solid var(--header-rule, transparent);
  color: var(--header-ink, var(--ground-ink));
  display: flex;
  justify-content: space-between;
  padding: var(--header-pad-y, calc(var(--outer-spacing) * 2)) var(--outer-spacing);
}

@media (min-width: 500px) {
  .header {
    padding-bottom: var(--header-pad-y, calc(var(--outer-spacing) * 0.75));
    padding-top: var(--header-pad-y, calc(var(--outer-spacing) * 0.75));
  }
}

.logo-container {
  align-items: center;
  display: flex;
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
  min-width: 0;
}

.logo {
  font-family: var(--font-headline, var(--font-sans));
  font-size: 1.15rem;
  font-weight: var(--weight-headline, var(--weight-display));
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo:hover,
.logo:focus-visible,
.logo:active {
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.12em;
}

@media (min-width: 350px) {
  .logo { font-size: 1.5rem; }
}

@media (min-width: 768px) {
  .logo { font-size: 2.25rem; }
}

/* Optionaler Akzent in der Wortmarke (links.js: nameAccent) */
.logo-accent {
  color: var(--header-accent, inherit);
}

/* Optionale Unterzeile der Wortmarke (links.js: sub) */
.logo-sub {
  color: var(--header-ink-soft, var(--ground-ink-soft));
  display: block;
  font-size: 0.75rem;
  font-weight: var(--weight-strong);
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo-sub[hidden] {
  display: none;
}

.section-mark {
  border-left: 1px solid var(--header-ink-soft, var(--ground-ink-soft));
  color: var(--header-ink-soft, var(--ground-ink-soft));
  font-size: 0.75rem;
  font-weight: var(--weight-strong);
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0 0 0 auto; /* bleibt rechts, auch wenn der Kopf umbricht */
  padding-left: 0.6rem;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Kanäle als Icon-Reihe im Kopf (links.js: socialsInHeader) — mobil als
   zweite Zeile unter der Wortmarke, ab 700 px rechts neben ihr */
.header {
  flex-wrap: wrap;
}

.channels {
  display: flex;
  flex-basis: 100%;
  gap: 0;
  margin: 0.25rem 0 0 -0.6rem;
}

/* Mit Icon-Reihe wandert die Marke mobil ans Ende dieser Reihe */
.channels:not([hidden]) {
  flex-basis: auto;
}

.channels:not([hidden]) + .section-mark {
  margin-left: auto;
  margin-top: 0.25rem;
}

.channels[hidden] {
  display: none;
}

.channel {
  align-items: center;
  color: inherit;
  display: inline-flex;
  height: 2.75rem;
  justify-content: center;
  transition: color 0.15s ease-out;
  width: 2.75rem; /* 44 px: sechs Ziele + Marke = 320 px, passen in 375 px; unter 350 px rückt die Marke in die nächste Zeile */
}

.channel svg {
  fill: currentColor;
  height: 1.375rem;
  width: 1.375rem;
}

.channel:hover,
.channel:focus-visible,
.channel:active {
  color: var(--header-accent, var(--active));
}

@media (min-width: 700px) {
  .channels {
    gap: 0.25rem;
    margin: 0 0 0 auto;
  }

  .channels:not([hidden]) + .section-mark {
    margin-left: 1rem;
    margin-top: 0;
  }
}

/* --------------------------------------------------------------------------
   Banner — der weiße Streifen der Startseite („Meine Abenteuer im
   Europaparlament ›"), hier für die eine Sache, die gerade vorgeht.
   -------------------------------------------------------------------------- */

.banner {
  align-items: center;
  animation: rise 0.4s var(--ease-out) both;
  order: 1;
  background-color: var(--banner, var(--sheet));
  color: var(--banner-ink, var(--sheet-ink));
  display: flex;
  gap: 0.85rem;
  justify-content: flex-start;
  line-height: 1.1;
  padding: 1rem 1.5rem;
  text-decoration: none;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}

.banner[hidden] {
  display: none;
}

@media (min-width: 500px) {
  .banner {
    padding: 1.25rem 2rem;
  }
}

.banner-text {
  display: block;
  min-width: 0;
}

.banner-label {
  display: block;
  font-family: var(--font-display, var(--font-sans));
  font-size: 1.15rem;
  font-weight: var(--weight-display);
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  text-wrap: balance;
}

@media (min-width: 500px) {
  .banner-label { font-size: 1.5rem; }
}

.banner-note {
  color: var(--banner-ink-soft, var(--sheet-ink-soft));
  display: block;
  font-family: var(--font-note, inherit);
  font-size: 0.95rem;
  font-weight: var(--weight-body);
  line-height: 1.35;
  margin-top: 0.3rem;
  text-transform: none;
  transition: color 0.15s ease-out;
}

.banner-arrow {
  flex-shrink: 0;
  height: 1.45rem;
  transition: transform 0.15s ease-out;
  width: 1.45rem;
}

.banner:hover,
.banner:focus-visible,
.banner:active {
  background-color: var(--banner-active, var(--active));
  color: var(--active-ink);
  outline: none;
}

.banner:hover .banner-note,
.banner:focus-visible .banner-note,
.banner:active .banner-note {
  color: var(--active-ink);
}

.banner:hover .banner-arrow,
.banner:focus-visible .banner-arrow,
.banner:active .banner-arrow {
  transform: translateX(0.25rem);
}

.banner:focus-visible .banner-label {
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.12em;
}

/* --------------------------------------------------------------------------
   Hauptfläche — mobil: Blatt zuerst, dann Menü.
   Desktop: Menü links, Blatt rechts (Startseiten-Komposition der Website).
   -------------------------------------------------------------------------- */

.main {
  display: grid;
  flex: 1;
  gap: calc(var(--outer-spacing) * 1.25);
  padding: var(--main-pad-top, calc(var(--outer-spacing) / 2)) var(--outer-spacing) calc(var(--outer-spacing) * 2);
  align-content: start;
}

/* Das Blatt: EIN Papier, darauf Gruppen (Termine, Aktuell) — getrennt durch
   eine Linie, nicht durch einen zweiten Container */
.sheets {
  animation: rise 0.4s var(--ease-out) both;
  background-color: var(--sheet);
  box-shadow: var(--sheet-shadow, none);
  color: var(--sheet-ink);
  min-width: 0;
  order: 2;
  padding: var(--sheet-pad-top) var(--sheet-pad) 0;
}

.sheets[hidden] {
  display: none;
}

@media (min-width: 600px) {
  .sheets { max-width: 560px; }
}

@media (min-width: 1024px) {
  .main {
    align-items: start;
    column-gap: 5rem;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
    padding-top: var(--main-pad-top, var(--outer-spacing));
    row-gap: calc(var(--outer-spacing) * 1.25);
  }

  .banner {
    grid-column: 1 / -1;
  }

  .main.main--no-sheet {
    grid-template-columns: minmax(0, max-content);
  }

  .sheets {
    animation-delay: 120ms;
    max-width: none;
    order: 3;
  }
}

@media (min-width: 1440px) {
  .main { column-gap: 8rem; }
}

/* ---- Die Gruppen auf dem Blatt ---- */

.sheet[hidden] {
  display: none;
}

/* Zweite Gruppe: eine 2-px-Linie bis zur Blattkante, dann die Überschrift */
.sheet:not([hidden]) ~ .sheet:not([hidden]) {
  border-top: 2px solid var(--sheet-ink);
  margin: 0.75rem calc(-1 * var(--sheet-pad)) 0;
  padding: 1.25rem var(--sheet-pad) 0;
}

.sheet-title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 1.25rem;
  font-weight: var(--weight-display);
  letter-spacing: 0.03em;
  line-height: 1;
  margin: 0 0 0.25rem;
  text-transform: uppercase;
}

@media (min-width: 500px) {
  .sheet-title { font-size: 1.5rem; }
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  align-items: center;
  color: inherit;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto;
  margin: 0 calc(-1 * var(--sheet-pad));
  min-height: 3.5rem;
  padding: 1rem var(--sheet-pad);
  text-decoration: none;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}

.row--with-image {
  grid-template-columns: auto 1fr auto;
}

.rows > li + li .row {
  border-top: 1px solid var(--sheet-rule);
}

/* Mehr Luft über der Blatt-Überschrift als darunter */
.rows > li:first-child .row {
  padding-top: 0.6rem;
}

.row-thumb {
  aspect-ratio: 2 / 3;
  background-color: var(--sheet-rule);
  display: block;
  height: auto; /* width/height-Attribute des <img> nicht als feste Höhe übernehmen */
  object-fit: cover;
  width: 3.25rem;
}

@media (min-width: 500px) {
  .row-thumb { width: 3.75rem; }
}

.row-text {
  min-width: 0;
}

.row-label {
  display: block;
  font-family: var(--font-headline, var(--font-sans));
  font-size: 1.15rem;
  font-weight: var(--weight-headline, var(--weight-display));
  letter-spacing: 0.03em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  text-wrap: balance;
}

@media (min-width: 500px) {
  .row-label { font-size: 1.5rem; }
}

.row-note {
  color: var(--sheet-ink-soft);
  display: block;
  font-family: var(--font-note, inherit);
  font-size: 0.95rem;
  font-weight: var(--weight-body);
  line-height: 1.35;
  margin-top: 0.3rem;
  transition: color 0.15s ease-out;
}

.row-arrow {
  flex-shrink: 0;
  height: 1.45rem;
  transition: transform 0.15s ease-out;
  width: 1.45rem;
}

.row:hover,
.row:focus-visible,
.row:active {
  background-color: var(--active);
  color: var(--active-ink);
  outline: none;
}

.row:hover .row-note,
.row:focus-visible .row-note,
.row:active .row-note {
  color: var(--active-ink);
}

.row:hover .row-arrow,
.row:focus-visible .row-arrow,
.row:active .row-arrow {
  transform: translateX(0.25rem);
}

.row:focus-visible .row-label {
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.12em;
}

/* ---- Das Menü: die Versal-Wörter der Startseite, jedes ein Ziel ---- */

.menu {
  display: flex;
  flex-direction: column;
  margin-left: -0.05rem;
  min-width: 0;
  order: 3;
}

@media (min-width: 500px) {
  .menu { margin-left: -0.35rem; }
}

@media (min-width: 1024px) {
  .menu { order: 2; }
}

.menu-item {
  animation: rise 0.4s var(--ease-out) both;
  animation-delay: calc(60ms * var(--i, 0));
  color: inherit;
  display: block;
  padding: 0.25rem 0 1.1rem;
  text-decoration: none;
  width: fit-content;
}

.menu-label {
  display: block;
  font-family: var(--font-display, var(--font-sans));
  font-size: clamp(2.75rem, 13vw, 6.75rem);
  hyphens: auto;
  width: fit-content;
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-display, 1);
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

@media (min-width: 1024px) {
  .menu-label {
    font-size: clamp(3.5rem, 6.5vw, 6.75rem);
  }
}

.menu-url {
  color: var(--ground-ink-soft);
  display: block;
  font-size: 0.8rem;
  font-weight: var(--weight-strong);
  letter-spacing: 0.1em;
  line-height: 1;
  margin-top: 0.05rem;
  padding-left: 0.2rem;
  text-transform: uppercase;
  transition: color 0.15s ease-out;
}

@media (min-width: 500px) {
  .menu-url { font-size: 0.9rem; }
}

@media (min-width: 1024px) {
  .menu-url { margin-top: -0.15rem; }
}

.menu-item:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

.menu-item:hover .menu-label,
.menu-item:focus-visible .menu-label,
.menu-item:active .menu-label {
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.06em;
}


.menu-item:hover .menu-url,
.menu-item:focus-visible .menu-url,
.menu-item:active .menu-url {
  color: var(--ground-ink);
}

/* --------------------------------------------------------------------------
   Fuß — die hellgraue Leiste der Website, mit den Kanälen und dem Rechtlichen
   -------------------------------------------------------------------------- */

.footer {
  background-color: var(--footer);
  border-top: 1px solid var(--footer-rule, transparent);
  color: var(--footer-ink);
  padding: 1.25rem var(--outer-spacing) 1.5rem;
}

/* Optionale Fußnote (links.js: footnote) — eine Zeile Kleingedrucktes über den Kanälen */
.footnote {
  flex-basis: 100%;
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 0 0 1rem;
  max-width: 42rem;
}

.footnote[hidden] {
  display: none;
}

/* Ab 600 px: Kanäle und Rechtliches in EINER Zeile, Rechtliches rechts */
@media (min-width: 600px) {
  .footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    padding-bottom: 1.25rem;
  }
}

.socials {
  display: grid;
  gap: 0.25rem 0;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
}

.social {
  align-items: center;
  color: inherit;
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  font-weight: var(--weight-strong);
  gap: 0.45rem;
  justify-content: center;
  letter-spacing: 0.08em;
  line-height: 1;
  min-height: 4.5rem;
  padding: 0.75rem 0.25rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}

.social svg {
  fill: currentColor;
  height: 1.75rem;
  width: 1.75rem;
}

.social:hover,
.social:focus-visible,
.social:active {
  background-color: var(--active);
  color: var(--active-ink);
  outline: none;
}

.social:focus-visible span {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (min-width: 600px) {
  .socials {
    gap: 0.25rem 0;
    grid-template-columns: repeat(3, max-content);
    margin-left: -0.9rem;
  }

  /* Trennstrich wie in der Fußleiste der Website — nur innerhalb einer Reihe */
  .socials > li:not(:nth-child(3n + 1)) {
    border-left: 2px solid var(--footer-sep, currentColor);
  }

  .social {
    flex-direction: row;
    font-size: 0.85rem;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0.5rem 0.9rem;
  }

  .social svg {
    height: 1.5rem;
    width: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .socials {
    grid-template-columns: repeat(6, max-content);
  }

  .socials > li:not(:nth-child(3n + 1)) {
    border-left: 0;
  }

  .socials > li:not(:nth-child(6n + 1)) {
    border-left: 2px solid var(--footer-sep, currentColor);
  }
}

.legal {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8rem;
  font-weight: var(--weight-strong);
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0.75rem 0 0;
  text-transform: uppercase;
}

@media (min-width: 600px) {
  .legal {
    font-size: 0.85rem;
    margin: 0 0 0 auto;
  }
}

/* Ohne JavaScript bleibt keine leere graue Leiste stehen */
.socials:empty,
.legal:empty {
  display: none;
}

.footer:not(:has(.socials > li, .legal > a)) {
  display: none;
}

.legal a {
  display: inline-block;
  padding: 1rem 0;
  text-decoration: none;
}

.legal a:hover,
.legal a:focus-visible,
.legal a:active {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.legal a + a {
  border-left: 2px solid var(--footer-sep, currentColor);
  margin-left: 0.9rem;
  padding-left: 0.9rem;
}

/* --------------------------------------------------------------------------
   Textseiten (Impressum, Datenschutz) — das weiße Blatt als Lesefläche
   -------------------------------------------------------------------------- */

.page {
  animation: rise 0.4s var(--ease-out) both;
  background-color: var(--sheet);
  color: var(--sheet-ink-soft);
  font-size: 1rem;
  line-height: 1.55;
  margin: calc(var(--outer-spacing) / 2) var(--outer-spacing) calc(var(--outer-spacing) * 2);
  max-width: 44rem;
  padding: calc(var(--sheet-pad) * 1.25) var(--sheet-pad) var(--sheet-pad);
}

.page h1 {
  color: var(--sheet-ink);
  font-family: var(--font-headline, var(--font-sans));
  font-size: 1.5rem;
  font-weight: var(--weight-headline, var(--weight-display));
  letter-spacing: 0.03em;
  line-height: 1;
  margin: 0 0 1.5rem;
  text-transform: uppercase;
}

@media (min-width: 500px) {
  .page h1 { font-size: 2rem; }
}

.page h2 {
  color: var(--sheet-ink);
  font-family: var(--font-headline, var(--font-sans));
  font-size: 1.05rem;
  font-weight: var(--weight-headline, var(--weight-display));
  letter-spacing: 0.03em;
  line-height: 1.15;
  margin: 2rem 0 0.5rem;
  text-transform: uppercase;
}

.page h3 {
  color: var(--sheet-ink);
  font-size: 1rem;
  font-weight: var(--weight-strong);
  line-height: 1.3;
  margin: 1.25rem 0 0.25rem;
}

.page p,
.page ul {
  margin: 0 0 0.9rem;
}

.page ul {
  padding-left: 1.2rem;
}

.page address {
  font-style: normal;
  margin: 0 0 0.9rem;
}

.page a {
  color: var(--sheet-ink);
  font-weight: var(--weight-strong);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

.page a:hover,
.page a:focus-visible,
.page a:active {
  background-color: var(--active);
  color: var(--active-ink);
  outline: none;
  text-decoration: none;
}

.page .back {
  display: inline-block;
  margin-top: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   Kein JavaScript: die Grundziele stehen trotzdem da.
   -------------------------------------------------------------------------- */

.noscript-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.noscript-links a {
  display: block;
  font-family: var(--font-headline, var(--font-sans));
  font-size: 1.5rem;
  font-weight: var(--weight-headline, var(--weight-display));
  padding: 0.5rem 0;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Der eine Moment: das Blatt und die Wörter setzen sich auf die Fläche.
   -------------------------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
