/* ==========================================================================
   Sustainable Mobility Unit — public site styles
   Layout: tokens → base → layout → header → hero → components → pages
   ========================================================================== */

@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner-greek.7f4d3852ea46.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner-latin-ext.6a331c6c197b.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner-latin.5639dfe67576.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens --------------------------------------------------------------- */
:root {
  --ink: #0d1b2a;          /* deep navy: hero, header, footer */
  --ink-2: #13283e;
  --ink-3: #1d3a57;
  --brand: #0a7489;        /* teal from the unit's logo (4.9:1 on white) */
  --brand-strong: #075a6b;
  --brand-soft: #e3f3f6;
  --lane: #c5ee4f;         /* cycle-lane green: buttons, highlights (on navy) */
  --lane-strong: #a9d62c;
  --text: #1b2430;
  --text-soft: #4c5a69;    /* 6.6:1 on white */
  --line: #dde3e8;
  --line-strong: #7a8794;   /* 3.6:1 on white: form field borders */
  --surface: #ffffff;
  --surface-2: #f3f5f7;
  --surface-3: #e9eef2;
  --danger: #b42318;
  --success: #116b3c;

  --font: "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --pill: 999px;
  --shadow-1: 0 1px 2px rgb(13 27 42 / .06), 0 2px 8px rgb(13 27 42 / .05);
  --shadow-2: 0 10px 30px -10px rgb(13 27 42 / .25);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-fast: .2s;
  --t: .3s;
  --t-slow: .6s;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 84px;
  --header-h-compact: 64px;

  --fs-display: clamp(2.4rem, 1.2rem + 5.2vw, 5.4rem);
  --fs-h1: clamp(2rem, 1.2rem + 3.4vw, 3.75rem);
  --fs-h2: clamp(1.6rem, 1.1rem + 2vw, 2.75rem);
  --fs-h3: clamp(1.15rem, 1rem + .5vw, 1.4rem);
  --fs-lead: clamp(1.08rem, 1rem + .4vw, 1.3rem);
}

/* --- Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 34px + 24px);
  scroll-padding-bottom: 96px;
  interpolate-size: allow-keywords;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: .18em; transition: color var(--t) ease; }
a:hover { color: var(--brand-strong); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--lane); outline-offset: 3px; border-radius: 4px; }
/* Light areas: dark teal ring (7:1 on white). Dark areas keep the lime ring. */
main :focus-visible { outline-color: var(--brand-strong); }
.hero :focus-visible, .page-hero :focus-visible, .section--dark :focus-visible, .cta-band :focus-visible { outline-color: var(--lane); }
/* Cards are clickable as a whole, so the ring goes around the card. */
.card:has(.card__title a:focus-visible) { outline: 3px solid var(--brand-strong); outline-offset: 3px; }
.card__title a:focus-visible { outline: none; }
::selection { background: var(--lane); color: var(--ink); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: .7em 1.2em; background: var(--lane); color: var(--ink); font-weight: 800;
  border-radius: var(--pill); transform: translateY(-160%); transition: transform var(--t) var(--ease);
}
.skip-link:focus { transform: none; }

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

/* Display headings: heavy, uppercase. Greek accents drop automatically
   because every block that may hold Greek text carries lang="el". */
.display, .section-title, .page-hero__title, .hero__title {
  overflow-wrap: break-word;
  hyphens: auto;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: -.015em;
  line-height: 1;
}
.section-title { font-size: var(--fs-h2); color: var(--brand); margin-bottom: .6em; }
.section-title--light { color: #fff; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: currentColor; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-soft); max-width: 62ch; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  --btn-bg: var(--lane); --btn-fg: var(--ink); --btn-bd: var(--lane);
  display: inline-flex; align-items: center; justify-content: center; gap: .65em;
  min-height: 48px; padding: .75em 1.6em;
  border: 2px solid var(--btn-bd); border-radius: var(--pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 900; font-size: .92rem; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--t) ease, color var(--t) ease, border-color var(--t) ease, transform var(--t) var(--ease), box-shadow var(--t) ease;
}
.btn:hover { --btn-bg: #d6f878; color: var(--btn-fg); transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgb(197 238 79 / .9); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform var(--t) var(--ease); }
.btn:hover .arrow, .link-arrow:hover .arrow, .card:hover .arrow { transform: translateX(4px); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--brand); --btn-bd: var(--brand); }
.btn--outline:hover { --btn-bg: var(--brand); --btn-fg: #fff; color: #fff; box-shadow: none; }
.btn--ghost { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgb(255 255 255 / .55); }
.btn--ghost:hover { --btn-bg: #fff; --btn-fg: var(--ink); color: var(--ink); box-shadow: none; }
.btn--sm { min-height: 40px; padding: .5em 1.15em; font-size: .8rem; }
.arrow { width: 1.15em; height: 1.15em; flex: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45em;
  font-weight: 800; text-decoration: none; text-transform: uppercase; font-size: .85rem; letter-spacing: .06em;
  min-height: 24px;
}

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: #fff;
  transition: background var(--t) ease, box-shadow var(--t) ease, transform .4s var(--ease-io);
}
.site-header::before { /* soft shade so the white menu stays readable over photos */
  content: ""; position: absolute; inset: 0 0 -40px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgb(13 27 42 / .55), transparent);
  transition: opacity var(--t) ease;
}
.site-header.is-solid { background: var(--ink); box-shadow: 0 6px 24px -12px rgb(0 0 0 / .5); }
.site-header.is-solid::before { opacity: 0; }
.site-header.is-hidden { transform: translateY(-100%); }
body.no-hero .site-header { background: var(--ink); }
body.no-hero .site-header::before { opacity: 0; }

.topbar { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid rgb(255 255 255 / .12); }
.topbar .wrap { display: flex; justify-content: flex-end; align-items: center; gap: 1.4rem; min-height: 34px; }
.topbar a { color: rgb(255 255 255 / .82); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 24px; min-width: 24px; }
.topbar a:hover, .topbar a[aria-current="true"] { color: #fff; }
.topbar__langs { display: flex; gap: .55rem; align-items: center; }
.topbar__langs span { opacity: .45; }
.topbar__langs a[aria-current="true"] { color: var(--lane); }
.site-header.is-solid .topbar { display: none; }

.navbar .wrap { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); transition: height .4s var(--ease-io); }
.site-header.is-solid .navbar .wrap { height: var(--header-h-compact); }

.brand { display: flex; align-items: center; gap: .8rem; color: #fff; text-decoration: none; margin-right: auto; min-width: 0; }
.brand:hover { color: #fff; }
.brand__mark { width: 46px; height: 46px; flex: none; transition: width .4s var(--ease-io), height .4s var(--ease-io); }
.site-header.is-solid .brand__mark { width: 38px; height: 38px; }
.brand--footer { gap: 1.1rem; }
.brand--footer .brand__mark { width: 96px; height: 96px; }
.brand--footer .brand__name { font-size: 1.05rem; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand__name { font-weight: 900; text-transform: uppercase; font-size: .98rem; letter-spacing: .01em; }
.brand__sub { font-size: .72rem; font-weight: 600; opacity: .75; margin-top: .25em; letter-spacing: .02em; }
@media (max-width: 520px) {
  .brand__name { font-size: .8rem; }
  .brand__sub { display: none; }
}

.mainnav { display: flex; align-items: center; }
.mainnav > ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.mainnav__item { position: relative; }
.mainnav__link {
  display: inline-flex; align-items: center; gap: .35em;
  padding: .6em .85em; border: 0; background: none; cursor: pointer;
  color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none; border-radius: var(--pill);
  transition: background var(--t) ease, color var(--t) ease;
}
.mainnav__link:hover, .mainnav__item.is-open > .mainnav__link { background: rgb(255 255 255 / .1); color: #fff; }
.mainnav__link[aria-current="page"], .mainnav__item.is-active > .mainnav__link { box-shadow: inset 0 -3px 0 var(--lane); border-radius: 0; }
.mainnav__chev { width: .8em; height: .8em; transition: transform var(--t) var(--ease); }
.mainnav__item.is-open .mainnav__chev { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 10px); left: 50%; min-width: 300px;
  padding: .6rem; list-style: none; margin: 0;
  background: #fff; color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity var(--t) ease, transform var(--t) var(--ease), visibility 0s linear var(--t);
}
.dropdown::before { content: ""; position: absolute; inset: -12px 0 auto 0; height: 12px; }
.mainnav__item.is-open > .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.dropdown a {
  display: grid; gap: .1rem; padding: .7rem .9rem; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-weight: 700;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.dropdown a small { font-weight: 500; color: var(--text-soft); font-size: .82rem; }
.dropdown a:hover, .dropdown a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); }

.header-actions { display: flex; align-items: center; gap: .3rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: #fff; cursor: pointer; transition: background var(--t) ease;
}
.icon-btn:hover { background: rgb(255 255 255 / .12); color: #fff; }
.icon-btn svg { width: 22px; height: 22px; }
.menu-toggle { display: none; }

@media (max-width: 1080px) {
  .mainnav { display: none; }
  .menu-toggle { display: inline-grid; }
  .topbar { display: none; }
}

/* Mobile menu panel */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: var(--ink); color: #fff; overflow-y: auto;
  clip-path: circle(0 at calc(100% - 40px) 40px);
  visibility: hidden;
  transition: clip-path .55s var(--ease-io), visibility 0s linear .55s;
}
.mobile-menu.is-open { clip-path: circle(150% at calc(100% - 40px) 40px); visibility: visible; transition-delay: 0s; }
.mobile-menu__head { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); }
.mobile-menu nav { padding: 0 var(--gutter) 2rem; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu > nav > ul > li { border-bottom: 1px solid rgb(255 255 255 / .1); }
.mobile-menu a, .mobile-menu summary {
  display: flex; justify-content: space-between; align-items: center; padding: 1rem 0;
  color: #fff; text-decoration: none; font-weight: 800; font-size: 1.2rem; cursor: pointer; list-style: none;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu details ul { padding: 0 0 1rem .9rem; }
.mobile-menu details a { font-size: 1rem; font-weight: 600; padding: .55rem 0; color: rgb(255 255 255 / .85); }
.mobile-menu .plus { transition: transform var(--t) var(--ease); }
.mobile-menu details[open] .plus { transform: rotate(45deg); }
.mobile-menu__langs { display: flex; gap: .6rem; padding: 1.5rem var(--gutter); margin-top: auto; }
.mobile-menu .mobile-menu__langs .btn { padding: .5em 1.3em; font-size: .85rem; }
.mobile-menu .is-open-item { color: var(--lane); }
.mobile-menu li { opacity: 0; transform: translateY(12px); transition: opacity .4s ease, transform .4s var(--ease); }
.mobile-menu.is-open li { opacity: 1; transform: none; }
.mobile-menu.is-open li:nth-child(2) { transition-delay: .05s; }
.mobile-menu.is-open li:nth-child(3) { transition-delay: .1s; }
.mobile-menu.is-open li:nth-child(4) { transition-delay: .15s; }
.mobile-menu.is-open li:nth-child(5) { transition-delay: .2s; }
.mobile-menu.is-open li:nth-child(n+6) { transition-delay: .25s; }

/* Search overlay */
.search-panel {
  position: fixed; inset: 0; z-index: 70; display: grid; align-items: start; padding-top: 18vh;
  background: rgb(13 27 42 / .92); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity var(--t) ease, visibility 0s linear var(--t);
}
.search-panel.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.search-panel form { display: flex; gap: .8rem; align-items: center; border-bottom: 3px solid var(--lane); }
.search-panel input {
  flex: 1; min-width: 0; padding: .4em 0; border: 0; background: transparent; color: #fff;
  font: 800 clamp(1.5rem, 1rem + 3vw, 3rem)/1.2 var(--font);
}
.search-panel input::placeholder { color: rgb(255 255 255 / .7); }
.search-panel input:focus-visible { outline-offset: 6px; }
.search-panel .icon-btn { flex: none; }
.search-panel__close { position: absolute; top: 18px; right: var(--gutter); }

/* --- Home hero ------------------------------------------------------------ */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(92svh, 860px);
  display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 34px + 3rem) 0 clamp(3rem, 8vw, 6rem);
  background: radial-gradient(120% 90% at 85% 10%, #1b4d68 0%, transparent 55%),
              radial-gradient(80% 70% at 10% 100%, #0f3b4a 0%, transparent 60%),
              var(--ink);
  color: #fff;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); animation: hero-zoom 14s var(--ease) forwards; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(13 27 42 / .92) 0%, rgb(13 27 42 / .6) 55%, rgb(13 27 42 / .3) 100%),
              linear-gradient(0deg, rgb(13 27 42 / .7), transparent 50%);
}
@keyframes hero-zoom { to { transform: scale(1); } }

.routes { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.routes path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.routes .r-base { stroke: rgb(255 255 255 / .07); stroke-width: 2; }
.routes .r-line { stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 3.2s var(--ease) forwards; }
.routes .r-line--lane { stroke: var(--lane); }
.routes .r-line--teal { stroke: #3fc1d6; }
.routes .r-line--white { stroke: rgb(255 255 255 / .6); stroke-dasharray: .006 .014; stroke-dashoffset: 0; animation: dash 40s linear infinite; stroke-width: 2; }
.routes .r-line:nth-of-type(2) { animation-delay: .35s; }
.routes .r-line:nth-of-type(3) { animation-delay: .7s; }
.routes .r-line:nth-of-type(4) { animation-delay: 1s; }
.routes .r-stop { fill: var(--ink); stroke: var(--lane); stroke-width: 3; opacity: 0; animation: pop .5s var(--ease) forwards; }
.routes .r-stop--teal { stroke: #3fc1d6; }
.routes .r-rider { fill: var(--lane); offset-rotate: 0deg; animation: ride 16s linear infinite; opacity: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dash { to { stroke-dashoffset: -1; } }
@keyframes pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes ride { 0% { offset-distance: 0%; opacity: 0; } 4% { opacity: 1; } 96% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.hero__media ~ .routes { opacity: .55; }

.hero::after { /* keeps the text readable where route lines pass behind it */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgb(13 27 42 / .78) 0%, rgb(13 27 42 / .45) 45%, transparent 75%);
}
.hero__inner { position: relative; }
.hero__title { font-size: var(--fs-display); max-width: 15ch; margin-bottom: .35em; }
.hero__title .hl { color: var(--lane); }
.hero__text { font-size: var(--fs-lead); max-width: 56ch; color: rgb(255 255 255 / .85); margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero__badge {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.4rem;
  padding: .4rem .9rem .4rem .45rem; border-radius: var(--pill); background: rgb(255 255 255 / .1);
  font-size: .82rem; font-weight: 700; letter-spacing: .04em; color: rgb(255 255 255 / .9);
  backdrop-filter: blur(6px);
}
.hero__badge b { white-space: nowrap; background: var(--lane); color: var(--ink); padding: .15rem .6rem; border-radius: var(--pill); font-weight: 900; }

.hero__scroll {
  position: absolute; right: var(--gutter); bottom: 2rem; display: grid; justify-items: center; gap: .5rem;
  color: rgb(255 255 255 / .7); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  writing-mode: vertical-rl;
}
.hero__scroll::after { content: ""; width: 2px; height: 56px; background: linear-gradient(var(--lane), transparent); animation: scroll-hint 2.2s var(--ease-io) infinite; transform-origin: top; }
@keyframes scroll-hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 720px) { .hero__scroll { display: none; } }

/* WCAG 2.2.2 Pause, Stop, Hide: endless motion only on the home hero, with a pause button.
   Inner pages draw their routes once and then stay still. */
.page-hero .r-rider { display: none; }
.page-hero .r-line--white { animation: none; }
html.motion-paused .r-rider,
html.motion-paused .r-line--white,
html.motion-paused .hero__scroll::after { animation-play-state: paused !important; }
.motion-toggle {
  position: absolute; right: calc(var(--gutter) + 44px); bottom: 2rem; z-index: 2;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgb(255 255 255 / .6); background: rgb(13 27 42 / .55); color: #fff; cursor: pointer;
  transition: background var(--t) ease, border-color var(--t) ease, color var(--t) ease;
}
.motion-toggle:hover { background: var(--lane); border-color: var(--lane); color: var(--ink); }
.motion-toggle svg { width: 18px; height: 18px; }
.motion-toggle__play, html.motion-paused .motion-toggle__pause { display: none; }
html.motion-paused .motion-toggle__play { display: grid; }
@media (max-width: 720px) { .motion-toggle { right: var(--gutter); bottom: 1.25rem; } }

/* Entrance animation for hero content */
.js .rise { opacity: 0; transform: translateY(28px); animation: rise .9s var(--ease) forwards; }
.js .rise-2 { animation-delay: .15s; }
.js .rise-3 { animation-delay: .3s; }
.js .rise-4 { animation-delay: .45s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* --- Inner page hero ------------------------------------------------------- */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: calc(var(--header-h) + 34px + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(2.5rem, 5vw, 4rem);
  background: radial-gradient(90% 120% at 100% 0%, #1b4d68 0%, transparent 60%), var(--ink);
  color: #fff;
}
.page-hero .routes { opacity: .7; }
.page-hero__title { font-size: var(--fs-h1); max-width: 22ch; margin-bottom: .35em; }
.page-hero__intro { font-size: var(--fs-lead); color: rgb(255 255 255 / .82); max-width: 62ch; margin: 0; }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; margin-top: 1.2rem; color: rgb(255 255 255 / .8); font-weight: 600; font-size: .95rem; }
.page-hero--image { min-height: 520px; display: flex; align-items: flex-end; }
.page-hero--image .hero__media::after { background: linear-gradient(0deg, rgb(13 27 42 / .95) 0%, rgb(13 27 42 / .55) 55%, rgb(13 27 42 / .35) 100%); }

.crumbs { margin-bottom: 1.4rem; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: .4rem; opacity: .5; }
.crumbs a, .crumbs [aria-current] { display: inline-flex; align-items: center; min-height: 24px; }
.crumbs a { color: rgb(255 255 255 / .8); text-decoration: none; }
.crumbs a:hover { color: var(--lane); }
.crumbs [aria-current] { color: #fff; }

/* --- Sections -------------------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tint { background: var(--surface-2); }
.section--dark { background: var(--ink); color: #fff; }
.section--dark .routes { opacity: .28; }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-head .section-title { margin-bottom: 0; }
.section-head p { margin: .6rem 0 0; }

/* Scroll reveal (only when JS runs and motion is welcome) */
.js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity .8s ease, transform .8s var(--ease); transition-delay: var(--delay, 0s); }
.js [data-reveal="left"] { transform: translateX(-32px); }
.js [data-reveal="scale"] { transform: scale(.96); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* --- Key figures ----------------------------------------------------------- */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.figure { padding: 1.8rem 1.4rem 1.6rem 0; border-bottom: 1px solid var(--line); }
.figure__value { display: block; font-size: clamp(2.6rem, 1.8rem + 2.6vw, 4rem); font-weight: 900; line-height: 1; color: var(--ink); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.figure__value::after { content: ""; display: block; width: 36px; height: 4px; margin-top: .9rem; border-radius: 4px; background: var(--lane-strong); transition: width .8s var(--ease) .2s; }
.js .figure:not(.is-visible) .figure__value::after { width: 0; }
.figure__label { display: block; margin-top: .8rem; color: var(--text-soft); font-weight: 600; line-height: 1.35; }

/* --- About split ----------------------------------------------------------- */
.split { display: grid; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; } }
.split__title { position: sticky; top: calc(var(--header-h-compact) + 2rem); }
.big-quote { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.85rem); font-weight: 600; line-height: 1.4; color: var(--ink); margin: 0 0 1.5rem; }

/* --- Cards ----------------------------------------------------------------- */
.grid { display: grid; gap: clamp(1.2rem, 2.5vw, 2rem); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-1); border: 1px solid var(--line);
  transition: transform var(--t) var(--ease), box-shadow var(--t) ease, border-color var(--t) ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: transparent; }
.card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, var(--ink-3), var(--brand)); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgb(255 255 255 / .25); }
.card__placeholder svg { width: 40%; height: auto; }
.card__body { display: flex; flex-direction: column; gap: .55rem; padding: 1.3rem 1.4rem 1.5rem; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; font-size: .8rem; font-weight: 700; color: var(--text-soft); letter-spacing: .02em; }
.card__title { font-size: 1.15rem; font-weight: 800; line-height: 1.28; margin: 0; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.card:hover .card__title a { color: var(--brand); }
.card__text { color: var(--text-soft); font-size: .97rem; margin: 0; }
.card__more { margin-top: auto; padding-top: .5rem; color: var(--brand); }

.card--feature { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .card--feature { grid-template-columns: 7fr 5fr; }
  .card--feature .card__media { aspect-ratio: auto; min-height: 420px; }
}
.card--feature .card__body { padding: clamp(1.5rem, 3vw, 2.6rem); justify-content: center; }
.card--feature .card__title { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); line-height: 1.18; }

.tag {
  display: inline-flex; align-items: center; min-height: 24px; padding: .2rem .65rem; border-radius: var(--pill);
  background: var(--brand-soft); color: var(--brand-strong); font-size: .74rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none; position: relative; z-index: 2;
}
a.tag:hover { background: var(--brand); color: #fff; }
.tag--lane { background: var(--lane); color: var(--ink); }
.tag--muted { background: var(--surface-3); color: var(--text-soft); }
.tag--onDark { background: rgb(255 255 255 / .12); color: #fff; }
a.tag--onDark:hover { background: var(--lane); color: var(--ink); }

/* --- Filter chips ----------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: .45em; min-height: 40px; padding: .4rem 1rem;
  border: 2px solid var(--line); border-radius: var(--pill); background: var(--surface);
  color: var(--text); font-weight: 700; font-size: .9rem; text-decoration: none;
  transition: border-color var(--t) ease, background var(--t) ease, color var(--t) ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-current="page"], .chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip__count { font-size: .75rem; opacity: .65; font-weight: 800; }

.searchbox { display: flex; align-items: center; min-width: min(100%, 340px); border: 2px solid var(--line-strong); border-radius: var(--pill); background: var(--surface); padding-left: 1rem; transition: border-color var(--t) ease, box-shadow var(--t) ease; }
.searchbox:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; padding: .6rem .4rem; color: var(--text); }
.searchbox input:focus { outline: none; }
.searchbox button { border: 0; background: var(--ink); color: #fff; width: 40px; height: 40px; margin: 2px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: background var(--t) ease; }
.searchbox button:hover { background: var(--brand); }
.searchbox svg { width: 18px; height: 18px; }

/* --- Tabs (separate pages shown as tabs, e.g. Publications / Articles) ------ */
.tabs { display: flex; gap: .25rem; margin: 0 0 2.5rem; border-bottom: 2px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.tabs a {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 48px; padding: .75rem 1.25rem;
  margin-bottom: -2px; border-bottom: 3px solid transparent; white-space: nowrap;
  color: var(--text-soft); font-weight: 800; font-size: 1.02rem; text-decoration: none;
  transition: color var(--t) ease, border-color var(--t) ease, background var(--t) ease;
}
.tabs a:hover { color: var(--ink); background: var(--surface-2); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.tabs__count { min-width: 1.8em; padding: .1rem .55rem; border-radius: var(--pill); background: var(--surface-3); color: var(--text-soft); font-size: .78rem; text-align: center; transition: background var(--t) ease, color var(--t) ease; }
.tabs a[aria-current="page"] .tabs__count { background: var(--brand); color: #fff; }

/* --- Table of contents (TalTech-style arrow list + sticky rail) ----------- */
.toc { background: var(--surface-2); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin-bottom: 2.5rem; }
.toc__title { font-size: .8rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 0 0 .9rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .35rem 1.6rem; }
.toc a { display: flex; gap: .55rem; align-items: baseline; padding: .3rem 0; color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.35; }
.toc a::before { content: "↓"; color: var(--brand); font-weight: 900; transition: transform var(--t) var(--ease); }
.toc a:hover { color: var(--brand); }
.toc a:hover::before { transform: translateY(3px); }

.with-rail { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1fr); }
.rail { display: none; }
@media (min-width: 1100px) {
  .with-rail { grid-template-columns: 240px minmax(0, 1fr); }
  .rail { display: block; }
  .rail__inner { position: sticky; top: calc(var(--header-h-compact) + 2rem); max-height: calc(100vh - var(--header-h-compact) - 4rem); overflow-y: auto; padding-right: .5rem; }
  .with-rail .toc { display: none; }
  /* Pages with too few headings hide the side contents: give the text the full width. */
  .with-rail:has(> .rail[hidden]), .with-rail.no-rail { grid-template-columns: minmax(0, 1fr); }
}
.rail__title { font-size: .75rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .8rem; color: var(--text-soft); }
.rail ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.rail a {
  display: block; margin-left: -2px; padding: .45rem 0 .45rem 1rem; border-left: 2px solid transparent;
  color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: .92rem; line-height: 1.35;
  transition: color var(--t) ease, border-color var(--t) ease, padding var(--t) var(--ease);
}
.rail a:hover { color: var(--ink); }
.rail a.is-active { color: var(--brand-strong); border-left-color: var(--brand); padding-left: 1.25rem; font-weight: 800; }

/* --- Accordions ------------------------------------------------------------ */
.acc { border-top: 1px solid var(--line); }
.acc:last-child { border-bottom: 1px solid var(--line); }
.acc > summary {
  display: flex; align-items: center; gap: 1rem; padding: 1.15rem .2rem; cursor: pointer; list-style: none;
  font-weight: 800; font-size: 1.05rem; line-height: 1.35; color: var(--ink);
  transition: color var(--t) ease;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { color: var(--brand); }
.acc__title { flex: 1; min-width: 0; }
.acc__meta { color: var(--text-soft); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.acc__icon { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); transition: background var(--t) ease, border-color var(--t) ease, transform var(--t) var(--ease); }
.acc__icon::before, .acc__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--brand); border-radius: 2px; translate: -50% -50%; transition: transform var(--t) var(--ease), background var(--t) ease; }
.acc__icon::after { transform: rotate(90deg); }
.acc[open] .acc__icon { background: var(--brand); border-color: var(--brand); transform: rotate(180deg); }
.acc[open] .acc__icon::before, .acc[open] .acc__icon::after { background: #fff; }
.acc[open] .acc__icon::after { transform: rotate(0deg); }
.acc::details-content { block-size: 0; overflow: clip; transition: block-size .45s var(--ease), content-visibility .45s allow-discrete; }
.acc[open]::details-content { block-size: auto; }
.acc__body { padding: 0 3.2rem 1.5rem .2rem; color: var(--text-soft); }
.acc__body > :last-child { margin-bottom: 0; }
@media (max-width: 640px) { .acc__meta { display: none; } .acc__body { padding-right: .2rem; } }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; margin: 0 0 1rem; }
.dl dt { font-weight: 800; color: var(--ink); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; padding-top: .15em; }
.dl dd { margin: 0; }

/* --- Lists: publications, theses, partners --------------------------------- */
.group { margin-bottom: clamp(2.5rem, 5vw, 4rem); scroll-margin-top: calc(var(--header-h-compact) + 24px); }
.group__title { font-size: var(--fs-h3); font-weight: 900; text-transform: uppercase; color: var(--ink); letter-spacing: .01em; display: flex; align-items: baseline; gap: .8rem; padding-bottom: .8rem; border-bottom: 3px solid var(--ink); margin-bottom: 0; }
.group__count { font-size: .8rem; color: var(--text-soft); font-weight: 800; letter-spacing: .04em; }

.reflist { list-style: none; margin: 0; padding: 0; }
.reflist > li { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: .4rem 1.2rem; align-items: start; padding: 1.1rem 0; border-bottom: 1px solid var(--line); transition: background var(--t) ease; }
.reflist > li:hover { background: linear-gradient(90deg, var(--brand-soft), transparent 70%); }
.reflist__year { font-weight: 900; color: var(--brand); font-variant-numeric: tabular-nums; padding-left: .3rem; }
.reflist__main { min-width: 0; overflow-wrap: anywhere; }
.reflist__title { font-weight: 700; color: var(--ink); }
.reflist__sub { display: block; color: var(--text-soft); font-size: .92rem; margin-top: .2rem; }
.reflist__link { white-space: nowrap; }
@media (max-width: 640px) {
  .reflist > li { grid-template-columns: 1fr; }
  .reflist__year { padding-left: 0; }
}

.partner-table { width: 100%; border-collapse: collapse; }
.partner-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); padding: .8rem .8rem .8rem 0; border-bottom: 1px solid var(--line); }
.partner-table td { padding: 1rem .8rem 1rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.partner-table td:first-child { font-weight: 800; color: var(--ink); width: 34%; }
@media (max-width: 720px) {
  .partner-table thead { display: none; }
  .partner-table, .partner-table tbody, .partner-table tr, .partner-table td { display: block; width: 100% !important; }
  .partner-table tr { padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .partner-table td { border: 0; padding: .15rem 0; }
}

/* --- People ---------------------------------------------------------------- */
.person-card { text-align: left; }
.person-card .card__media { aspect-ratio: 4 / 5; }
.avatar { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.4rem; font-weight: 900; color: rgb(255 255 255 / .9); letter-spacing: .02em; }
.person-hero { display: grid; gap: 2rem; align-items: end; grid-template-columns: 1fr; }
@media (min-width: 760px) { .person-hero { grid-template-columns: 220px 1fr; } }
.person-hero__photo { width: 220px; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; position: relative; background: linear-gradient(135deg, var(--ink-3), var(--brand)); box-shadow: var(--shadow-2); }
.person-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }

/* --- Article / prose ------------------------------------------------------- */
.article-layout { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .article-layout { grid-template-columns: minmax(0, 760px) 1fr; } }
.article-aside { display: grid; gap: 1.5rem; align-content: start; }
@media (min-width: 1100px) { .article-aside > div { position: sticky; top: calc(var(--header-h-compact) + 2rem); } }
.aside-box { background: var(--surface-2); border-radius: var(--radius); padding: 1.4rem; }
.aside-box h2 { font-size: .8rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .8rem; }
.share { display: flex; flex-wrap: wrap; gap: .5rem; }

.prose { font-size: 1.1rem; line-height: 1.75; color: var(--text); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.15em; }
.prose p { margin-bottom: 0; } /* spacing between blocks comes from `.prose > * + *` */
.prose h2, .prose h3, .prose h4 { margin: 2em 0 .5em; color: var(--ink); scroll-margin-top: calc(var(--header-h-compact) + 24px); }
.prose h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); font-weight: 900; }
.prose h3 { font-size: 1.3rem; }
.prose h4 { font-size: 1.1rem; }
.prose > :first-child { margin-top: 0; }
.prose a { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose ul li::marker { color: var(--brand); }
.prose blockquote { margin-inline: 0; padding: .4em 0 .4em 1.4em; border-left: 4px solid var(--lane-strong); font-size: 1.15em; color: var(--ink); font-weight: 500; }
.prose blockquote p + p { margin-top: .8em; }
.prose figure { margin-inline: 0; }
.prose img { border-radius: var(--radius-sm); margin-inline: auto; }
.prose figcaption { font-size: .88rem; color: var(--text-soft); margin-top: .6rem; text-align: center; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 800; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-sm); }
.prose .lead-first > p:first-child, .prose--lead > p:first-of-type { font-size: 1.22em; line-height: 1.6; color: var(--ink); font-weight: 500; }

.article-cover { margin: 0 0 2.5rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-2); }
.article-cover img { width: 100%; max-height: 560px; object-fit: cover; }

.notice { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.2rem; margin-bottom: 2rem; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; font-size: .95rem; }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: .15em; }
.notice--draft { background: #fff4d6; color: #7a4b00; }

.pager-nav { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
@media (min-width: 720px) { .pager-nav { grid-template-columns: 1fr 1fr; } }
.pager-nav a { display: block; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 700; transition: border-color var(--t) ease, transform var(--t) var(--ease); }
.pager-nav a:hover { border-color: var(--brand); transform: translateY(-2px); }
.pager-nav small { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); font-weight: 900; margin-bottom: .3rem; }
.pager-nav .next { text-align: right; }

/* --- Pagination -------------------------------------------------------------- */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 3rem; list-style: none; padding: 0; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .8rem; border-radius: var(--pill); font-weight: 800; text-decoration: none; color: var(--ink); border: 2px solid var(--line); transition: border-color var(--t) ease, background var(--t) ease, color var(--t) ease; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination [aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .gap { border: 0; }

/* --- Timeline (history page) ---------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7.5rem; top: .5rem; bottom: .5rem; width: 3px; border-radius: 3px; background: linear-gradient(var(--brand), var(--lane-strong)); transform-origin: top; transition: transform 1.6s var(--ease); }
.js .timeline:not(.is-visible)::before { transform: scaleY(0); }
.timeline li { position: relative; display: grid; grid-template-columns: 6.5rem 1fr; gap: 2.5rem; padding: 0 0 2rem; }
.timeline li::before { content: ""; position: absolute; left: calc(7.5rem - 6px); top: .45rem; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }
.timeline__year { font-weight: 900; font-size: 1.15rem; color: var(--brand); text-align: right; font-variant-numeric: tabular-nums; }
.timeline__text { margin: 0; }
@media (max-width: 600px) {
  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: .2rem; padding-left: 2rem; }
  .timeline li::before { left: 0; }
  .timeline__year { text-align: left; }
}

/* --- Projects preview on home ------------------------------------------------ */
.project-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgb(255 255 255 / .15); }
.project-rows li { border-bottom: 1px solid rgb(255 255 255 / .15); }
.project-rows a { display: grid; grid-template-columns: 7rem 1fr auto; gap: 1.2rem; align-items: center; padding: 1.25rem 0; color: #fff; text-decoration: none; transition: padding var(--t) var(--ease), color var(--t) ease; }
.project-rows a:hover { padding-left: .8rem; color: var(--lane); }
.project-rows .yr { font-weight: 900; color: var(--lane); font-variant-numeric: tabular-nums; }
.project-rows .ttl { font-weight: 700; font-size: 1.1rem; line-height: 1.35; }
@media (max-width: 640px) { .project-rows a { grid-template-columns: 1fr auto; } .project-rows .yr { grid-column: 1 / -1; } }

/* Topics cloud on home */
.topic-list { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.topic-list a { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem; border-radius: var(--pill); background: var(--surface); border: 2px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; transition: all var(--t) var(--ease); }
.topic-list a:hover { border-color: var(--ink); background: var(--ink); color: #fff; transform: translateY(-2px); }
.topic-list b { font-size: .78rem; color: var(--brand); transition: color var(--t) ease; }
.topic-list a:hover b { color: var(--lane); }

/* --- CTA band ---------------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; background: var(--brand); color: #fff; border-radius: calc(var(--radius) * 1.5); padding: clamp(2rem, 5vw, 4rem); display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 860px) { .cta-band { grid-template-columns: 1fr auto; } }
.cta-band h2 { font-size: var(--fs-h2); text-transform: uppercase; font-weight: 900; line-height: 1; margin: 0 0 .4em; }
.cta-band p { margin: 0; color: rgb(255 255 255 / .88); font-size: var(--fs-lead); }
.cta-band::after { content: ""; position: absolute; z-index: -1; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 40px solid rgb(197 238 79 / .25); }

/* --- Forms ------------------------------------------------------------------- */
.form { display: grid; gap: 1.2rem; }
.form-row { display: grid; gap: 1.2rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 800; margin-bottom: .4rem; color: var(--ink); }
.field .req { color: var(--danger); }
.form-note { margin: 0; color: var(--text-soft); font-size: .95rem; }
.alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.alert a { color: inherit; font-weight: 800; }
.alert:focus { outline: 3px solid var(--danger); outline-offset: 3px; }
.field input, .field textarea {
  width: 100%; padding: .85rem 1rem; border: 2px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; color: var(--text); background: var(--surface); transition: border-color var(--t) ease, box-shadow var(--t) ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field textarea { resize: vertical; min-height: 9rem; }
.field--error input, .field--error textarea { border-color: var(--danger); }
.field__error { color: var(--danger); font-weight: 700; font-size: .9rem; margin: .4rem 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-weight: 700; margin-bottom: 1.5rem; }
.alert--success { background: #e3f6ea; color: var(--success); }
.alert--error { background: #fdecea; color: var(--danger); }

.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 5fr 7fr; } }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.contact-list li { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: start; }
.contact-list .ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); }
.contact-list .ico svg { width: 22px; height: 22px; }
.contact-list strong { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.contact-list a, .contact-list span { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }

/* --- Search results ---------------------------------------------------------- */
.result-group + .result-group { margin-top: 3rem; }
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.result-list a { font-weight: 800; font-size: 1.1rem; text-decoration: none; }
.result-list p { margin: .3rem 0 0; color: var(--text-soft); font-size: .95rem; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--text-soft); background: var(--surface-2); border-radius: var(--radius); }

/* --- Footer ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: rgb(255 255 255 / .78); padding: clamp(3rem, 7vw, 5rem) 0 2rem; font-size: .95rem; position: relative; overflow: hidden; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--lane); }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand .brand { margin-bottom: 1.2rem; }
.footer-brand p { max-width: 46ch; }
.footer-title { color: #fff; font-size: .78rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-links a, .footer-bottom a, .contact-list a, .partner-table a { display: inline-flex; align-items: center; min-height: 24px; }
.socials { display: flex; gap: .5rem; margin-top: 1.2rem; }
.socials a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .25); transition: background var(--t) ease, border-color var(--t) ease, transform var(--t) var(--ease); }
.socials a:hover { background: var(--lane); border-color: var(--lane); color: var(--ink); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / .12); font-size: .85rem; }
.footer-word { position: absolute; right: -2vw; bottom: -3.2vw; font-size: 18vw; font-weight: 900; line-height: 1; color: rgb(255 255 255 / .03); letter-spacing: -.04em; pointer-events: none; user-select: none; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 50px; height: 50px; border-radius: 50%;
  border: 0; background: var(--ink); color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-2); opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity var(--t) ease, transform var(--t) var(--ease), visibility 0s linear var(--t), background var(--t) ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { background: var(--brand); }
.to-top svg { width: 22px; height: 22px; }
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 55; background: var(--lane); transform-origin: left; transform: scaleX(0); }

/* --- Reduced motion ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js .rise { opacity: 1; transform: none; }
  .routes .r-rider { display: none; }
  .motion-toggle { display: none; }  /* nothing moves, so nothing to pause */
}

@media print {
  .site-header, .site-footer, .to-top, .progress, .rail, .toc, .share, .pager-nav { display: none !important; }
  .page-hero { padding: 0; background: none; color: #000; }
  .page-hero .routes { display: none; }
}
