/* German Mentors — "Loud and flat" (tasteskill seed 2111963910), in the colours of German itself:
   black, red and gold as flat fields, white where the pictures are. Text is only ever black or white. */

:root {
  --bg: #ffffff;
  --surface: #f3f3f1;
  --ink: #0a0a0a;
  --muted: #4f4f4f;
  --black: #0a0a0a;
  --red: #dd0000;
  --gold: #ffce00;
  --accent: #dd0000;      /* the one action fill */
  --accent-ink: #ffffff;

  --font-display: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
  --font-text: "EB Garamond", Garamond, Georgia, serif;

  --step-small: 0.9375rem;
  --step-body: 1.25rem;
  --step-lead: clamp(1.5rem, 1.1rem + 1vw, 1.875rem);
  --step-head: clamp(2.75rem, 1.6rem + 5vw, 6.25rem);
  --step-display: clamp(3.5rem, 1rem + 12.5vw, 13.5rem);

  --margin: clamp(1rem, 1.7vw, 1.5rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(7.5rem, 11vw, 12rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-reveal: 800ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
h1, h2, h3, p, figure, ul, table { margin: 0; }
ul[class] { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 1rem; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.places :focus-visible, .levels :focus-visible, .intro :focus-visible { outline-color: currentColor; }

h1, h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; text-wrap: balance; }
p { max-width: 62ch; text-wrap: pretty; }
.head { font-size: var(--step-head); line-height: 0.9; letter-spacing: -0.01em; }
.lead { font-size: var(--step-lead); line-height: 1.3; }
.wrap { padding-inline: var(--margin); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -4rem; z-index: 10; background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; text-decoration: none; }
.skip:focus { top: 0.75rem; }

/* ---------- controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.4rem; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); font-family: var(--font-display); font-size: var(--step-body); letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.button:hover { background: var(--ink); color: var(--bg); }
.button:active { transform: scale(0.96); }
.button-small { min-height: 2.5rem; }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; transition: text-decoration-color var(--t-hover) ease; }
.link:hover, .link:focus-visible { text-decoration-color: currentColor; }
.link-plain { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }

/* ---------- bar ---------- */
.bar { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding-block: 1.25rem; }
.wordmark { font-family: var(--font-display); font-size: var(--step-lead); line-height: 1; letter-spacing: 0.01em; text-transform: uppercase; text-decoration: none; justify-self: start; transition: transform var(--t-hover) var(--ease-out); }
.wordmark:hover { transform: translateY(-2px); }
.bar-links { display: flex; gap: clamp(1rem, 3vw, 2.5rem); font-size: var(--step-body); }
.bar-action { justify-self: end; }

/* ---------- hero ---------- */
.hero { position: relative; height: max(calc(100svh - 5.5rem), 34rem); display: grid; justify-items: center; align-content: start; overflow: clip; padding-top: clamp(1rem, 5svh, 3.5rem); }
.hero-title { font-size: var(--step-display); line-height: 0.86; letter-spacing: -0.01em; text-align: center; position: relative; z-index: 2; }
.lines .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.lines [data-line] { display: block; }
.hero-photo { position: relative; z-index: 1; width: max(27vw, 18rem); aspect-ratio: 3 / 4; margin-top: 2.5vw; overflow: clip; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-note, .hero-fact { position: absolute; bottom: 2rem; font-size: var(--step-body); line-height: 1.4; z-index: 2; }
.hero-note { left: var(--margin); max-width: 18.5rem; }
.hero-fact { right: var(--margin); text-align: right; font-family: var(--font-display); font-size: var(--step-lead); line-height: 1; text-transform: uppercase; max-width: none; }

/* ---------- intro: a red field ---------- */
.intro { background: var(--red); color: #fff; }
.intro-inner { min-height: 92svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-content: center; row-gap: clamp(2rem, 4vw, 3.5rem); padding-block: var(--section); }
.intro-title { grid-column: 1 / 13; font-size: var(--step-display); line-height: 0.86; }
.intro-statement { grid-column: 1 / 9; font-size: var(--step-lead); line-height: 1.3; font-weight: 500; max-width: 46ch; }
.intro-chip { grid-column: 9 / 12; align-self: start; transform: rotate(4deg); background: #fff; padding: 0.6rem 0.6rem 0.4rem; color: var(--ink); }
.intro-chip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
.intro-chip figcaption { font-size: var(--step-small); padding-top: 0.4rem; }

/* ---------- builder: the poster restacks ---------- */
.builder { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: clamp(2rem, 4vw, 3rem); padding-block: var(--section); overflow: clip; }
.builder-facts { display: contents; }
#builder-title { grid-column: 1 / 13; grid-row: 1; }
.stack { grid-column: 1 / 10; grid-row: 2; font-family: var(--font-display); font-size: var(--step-display); line-height: 0.86; text-transform: uppercase; white-space: nowrap; }
.builder-reading { grid-column: 10 / 13; grid-row: 2; align-self: end; max-width: 20ch; padding-bottom: 0.4em; }
.stack-line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.stack-line > span { display: inline-block; }
.stack-a { color: var(--muted); }
.stack-whole { color: var(--ink); }
.builder-words { grid-column: 1 / 8; grid-row: 3; align-self: start; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.word-list { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.builder-object { grid-column: 8 / 13; grid-row: 3; align-self: start; transform: rotate(-4deg); }
.builder-object img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; mix-blend-mode: multiply; }
.word { display: inline-flex; align-items: center; min-height: 3.5rem; padding: 0.55rem 1.2rem 0.45rem; background: var(--surface); color: var(--ink); font-family: var(--font-display); font-size: var(--step-lead); line-height: 1; text-transform: uppercase; text-align: left; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.word:hover { background: var(--gold); }
.word:active { transform: scale(0.96); }
.word.is-on { background: var(--ink); color: #fff; }

/* ---------- levels: a black field, one type size ---------- */
.levels { background: var(--black); color: #fff; padding-block: var(--section); }
.levels-title { max-width: 14ch; }
.levels-intro { margin-top: clamp(1.25rem, 2vw, 2rem); font-size: var(--step-body); }
.levels-table { width: 100%; border-collapse: collapse; margin-top: clamp(3rem, 6vw, 5rem); font-size: var(--step-lead); line-height: 1.5; font-variant-numeric: tabular-nums; }
.levels-table th, .levels-table td { padding: 0; text-align: left; font-weight: 400; vertical-align: baseline; }
.levels-table tbody tr > :nth-child(1) { width: 8%; font-family: var(--font-display); }
.levels-table tbody tr > :nth-child(2) { width: 24%; }
.levels-table tbody tr > :nth-child(3) { width: 46%; }
.levels-table tbody tr > :nth-child(4) { text-align: right; }
.levels-table .group th { color: var(--gold); font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.01em; padding-top: 3.5rem; padding-bottom: 0.6rem; }
.levels-table tbody:first-of-type .group th { padding-top: 0; }

/* ---------- places: a gold field, prints around the headline ---------- */
.places { background: var(--gold); color: var(--ink); }
.places-inner { display: grid; padding-block: var(--section); }
.places-title { text-align: center; font-size: var(--step-display); line-height: 0.85; }
.prints { position: relative; display: flex; justify-content: center; align-items: flex-start; padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 7vw, 6rem); }
.print { position: relative; background: #fff; padding: 0.55rem 0.55rem 0.45rem; transition: transform 200ms var(--ease-out), z-index 0s; outline-offset: 6px; }
.print img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.print figcaption { font-size: var(--step-small); padding-top: 0.4rem; color: var(--ink); }
.print-1 { width: 30vw; transform: rotate(-6deg); margin-right: -5vw; z-index: 1; }
.print-2 { width: 32vw; transform: rotate(4deg) translateY(2.5rem); z-index: 2; }
.print-3 { width: 26vw; transform: rotate(-2deg) translateY(0.75rem); margin-left: -5vw; z-index: 1; }
.print-3 figcaption { text-align: right; }
.print:hover, .print:focus-visible { transform: rotate(0deg) translateY(-0.5rem); z-index: 5; }
.places-note { font-size: var(--step-body); max-width: 40ch; }

/* ---------- footer: the mark, built large ---------- */
.foot { padding-block: var(--section) 1.5rem; }
.mark { display: flex; align-items: flex-end; gap: clamp(0.75rem, 2vw, 2rem); }
.mark-word { display: block; width: 100%; min-width: 0; height: auto; overflow: visible; }
.mark-german { flex: 620; }
.mark-mentors { flex: 724; }
.mark text { font-family: var(--font-display); font-size: 168px; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2rem; margin-top: 3.5rem; font-size: var(--step-small); }
.foot-col:nth-child(1) { grid-column: 1 / 3; display: grid; gap: 0.5rem; align-content: start; font-size: var(--step-body); }
.foot-soon { grid-column: 3 / 7; font-size: var(--step-body); }
.credits { grid-column: 7 / 13; max-width: 68ch; }
.foot-last { display: flex; justify-content: space-between; align-items: center; margin-top: 3rem; font-size: var(--step-body); }

/* ---------- phone ---------- */
@media (max-width: 47.99em) {
  .bar { grid-template-columns: 1fr auto; padding-block: 1rem; }
  .bar-links { display: none; }
  .wordmark { font-size: 1.75rem; }
  .hero { min-height: auto; padding-bottom: 2rem; }
  .hero-title { font-size: 31vw; justify-self: stretch; text-align: left; }
  .hero-photo { width: 64%; margin-top: 1.25rem; }
  .hero-note, .hero-fact { position: static; justify-self: start; margin-top: 1.5rem; max-width: none; text-align: left; }
  .hero-fact { margin-top: 0.75rem; }

  .intro-inner { min-height: auto; }
  .intro-title { font-size: 15vw; }
  .intro-statement { grid-column: 1 / 13; font-size: 1.5rem; }
  .intro-chip { grid-column: 4 / 11; }

  #builder-title, .builder-reading, .stack, .builder-object, .builder-words { grid-column: 1 / 13; grid-row: auto; }
  #builder-title { order: -3; }
  .stack { order: -2; }
  .builder-reading { order: -1; }
  .builder-words { order: 0; }
  .builder-object { order: 1; }
  .stack { font-size: 15vw; }
  .builder-object { width: 78%; justify-self: end; }

  .levels-table, .levels-table tbody, .levels-table tr { display: block; }
  .levels-table tr:not(.group) { display: grid; grid-template-columns: auto 1fr; column-gap: 0.75rem; margin-top: 1.1rem; }
  .levels-table tbody tr > * { width: auto !important; }
  .levels-table tr:not(.group) > :nth-child(1), .levels-table tr:not(.group) > :nth-child(2) { font-size: 1.375rem; }
  .levels-table tr:not(.group) > :nth-child(3) { grid-column: 1 / 3; font-size: 1.0625rem; line-height: 1.4; }
  .levels-table tr:not(.group) > :nth-child(4) { grid-column: 1 / 3; text-align: left; font-size: 1.0625rem; line-height: 1.4; }
  .levels-table .group th { display: block; padding-top: 2.5rem; }

  .places-title { font-size: 15vw; }
  .prints { flex-direction: column; align-items: center; gap: 0; }
  .print-1, .print-2, .print-3 { width: 78vw; margin: 0; }
  .print-1 { transform: rotate(-5deg); }
  .print-2 { transform: rotate(4deg); margin-top: 0.75rem; }
  .print-3 { transform: rotate(-2deg); margin-top: 0.75rem; }

  .mark { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .mark-german, .mark-mentors { flex: none; }
  .foot-col:nth-child(1), .foot-soon, .credits { grid-column: 1 / 13; }
  .foot-last { gap: 1rem; }
}

/* ---------- motion (content stays visible without JavaScript or with reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-expo) forwards; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
  .js .hero-photo img { transform: translateY(14%) scale(1.08); animation: photo-rise 1400ms var(--ease-expo) 380ms forwards; }

  .js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(min(var(--i, 0), 4) * 70ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .intro-chip[data-reveal].is-in { transform: rotate(4deg); }
  .js .builder-object[data-reveal].is-in { transform: rotate(-4deg); }
  .js .print[data-reveal] { opacity: 0; }
  .js .print-1[data-reveal].is-in { opacity: 1; transform: rotate(-6deg); }
  .js .print-2[data-reveal].is-in { opacity: 1; transform: rotate(4deg) translateY(2.5rem); }
  .js .print-3[data-reveal].is-in { opacity: 1; transform: rotate(-2deg) translateY(0.75rem); }
  .js .print[data-reveal].is-in:hover, .js .print[data-reveal].is-in:focus-visible { transform: rotate(0deg) translateY(-0.5rem); transition-delay: 0ms; transition-duration: 200ms; }

  /* places headline: lines rise when the section arrives */
  .js .places-title [data-line] { transform: translateY(105%); transition: transform 900ms var(--ease-expo); transition-delay: calc(var(--i, 0) * 110ms); }
  .js .places-title.is-in [data-line] { transform: none; }

  /* word builder: the pieces drop in again each time a word is chosen */
  .stack.is-swapping .stack-line > span { animation: piece-in 520ms var(--ease-expo) both; }
  .stack.is-swapping .stack-b > span { animation-delay: 70ms; }
  .stack.is-swapping .stack-whole > span { animation-delay: 150ms; }
  .builder-object.is-swapping img { animation: object-in 600ms var(--ease-expo) both; }

  /* the footer mark builds up as it arrives */
  .js .mark .b { transform: scaleY(0.55); transform-box: fill-box; transform-origin: 50% 100%; transition: transform 800ms var(--ease-expo); transition-delay: calc(var(--n, 0) * 40ms); }
  .js .mark.is-in .b { transform: none; }
  @media (max-width: 47.99em) {
    .js .print-1[data-reveal].is-in { transform: rotate(-5deg); }
    .js .print-2[data-reveal].is-in { transform: rotate(4deg); }
    .js .print-3[data-reveal].is-in { transform: rotate(-2deg); }
  }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes photo-rise { to { transform: none; } }
@keyframes piece-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes object-in { from { opacity: 0; transform: translateY(8%) rotate(6deg) scale(0.94); } to { opacity: 1; transform: none; } }
