/* ══ BRACE — Referenzseite ══════════════════════════════════════════════════
   Alles unter .ref-page, damit die kurzen Namen aus dem Entwurf (.title, .gal,
   .facts) erhalten bleiben, ohne mit den Sections der Startseite zu kollidieren.
   Wird nur auf Referenzseite und -archiv geladen. The detail page follows the
   V2 prototype referenz-rika.html; the archive part follows referenzen.html.
   ══════════════════════════════════════════════════════════════════════════ */

.ref-page .wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }
.ref-page .label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-60); }
.ref-page .reveal { transition-delay: var(--d, 0s); }
.ref-page .zoom { cursor: zoom-in; }
/* Inset, because the image boxes clip anything outside them. */
.ref-page .zoom:focus-visible { outline: 3px solid var(--copper); outline-offset: -3px; }
.ref-page .kv.zoom:focus-visible { outline-offset: -6px; }

.ref-page .u-link {
  display: inline-block; padding-bottom: 6px; border-bottom: 2px solid var(--copper);
  font-size: 15px; font-weight: 700; letter-spacing: .3px; transition: border-bottom-width .2s;
}
.ref-page .u-link:hover { border-bottom-width: 4px; }

/* --mod: the CD module the Layered Grid sits on. --gut: left edge of the
   content column, measured in the full-width key visual. */
.ref-detail {
  --mod: clamp(56px, 8.4vw, 120px);
  --gut: max(var(--pad), calc((100% - 1280px) / 2 + var(--pad)));
  --veil: rgba(255, 255, 255, .52);
  padding-bottom: clamp(72px, 9vw, 120px);
}
/* The dark "Weitere Referenzen" band or the sand contact closes the page by itself. */
.ref-detail:has(.related, .contact) { padding-bottom: 0; }

/* ══ Titelband ══ */
.ref-page .title { background: var(--sand); padding: clamp(40px, 6vw, 88px) 0 calc(var(--mod) * .9 + clamp(24px, 3vw, 40px)); }
.ref-page .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 14px; font-weight: 600; color: var(--grey-60); }
.ref-page .crumbs a { transition: color .2s; }
.ref-page .crumbs a:hover { color: var(--copper); }
.ref-page .crumbs i { font-style: normal; color: var(--grey-40); }
.ref-page .title-row { margin-top: clamp(24px, 3vw, 40px); }
.ref-page .title .type { font-size: var(--eyebrow-size); font-weight: 500; color: var(--copper); text-transform: uppercase; letter-spacing: .08em; }
/* Only long compounds ("Hauptversammlung") break; "Robotics" or "Mar-kenpräsenz" never.
   Safari ignores hyphenate-limit-chars and reads the -webkit- pair instead. */
.ref-page .title h1 { margin-top: 10px; font-size: clamp(2.6rem, 7vw, 104px); line-height: .92; letter-spacing: -.025em; font-weight: 400; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; hyphenate-limit-chars: 10 5 5; -webkit-hyphenate-limit-before: 5; -webkit-hyphenate-limit-after: 5; }
.ref-page .by-big {
  display: inline-flex; align-items: center; gap: 12px; margin-top: clamp(20px, 2.4vw, 28px);
  padding-bottom: 6px; border-bottom: 2px solid var(--copper);
  font-size: 16px; font-weight: 500; transition: border-bottom-width .2s;
}
.ref-page .by-big strong { font-weight: 700; }
.ref-page .by-big img { width: 8.2px; height: 12.3px; filter: invert(1); transition: transform .22s; }
.ref-page a.by-big:hover { border-bottom-width: 4px; }
.ref-page a.by-big:hover img { transform: translateX(3px); }

/* ══ Key Visual ══ */
.ref-page .kv { position: relative; height: clamp(320px, 52vw, 760px); background: var(--ink); }
.ref-page .kv > img { width: 100%; height: 100%; object-fit: cover; }

/* Das <img> bleibt im Markup: es ist die Rückfallebene ohne JS und zugleich
   Bildquelle des Canvas, also kein zweiter Download. Das Canvas legt sich nur
   darüber, wenn der Effekt wirklich läuft. */
.ref-page .kv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.ref-page .kv-canvas.on { display: block; }

/* Layered Grid: three modules over the edge between title band and key
   visual, the one place the CD element appears on the page. */
.ref-page .lg { position: absolute; z-index: 2; pointer-events: none; width: var(--mod); height: var(--mod); }
.ref-page .lg-veil { background: var(--veil); }
.ref-page .lg-solid { background: var(--copper); }
.ref-page .lg-a1 { left: var(--gut); top: calc(var(--mod) * -.5); }
.ref-page .lg-a2 { left: calc(var(--gut) + var(--mod) * 1.25); top: 0; }
.ref-page .lg-a3 { left: calc(var(--gut) + var(--mod) * 3); top: calc(var(--mod) * .75); width: calc(var(--mod) * .6); height: calc(var(--mod) * .6); }

/* ══ Fakten ══
   One row of up to six cells (--n is the number of facts). Hairlines are cell
   borders rather than a grid gap on a grey background, so a short last row
   leaves no grey hole when the cells wrap. */
.ref-page .facts {
  display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr));
  margin: clamp(48px, 6vw, 88px) 0 0; border-bottom: 1px solid var(--grey-20);
}
.ref-page .facts > div { padding: 22px clamp(14px, 1.6vw, 24px) 24px; border-left: 1px solid var(--grey-20); }
.ref-page .facts > div:first-child { padding-left: 0; border-left: 0; }
/* Long labels and values ("Veranstaltungsfläche", "Hauptversammlung") hyphenate instead of running into the next cell. */
.ref-page .facts dt { margin-bottom: 10px; overflow-wrap: break-word; hyphens: auto; }
.ref-page .facts dd { margin: 0; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.35; font-weight: 500; overflow-wrap: break-word; hyphens: auto; }
.ref-page .facts dd a { border-bottom: 2px solid var(--copper); transition: color .2s; }
.ref-page .facts dd a:hover { color: var(--copper); }

/* ══ Das Projekt ══ */
.ref-page .story { padding: clamp(56px, 8vw, 120px) 0 0; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
/* #4a4c4f: the prototype's body grey, between ink and grey-60. */
.ref-page .story-txt p { max-width: 68ch; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.7; font-weight: 500; color: #4a4c4f; text-wrap: pretty; }
.ref-page .story-txt p + p { margin-top: 18px; }

/* ══ Statement ══ (single colour, no gradient) */
.ref-page .pull { padding: clamp(56px, 8vw, 120px) 0 0; }
.ref-page .pull p { max-width: 22ch; font-size: clamp(2rem, 4.6vw, 66px); line-height: 1.12; letter-spacing: -.02em; font-weight: 400; text-wrap: balance; }

/* ══ Galerie ══ */
.ref-page .gal { margin: 0; padding: clamp(48px, 6vw, 88px) 0 0; display: grid; gap: clamp(16px, 2.4vw, 36px); }
.ref-page .gal-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.ref-page .gal-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ref-page .gal-1 { grid-template-columns: minmax(0, 1fr); }
.ref-page .gal figure { margin: 0; min-width: 0; display: flex; flex-direction: column; }
.ref-page .gal .im { position: relative; overflow: hidden; background: var(--sand); }
/* height:100% beats the height attribute of wp_get_attachment_image(); the
   box ratio comes from .im. */
.ref-page .gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
.ref-page .gal figure:hover img { transform: scale(1.025); }
.ref-page .gal .r-16 .im { aspect-ratio: 16/9; }
.ref-page .gal .r-1 .im { aspect-ratio: 1/1; }
/* In the duo the square takes the height of the 16:9 image beside it. */
.ref-page .gal-2 .r-1 .im { aspect-ratio: auto; flex: 1 1 auto; min-height: 0; }
.ref-page .gal-2 .r-1 .im img { position: absolute; inset: 0; }

/* Video: content width, never full-bleed, starts on click. */
.ref-page .gal-video { display: block; }
/* Fixed 16:9 box, whatever the poster or metadata say; contain, so a video
   in another format is letterboxed rather than cropped. */
.ref-page .gal-video .im { aspect-ratio: 16/9; background: var(--ink); }
.ref-page .gal-video video { display: block; width: 100%; height: 100%; object-fit: contain; }
.ref-page .gal-video .play {
  position: absolute; inset: 0; margin: auto; width: clamp(64px, 7vw, 96px); height: clamp(64px, 7vw, 96px);
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 0;
  background: var(--copper); color: #fff; cursor: pointer; transition: transform .25s;
}
.ref-page .gal-video .play[hidden] { display: none; }
.ref-page .gal-video .play svg { width: 42%; height: 42%; margin-left: 6%; }
.ref-page .gal-video .play:hover { transform: scale(1.06); }
.ref-page .gal-video .play:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* Volle Breite, wie das Key Visual — bricht die Rasterfolge auf. The image
   is taller than the band so the parallax never shows an edge. */
.ref-page .band { margin-top: clamp(48px, 6vw, 88px); height: clamp(260px, 40vw, 560px); overflow: hidden; background: var(--ink); }
.ref-page .band img { position: relative; top: -10%; width: 100%; height: 120%; object-fit: cover; }

/* ══ Testimonial ════════════════════════════════════════════════════════════
   Reines Design-System: nicht das Bild bestimmt die Komposition, sondern ein
   Modul. Im Entwurf ist es 1/9 der Rahmenbreite, alle Ebenen liegen darauf.

     Ebene       Größe    Position (Modul)
     Portrait    2 × 2    0    / 0
     Zitatkarte  7 × 3    1,5  / 1,5   (grows with a long quote)
     Zitatmarke  1 × 1    8    / 1

   The card stays in the flow so a long quote makes the grid taller instead of
   running out of the card. Without a portrait (.no-portrait) the card starts
   in the left column and the attribution follows below it.
   ══════════════════════════════════════════════════════════════════════════ */
.ref-page .testi { max-width: 1280px; margin: clamp(72px, 10vw, 140px) auto 0; padding: 0 var(--pad); container-type: inline-size; }

/* Das Modul muss eine echte Länge sein: als Prozentwert würde es waagerecht auf
   die Breite, senkrecht aber auf die Höhe bezogen — und die ist hier erst das
   Ergebnis. cqw bezieht sich immer auf die Containerbreite. */
.ref-page .testi-grid {
  position: relative; --m: 11.1111cqw; margin: 0;
  min-height: calc(var(--m) * 4.5); padding: calc(var(--m) * 1.5) 0 0 calc(var(--m) * 1.5);
}

.ref-page .t-portrait { position: absolute; left: 0; top: 0; width: calc(var(--m) * 2); height: calc(var(--m) * 2); overflow: hidden; }
.ref-page .t-portrait img { width: 100%; height: 100%; object-fit: cover; }

/* The name block ends before the card starts, so long names wrap. */
.ref-page .t-who { position: absolute; left: 0; top: calc(var(--m) * 2.444); width: calc(var(--m) * 1.5 - clamp(20px, 2.2vw, 32px)); }
.ref-page .t-who .n { display: block; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.6; font-weight: 700; color: var(--ink); }
.ref-page .t-who .c { display: block; font-size: clamp(13px, 1.05vw, 15px); line-height: 1.6; font-weight: 500; color: var(--grey-60); }

.ref-page .t-card {
  position: relative; margin: 0; width: calc(var(--m) * 7); min-height: calc(var(--m) * 3);
  padding: calc(var(--m) * .62) calc(var(--m) * .9) calc(var(--m) * .62) var(--m); background: var(--ink);
}
/* No headline in the card: the quote itself is the large text. */
.ref-page .t-text { font-size: clamp(20px, 2.3vw, 33px); line-height: 1.35; font-weight: 400; color: #fff; text-wrap: pretty; }

/* z-index, weil die Marke vor der Karte liegt, im Markup aber davor steht. */
.ref-page .t-badge { position: absolute; left: calc(var(--m) * 8); top: var(--m); width: var(--m); height: var(--m); z-index: 2; background: var(--copper); display: grid; place-items: center; }
.ref-page .t-badge img { width: calc(var(--m) * .514); height: calc(var(--m) * .368); }

.ref-page .no-portrait { min-height: 0; padding: calc(var(--m) * .5) 0 0; }
.ref-page .no-portrait .t-badge { left: calc(var(--m) * 6.5); top: 0; }
.ref-page .no-portrait .t-who { position: relative; left: auto; top: auto; width: auto; max-width: calc(var(--m) * 7); margin-top: clamp(16px, 1.8vw, 26px); }

/* ══ Credits ══ */
.ref-page .credits {
  margin-top: clamp(72px, 9vw, 120px); padding-top: 20px; border-top: 1px solid var(--grey-20);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px clamp(24px, 3vw, 48px);
}
.ref-page .credits .label + p { margin-top: 8px; font-size: 15px; line-height: 1.55; font-weight: 500; }

/* ══ Weitere Referenzen ══ (tiles from blocks/references/style.css) */
.ref-page .related { margin-top: clamp(88px, 11vw, 160px); padding: clamp(72px, 9vw, 130px) 0; background: var(--ink); color: #fff; }
.ref-page .related .eyebrow { color: var(--grey-40); }
.ref-page .related h2 { margin-top: 14px; font-size: clamp(2rem, 4.4vw, 64px); line-height: 1.05; letter-spacing: -.02em; font-weight: 400; color: var(--sand); text-wrap: balance; }
.ref-page .related .ref-grid { margin-top: clamp(40px, 5vw, 64px); }
.ref-page .rel-foot { margin-top: clamp(40px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.ref-page .related .u-link { color: #fff; }
.ref-page .related :is(.btn-out, .u-link):focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

/* ══ Kontakt ══ (V18): sand, headline across, lead and direct contact left,
   the form right. Phone and e-mail are the central contact data, see
   brace_project_contact(). */
.ref-page .contact { margin-top: clamp(88px, 11vw, 160px); background: var(--sand); padding: clamp(72px, 10vw, 140px) var(--pad); }
.ref-page .related + .contact { margin-top: 0; }
.ref-page .contact-in { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0 clamp(40px, 6vw, 120px); align-items: start; }
.ref-page .contact-head { grid-column: 1 / -1; }
.ref-page .contact-head h2 { max-width: 18ch; margin: 14px 0 clamp(28px, 3.4vw, 48px); font-size: clamp(2rem, 5.2vw, 75px); line-height: 1.05; letter-spacing: -.02em; font-weight: 400; text-wrap: balance; }
.ref-page .contact .lead { max-width: 440px; color: var(--ink); opacity: .78; }
.ref-page .direct { margin: clamp(28px, 3.4vw, 44px) 0 0; padding-top: 24px; border-top: 1px solid rgba(40, 42, 45, .18); max-width: 440px; display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; font-size: 16px; line-height: 1.5; font-weight: 500; }
.ref-page .direct:first-child { margin-top: 0; }
.ref-page .direct dt { color: var(--grey-60); }
.ref-page .direct dd { margin: 0; }
.ref-page .direct a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(40, 42, 45, .3); }
.ref-page .direct a:hover { border-bottom-color: var(--ink); }
.ref-page .direct a:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

/* Form (Gravity Forms, markup version 2) styled to the V18 form: underlined
   inputs, two half fields, consent and outline button. Gravity's own CSS is
   off on reference pages (inc/project.php). Required markers and the legend
   are left out as in the proto; inputs keep aria-required. */
.ref-page .contact-form .gform_heading,
.ref-page .contact-form .gfield_required,
.ref-page .contact-form .gform_validation_container,
.ref-page .contact-form .gfield--type-honeypot,
.ref-page .contact-form .gform_hidden,
.ref-page .contact-form .gfield_visibility_hidden { display: none !important; }
.ref-page .contact-form .hidden_label > .gfield_label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ref-page .contact-form .gform_fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 24px; }
.ref-page .contact-form .gfield { min-width: 0; margin: 0; padding: 0; border: 0; }
.ref-page .contact-form .gfield--width-full { grid-column: 1 / -1; }
.ref-page .contact-form .gfield_label { display: block; margin-bottom: 6px; padding: 0; font-size: 14px; font-weight: 600; }
.ref-page .contact-form :is(input[type=text], input[type=email], textarea) { width: 100%; font: inherit; font-size: 17px; font-weight: 500; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 10px 0; }
.ref-page .contact-form textarea { height: 112px; min-height: 112px; resize: vertical; line-height: 1.55; }
.ref-page .contact-form :is(input, textarea):focus { outline: none; border-bottom: 2px solid var(--copper); padding-bottom: 9px; }
.ref-page .contact-form ::placeholder { color: var(--grey-60); opacity: 1; }
.ref-page .contact-form .ginput_container_consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; font-weight: 500; color: var(--grey-60); }
.ref-page .contact-form .ginput_container_consent input { flex: none; margin: 3px 0 0; accent-color: var(--copper); }
.ref-page .contact-form .ginput_container_consent input:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.ref-page .contact-form .gform_footer { margin-top: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.ref-page .contact-form .gform_footer .btn-out { cursor: pointer; }
/* hCaptcha (added to every Gravity form by its plugin) stands above the button; no space until its script has run. */
.ref-page .contact-form .gform_footer h-captcha:not(:has(*)) { display: none; }
.ref-page .contact-form .gform_footer .btn-out:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.ref-page .contact-form .gform-loader, .ref-page .contact-form .gform_ajax_spinner { width: 18px; height: 18px; }
/* Errors: the copper line and a short message under the field, a summary on top. */
.ref-page .contact-form .gform_validation_errors { margin-bottom: 24px; padding: 14px 0; border-top: 1px solid var(--copper); border-bottom: 1px solid var(--copper); }
.ref-page .contact-form .gform_validation_errors h2 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--ink); }
.ref-page .contact-form .gform_validation_errors ol { margin: 8px 0 0; padding-left: 1.2em; font-size: 14px; line-height: 1.5; font-weight: 500; color: var(--grey-60); }
.ref-page .contact-form .gfield_error :is(input[type=text], input[type=email], textarea) { border-bottom-color: var(--copper); }
.ref-page .contact-form .gfield_validation_message { margin-top: 6px; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--copper); }
/* After sending: the proto's thank-you line between hairlines. */
.ref-page .contact-form .gform_confirmation_message { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.35; font-weight: 400; padding: clamp(24px, 3vw, 40px) 0; border-top: 1px solid rgba(40, 42, 45, .18); border-bottom: 1px solid rgba(40, 42, 45, .18); }

/* ══ Lightbox ══ */
.ref-page .lb {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: clamp(16px, 4vw, 56px);
  background: rgba(40, 42, 45, .94); opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s;
}
.ref-page .lb[hidden] { display: none; }
/* Visibility flips without delay on open, so the close button can take focus
   in the same frame; on close it waits for the fade. */
.ref-page .lb.open { opacity: 1; visibility: visible; transition-delay: 0s; }
.ref-page .lb img { max-width: 100%; max-height: 84vh; object-fit: contain; }
.ref-page .lb button {
  position: absolute; width: 52px; height: 52px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .5); border-radius: 0; background: transparent;
  font: inherit; font-size: 22px; line-height: 1; color: #fff; cursor: pointer; transition: background .2s, color .2s;
}
.ref-page .lb button:hover { background: #fff; color: var(--ink); }
.ref-page .lb button:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.ref-page .lb button[hidden] { display: none; }
.ref-page .lb .x { right: 20px; top: 20px; }
.ref-page .lb .pv { left: 20px; top: 50%; margin-top: -26px; }
.ref-page .lb .nx { right: 20px; top: 50%; margin-top: -26px; }
.ref-page .lb p { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: 14px; color: var(--grey-40); }
html.lb-on { overflow: hidden; }

/* ══ Archiv (V18 prototype, referenzen.html) ═════════════════════════════════
   Tiles and grid come from blocks/references/style.css; this adds the
   slider, the intro, the labelled filters, the result line, the empty state,
   the batches and the awards. Logo band and contact are the shared blocks.
   ══════════════════════════════════════════════════════════════════════════ */

/* Full-screen slider: fills the screen below the sticky header (106px). Image
   only, evenly darkened; every 4 s the next slide pushes in from the right
   (project-archive.js). Slides lie on top of each other; only the active one
   and the one leaving are visible. Each slide is a link to its reference. */
.ref-archive .rhero { position: relative; height: calc(100vh - 106px); height: calc(100svh - 106px); min-height: 520px; overflow: hidden; background: var(--ink); }
.ref-archive .rh-slide { position: absolute; inset: 0; display: block; visibility: hidden; transform: translateX(100%); }
.ref-archive .rh-slide.on, .ref-archive .rh-slide.out { visibility: visible; }
.ref-archive .rh-slide.on { transform: translateX(0); }
.ref-archive .rh-slide.is-moving { transition: transform .9s cubic-bezier(.65, 0, .35, 1); }
.ref-archive .rh-slide img { width: 100%; height: 100%; object-fit: cover; }
.ref-archive .rh-slide::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: rgba(40, 42, 45, .45); }
.ref-archive .rh-slide:focus-visible { outline: 3px solid var(--copper); outline-offset: -6px; }
/* Arrows bottom right, as in the home slider. */
.ref-archive .rh-nav { position: absolute; right: var(--pad); bottom: clamp(28px, 4vw, 56px); z-index: 2; display: flex; gap: 8px; }
.ref-archive .rh-nav button { width: 52px; height: 52px; display: grid; place-items: center; padding: 0; border: 1px solid #fff; border-radius: 0; background: transparent; cursor: pointer; transition: background .22s; }
.ref-archive .rh-nav button img { width: 10.93px; height: 16.4px; transition: filter .22s; }
.ref-archive .rh-nav .prev img { transform: rotate(180deg); }
.ref-archive .rh-nav button:hover { background: #fff; }
.ref-archive .rh-nav button:hover img { filter: invert(1); }
.ref-archive .rh-nav button:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.ref-archive .intro {
  max-width: calc(1280px + 2 * var(--pad)); margin: 0 auto;
  padding: clamp(40px, 6vw, 96px) var(--pad) clamp(56px, 7vw, 104px);
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: end;
}
.ref-archive .intro h1 { margin-top: 14px; font-size: clamp(3rem, 7.4vw, 110px); line-height: .9; letter-spacing: -.02em; font-weight: 400; text-wrap: balance; }
.ref-archive .lead { max-width: 520px; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.6; font-weight: 500; color: var(--grey-60); text-wrap: pretty; }

/* Below the sticky header when the page jumps to the grid. */
.ref-archive .refs { color: #fff; padding: clamp(72px, 9vw, 130px) var(--pad) clamp(80px, 10vw, 140px); scroll-margin-top: 106px; }
.ref-archive .refs-head { margin-bottom: 0; }

/* Filters: caption above an underlined select. Each option shows how many
   projects it leaves under the other filters; zero hits are disabled. */
.ref-archive .filters { flex: 1 1 560px; max-width: 860px; margin: 0; }
.ref-archive .filters label span { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-40); }
.ref-archive .filters select {
  height: 52px; padding: 0 30px 0 0; font-size: 16px; text-overflow: ellipsis;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23EAE7E1' stroke-width='1.5'/%3E%3C/svg%3E") right 2px center / 14px 9px no-repeat;
}
.ref-archive .filters select.set,
.ref-archive .filters select:focus { outline: none; border-bottom: 2px solid var(--copper); }
/* Keyboard focus must stay visible on a select that already carries a filter
   (same underline as .set), so it gets the outline on top. */
.ref-archive .filters select:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

/* Result line: count, active filters as chips, reset. */
.ref-archive .result {
  margin: clamp(28px, 3vw, 40px) 0 clamp(40px, 5vw, 64px); padding-top: 18px; min-height: 58px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
}
.ref-archive .count { font-size: 15px; font-weight: 500; color: var(--grey-40); }
.ref-archive .count b { margin-right: 4px; font-size: clamp(20px, 1.8vw, 26px); font-weight: 400; color: #fff; }
.ref-archive .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ref-archive .chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 10px 7px 14px;
  border: 1px solid rgba(255, 255, 255, .5); background: transparent;
  font: inherit; font-size: 13px; font-weight: 600; color: #fff; cursor: pointer; transition: background .2s, color .2s;
}
.ref-archive .chip i { font-style: normal; font-size: 15px; line-height: 1; }
.ref-archive .chip:hover { background: #fff; color: var(--ink); }
.ref-archive .reset {
  margin-left: auto; padding: 0 0 4px; border: 0; border-bottom: 2px solid var(--copper); background: none;
  font: inherit; font-size: 15px; font-weight: 700; color: #fff; cursor: pointer;
}
.ref-archive .reset:disabled { opacity: .28; cursor: default; border-bottom-color: rgba(255, 255, 255, .3); }
.ref-archive :is(.chip, .reset, .btn-out):focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

.ref-archive .empty { padding: clamp(40px, 5vw, 72px) 0; text-align: center; }
.ref-archive .empty p { font-size: clamp(20px, 2vw, 28px); font-weight: 400; color: var(--sand); }
.ref-archive .empty .btn-out { margin-top: 20px; }

.ref-archive .more { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: clamp(48px, 7vw, 96px); }
.ref-archive .more small { font-size: 14px; font-weight: 500; color: var(--grey-40); }
.ref-archive .progress { width: 180px; height: 2px; background: rgba(255, 255, 255, .18); }
.ref-archive .progress i { display: block; height: 100%; background: var(--copper); transition: width .4s; }
/* Beats `.refs .more { display: flex }` of the block stylesheet, which loads later. */
.ref-archive .refs [hidden] { display: none; }

/* Awards: the Wall of Fame (V18). Equal fields between two hairlines, each
   seal at the height of its --h, so flat and tall formats read the same size
   (equal area). 5 columns, 3 below 900px, 2 below 560px. */
.ref-archive .awards { max-width: calc(1280px + 2 * var(--pad)); margin: 0 auto; padding: clamp(72px, 9vw, 130px) var(--pad) 0; }
.ref-archive .awards-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: end; }
.ref-archive .awards-head h2 { margin-top: 12px; font-size: clamp(1.6rem, 3vw, 44px); line-height: 1.1; letter-spacing: -.015em; font-weight: 400; text-wrap: balance; }
.ref-archive .award-wall { margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); border-top: 1px solid var(--grey-20); border-bottom: 1px solid var(--grey-20); }
.ref-archive .award-badge { display: grid; place-items: center; padding: clamp(28px, 3.4vw, 48px) 12px; }
.ref-archive .award-badge + .award-badge { border-left: 1px solid var(--grey-20); }
/* More than six seals: the next row starts at the left edge with its own line on top. */
.ref-archive .award-badge:nth-child(6n+1) { border-left: 0; }
.ref-archive .award-badge:nth-child(n+7) { border-top: 1px solid var(--grey-20); }
.ref-archive .award-badge img { display: block; height: calc(var(--h, 80) * clamp(.8px, .08vw, 1.15px)); width: auto; max-width: 100%; object-fit: contain; }

/* ══ Responsive ══ */
@media (max-width: 1100px) {
  .ref-archive .intro { grid-template-columns: minmax(0, 1fr); }
  .ref-page .contact-in { grid-template-columns: minmax(0, 1fr); row-gap: clamp(32px, 6vw, 48px); }
  .ref-archive .filters { flex-wrap: wrap; max-width: none; }
  .ref-archive .filters label { flex: 1 1 40%; }

  .ref-page .story { grid-template-columns: minmax(0, 1fr); }

  .ref-page .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ref-page .facts > div:nth-child(3n+1) { padding-left: 0; border-left: 0; }
  .ref-page .facts > div:nth-child(n+4) { border-top: 1px solid var(--grey-20); }

  /* The tile grid runs in two columns here; a third tile would stand alone. */
  .ref-page .related .ref-grid > :nth-child(3) { display: none; }
}

@media (max-width: 900px) {
  .ref-archive .rhero { min-height: 460px; }
  .ref-archive .awards-head { grid-template-columns: minmax(0, 1fr); }
  .ref-archive .award-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ref-archive .award-badge + .award-badge { border-left: 0; }
  .ref-archive .award-badge { border-bottom: 1px solid var(--grey-20); }
  .ref-archive .award-badge:nth-child(n+7) { border-top: 0; }

  .ref-page .gal-2, .ref-page .gal-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ref-page .gal-2 > :first-child, .ref-page .gal-3 > :first-child { grid-column: 1 / -1; }
  .ref-page .gal-2 .r-1 .im { aspect-ratio: 1/1; flex: none; }
  .ref-page .gal-2 .r-1 .im img { position: static; }

  /* Unter 900px trägt dasselbe Modul eine gestapelte Folge: --m wird größer,
     die Vielfachen bleiben — die Überlappung der Zitatmarke hält dadurch auch
     im Umbruch. Order: portrait, name, mark, card; without a portrait the
     name follows the card. */
  .ref-page .testi-grid { --m: 20cqw; display: flex; flex-direction: column; min-height: 0; padding: 0; }
  .ref-page .testi-grid > * { position: relative; left: auto; top: auto; }
  .ref-page .t-portrait { order: 0; width: calc(var(--m) * 3.4); height: calc(var(--m) * 3.4); }
  .ref-page .t-who { order: 1; width: auto; margin-top: 20px; }
  .ref-page .t-badge { order: 2; width: calc(var(--m) * 1.7); height: calc(var(--m) * 1.7); margin: 0 0 calc(var(--m) * -.85) auto; }
  .ref-page .t-badge img { width: calc(var(--m) * .874); height: calc(var(--m) * .626); }
  .ref-page .t-card { order: 3; width: 100%; min-height: 0; padding: calc(var(--m) * .85 + 24px) clamp(20px, 5vw, 36px) clamp(28px, 7vw, 44px); }
  .ref-page .no-portrait .t-badge { left: auto; }
  .ref-page .no-portrait .t-who { order: 4; max-width: none; margin-top: 18px; }

  .ref-page .credits { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .ref-archive .filters { gap: 8px 14px; }
  .ref-archive .filters select { height: 44px; font-size: 15px; }
  .ref-archive .reset { margin-left: 0; }

  .ref-page .related .ref-grid > :nth-child(3) { display: block; }
}

@media (max-width: 560px) {
  .ref-archive .award-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-page .contact-form .gform_fields { grid-template-columns: minmax(0, 1fr); }

  .ref-page .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-page .facts > div:nth-child(n) { padding-left: clamp(14px, 1.6vw, 24px); border-left: 1px solid var(--grey-20); }
  .ref-page .facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .ref-page .facts > div:nth-child(n+3) { border-top: 1px solid var(--grey-20); }
  .ref-page .lg-a3 { display: none; }
  /* A lone half-width square reads as a gap on a phone. */
  .ref-page .gal-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .ref-archive .progress i, .ref-archive .rh-slide.is-moving { transition: none; }
  .ref-page .gal img, .ref-page .lb, .ref-page .gal-video .play, .ref-page .by-big img { transition: none; }
  .ref-page .gal figure:hover img { transform: none; }
  .ref-page .testi-grid [data-asm] { transform: none !important; opacity: 1 !important; }
}
