/* EDU, o.z. — institutional design
   Near-monochrome ink palette with the brand crimson #930012 used sparingly.
   Source Serif 4 for display, IBM Plex Sans for text. Hairline rules,
   framed imagery, flat panels — no shadows, no gradients. */

:root {
  --ink: #12161f;
  --panel: #1a2029;
  --text: #343b47;
  --muted: #66707f;
  --crimson: #930012;
  --crimson-dark: #6f000e;
  --paper: #ffffff;
  --stone: #f5f5f7;
  --line: #e2e5ea;
  --line-dark: #c9ced6;
  --footer-text: #c9ced6;
  --footer-dim: #98a1b0;
  --crimson-light: #ffb3ad;

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1160px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--crimson); text-decoration: none; }
a:hover { color: var(--crimson-dark); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.65rem, 2.8vw, 2.15rem); line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 1.35rem; line-height: 1.35; }

.kicker {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--crimson);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 46rem;
}

.label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.prose { max-width: 68ch; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: .5rem; }
.prose strong { font-weight: 600; color: var(--ink); }

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

.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .8rem 1.6rem;
  border-radius: 2px;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--crimson); color: #fff; border-color: var(--crimson); }
.btn-primary:hover { background: var(--crimson-dark); border-color: var(--crimson-dark); color: #fff; }
.btn-secondary { color: var(--ink); border-color: var(--line-dark); background: transparent; }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- meta line ---------- */

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .6rem;
  align-items: baseline;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
.meta .status { color: var(--crimson); }
.meta .sep::before { content: "·"; color: var(--line-dark); }

/* ---------- framed images ---------- */

.framed {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px;
}
.framed img { width: 100%; }
figcaption {
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: .6rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background .35s ease, border-color .35s ease;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  min-height: 72px;
  padding-block: .6rem;
}

.brand { display: flex; align-items: center; gap: .8rem; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand-name {
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.3;
  letter-spacing: .01em;
}
.brand-sub {
  display: block;
  font-weight: 400;
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.site-nav ul {
  display: flex;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  list-style: none;
}
.site-nav a {
  display: inline-block;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  padding-block: .4rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--crimson); text-decoration: none; }
.site-nav a[aria-current="page"],
.site-nav a.active {
  color: var(--crimson);
  border-bottom-color: var(--crimson);
}

/* On the homepage the header sits dark over the hero, then turns white on scroll. */
body.home .site-header:not(.scrolled) {
  background: var(--ink);
  border-color: transparent;
}
body.home .site-header:not(.scrolled) .brand,
body.home .site-header:not(.scrolled) .brand-name { color: #fff; }
body.home .site-header:not(.scrolled) .brand-sub { color: var(--footer-dim); }
body.home .site-header:not(.scrolled) .site-nav a { color: var(--footer-text); }
body.home .site-header:not(.scrolled) .site-nav a:hover { color: #fff; }
body.home .site-header:not(.scrolled) .site-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--crimson-light);
}

/* ---------- sections ---------- */

.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section-alt { background: var(--stone); }

.section-head {
  display: grid;
  gap: .75rem;
  justify-items: start;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

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

.hero-cinema {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: clamp(520px, 82vh, 780px);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Ambient drift shown until the video file exists (and behind it while loading). */
.hero-cinema::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(38% 45% at 68% 38%, rgba(147, 0, 18, 0.35), transparent 70%),
    radial-gradient(45% 55% at 25% 70%, rgba(64, 78, 105, 0.5), transparent 72%);
  animation: drift 26s ease-in-out infinite alternate;
}
/* Scrim keeps the headline readable over any footage. */
.hero-cinema::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 130% at 50% 35%, rgba(18, 22, 31, 0.55) 0%, rgba(18, 22, 31, 0.88) 100%);
}
@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

.hero-cinema .wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: clamp(4rem, 9vw, 7rem);
}
.hero-copy {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
  text-align: center;
  max-width: 44rem;
  margin-inline: auto;
}
.hero-copy .kicker { color: var(--crimson-light); }
.hero-cinema h1 {
  color: #fff;
  font-size: clamp(2.4rem, 4.6vw, 3.7rem);
}
.hero-cinema .lead { color: var(--footer-text); }
.hero-cinema .btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.hero-cinema .btn-secondary:hover { border-color: #fff; color: #fff; }

/* Hero entrance sequence */
.hero-copy > * {
  animation: rise .8s cubic-bezier(.22, .8, .3, 1) both;
}
.hero-copy > :nth-child(1) { animation-delay: .1s; }
.hero-copy > :nth-child(2) { animation-delay: .24s; }
.hero-copy > :nth-child(3) { animation-delay: .38s; }
.hero-copy > :nth-child(4) { animation-delay: .52s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- featured project band ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.feature-copy {
  display: grid;
  gap: 1.1rem;
  justify-items: start;
}
.feature-copy figcaption,
.feature-note {
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- stats band ---------- */

.stats {
  border-block: 1px solid var(--line);
}
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 1.75rem 1.5rem 1.75rem 0;
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--ink);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat span {
  display: inline-block;
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.45;
  margin-top: .3rem;
}

@media (max-width: 760px) {
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(even) { padding-left: 1.5rem; }
}

/* ---------- profil & misia ---------- */

.profil-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.mission-panel {
  background: var(--panel);
  border-top: 3px solid var(--crimson);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: grid;
  gap: 1rem;
}
.mission-panel h3 {
  color: #fff;
  font-size: 1.5rem;
}
.mission-panel p {
  color: var(--footer-text);
  font-size: 1rem;
  line-height: 1.7;
}
.mission-panel strong { color: #fff; font-weight: 600; }

@media (max-width: 900px) {
  .profil-grid { grid-template-columns: 1fr; }
}

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

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.value {
  border-top: 2px solid var(--ink);
  padding-top: 1.25rem;
  display: grid;
  gap: .6rem;
  align-content: start;
}
.value p { font-size: .9375rem; line-height: 1.6; }

@media (max-width: 800px) {
  .values { grid-template-columns: 1fr; }
}

/* ---------- programs ---------- */

.program {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  gap: clamp(1.25rem, 4vw, 4rem);
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}
.program:last-child { border-bottom: 1px solid var(--line); }
.program h3 { max-width: 18ch; }
.program p { max-width: 68ch; }

@media (max-width: 760px) {
  .program { grid-template-columns: 1fr; gap: .6rem; }
}

/* ---------- two-column info ---------- */

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.info-grid h3 { margin-bottom: .75rem; }

@media (max-width: 800px) {
  .info-grid { grid-template-columns: 1fr; }
}

.quote {
  border-left: 3px solid var(--crimson);
  padding-left: 1.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 52ch;
}

/* ---------- page head ---------- */

.page-head { padding-top: clamp(2.5rem, 5vw, 4rem); }
.page-head .wrap {
  display: grid;
  gap: .85rem;
  justify-items: start;
}

/* ---------- project listing ---------- */

.project-list { margin-top: clamp(2rem, 4vw, 3rem); }
.project-entry {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line);
  align-items: start;
}
.project-entry:last-child { border-bottom: 1px solid var(--line); }
.project-entry .framed img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.project-entry .body {
  display: grid;
  gap: .85rem;
  justify-items: start;
}
.project-entry h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
}
.project-entry h2 a { color: var(--ink); }
.project-entry h2 a:hover { color: var(--crimson); text-decoration: none; }
.project-entry .excerpt { max-width: 62ch; }
.project-entry .more {
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .04em;
}

@media (max-width: 760px) {
  .project-entry { grid-template-columns: 1fr; }
  .project-entry .framed { max-width: 420px; }
}

/* ---------- project detail pages ---------- */

.crumb {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 1.75rem;
}
.crumb:hover { color: var(--crimson); text-decoration: none; }

.project-head {
  display: grid;
  gap: 1rem;
  max-width: 62ch;
  justify-items: start;
}
.project-head h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }

.project figure { margin-block: clamp(1.75rem, 4vw, 2.75rem); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-block: clamp(1.75rem, 4vw, 2.5rem);
}
.detail-block {
  border-top: 2px solid var(--ink);
  padding-top: 1.1rem;
  display: grid;
  gap: .6rem;
  align-content: start;
}
.detail-block h3 { font-size: 1.15rem; }
.detail-block ul { padding-left: 1.2rem; }
.detail-block li { font-size: .9375rem; line-height: 1.6; }
.detail-block li + li { margin-top: .45rem; }
.detail-block strong { font-weight: 600; color: var(--ink); }

@media (max-width: 760px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.city-list {
  columns: 3;
  column-gap: 2.5rem;
  list-style: none;
  font-variant-numeric: tabular-nums;
  margin-top: 1rem;
}
.city-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .9375rem;
  padding-block: .35rem;
  border-bottom: 1px solid var(--line);
  break-inside: avoid;
}
.city-list b { font-weight: 600; color: var(--ink); }

@media (max-width: 900px) { .city-list { columns: 2; } }
@media (max-width: 560px) { .city-list { columns: 1; } }

.project-index { list-style: none; border-top: 1px solid var(--line); margin-top: 1.25rem; }
.project-index li { border-bottom: 1px solid var(--line); }
.project-index a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
}
.project-index a:hover { color: var(--crimson); text-decoration: none; }
.project-index .period {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: .8125rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.contact-panel {
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: grid;
  gap: 1.25rem;
  align-content: start;
  background: var(--paper);
}
.contact-panel h2 { font-size: 1.5rem; }
.contact-panel .field { display: grid; gap: .35rem; justify-items: start; }
.contact-panel .field p,
.contact-panel .field a {
  font-size: 1.0625rem;
  line-height: 1.55;
}
.contact-panel .field a { color: var(--ink); font-weight: 500; }
.contact-panel .field a:hover { color: var(--crimson); }
.contact-panel .note {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.5;
}
.map-link {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--crimson) !important;
}

.legal-panel {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.legal-panel .legal-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  flex: 1;
  min-width: 0;
}
.legal-block { display: grid; gap: .4rem; }
.legal-block p { font-size: 1.0625rem; color: var(--ink); }
.legal-logo {
  width: 104px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  padding: 8px;
}

@media (max-width: 700px) {
  .contact-grid { grid-template-columns: 1fr; }
  .legal-panel .legal-cols { grid-template-columns: 1fr; }
}

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

.site-footer {
  background: var(--ink);
  color: var(--footer-text);
  margin-top: clamp(3rem, 7vw, 5rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: 3rem 2.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.footer-brand img { width: 36px; height: 36px; }
.footer-brand span {
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  line-height: 1.3;
}
.footer-desc {
  font-size: .875rem;
  line-height: 1.6;
  max-width: 24rem;
}

.site-footer h4 {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--footer-dim);
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; display: grid; gap: .6rem; }
.site-footer li { font-size: .875rem; line-height: 1.55; }
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: #fff; }
.site-footer a.active { color: #fff; font-weight: 600; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .8125rem;
  color: var(--footer-dim);
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; }
}

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

.btn { transition: background .2s ease, border-color .2s ease, color .2s ease; }
.site-nav a { transition: color .2s ease, border-color .2s ease; }

.framed { overflow: hidden; }
.framed img { transition: transform .6s cubic-bezier(.22, .8, .3, 1); }
.project-entry:hover .framed img,
a.framed:hover img { transform: scale(1.03); }

/* Reveal on scroll — applied by site.js, so content stays visible without it. */
.will-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, .8, .3, 1);
}
.will-reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-cinema::before,
  .hero-copy > * {
    animation: none;
  }
  .framed img,
  .btn,
  .site-nav a,
  .site-header {
    transition: none;
  }
}
