/* ==========================================================================
   EDU, o.z. — "Dvadsať" (v2)
   A committed-crimson institutional editorial system.
   Display: Bricolage Grotesque · Reading: Literata
   Colour strategy: COMMITTED — the brand crimson owns whole fields,
   white/bone carry the reading, ink closes the page, brass is hairline only.
   ========================================================================== */

:root {
  --red: #930012;
  --red-deep: #5e000c;
  --red-tint: #fbf1f2;
  --ink: #17130f;
  --ink-2: #241e19;
  --paper: #ffffff;
  --bone: #efeeea;
  --stone: #6b645e;
  --brass: #a47c36;
  --line: #e3dfd8;
  --on-red: #ffffff;
  --on-red-dim: rgba(255, 255, 255, .74);
  --on-ink-dim: rgba(255, 255, 255, .66);

  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --read: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --col-gap: clamp(1rem, 2vw, 2rem);
  --rail-w: 172px;
  --header-h: 76px;
  --ease: cubic-bezier(.19, 1, .22, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--red) var(--bone);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bone); }
::-webkit-scrollbar-thumb { background: var(--red); border: 3px solid var(--bone); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-deep); }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--read);
  font-size: 1.03rem;
  line-height: 1.68;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--red);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--red); color: #fff; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
  border-radius: 1px;
}
.on-dark :focus-visible, .u-band-red :focus-visible, .site-footer :focus-visible, .site-head :focus-visible {
  outline-color: #fff;
}

.u-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.u-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--col-gap);
}

.u-skip {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem;
  font-family: var(--display); font-weight: 600;
}
.u-skip:focus { left: 0; }

/* ---------- typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.026em;
  line-height: 1.02;
  text-wrap: balance;
  font-variant-numeric: lining-nums;
}

.t-display {
  font-size: clamp(2.5rem, 6.1vw, 5.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -.036em;
}
.t-h2 { font-size: clamp(1.8rem, 3.2vw, 2.8rem); font-weight: 800; line-height: 1.08; letter-spacing: -.03em; }
.t-h3 { font-size: clamp(1.22rem, 1.55vw, 1.4rem); font-weight: 700; line-height: 1.25; letter-spacing: -.016em; }

.t-lead {
  font-family: var(--read);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.58;
  font-weight: 400;
  max-width: 34em;
}

.t-label {
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--stone);
  font-variant-numeric: tabular-nums lining-nums;
}
.u-band-red .t-label, .u-band-ink .t-label, .site-footer .t-label { color: var(--on-red-dim); }

.t-body { max-width: 58ch; }
.t-body p + p { margin-top: 1.05em; }
.t-body strong { font-weight: 600; color: var(--ink); }
.u-band-red .t-body strong, .u-band-ink .t-body strong { color: #fff; }

.t-num { font-variant-numeric: tabular-nums lining-nums; }

/* inline text links inside reading copy */
.t-body a, .u-link {
  color: var(--red);
  font-weight: 500;
  box-shadow: inset 0 -1px 0 0 rgba(147, 0, 18, .35);
  transition: box-shadow .25s var(--ease), color .25s var(--ease);
}
.t-body a:hover, .u-link:hover { color: var(--red-deep); box-shadow: inset 0 -2px 0 0 var(--red-deep); }

/* ---------- section rhythm ---------- */

.u-sec { padding-block: clamp(3.75rem, 8.5vw, 7.5rem); position: relative; }
.u-sec--tight { padding-block: clamp(2.75rem, 5.5vw, 4.5rem); }
.u-band-bone { background: var(--bone); }
.u-band-ink { background: var(--ink); color: #fff; }
.u-band-red { background: var(--red); color: var(--on-red); position: relative; }
.u-band-red::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain); background-size: 180px 180px; opacity: .07; mix-blend-mode: overlay;
}

.u-band-red > * { position: relative; z-index: 1; }
.u-band-red h1, .u-band-red h2, .u-band-red h3,
.u-band-ink h1, .u-band-ink h2, .u-band-ink h3 { color: #fff; }

/* section masthead: a rule, a label, a heading — no decorative eyebrow */
.sec-head { border-top: 1px solid var(--line); padding-top: 1.1rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.u-band-red .sec-head, .u-band-ink .sec-head { border-top-color: rgba(255, 255, 255, .25); }
.sec-head__row { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.sec-head h2 { margin-top: .7rem; max-width: 18ch; }
.sec-head .t-lead { margin-top: 1rem; }

/* ---------- buttons ---------- */

.u-btn {
  --btn-fg: #fff;
  --btn-bg: var(--red);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--display);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  padding: 1.05rem 1.6rem;
  overflow: hidden;
  isolation: isolate;
  transition: color .3s var(--ease), border-color .3s var(--ease);
  border: 1px solid var(--btn-bg);
}
.u-btn__t { position: relative; z-index: 2; }
.u-btn__a { position: relative; z-index: 2; width: 22px; height: 8px; flex: none; }
.u-btn__a svg { display: block; width: 18px; height: 8px; transition: transform .45s var(--ease); }
.u-btn::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: var(--ink);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .45s var(--ease);
}
.u-btn:hover::before { transform: scaleY(1); }
.u-btn:hover { border-color: var(--ink); }
.u-btn:hover .u-btn__a svg { transform: translateX(4px); }

.u-btn--light { --btn-bg: #fff; --btn-fg: var(--red); }
.u-btn--light:hover { --btn-fg: #fff; }
.u-btn--ghost { --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255, 255, 255, .45); }
.u-btn--ghost::before { background: #fff; }
.u-btn--ghost:hover { --btn-fg: var(--red); border-color: #fff; }
.u-btn--outline { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--ink); }
.u-btn--outline::before { background: var(--ink); }
.u-btn--outline:hover { --btn-fg: #fff; }

.u-btnrow { display: flex; gap: .85rem; flex-wrap: wrap; }

/* ---------- header ---------- */

.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-head.is-solid { background: var(--ink); border-bottom-color: rgba(255, 255, 255, .12); }
.site-head__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; }

.brandmark { display: flex; align-items: center; gap: .7rem; color: #fff; }
.brandmark img { width: 30px; height: 30px; flex: none; }
.brandmark__plate { background: #fff; padding: 4px; display: block; flex: none; line-height: 0; }
.brandmark span {
  font-family: var(--display); font-weight: 700; font-size: .95rem;
  letter-spacing: -.015em; line-height: 1.15; color: #fff;
}

.site-nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.1rem); list-style: none; }
.site-nav a {
  position: relative;
  font-family: var(--display); font-size: .88rem; font-weight: 500;
  letter-spacing: .01em; color: rgba(255, 255, 255, .78);
  padding-block: .8rem;
  transition: color .25s var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.site-nav a:hover { color: #fff; }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.site-nav a[aria-current="page"] { color: #fff; }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); background: var(--brass); }

@media (max-width: 620px) {
  :root { --header-h: 68px; }
  .brandmark > span:not(.brandmark__plate) { font-size: .8rem; max-width: 8.5em; }
  .site-nav ul { gap: 1rem; }
  .site-nav a { font-size: .82rem; }
}
@media (max-width: 430px) { .brandmark > span:not(.brandmark__plate) { display: none; } }

.head-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: var(--brass); transform: scaleX(0); transform-origin: left;
}

/* ---------- section rail (desktop) ---------- */

.rail {
  position: fixed; z-index: 60; left: clamp(1rem, 2.2vw, 2rem); top: 50%;
  transform: translateY(-50%);
  display: none;
  font-family: var(--display);
}
.rail ol { list-style: none; display: grid; gap: .85rem; }
.rail a {
  display: flex; align-items: center; gap: .7rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--stone); opacity: 1;
  transition: opacity .3s var(--ease), color .3s var(--ease);
}
.rail i { display: block; width: 30px; height: 1px; background: currentColor; transform: scaleX(.45); transform-origin: left; transition: transform .35s var(--ease); flex: none; }
.rail a:hover { opacity: 1; }
.rail li.is-active a { opacity: 1; color: var(--red); }
.rail li.is-active i { transform: scaleX(1); background: var(--red); }
.rail.on-dark a { color: rgba(255, 255, 255, .82); }
.rail.on-dark li.is-active a { color: #fff; }
.rail.on-dark li.is-active i { background: #fff; }
.rail a { padding-left: 0; }
/* dashes only until there is real room for the labels beside the text column */
@media (min-width: 1200px) { .rail { display: block; } }
@media (max-width: 1559px) {
  .rail { left: .9rem; }
  .rail a { font-size: .62rem; letter-spacing: .1em; gap: .45rem; }
  .rail i { width: 16px; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
  /* the hero is exactly the banner's own shape, so the whole artwork shows */
  aspect-ratio: 1942 / 809;
  min-height: clamp(430px, 41.6vw, 700px);
  background: var(--ink);
  color: #fff;
  padding-top: calc(var(--header-h) + clamp(2rem, 4vw, 3.5rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
/* the anniversary banner is the hero itself */
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  /* zoomed past the artwork's own captions so they never collide with the site's type */
}
/* a flat 40% neutral tint — the artwork carries the hero, no colour laid over it */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(23, 19, 15, .93) 0%,
      rgba(23, 19, 15, .88) 26%,
      rgba(23, 19, 15, .55) 42%,
      rgba(23, 19, 15, .12) 56%,
      rgba(23, 19, 15, 0) 66%),
    rgba(23, 19, 15, .40);
}
.hero > .u-wrap { position: relative; z-index: 2; width: 100%; }
.hero h1 { color: #fff; text-shadow: 0 2px 30px rgba(23, 19, 15, .35); }
.hero :focus-visible { outline-color: #fff; }
.hero__masthead {
  display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
  padding-bottom: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .28);
}
.hero__masthead span { font-family: var(--display); font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--on-red-dim); }
.hero h1 { max-width: 17ch; }
.hero__foot {
  margin-top: clamp(2.25rem, 4.5vw, 3.25rem);
  display: flex; gap: .85rem; flex-wrap: wrap;
}
.hero .t-lead { color: var(--on-red-dim); }
.hero__year {
  font-family: var(--display); font-weight: 600; font-size: .74rem; letter-spacing: .24em;
  color: var(--on-red-dim); white-space: nowrap; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: .75rem;
}
.hero__year::before { content: ""; width: clamp(28px, 6vw, 80px); height: 1px; background: currentColor; }
@media (max-width: 560px) {
  .hero__foot { display: grid; gap: .7rem; }
  .hero__foot .u-btnrow { display: grid; gap: .7rem; width: 100%; }
  .hero__foot .u-btn { justify-content: space-between; width: 100%; }
}
/* On a phone a 2.4:1 band is far too short to hold the headline, so the
   banner sits at its full width at the top and the words go beneath it —
   still one hero, still the whole image. */
@media (max-width: 860px) {
  .hero {
    aspect-ratio: auto;
    min-height: 0;
    display: block;
    padding-top: calc(var(--header-h) + 1rem);
    padding-bottom: clamp(2rem, 6vw, 3rem);
  }
  .hero__bg {
    position: static;
    width: 100%;
    height: auto;
    margin-bottom: clamp(1.75rem, 6vw, 2.5rem);
  }
  .hero::before { display: none; }
}

/* line-mask reveal for the headline */
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: block; }

/* ---------- anniversary plate (kept for reuse; the homepage now carries the
   banner as the hero backdrop itself) ---------- */

.plate { background: var(--red); }
.plate figure { position: relative; }
.plate img { width: 100%; }
.plate figcaption {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .9rem 0 0;
  font-family: var(--display); font-size: .7rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--on-red-dim);
}

/* ---------- feature (aktuálny projekt) ---------- */

/* the frame must hug its image, not stretch to the copy column */
.feature { align-items: center; }
.feature__media { grid-column: 1 / span 6; align-self: center; }
.feature__body { grid-column: 8 / span 5; display: grid; gap: 1.15rem; justify-items: start; align-content: start; }
.feature__media img { width: 100%; }
.feature__body h2 { max-width: 16ch; }
.feature__note { font-size: .86rem; line-height: 1.6; color: var(--stone); max-width: 40ch; }
@media (max-width: 900px) {
  .feature__media, .feature__body { grid-column: 1 / -1; }
  .feature__body { margin-top: 1.6rem; }
}

.tagline { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.tag {
  font-family: var(--display); font-size: .68rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: #fff; background: var(--red); padding: .38em .75em .32em;
}
.tag--past { background: var(--ink); }
.u-band-red .tag { background: #fff; color: var(--red); }
.u-band-red .tag--past { background: rgba(255,255,255,.18); color: #fff; }

/* framed media with a hairline, no shadow theatre */
.framed { border: 1px solid var(--line); padding: 10px; background: #fff; }
.u-band-bone .framed { background: #fff; }

/* ---------- profil: prose + fact register ---------- */

.profil__prose { grid-column: 1 / span 6; }
.profil__facts { grid-column: 8 / span 5; align-self: start; }
@media (max-width: 900px) { .profil__prose, .profil__facts { grid-column: 1 / -1; } .profil__facts { margin-top: 2.5rem; } }

.register { border-top: 1px solid var(--line); }
.register div {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem;
  padding-block: .85rem; border-bottom: 1px solid var(--line);
}
.register dt { font-family: var(--display); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--stone); padding-top: .34em; }
.register dd { font-size: .98rem; line-height: 1.5; font-variant-numeric: lining-nums; }
@media (max-width: 480px) { .register div { grid-template-columns: 1fr; gap: .2rem; } }

/* ---------- mission band ---------- */

.mission__lead { grid-column: 1 / span 7; }
.mission__aside { grid-column: 9 / span 4; align-self: end; }
.mission p + p { margin-top: 1.1rem; }
.mission__lead p {
  font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.24;
  font-size: clamp(1.35rem, 2.4vw, 2.1rem); color: #fff;
}
.mission__aside p { color: var(--on-red-dim); font-size: 1rem; line-height: 1.65; }
@media (max-width: 900px) { .mission__lead, .mission__aside { grid-column: 1 / -1; } .mission__aside { margin-top: 1.75rem; } }

/* ---------- programmes: full-width rows ---------- */

.prog { border-top: 1px solid var(--line); }
.prog__row {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(1rem, 3vw, 3rem);
  padding-block: clamp(1.6rem, 2.6vw, 2.35rem);
  border-bottom: 1px solid var(--line);
  transition: background-color .35s var(--ease);
}
.prog__row h3 { transition: transform .45s var(--ease), color .3s var(--ease); }
.prog__row:hover { background: var(--red-tint); }
.prog__row:hover h3 { transform: translateX(10px); color: var(--red); }
.prog__row p { color: var(--stone); max-width: 62ch; }
.prog__row h3 { max-width: 15ch; }
@media (max-width: 760px) { .prog__row { grid-template-columns: 1fr; gap: .6rem; } }

/* ---------- values ---------- */

.vals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.vals > div { padding-inline: clamp(1rem, 2.4vw, 2.25rem); border-left: 1px solid var(--line); }
.vals > div:first-child { padding-left: 0; border-left: 0; }
.vals > div:last-child { padding-right: 0; }
.vals h3 { margin-bottom: .7rem; }
.vals p { font-size: .98rem; line-height: 1.62; color: var(--stone); }
@media (max-width: 820px) {
  .vals { grid-template-columns: 1fr; gap: 1.75rem; }
  .vals > div { padding-inline: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 1.25rem; }
  .vals > div:first-child { border-top: 0; padding-top: 0; }
}

/* ---------- SIGNATURE: project index with cursor-tracked preview ---------- */

.pindex { list-style: none; border-top: 1px solid var(--line); }
.pindex__row { border-bottom: 1px solid var(--line); }
.pindex__link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 1rem clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.15rem, 2.3vw, 1.9rem);
  transition: color .35s var(--ease);
}
.pindex__t {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.35rem, 3.1vw, 2.6rem); line-height: 1.05; letter-spacing: -.03em;
  display: inline-block;
  transition: transform .5s var(--ease);
}
.pindex__meta {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: flex-end;
  font-family: var(--display); font-size: .72rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--stone); font-variant-numeric: tabular-nums;
  transition: color .35s var(--ease);
}
.pindex__thumb { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .pindex__link:hover .pindex__t { transform: translateX(clamp(8px, 1.4vw, 22px)); }
  .pindex__link:hover { color: var(--red); }
  .pindex__link:hover .pindex__meta { color: var(--red); }
}
@media (max-width: 900px) {
  .pindex__link { grid-template-columns: 84px minmax(0, 1fr); align-items: start; }
  .pindex__thumb { display: block; width: 84px; height: 62px; object-fit: cover; border: 1px solid var(--line); }
  .pindex__col { display: grid; gap: .5rem; }
  .pindex__meta { justify-content: flex-start; grid-column: 2; }
}

/* The four project images come from four unrelated sources (an EU poster, two
   illustrations, a photograph). Shown as a set — the listing rows and the
   phone-width index thumbnails — they are held together in monochrome; hovering
   a listing row returns that image to colour, and a project's own detail page
   always shows it untreated. The homepage index carries no imagery at all: the
   titles do the work. */
.pindex__thumb { filter: grayscale(1) contrast(1.04); }
.plist__media img { filter: grayscale(1) contrast(1.04); transition: transform .8s var(--ease), filter .6s var(--ease); }
.plist__link:hover .plist__media img { filter: none; }

/* ---------- impact ---------- */

.impact__a { grid-column: 1 / span 6; }
.impact__b { grid-column: 8 / span 5; }
@media (max-width: 900px) { .impact__a, .impact__b { grid-column: 1 / -1; } .impact__b { margin-top: 2.25rem; } }
.impact h3 { margin-bottom: .85rem; }

.pull {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 2.15rem); line-height: 1.22; letter-spacing: -.025em;
  max-width: 22ch;
}
.pull b { color: var(--red); font-weight: 600; }

/* ---------- contact close ---------- */

.close__head { grid-column: 1 / span 6; }
.close__data { grid-column: 8 / span 5; align-self: end; }
@media (max-width: 900px) { .close__head, .close__data { grid-column: 1 / -1; } .close__data { margin-top: 2rem; } }
.close h2 { max-width: 12ch; font-size: clamp(2.2rem, 4.4vw, 3.5rem); }
.close__line { display: grid; gap: .35rem; padding-block: .9rem; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.close__line:first-of-type { border-top: 1px solid rgba(255, 255, 255, .25); }
.close__line a, .close__line p { font-family: var(--display); font-size: clamp(1.05rem, 1.6vw, 1.3rem); font-weight: 500; letter-spacing: -.01em; color: #fff; }
.close__line a { transition: opacity .25s var(--ease); }
.close__line a:hover { box-shadow: inset 0 -2px 0 0 currentColor; }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: var(--on-ink-dim); padding-block: clamp(3rem, 6vw, 5rem) 1.5rem; }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: clamp(1.75rem, 4vw, 3.5rem); }
.site-footer h4 { font-family: var(--display); font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .5); margin-bottom: 1.1rem; }
.site-footer ul { list-style: none; display: grid; gap: .6rem; }
.site-footer li { font-size: .92rem; line-height: 1.55; }
.site-footer a { transition: color .25s var(--ease); }
.site-footer a:hover { color: #fff; }
.site-footer a[aria-current="page"] { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.footer-brand img { width: 30px; height: 30px; }
.footer-brand span { font-family: var(--display); font-weight: 700; font-size: 1rem; color: #fff; line-height: 1.2; }
.footer-desc { font-size: .92rem; line-height: 1.6; max-width: 26rem; }
.footer-base {
  margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--display); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}
@media (max-width: 820px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- subpages ---------- */

.pagehead { padding-top: calc(var(--header-h) + clamp(2.5rem, 5.5vw, 5rem)); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.pagehead h1 { max-width: 20ch; font-size: clamp(1.95rem, 4vw, 3.3rem); }
.pagehead .t-lead { margin-top: 1.5rem; color: var(--on-red-dim); }
.pagehead__top { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-bottom: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .28); margin-bottom: clamp(1.75rem, 4vw, 3rem); }

.back {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--display); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--on-red-dim); transition: color .25s var(--ease), gap .3s var(--ease);
}
.back:hover { color: #fff; gap: .85rem; }

.plist { list-style: none; }
.plist__row { border-bottom: 1px solid var(--line); }
.plist__row:first-child { border-top: 1px solid var(--line); }
.plist__link {
  display: grid; grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(1.25rem, 3.5vw, 3rem);
  padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
  align-items: start;
}
.plist__media { overflow: hidden; }
.plist__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .8s var(--ease); }
.plist__link:hover .plist__media img { transform: scale(1.04); }
.plist__body { display: grid; gap: .9rem; justify-items: start; }
.plist__body h2 { font-size: clamp(1.35rem, 2.3vw, 1.95rem); max-width: 22ch; transition: color .3s var(--ease); }
.plist__link:hover h2 { color: var(--red); }
.plist__body p { color: var(--stone); max-width: 66ch; }
.plist__more { font-family: var(--display); font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--red); display: inline-flex; align-items: center; gap: .5rem; }
@media (max-width: 820px) { .plist__link { grid-template-columns: 1fr; } .plist__media { max-width: 440px; } }

/* project detail */
.detail__main { grid-column: 1 / span 7; }
.detail__side { grid-column: 9 / span 4; align-self: start; }
@media (max-width: 980px) { .detail__main, .detail__side { grid-column: 1 / -1; } .detail__side { margin-top: 2.5rem; } }

.spec { border-top: 1px solid var(--line); }
.spec h3 { font-size: 1.18rem; letter-spacing: -.015em; margin: 1.5rem 0 .75rem; }
.spec ul { list-style: none; display: grid; gap: .6rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.spec li { font-size: .95rem; line-height: 1.55; padding-left: 1.1rem; position: relative; }
.spec li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; background: var(--red); }
.spec strong { font-weight: 600; }

.figure-wide { margin-block: clamp(1.75rem, 4vw, 2.75rem); }
.figure-wide figcaption { margin-top: .8rem; font-size: .84rem; color: var(--stone); line-height: 1.5; }

/* data table (towns) */
.dtable { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums lining-nums; }
.dtable th:first-child, .dtable td:first-child { width: 26%; }
.dtable th:last-child, .dtable td:last-child { width: 9%; }
.dtable caption { text-align: left; font-family: var(--display); font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--stone); padding-bottom: .9rem; }
.dtable th { text-align: left; font-family: var(--display); font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); padding-bottom: .55rem; border-bottom: 1px solid var(--ink); }
.dtable th:last-child { text-align: right; }
.dtable td { padding-block: .5rem; border-bottom: 1px solid var(--line); font-size: .95rem; }
.dtable td:last-child { text-align: right; font-weight: 600; }
.dtable .barcell { width: 65%; padding-inline: 1.25rem 0; }
.dtable .barcell { position: relative; }
.dtable .bar { display: block; height: 7px; background: var(--red); transform-origin: left; transform: scaleX(var(--v, 0)); }
.dtable .barcell::before { content: ""; position: absolute; left: 1.25rem; right: 0; top: 50%; height: 1px; background: var(--line); }
.dtable .bar { position: relative; }
.dtable td { padding-block: .55rem; }
.dtable tfoot td { border-bottom: 0; border-top: 1px solid var(--ink); font-weight: 700; padding-top: .7rem; }

/* related */
.related { list-style: none; }
.related__row { border-bottom: 1px solid var(--line); }
.related__row:first-child { border-top: 1px solid var(--line); }
.related__link { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; padding-block: 1.15rem; transition: color .3s var(--ease); }
.related__link:hover { color: var(--red); }
.related__t { font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: -.015em; }
.related__p { font-family: var(--display); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--stone); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* contact page */
.ccard { border-top: 1px solid var(--line); padding-top: 1.4rem; display: grid; gap: 1.4rem; align-content: start; }
.ccard--a { grid-column: 1 / span 4; }
.ccard--b { grid-column: 5 / span 4; }
.ccard--c { grid-column: 9 / span 4; }
@media (max-width: 1000px) {
  .ccard--a, .ccard--b { grid-column: span 6; }
  .ccard--c { grid-column: 1 / -1; }
}
@media (max-width: 720px) { .ccard--a, .ccard--b, .ccard--c { grid-column: 1 / -1; } }
.ccard__field { display: grid; gap: .3rem; }
.ccard__field a, .ccard__field p { font-size: 1.05rem; line-height: 1.5; }
.ccard__field a { font-weight: 500; color: var(--red); box-shadow: inset 0 -1px 0 0 rgba(147,0,18,.3); transition: box-shadow .25s var(--ease), color .25s var(--ease); }
.ccard__field a:hover { color: var(--red-deep); box-shadow: inset 0 -2px 0 0 var(--red-deep); }

/* ---------- motion ---------- */

/* Content is visible by default. It is only hidden once the page has
   confirmed scripting can reveal it again (html.js-on), so a visitor with
   JavaScript off or a failed script still reads the whole page. */
.js-on [data-rise] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js-on [data-rise].is-in { opacity: 1; transform: none; }

.js-on .reveal-line > span { transform: translateY(105%); transition: transform 1.05s var(--ease); }
.js-on .reveal-line.is-in > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-rise], .js-on [data-rise] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js-on .reveal-line > span { transform: none !important; transition: none !important; }
  .u-btn, .u-btn::before, .prog__row, .prog__row h3, .rail i, .pindex__t, .plist__media img, .site-nav a::after { transition: none !important; }
}


/* ---------- project photo slider ----------
   One photo at a time inside the page, paged with the buttons, the arrow
   keys, or a swipe. The track is a native scroll-snap strip, so with
   JavaScript off it still scrolls and every photo stays reachable. */

.slider { display: grid; gap: 1rem; }
.slider__frame {
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px;
}
.slider__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.slider__track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .slider__track { scroll-behavior: auto; } }

.slider__slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: grid;
  place-items: center;
  background: var(--bone);
  aspect-ratio: 3 / 2;
}
.slider__slide img { width: 100%; height: 100%; object-fit: contain; }

.slider__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}
.slider__cap { font-size: .9rem; line-height: 1.5; color: var(--stone); max-width: 52ch; }
.slider__ctrl { display: flex; align-items: center; gap: .6rem; flex: none; }
.slider__count {
  font-family: var(--display); font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; color: var(--stone); font-variant-numeric: tabular-nums;
  margin-right: .3rem;
}
.slider__btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line-strong, var(--ink));
  color: var(--ink);
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.slider__btn svg { width: 18px; height: 8px; }
.slider__btn:hover:not(:disabled) { background: var(--ink); color: #fff; }
.slider__btn:disabled { opacity: .28; cursor: default; }

/* dots double as a position read-out and a jump target */
.slider__dots { display: flex; gap: .45rem; }
.slider__dot {
  width: 26px; height: 3px; padding: 0;
  border: 0; background: var(--line); cursor: pointer;
  transition: background-color .25s var(--ease);
}
.slider__dot[aria-current="true"] { background: var(--red); }

/* no JS: the strip is still scrollable and the controls stay hidden.
   The slider script itself marks the component ready — never tied to the
   reveal flag, so reduced-motion visitors keep the controls. */
.slider__ctrl, .slider__dots { display: none; }
.slider.is-ready .slider__ctrl, .slider.is-ready .slider__dots { display: flex; }

@media (prefers-reduced-motion: reduce) { .slider__btn, .slider__dot { transition: none; } }
