/* ==========================================================================
   style.css — STRUKTUR. Bleibt bei jeder Person gleich.
   Farben, Schrift und Rollen kommen aus theme.css.
   ========================================================================== */

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

:root {
  --outer-spacing: 0.75rem;
  --sheet-pad: 1.25rem;
  --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;
  }
}

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;
}

.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;
  display: flex;
  justify-content: space-between;
  padding: calc(var(--outer-spacing) * 1.25) var(--outer-spacing) var(--outer-spacing);
}

@media (min-width: 500px) {
  .header {
    padding-bottom: calc(var(--outer-spacing) * 0.75);
    padding-top: 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 {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: var(--weight-display);
  margin: -0.4rem 0;
  padding: 0.4rem 0;
  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; }
}

.section-mark {
  border-left: 1px solid var(--ground-ink-soft);
  color: var(--ground-ink-soft);
  font-size: 0.75rem;
  font-weight: var(--weight-strong);
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0 0 0 0.6rem;
  padding-left: 0.6rem;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   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(--sheet);
  color: var(--sheet-ink);
  display: flex;
  gap: 0.85rem;
  justify-content: flex-start;
  line-height: 1.1;
  margin: 0 calc(-1 * var(--outer-spacing));
  padding: 1rem var(--outer-spacing);
  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 var(--outer-spacing);
  }
}

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

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

.banner-label {
  display: block;
  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(--sheet-ink-soft);
  display: block;
  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(--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: 0 var(--outer-spacing) calc(var(--outer-spacing) * 2);
  align-content: start;
}

@media (min-width: 600px) {
  .sheet { 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(--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);
  }

  .sheet { max-width: none; }
}

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

/* ---- Das weiße Blatt: der Banner der Website, zu einer Fläche gewachsen ---- */

.sheet {
  animation: rise 0.4s var(--ease-out) both;
  background-color: var(--sheet);
  color: var(--sheet-ink);
  order: 2;
  padding: var(--sheet-pad) var(--sheet-pad) 0;
}

.sheet[hidden] {
  display: none;
}

@media (min-width: 1024px) {
  .sheet {
    animation-delay: 120ms;
    order: 3;
  }
}

.sheet-title {
  color: var(--sheet-ink-soft);
  font-size: 0.8rem;
  font-weight: var(--weight-strong);
  letter-spacing: 0.1em;
  line-height: 1;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

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

.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: 0.85rem 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);
}

/* Die erste Zeile schließt an die Blatt-Beschriftung an */
.rows > li:first-child .row {
  padding-top: 0.5rem;
}

.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-size: 1.15rem;
  font-weight: 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-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-size: clamp(2.75rem, 13vw, 6.75rem);
  hyphens: auto;
  width: fit-content;
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  line-height: 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.3rem;
  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.1rem; }
}

.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.06em;
  text-underline-offset: 0.1em;
}


.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);
  color: var(--footer-ink);
  padding: 1.25rem var(--outer-spacing) 1.5rem;
}

/* 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: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  list-style: none;
  margin: 0 0 0 -0.75rem;
  overflow: hidden;
  padding: 0;
}

/* Trennstrich wie in der Fußleiste der Website — nur innerhalb einer Zeile:
   jeder Strich sitzt 2 px links außerhalb des Elements; am Zeilenanfang
   liegt er damit außerhalb der Liste und wird abgeschnitten. */
.socials > li {
  border-left: 2px solid currentColor;
  margin-left: -2px;
}

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

.social svg {
  fill: currentColor;
  flex-shrink: 0;
  height: 1.35rem;
  width: 1.35rem;
}

.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 {
    margin-left: -0.9rem;
  }

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

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

.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 currentColor;
  margin-left: 0.9rem;
  padding-left: 0.9rem;
}

/* --------------------------------------------------------------------------
   Nur lokal (file:// oder localhost): Warnung, wenn links.js nicht lesbar ist
   -------------------------------------------------------------------------- */

.dev-warning {
  background-color: var(--active);
  color: var(--active-ink);
  font-size: 0.95rem;
  font-weight: var(--weight-strong);
  line-height: 1.4;
  margin: 0 var(--outer-spacing) var(--outer-spacing);
  padding: 0.75rem 1rem;
}

/* --------------------------------------------------------------------------
   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-size: 1.5rem;
  font-weight: 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-size: 1.05rem;
  font-weight: 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;
}

/* --------------------------------------------------------------------------
   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;
  }
}
