/*
 * vikusviewer.org
 * Based on the original VIKUS Viewer microsite (2018), modernized.
 */

@font-face { font-family: "Lato"; font-weight: 300; font-style: normal; font-display: swap; src: url("fonts/lato-300.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/lato-400.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/lato-700.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 900; font-style: normal; font-display: swap; src: url("fonts/lato-900.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --ink: #131416;
  --panel: #1d1e20;
  --panel-2: #292b2e;
  --line: rgba(255, 255, 255, 0.14);
  --cream: #f6f1d6;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.74);
  --container: min(100% - 3rem, 1200px);
}

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

html {
  font-size: clamp(16px, 0.35vw + 14px, 20px);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
em, strong { font-weight: 700; font-style: normal; }

a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.2s;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; }

.container { width: var(--container); margin-inline: auto; }
section { padding: clamp(4rem, 9vw, 7rem) 0; }

.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--ink); padding: 0.5rem 1rem; }

/* Section headings: small label, large statement */

.label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--cream); margin-bottom: 1.25rem; }
.statement { max-width: 22em; font-size: clamp(1.5rem, 3.2vw, 2.25rem); font-weight: 300; line-height: 1.25; text-wrap: balance; }

/* Top bar ----------------------------------------- */

.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; padding: 1.25rem 0; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 900; font-size: 1.1rem; text-decoration: none; }
.brand img { width: 2.75rem; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.nav a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.nav a:hover { color: #fff; }

/* Hero ----------------------------------------- */

.hero { padding: clamp(3rem, 9vw, 7rem) 0 clamp(3rem, 8vw, 6rem); text-align: center; }
.hero h1 { max-width: 15em; margin-inline: auto; font-size: clamp(2.25rem, 6.4vw, 4.5rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
.hero h1 span { color: var(--cream); }
.hero-sub { max-width: 34em; margin: 1.5rem auto 0; font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 300; color: var(--muted); text-wrap: pretty; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2.5rem; }
.button { display: inline-block; padding: 0.8rem 1.6rem; border-radius: 99rem; border: 1px solid rgba(255, 255, 255, 0.5); font-weight: 700; font-size: 1rem; text-decoration: none; transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.button:hover { border-color: #fff; }
.button.primary { background: var(--cream); border-color: var(--cream); color: #000; }
.button.primary:hover { background: #fff; border-color: #fff; }

.teaser { padding: 0; line-height: 0; background: var(--panel); }
.teaser img { width: 100%; }

/* About ----------------------------------------- */

.about { background: var(--panel); }

.lead { max-width: 30em; margin: 0 auto; font-size: clamp(1.35rem, 2.7vw, 1.9rem); font-weight: 300; line-height: 1.4; text-align: center; text-wrap: pretty; }

.triad { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem clamp(2rem, 5vw, 5rem); margin-top: clamp(4rem, 8vw, 6rem); }
.triad li { text-align: center; }
.triad .motif { height: 5rem; display: grid; place-items: center; margin-bottom: 1.75rem; }
.triad .motif img { width: 9.5rem; }
.triad h3 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--cream); margin-bottom: 0.75rem; }
.triad p { color: var(--muted); text-wrap: pretty; }

/* Collections ----------------------------------------- */

.collections { padding-bottom: 0; }
.collections-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

.slider-buttons { display: flex; gap: 0.5rem; flex: none; }
.slider-button {
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%; padding: 0;
  background: transparent; color: #fff; cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s, color 0.2s, border-color 0.2s;
}
.slider-button[hidden] { display: none; }
.slider-button:hover { background: var(--cream); border-color: var(--cream); color: #000; }
.slider-button:disabled { opacity: 0.3; pointer-events: none; }
.slider-button.prev svg { transform: scaleX(-1); }

.track {
  display: flex; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--panel-2) var(--ink);
}
.has-slider .track { scrollbar-width: none; }
.has-slider .track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline-offset: -3px; }

.collection {
  --bg: #1d1e20; --caption: #fff;
  flex: 0 0 min(34rem, 86vw);
  display: flex; flex-direction: column;
  scroll-snap-align: start;
  background: var(--bg); color: var(--caption);
}

.collection-link { display: block; position: relative; text-decoration: none; container-type: inline-size; overflow: hidden; }
.collection-link img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.collection-link:hover img { transform: scale(1.04); }

.circle {
  position: absolute; top: 50%; left: 50%;
  width: 38%; aspect-ratio: 1;
  display: grid; place-items: center;
  padding: 0.5rem;
  border-radius: 50%;
  background: var(--circle, var(--cream)); color: var(--circle-text, #000);
  text-align: center; text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 900; font-size: 1.2rem; font-size: clamp(0.85rem, 4.4cqw, 1.4rem); line-height: 1.25;
  transform: translate(-50%, -50%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s, color 0.2s;
}
.collection-link:hover .circle, .collection-link:focus-visible .circle { background: var(--ink); color: #fff; transform: translate(-50%, -50%) scale(1.08); }
.collection-link:focus-visible { outline-offset: -3px; }

.collection-info { padding: 1.25rem 1.5rem 1.75rem; text-align: center; font-size: 0.92rem; text-wrap: balance; }

/* In use ----------------------------------------- */

.in-use { background: var(--panel); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem clamp(2rem, 4vw, 4rem); margin: clamp(3rem, 6vw, 4.5rem) 0; }
.stats div { display: flex; flex-direction: column; }
.stats dt { font-size: clamp(2.75rem, 6vw, 4.5rem); font-weight: 900; line-height: 1; letter-spacing: -0.02em; color: var(--cream); font-variant-numeric: tabular-nums; }
.stats dd { margin: 0.75rem 0 0; max-width: 18em; color: var(--muted); text-wrap: pretty; }

.index { list-style: none; columns: 2; column-gap: clamp(2rem, 4vw, 4rem); }
.index li { break-inside: avoid; border-top: 1px solid var(--line); }
.index a { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; padding: 0.9rem 0; font-weight: 400; text-decoration: none; transition: color 0.2s, padding 0.2s; }
.index .who span { color: var(--muted); margin-left: 0.5rem; transition: color 0.2s; }
.index .count { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; transition: color 0.2s; }
.index a:hover { color: var(--cream); padding-left: 0.5rem; }
.index a:hover .who span, .index a:hover .count { color: var(--cream); }
.index-note { margin-top: 2rem; max-width: 40em; color: var(--muted); font-size: 0.95rem; }

/* Features ----------------------------------------- */

.features { background: var(--ink); }
.feature-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(2rem, 4vw, 4rem); margin-top: clamp(3rem, 6vw, 4.5rem); }
.feature-grid li { padding: 1.5rem 0 2.25rem; border-top: 1px solid var(--line); }
.feature-grid h3 { font-size: 1.15rem; font-weight: 900; margin-bottom: 0.4rem; }
.feature-grid p { color: var(--muted); text-wrap: pretty; }

/* Get started ----------------------------------------- */

.start { background: var(--panel-2); }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem clamp(2rem, 4vw, 4rem); margin-top: clamp(3rem, 6vw, 4.5rem); }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 3.5rem; aspect-ratio: 1; margin-bottom: 1.5rem;
  border-radius: 50%; background: var(--cream); color: #000;
  font-size: 1.5rem; font-weight: 900; line-height: 1;
}
.steps h3 { font-size: 1.15rem; font-weight: 900; margin-bottom: 0.4rem; }
.steps p { color: var(--muted); text-wrap: pretty; }
.more { margin-top: clamp(3rem, 6vw, 4rem); }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; background: rgba(255, 255, 255, 0.1); color: #fff; padding: 0.1em 0.35em; border-radius: 3px; }

/* Institutions ----------------------------------------- */

.institutions { background: var(--cream); color: #000; color-scheme: light; }
.institutions :focus-visible { outline-color: #000; }
.institutions .container { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3rem clamp(3rem, 8vw, 8rem); }
.institutions .label { color: #000; opacity: 0.6; }
.institutions .statement { max-width: 18em; font-weight: 400; }
.institutions p.text { max-width: 34em; margin-top: 1.5rem; font-size: 1.1rem; }

.circle.static { position: static; transform: none; width: min(15rem, 60vw); padding: 1rem; font-size: 1.35rem; text-decoration: none; background: var(--ink); color: var(--cream); }
.circle.static:hover, .circle.static:focus-visible { background: #000; color: #fff; transform: scale(1.06); }

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

.footer { padding: clamp(3rem, 7vw, 5rem) 0 3rem; color: var(--muted); font-size: 0.95rem; }
.footer .container { display: grid; grid-template-columns: 1fr auto; gap: 2.5rem clamp(3rem, 8vw, 8rem); }
.footer a { color: #fff; }
.credits { max-width: 40em; }
.credits p + p { margin-top: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { text-decoration: none; font-weight: 400; color: var(--muted); }
.footer-links a:hover { color: #fff; text-decoration: underline; }

/* Legal pages ----------------------------------------- */

.page-title { padding: clamp(2rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem); }
.page-title h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.015em; }
.legal { background: var(--panel); }
.legal .inner { max-width: 40rem; }
.legal h2 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--cream); margin: 3.5rem 0 1rem; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal ul, .legal address { margin: 0 0 1.25rem; font-style: normal; color: var(--muted); }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: 0.5rem; }
.legal .updated { margin-top: 3.5rem; font-size: 0.9rem; }

/* 404 ----------------------------------------- */

.notfound { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 1.5rem; padding: 2rem; }
.notfound h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); font-weight: 900; line-height: 1.05; }

/* Small screens ----------------------------------------- */

@media (max-width: 800px) {
  .triad, .feature-grid, .steps, .stats { grid-template-columns: 1fr; }
  .index { columns: 1; }
  .index .who span { display: block; margin-left: 0; font-size: 0.92rem; }
  .triad { gap: 3.5rem; }
  .triad li { max-width: 26em; margin-inline: auto; }
  .steps { gap: 2.5rem; }
  .institutions .container { grid-template-columns: 1fr; }
  .circle.static { justify-self: center; }
  .footer .container { grid-template-columns: 1fr; }
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
}

@media (max-width: 560px) {
  .topbar { justify-content: center; }
  .nav { justify-content: center; }
  .collections-head { align-items: start; }
  .slider-buttons { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
