/* 1. LOCAL FONTS */
@font-face {
  font-family: Youth;
  src: url("fonts/Youth-Bold.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

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

/* 2. GLOBAL CONTROLS
Colors, page gutters and animation timing.
Longer durations slow the animations; float-distance controls vertical travel.
clamp(minimum, fluid value, maximum) keeps sizes responsive. */
:root {
  --ink: #10100f;
  --paper: #fff;
  --metal-dark: #969a95;
  --metal-light: #fff;
  --metal-base: #ced0cc;
  --shine-duration: 9s;
  --shine-delay: 1s;
  --float-duration: 15s;
  --float-distance: 7px;
  --offer-rotation: 10deg;
  /* Clockwise tilt of the badge content. */
  --offer-logo-correction: -10deg;
  /* Compensate for the tilt inside the supplied SVG. */
  --page-gutter: clamp(1.25rem, 2.8vw, 4rem);

  /* Shared keyboard-focus appearance on every background. */
  --focus-color: #0055ff;
  --focus-halo: #fff;
  --focus-width: 3px;
  --focus-offset: 3px;
  --focus-radius: 4px;
}

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

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

/* 3. BASE STYLES AND ACCESSIBILITY HELPERS */
* {
  box-sizing: border-box;
}

body {
  /* Fill short pages without fixing or overlaying the footer. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Alpina, Georgia, serif;
}

/* Fill the viewport with short pages; keep natural content height when
   text, zoom or a short window requires scrolling. */
body > main {
  flex: 1 0 auto;
}

.site-header,
.site-footer {
  flex-shrink: 0;
}

a {
  color: inherit;
  text-underline-offset: 2.5px;
  cursor: pointer;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* Low specificity preserves the existing pill and circular button shapes. */
:where(a, button, input, select, textarea) {
  border-radius: var(--focus-radius);
}

/* The small halo keeps the blue distinct over metallic gradients
   and decorative lines. Outline spacing is identical for links and buttons. */
:is(a, button, input, select, textarea):focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: var(--focus-offset);
  box-shadow: 0 0 0 calc(var(--focus-width) + var(--focus-offset))
    var(--focus-halo);
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-weight: 400;
}

h2,
h3 {
  font-size: 1.45rem;
  font-weight: 400;
  margin: 2rem 0 0.7rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  background: white;
  padding: 2px 4px;
  font:
    400 15px/1.4 Youth,
    sans-serif;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* 4. HEADER */
.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.site-header a {
  font-family: Youth, sans-serif;
  font-size: 21px;
  text-decoration: none;
}

/* 5. LANDING PAGE AND DECORATIVE VERTICAL LINES */
.landing {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px var(--page-gutter) 70px;
}

.rules {
  position: absolute;
  inset: 0 0 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.rules i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--line-position);
  width: 1px;
  background: var(--ink);
  opacity: 1;
}

/* 6. METALLIC BUTTONS AND FILM OFFER */
.offer-position {
  align-self: flex-end;
  margin: 0 12px 24px;
  transform: rotate(var(--offer-rotation));
}

.metal {
  background: linear-gradient(
    120deg,
    var(--metal-dark) 0%,
    var(--metal-base) 24%,
    var(--metal-light) 34%,
    var(--metal-base) 45%,
    var(--metal-dark) 70%,
    var(--metal-base) 100%
  );
  background-size: 250% 100%;
  animation: metal-shine var(--shine-duration) ease-in-out var(--shine-delay)
    infinite;
}

.film-offer {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 50%;
  text-align: center;
  text-decoration: none;
  animation:
    metal-shine var(--shine-duration) ease-in-out var(--shine-delay) infinite,
    offer-float var(--float-duration) ease-in-out infinite;
}

.offer-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  font:
    400 clamp(17px, 1.5vw, 22px)/1.02 Youth,
    sans-serif;
  padding: 1em;
}

.offer-copy strong {
  font-weight: 400;
  max-width: 10em;
}

.offer-copy strong + strong {
  margin-top: 0.4em;
}

.supported {
  font-size: 9px;
  margin-top: 1.7em;
}

.offer-copy img {
  width: 53px;
  height: 38px;
  object-fit: contain;
  transform: rotate(var(--offer-logo-correction));
  margin-top: 4px;
}

/* 7. HEADLINE, INTRODUCTION, FACTS AND CALLS TO ACTION */
.hero {
  --hero-copy-size: clamp(1.2rem, 1.7vw, 2.3rem);
  margin: 0 auto;
  max-width: 100%;
  text-align: center;
}

.hero h1 {
  font:
    400 clamp(2.5175rem, 3.8vw, 5.32rem)/1.04 Youth,
    sans-serif;
  letter-spacing: -0.035em;
  margin: 0 0 23px;
  text-wrap: balance;
}

.intro {
  font-size: var(--hero-copy-size);
  line-height: 1.13;
  max-width: 25em;
  margin: 0 auto;
  text-wrap: balance;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 28px;
  list-style: none;
  padding: 0;
  margin: 40px 0;
  font-size: var(--hero-copy-size);
  line-height: 1.2;
}

.facts li {
  white-space: nowrap;
}

.number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: white;
  border-radius: 50%;
  width: 1.2em;
  height: 1.2em;
  font-size: 0.85em;
  vertical-align: 0.04em;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.button {
  font:
    400 14px/1.2 Youth,
    sans-serif;
  min-height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 100px;
  padding: 17px 40px;
  width: auto;
  min-width: 250px;
  max-width: 100%;
  text-decoration: none;
}

.button:not(.secondary):hover,
.film-offer:hover {
  box-shadow: 0 0 0 2px var(--ink);
}

.button:nth-child(2) {
  animation-delay: 2s;
}

.secondary {
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}
/* 8. FOOTER AND PARTNER LOGOS */
.site-footer {
  /* The solid dark background needs no white focus halo. */
  --focus-halo: transparent;
  background: #0e0e0d;
  color: white;
  padding: 38px var(--page-gutter);
  display: grid;
  gap: 32px;
}

.footer-brand {
  max-width: 620px;
}

.footer-brand a {
  display: block;
}

.footer-brand img {
  width: 100%;
}

.supporters {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.supporters img:first-child {
  width: 148px;
}

.supporters img:last-child {
  width: 61px;
}

.site-footer nav {
  font:
    400 15px/1.1 Youth,
    sans-serif;
}

.site-footer nav a {
  text-decoration: none;
  display: inline-block;
  padding: 2px 0;
}

.site-footer nav a:hover,
.site-footer nav a[aria-current] {
  text-decoration: underline;
}

.funding {
  max-width: 29em;
  font-size: 16px;
  line-height: 1.15;
  margin: 0;
}

/* 9. TEXT PAGES: IMPRESSUM, DATENSCHUTZ, BARRIEREFREIHEIT */
.text-page {
  min-height: calc(100svh - 300px);
  padding: 35px var(--page-gutter) 100px;
}

.back {
  font:
    400 15px Youth,
    sans-serif;
}

.text-page article {
  max-width: 740px;
  margin: 65px auto 0;
  font-size: clamp(1.15rem, 1.4vw, 1.4rem);
  line-height: 1.4;
}

.text-page h1 {
  font-size: 1.7rem;
  margin-bottom: 1rem;
}

.draft-note {
  border-left: 2px solid currentColor;
  padding-left: 1em;
  font-size: 0.9em;
}

/* 10. ANIMATION KEYFRAMES
The shine rests through 65% of each cycle and sweeps at 82%. */
@keyframes metal-shine {
  0%,
  65%,
  100% {
    background-position: 30% 50%;
  }

  82% {
    background-position: 90% 50%;
  }
}

@keyframes offer-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(calc(-1 * var(--float-distance)));
  }
}

/* 11. TABLET AND WIDER: 700px+ */
@media (min-width: 700px) {
  .landing {
    min-height: 0;
  }

  .landing {
    --line-side: 18%;
  }

  .rules i {
    display: block;
    opacity: 1;
    position: absolute;
  }

  /* Three lines left, four right; the inner lines share the hero boundary. */
  .rules i:nth-child(1) {
    left: 3%;
  }

  .rules i:nth-child(2) {
    left: 9%;
  }

  .rules i:nth-child(3) {
    left: 11%;
  }

  .rules i:nth-child(4) {
    left: var(--line-side);
  }

  .rules i:nth-child(5) {
    left: calc(100% - var(--line-side));
  }

  .rules i:nth-child(6) {
    left: 92%;
  }

  .rules i:nth-child(7) {
    left: 97%;
  }

  .rules i:nth-child(8) {
    display: none;
  }

  .site-footer {
    /* Reserve space for the main logo; long funding text must wrap instead
       of forcing the logo column to shrink near the tablet breakpoint. */
    grid-template-columns: minmax(0, 3fr) minmax(240px, 2fr);
    align-items: start;
    gap: 28px 50px;
  }

  .supporters {
    justify-content: flex-end;
  }

  .funding {
    text-align: right;
    justify-self: end;
  }

  .footer-brand {
    width: min(100%, 620px);
  }

  .hero {
    width: 85%;
  }

  .offer-position {
    margin-bottom: 36px;
  }

  .text-page .back {
    margin-left: 8%;
  }

  .intro {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.2;
  }

  .site-footer nav {
    align-self: end;
  }
}

/* 12. DESKTOP: 1100px+ */
@media (min-width: 1100px) {
  .site-header {
    height: 80px;
  }

  .landing {
    --line-side: 24%;

    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    /* Spend spare height on whitespace rather than forcing a tall page.
       Intrinsic content height remains the floor, so nothing is clipped. */
    min-height: min-content;
    padding: clamp(20px, calc((100dvh - 640px) * 0.18), 100px)
      calc(var(--line-side) + 32px);
  }

  .rules i {
    display: block;
    opacity: 1;
  }

  /* Three lines left, four right; the inner lines share the hero boundary. */
  .rules i:nth-child(1) {
    left: 5%;
  }

  .rules i:nth-child(2) {
    left: 11%;
  }

  .rules i:nth-child(3) {
    left: 13%;
  }

  .rules i:nth-child(4) {
    left: var(--line-side);
  }

  .rules i:nth-child(5) {
    left: calc(100% - var(--line-side));
  }

  .rules i:nth-child(6) {
    left: 90%;
  }

  .rules i:nth-child(7) {
    left: 95%;
  }

  .rules i:nth-child(8) {
    display: none;
  }

  .hero {
    width: 100%;
  }

  .hero h1 {
    white-space: normal;
  }

  .intro {
    width: calc(100% + 4rem);
    max-width: none;
    margin-left: -2rem;
  }

  .offer-position {
    position: absolute;
    right: 6.7%;
    top: 65px;
    margin: 0;
  }

  .facts {
    flex-wrap: wrap;
    gap: clamp(24px, 3.5vw, 65px);
    margin: 58px 0 46px;
  }

  .actions {
    flex-wrap: wrap;
  }

  .button {
    font-size: clamp(14px, 0.9vw, 17px);
    width: auto;
    min-width: 250px;
    max-width: 100%;
  }

  .site-footer {
    padding-top: 44px;
    padding-bottom: 38px;
    min-height: 230px;
  }

  .footer-brand {
    width: 600px;
    max-width: 100%;
  }

  .text-page {
    padding-top: 45px;
    min-height: calc(100svh - 310px);
  }

  .text-page article {
    margin-top: 85px;
  }

  .intro {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.2;
  }

  .rules i:first-child,
  .rules i:last-child {
    opacity: 1;
  }
}

/* Fit the desktop landing page to 100dvh whenever its content fits.
   Never use a fixed height or hidden overflow: short/zoomed windows may scroll. */
@media (min-width: 1100px) {
  body:has(> .landing) .site-header {
    height: clamp(56px, 8dvh, 80px);
  }

  .landing .hero h1 {
    margin-bottom: clamp(14px, 2.5dvh, 23px);
  }

  .landing .facts {
    margin: clamp(20px, 4dvh, 58px) 0 clamp(18px, 3.5dvh, 46px);
  }

  .landing .offer-position {
    top: clamp(28px, 6dvh, 65px);
    right: clamp(24px, 4vw, 76px);
  }

  .landing .film-offer {
    width: clamp(170px, 16vw, 250px);
  }

  body:has(> .landing) .site-footer {
    min-height: 0;
    padding-block: clamp(20px, 3dvh, 38px);
    row-gap: clamp(16px, 2.5dvh, 28px);
  }
}

/* 13. SYSTEM ACCESSIBILITY PREFERENCES */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .metal {
    border: 2px solid ButtonText;
  }

  .number {
    border: 1px solid currentColor;
  }

  .site-footer img {
    background: #111;
  }

  .rules {
    display: none;
  }
}

@media (max-width: 700px) {
  .rules {
    padding: 88px 4vw 205px;
  }

  .text-page {
    padding-top: calc(72px + 20px);
  }

  .landing {
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 20px);
    padding: 88px var(--page-gutter) 205px;
  }

  .landing .rules {
    order: 1;
  }

  .landing .offer-position {
    order: 3;
    position: absolute;
    right: var(--page-gutter);
    bottom: 24px;
    margin: 0;
  }

  .landing .film-offer {
    width: 155px;
  }

  .hero {
    background: var(--paper);
    padding: 20px 0;
  }

  .landing .hero {
    order: 2;
    width: calc(100% + 2 * var(--page-gutter));
    max-width: none;
    margin: auto calc(-1 * var(--page-gutter));
    padding-inline: var(--page-gutter);
  }

  .site-header {
    position: fixed;
    justify-content: center;
    align-items: center;
    background: #ffffffd0;
    backdrop-filter: blur(10px);
    width: 100%;
  }

  .site-footer {
    display: flex;
    flex-direction: column;
  }

  .site-footer nav {
    order: 2;
  }

  .site-footer .funding {
    order: 1;
  }

  .hero {
    --hero-copy-size: clamp(15.2px, 4.275dvw, 17.1px);
  }

  .hero h1 {
    font-size: clamp(33.25px, 8.55vw, 38px);
  }
}

/* 14. FINAL COMPONENT ADJUSTMENTS
These overrides follow the responsive rules intentionally.
Edit here for offer typography and the final desktop intro sizing. */

/* Keep the offer typography within the circular silhouette. The supplied ÖFI
artwork already includes the “Unterstützt von” credit. */
.offer-copy {
  width: 76%;
  font-size: clamp(14px, 1.35vw, 22px);
}

.offer-copy strong:first-child {
  max-width: 7em;
}

.offer-copy img {
  width: 62px;
  height: 46px;
  margin-top: 14px;
}

/* 15. OPTIONAL ANIMATION PAUSE CONTROL */
.motion-toggle {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  padding: 2px 0;
  cursor: pointer;
}

.motion-control[hidden] {
  display: none;
}

.motion-paused .metal {
  animation-play-state: paused;
}

.motion-toggle:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Compact offer typography: more breathing room inside the small circle. */
@media (max-width: 699px) {
  .offer-copy {
    font-size: 14px;
    line-height: 1.08;
  }

  .offer-copy img {
    width: 50px;
    height: 38px;
    margin-top: 10px;
  }
}

/* Keep operating-system focus colors in high-contrast mode. */
@media (forced-colors: active) {
  :is(a, button, input, select, textarea):focus-visible {
    outline-color: Highlight;
    box-shadow: none;
  }
}

:root {
  --line: #cfcfcf;
  --brand: #00500a; /* offizielles BFF-Grün, in beiden Modi */
  --accent: #00500a;
  --accent-soft: #eef4ee;
  --error: #a3120f;
  --bg: #ffffff;
  --fg: #111111;
  --muted: #474747;
}


[hidden] {
  display: none !important;
}
img {
  max-width: 100%;
}

form {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.text-page button.button.metal {
  border: 0;
  color: inherit;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

legend {
  padding: 0;
  margin-bottom: 0.75rem;
  font: 400 15px Youth, sans-serif;
}

legend .num {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.45rem !important;
  font-weight: 400;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.opt:hover {
  border-color: black;
}

.opt:has(input:checked) {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  padding: calc(0.75rem - 1px) calc(1rem - 1px);
}

.opt input {
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.2rem 0 0;
  flex: none;
  accent-color: var(--accent);
}

.opt > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.opt-desc {
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.45;
}
.opt:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

.footer {
  margin-top: 4rem;
}

/* Fairness Profil */
.profile {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile svg {
  width: 100%;
  max-width: 30rem;
  height: auto;
  display: block;
  margin: 0 auto;
}

.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legend li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.swatch {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 4px;
  border: 1px solid white;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: #000;
  margin-top: 0.1rem;
}
.swatch.off {
  background: white;
  color: black;
  border-color: var(--line);
}

.legend .lvl {
  display: block;
  font-size: 1rem;
  font-weight: 400;
}
fieldset.invalid .opt {
  border-color: var(--error);
}
.field-error {
  color: var(--error);
  font-weight: 600;
  font-size: 1rem;
}

.errors {
  display: flex;
  flex-direction: column;
}

.errors h2 {
  color: var(--error);
}
.errors a {
  color: var(--fg);
}

.errors ul {
  list-style: disc;
  margin: 0;
  padding-left: 1em;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.progress {
  color: var(--muted);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

/* Ergebnis */
.result {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 2rem;
}
.result h2:focus {
  outline: none;
}
.result h2:focus-visible {
  outline: 3px solid var(--accent);
}

.pkg {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pkg-name {
  font-family: Youth, sans-serif;
  font-size: 1.45rem;
  line-height: 1.15;
  margin: 0;
}

.pkg h3 {
  margin: 0;
}

.pkg ul,
.result ul.plain {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.hints {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.hints:empty {
  display: none;
}
.hint {
  border-left: 4px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.hint strong {
  display: block;
}

.people {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.people-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
}
.person {
  display: flex;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.875rem;
}
.person figure {
  margin: 0;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 5.5rem;
}
.photo {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  background: var(--accent-soft);
}
.initials {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.5rem;
  border: 1px solid var(--line);
}
.person figcaption {
  font-size: 0.6875rem;
  line-height: 1.3;
  color: var(--muted);
}
.person .who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.person .name {
  font-weight: 700;
}
.person .role {
  color: var(--muted);
  font-size: 1rem;
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.address {
  font-weight: 700;
  user-select: all;
  word-break: break-all;
}
.toast {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 600;
  min-height: 1.5rem;
}

