/* NVO Indeks — site styles (no frameworks) */

:root {
  --brand: #9e1f62;
  --brand-dark: #7d184d;
  --text: #666;
  --heading: #333;
  --muted-year: rgba(183, 183, 183, 0.51);
  --bg: #fff;
  --row-width: 80%;
  --font: "Open Sans", Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

p { margin: 0; padding-bottom: 1em; }
p:last-child { padding-bottom: 0; }

h1, h2, h3 {
  margin: 0;
  padding-bottom: 10px;
  color: var(--heading);
  line-height: 1.2;
  font-weight: 500;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Layout helpers ---------- */

.container {
  width: var(--row-width);
  max-width: 2560px;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  text-decoration: none;
  color: #fff;
  background: var(--brand);
  border-radius: 29px;
  padding: 5px 20px;
  transition: background-color 0.3s ease, padding 0.3s ease;
}
.btn::after {
  content: "›";
  display: inline-block;
  margin-left: 0;
  opacity: 0;
  width: 0;
  transition: all 0.3s ease;
}
.btn:hover,
.btn:focus-visible { color: #fff; background: var(--brand-dark); }
.btn:hover::after,
.btn:focus-visible::after { opacity: 1; width: auto; margin-left: 0.4em; }

.btn-outline {
  display: inline-block;
  font-size: 18px;
  line-height: 1.7;
  text-decoration: none;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 3px;
  padding: 4px 1.4em 4px 0.9em;
  transition: all 0.3s ease;
}
.btn-outline::after { content: " ›"; }
.btn-outline:hover,
.btn-outline:focus-visible { background: var(--brand); color: #fff; }

/* ---------- Home page ---------- */

.home-intro {
  width: var(--row-width);
  margin: 0 auto;
  padding-top: 56px;
}
.home-intro .logo { margin: 0 auto 18px; }
.home-intro h1 {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 29px;
  color: var(--brand);
  text-align: center;
  padding-top: 23px;
}
.home-intro .year {
  font-weight: 800;
  font-size: 100px;
  color: var(--muted-year);
  text-align: right;
  line-height: 1;
  padding-bottom: 10px;
}
.home-intro .lead {
  font-size: 22px;
  color: var(--brand);
  text-align: center;
}

.dimensions {
  width: var(--row-width);
  margin: 0 auto;
  padding: 49px 0 30px;
}

.dimension {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5.5%;
  align-items: center;
  padding: 27px 0;
}
.dimension h2 {
  font-weight: 700;
  font-size: 40px;
  color: var(--brand);
  transition: color 0.3s ease;
}
.dimension h2 a { color: inherit; text-decoration: none; }
.dimension .text p { padding-bottom: 1em; }
.dimension .btn { margin-top: 10px; }

/* ---------- Inner pages ---------- */

.banner {
  height: 248px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.page-layout {
  width: var(--row-width);
  margin: 0 auto;
  padding: 27px 0 40px;
  display: grid;
  grid-template-columns: 73.625fr 20.875fr;
  gap: 5.5%;
  align-items: start;
}

.page-title {
  font-weight: 800;
  font-size: 31px;
  color: var(--brand);
}

.page-content p { padding-bottom: 1em; }
.page-content i { font-style: italic; }

.chart {
  margin: 10px 0 0;
}
.chart a { display: inline-block; cursor: zoom-in; }

/* Sidebar */
.sidebar .logo { margin: 30px 0 16px; }
.sidebar .about { text-align: center; }

.side-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side-nav li {
  margin-bottom: 10px;
  border: 1px solid currentColor;
  color: var(--text);
  transition: background-color 0.3s ease;
}
.side-nav a {
  display: block;
  padding: 7px 10px 6px;
  color: rgba(0, 0, 0, 0.6);
  text-decoration: none;
  font-weight: 600;
}
.side-nav li:hover,
.side-nav li:focus-within { background: var(--brand); }
.side-nav li:hover a,
.side-nav a:focus-visible { color: #fff; }
.side-nav a[aria-current="page"] { font-weight: 900; }
.side-nav a[aria-current="page"]::before {
  content: ">> ";
  font-weight: 500;
  font-family: monospace;
  position: relative;
  top: -1px;
}

.nav-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--brand);
  padding: 10px 14px;
  cursor: pointer;
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #7ebec5;
  position: relative;
  content: "";
  transition: transform 0.2s ease;
}
.nav-toggle .bars::before { position: absolute; top: -7px; }
.nav-toggle .bars::after { position: absolute; top: 7px; }

/* ---------- Footer ---------- */

.site-footer { padding: 54px 0 10px; }

.archive {
  width: var(--row-width);
  margin: 0 auto;
  border: 1px dotted var(--brand);
  padding: 14px 20px 20px;
  text-align: center;
}
.archive h3 {
  color: var(--brand);
  font-size: 22px;
  margin: 7px 0 9px;
}
.archive-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.partners {
  width: 81%;
  margin: 0 auto;
  padding-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5.5%;
  align-items: center;
}
.partners a { display: inline-block; }
.partners img { max-height: 96px; width: auto; }

.copyright {
  text-align: center;
  color: var(--brand);
  font-weight: 700;
  padding-top: 36px;
}

/* ---------- Scroll to top ---------- */

.to-top {
  position: fixed;
  right: 0;
  bottom: 125px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 5px 0 0 5px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  z-index: 50;
}
.to-top.visible { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--brand); }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  z-index: 200;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 16px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Fade-in on scroll ---------- */

.js .reveal {
  opacity: 0;
  transition: opacity 1s ease;
}
.js .reveal.in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  :root { --row-width: 90%; }

  .home-intro h1 { font-size: 24px; }
  .home-intro .year { font-size: 70px; text-align: center; }
  .home-intro .lead { font-size: 18px; }

  .dimension { grid-template-columns: 1fr; gap: 20px; }
  .dimension h2 { font-size: 30px; }

  /* Background-attachment: fixed is unreliable on touch devices */
  .banner { background-attachment: scroll; height: 180px; }

  .page-layout { grid-template-columns: 1fr; gap: 30px; }
  .sidebar { order: -1; }
  .sidebar .logo,
  .sidebar .about { display: none; }

  .js .nav-toggle { display: flex; }
  .js .side-nav ul { display: none; margin-top: 10px; }
  .js .side-nav.open ul { display: block; }

  .partners { grid-template-columns: repeat(2, 1fr); gap: 30px; justify-items: center; }
}

@media (max-width: 767px) {
  :root { --row-width: calc(100% - 32px); }

  .home-intro { padding-top: 32px; }
  .home-intro h1 { font-size: 20px; }
  .home-intro .year { font-size: 56px; }
  .dimension h2 { font-size: 26px; }
  .page-title { font-size: 26px; }
  .banner { height: 140px; }
  .partners { width: calc(100% - 32px); }
}
