/* ============================================================
   Minerva FC · brand pack
   Same system as hyuwa.dev: monochrome at rest, glass, grain.
   The one accent is the club's Antique Gold, and it only shows
   up as a response to the pointer.
   ============================================================ */

:root {
  --bg: #050505;
  --ink: #f4f4f4;
  --ink-dim: #a0a0a0;
  --ink-faint: #616161;
  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-border: rgba(255, 255, 255, 0.09);
  --radius: 22px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --font-brand: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --brand-black: #0a0a0a;
  --brand-green: #0b3d2e;
  --brand-gold: #b89b5e;

  --accent: #c9ab6c;
  --accent-soft: rgba(201, 171, 108, 0.16);
  --accent-line: rgba(201, 171, 108, 0.6);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  background: var(--bg);
}

body {
  font-family: var(--font-body);
  background: var(--bg) radial-gradient(120% 70% at 50% -10%, #0d0d0d 0%, rgba(5, 5, 5, 0) 60%) no-repeat;
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #120e05;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img {
  max-width: 100%;
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.005em;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.02em;
}

/* ---------- film grain ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- glass primitives ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 45px rgba(0, 0, 0, 0.4);
}

.glass-soft {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}

.card-spot {
  position: relative;
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), border-color 0.35s, box-shadow 0.45s;
}

.card-spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.07), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 1;
}

.card-spot:hover::before {
  opacity: 1;
}

.card-spot:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 24px 60px rgba(0, 0, 0, 0.5);
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px 10px 18px;
  border-radius: 999px;
  transition: box-shadow 0.4s, background 0.4s;
  /* left: 50% would otherwise cap the shrink-to-fit width at half the viewport */
  width: max-content;
  max-width: calc(100vw - 32px);
}

.nav--scrolled {
  background: rgba(8, 8, 8, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.55);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-size: 1.22rem;
  line-height: 1;
  flex-shrink: 0;
}

.nav__logo img {
  height: 24px;
  width: auto;
}

.nav__links {
  position: relative;
  display: flex;
  gap: 2px;
}

.nav__links a {
  position: relative;
  z-index: 1;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.25s;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--ink);
}

.nav__links a:active {
  color: var(--accent);
}

/* the pill that slides between items */
.nav__indicator {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  pointer-events: none;
  opacity: 0;
  transition:
    transform 0.42s var(--ease-out),
    width 0.42s var(--ease-out),
    opacity 0.28s ease,
    background 0.28s ease;
}

.nav__indicator--on {
  opacity: 1;
}

.nav__links--pressed .nav__indicator {
  background: var(--accent-soft);
  box-shadow: 0 0 22px rgba(201, 171, 108, 0.3);
}

.nav__burger {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.3s;
  flex-shrink: 0;
}

.nav__burger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav__burger i {
  display: block;
  width: 15px;
  height: 1.6px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.35s var(--ease-out);
}

.nav--open .nav__burger i:first-child {
  transform: translateY(3.3px) rotate(45deg);
}

.nav--open .nav__burger i:last-child {
  transform: translateY(-3.3px) rotate(-45deg);
}

@media (max-width: 760px) {
  .nav {
    gap: 10px;
  }

  .nav__burger {
    display: flex;
  }

  .nav__indicator {
    display: none;
  }

  .nav__links {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    width: min(92vw, 340px);
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(10, 10, 10, 0.97);
    border: 1px solid var(--glass-border);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 24px 60px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0.3s;
  }

  .nav--open .nav__links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .nav__links a {
    font-size: 0.95rem;
    padding: 12px 18px;
    border-radius: 14px;
  }

  .nav__links a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.09);
  }
}

@media (max-width: 400px) {
  .nav__logo span {
    display: none;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, background 0.3s;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--small {
  padding: 8px 18px;
  font-size: 0.82rem;
}

.btn__meta {
  opacity: 0.55;
  font-weight: 500;
  font-size: 0.74rem;
}

.btn--primary {
  color: var(--bg);
  background: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 28px rgba(255, 255, 255, 0.08);
}

.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.65) 50%, transparent 65%);
  background-size: 250% 100%;
  background-position: 130% 0;
  transition: background-position 0.8s var(--ease-out);
}

.btn--primary:hover::after {
  background-position: -30% 0;
}

.btn--primary:active {
  background: var(--accent);
  color: #120e05;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px var(--accent-line),
    0 6px 30px rgba(201, 171, 108, 0.45);
  transform: translateY(0);
}

.btn--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--ghost:active,
.nav__burger:active,
.to-top:active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  box-shadow: 0 0 26px rgba(201, 171, 108, 0.28);
}

/* download chip: the one control repeated on every card */
.dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--bg);
  background: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.3s var(--ease-out);
  border: 1px solid transparent;
}

.dl i {
  font-style: normal;
  font-family: var(--font-body);
  font-weight: 600;
  transition: transform 0.3s var(--ease-out);
}

.dl:hover i {
  transform: translateY(2px);
}

.dl--quiet {
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.09);
}

.dl--quiet:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.35);
}

.dl:active {
  background: var(--accent);
  color: #120e05;
  border-color: var(--accent-line);
  box-shadow: 0 0 22px rgba(201, 171, 108, 0.35);
}

/* ---------- hero ---------- */
.hero {
  min-height: 92svh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 150px 28px 80px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 60px;
}

.hero__eyebrow {
  color: var(--ink-dim);
  font-size: 0.74rem;
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  animation: pulse 2.4s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.hero__title {
  font-size: clamp(3rem, 7.2vw, 5.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}

.hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.hero__line-inner {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  transition:
    transform 0.9s var(--ease-out) 0.1s,
    opacity 0.7s ease 0.1s;
}

.hero__line + .hero__line .hero__line-inner {
  transition-delay: 0.4s;
}

body.loaded .hero__line-inner {
  opacity: 1;
  transform: none;
}

.hero__line--accent {
  font-weight: 400;
  background: linear-gradient(180deg, #ffffff 20%, #8c8c8c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em;
}

.hero__sub {
  color: var(--ink-dim);
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  max-width: 34rem;
  margin-bottom: 38px;
}

.hero__sub .serif {
  color: var(--ink);
}

.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__crest {
  display: flex;
  justify-content: center;
}

.crest {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 4 / 5;
  padding: 44px 40px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(90% 70% at 50% 40%, rgba(255, 255, 255, 0.05), transparent 70%), var(--brand-black);
  transition: transform 0.25s ease-out;
}

.crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 0.7s var(--ease-out);
}

.crest:hover img {
  filter: drop-shadow(0 0 28px rgba(201, 171, 108, 0.25));
}

.crest__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.1) 46%, rgba(255, 255, 255, 0.03) 54%, transparent 70%);
  background-size: 250% 250%;
  animation: sheen 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sheen {
  0%, 55%, 100% { background-position: 130% 0; }
  25% { background-position: -30% 0; }
}

.crest__badge {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--ink-dim);
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  border-left: none;
  border-right: none;
  border-radius: 0;
  padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: marquee 46s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__track span {
  color: var(--ink-dim);
  font-size: 0.82rem;
  white-space: nowrap;
}

.marquee__track i {
  color: var(--ink-faint);
  font-style: normal;
  font-size: 0.72rem;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- library: directory + content ---------- */
.lib {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 28px 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

.dir {
  position: sticky;
  top: 100px;
}

.dir__box {
  padding: 18px 12px 14px;
}

.dir__summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px 12px;
  color: var(--ink);
  font-size: 0.78rem;
  cursor: default;
  pointer-events: none;
}

.dir__summary::-webkit-details-marker {
  display: none;
}

.dir__summary i {
  display: none;
  font-style: normal;
  color: var(--ink-faint);
  transition: transform 0.3s var(--ease-out);
}

.dir__tree,
.dir__tree ol,
.dir__bundles ul {
  list-style: none;
}

.dir__tree ol {
  margin: 2px 0 4px 12px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.dir__tree a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 10px;
  color: var(--ink-faint);
  text-decoration: none;
  font-size: 0.76rem;
  transition: color 0.25s, background 0.25s;
}

.dir__tree a b {
  font-weight: 400;
  color: var(--ink-faint);
  opacity: 0.7;
}

.dir__tree a:hover {
  color: var(--ink);
}

.dir__tree a.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.dir__tree a.is-active b {
  color: var(--accent);
  opacity: 1;
}

.dir__tree a:active {
  color: var(--accent);
}

.dir__bundles {
  margin-top: 14px;
  padding: 14px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dir__bundles > p {
  color: var(--ink-faint);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.dir__bundles a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.25s;
}

.dir__bundles a b {
  font-weight: 400;
  font-size: 0.66rem;
  color: var(--ink-faint);
  padding-top: 2px;
}

.dir__bundles a:hover {
  color: var(--ink);
}

.dir__bundles a:active {
  color: var(--accent);
}

.lib__main {
  min-width: 0;
}

.lib__group {
  padding-bottom: 88px;
}

.lib__head {
  margin-bottom: 26px;
}

.section__eyebrow {
  color: var(--ink-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section__eyebrow::after {
  content: "";
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), transparent);
}

.lib__title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.lib__title em {
  font-weight: 400;
  color: var(--ink-dim);
}

.section__sub {
  color: var(--ink-faint);
  font-size: 0.96rem;
  max-width: 38rem;
}

/* ---------- logo cards ---------- */
.assets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.assets--horizontal {
  grid-template-columns: repeat(2, 1fr);
}

.asset {
  display: flex;
  flex-direction: column;
}

.asset__tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 18%;
  margin: 8px 8px 0;
  border-radius: 16px;
  cursor: zoom-in;
  overflow: hidden;
}

.asset__tile--horizontal {
  aspect-ratio: 16 / 8;
  padding: 10% 12%;
}

.asset__tile--stacked {
  padding: 14% 20%;
}

.asset__tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s var(--ease-out);
}

.asset:hover .asset__tile img {
  transform: scale(1.04);
}

.asset__tile--dark,
.asset__tile--black {
  background: var(--brand-black);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.asset__tile--light {
  background: #f4f3ef;
}

.asset__tile--green {
  background: var(--brand-green);
}

/* the "on ground" files carry their own background; the tile matches it so
   the file's edge disappears and every card keeps the same margin */
.asset__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.asset__head h3 {
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.asset__note {
  display: block;
  color: var(--ink-faint);
  font-size: 0.78rem;
  margin-top: 2px;
}

.asset__dl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

/* ---------- icons ---------- */
.icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.icon {
  display: flex;
  flex-direction: column;
}

.icon__tile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  margin: 8px 8px 0;
  border-radius: 16px;
  cursor: zoom-in;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04), transparent 70%),
    repeating-conic-gradient(rgba(255, 255, 255, 0.025) 0% 25%, transparent 0% 50%) 50% / 16px 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.icon__tile img {
  display: block;
  border-radius: 18%;
  transition: transform 0.5s var(--ease-out);
}

.icon__img--pixel {
  image-rendering: pixelated;
  border-radius: 0 !important;
}

.icon:hover .icon__tile img {
  transform: scale(1.05);
}

.icon__body {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 16px 16px;
  position: relative;
  z-index: 2;
}

.icon__body h3 {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
}

.icon__body span {
  color: var(--ink-faint);
  font-size: 0.72rem;
}

/* ---------- print docs ---------- */
.docs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.doc {
  display: flex;
  flex-direction: column;
}

.doc__tile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  margin: 8px 8px 0;
  padding: 24px;
  border-radius: 16px;
  cursor: zoom-in;
  background: #121212;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.doc__tile img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 3px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.6s var(--ease-out);
}

.doc:hover .doc__tile img {
  transform: translateY(-4px) rotate(-0.6deg);
}

.doc__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.doc__meta {
  color: var(--ink-faint);
  font-size: 0.68rem;
  margin-bottom: 8px;
}

.doc__body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.doc__body > p:not(.doc__meta) {
  color: var(--ink-dim);
  font-size: 0.86rem;
  margin-bottom: 16px;
}

/* ---------- colour ---------- */
.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.swatch {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.swatch__chip {
  display: flex;
  align-items: flex-end;
  height: 150px;
  margin: 8px 8px 0;
  padding: 14px;
  border-radius: 16px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  transition: transform 0.45s var(--ease-out);
}

.swatch__chip--light {
  color: rgba(0, 0, 0, 0.55);
}

.swatch__chip:hover {
  transform: scale(0.985);
}

.swatch__body {
  padding: 16px 18px 12px;
}

.swatch__body h3 {
  font-size: 0.96rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.swatch__body > p {
  color: var(--ink-faint);
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.swatch__rows {
  display: flex;
  flex-direction: column;
}

.swatch__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  font-size: 0.72rem;
  color: var(--ink-faint);
  transition: color 0.2s;
}

.swatch__row b {
  font-weight: 400;
  color: var(--ink-dim);
  transition: color 0.2s;
}

.swatch__row:hover b {
  color: var(--ink);
}

.swatch__row:active b,
.swatch__row.is-copied b {
  color: var(--accent);
}

/* ---------- type ---------- */
.type {
  padding: 44px 40px 34px;
  overflow: hidden;
}

.type__specimen {
  font-family: var(--font-brand);
  font-weight: 600;
  font-stretch: 112%;
  font-size: clamp(2rem, 6.4vw, 4.6rem);
  letter-spacing: 0.32em;
  line-height: 1.1;
  white-space: nowrap;
  margin-bottom: 34px;
}

.type__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.type__spec {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}

.type__spec dt {
  color: var(--ink-faint);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 4px;
}

.type__spec dd {
  color: var(--ink);
  font-size: 0.82rem;
}

.type__glyphs {
  margin-top: 26px;
  font-family: var(--font-brand);
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.24em;
  color: var(--ink-faint);
  font-size: 0.82rem;
  word-break: break-all;
}

/* ---------- usage notes ---------- */
.notes {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
}

.note {
  display: flex;
  gap: 18px;
  padding: 24px 26px;
  background: var(--bg);
}

.note > span {
  color: var(--ink-faint);
  font-size: 0.72rem;
  padding-top: 3px;
}

.note h4 {
  font-size: 0.96rem;
  font-weight: 650;
  margin-bottom: 6px;
}

.note p {
  color: var(--ink-dim);
  font-size: 0.88rem;
}

/* ---------- footer ---------- */
.footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 28px 40px;
}

.footer__inner {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-size: 0.75rem;
}

.footer__links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.25s;
}

.footer__links a:hover {
  color: var(--ink);
}

.footer__links a:active {
  color: var(--accent);
}

/* ---------- viewer (lightbox) ---------- */
.viewer {
  margin: auto;
  width: min(1000px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  color: var(--ink);
  background: rgba(12, 12, 12, 0.96);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.viewer[open] {
  display: flex;
  flex-direction: column;
  animation: viewer-in 0.4s var(--ease-out);
}

.viewer::backdrop {
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

@keyframes viewer-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

.viewer__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.viewer__name {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer__grounds {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.viewer__grounds button {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  color: var(--ink-faint);
  transition: color 0.2s, background 0.2s;
}

.viewer__grounds button:hover {
  color: var(--ink);
}

.viewer__grounds button[aria-pressed="true"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
}

.viewer__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s, background 0.2s;
}

.viewer__close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
}

.viewer__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  height: min(64svh, 640px);
  overflow: hidden;
  transition: background 0.3s;
}

.viewer__stage img {
  max-width: 100%;
  /* the stage's height is set, but a flex child's % height does not resolve
     against it reliably, so cap the image with the same numbers */
  max-height: calc(min(64svh, 640px) - 96px);
  object-fit: contain;
}

.viewer__stage[data-ground="dark"] {
  background: var(--brand-black);
}

.viewer__stage[data-ground="light"] {
  background: #f4f3ef;
}

.viewer__stage[data-ground="checker"] {
  background: repeating-conic-gradient(#1c1c1c 0% 25%, #111 0% 50%) 50% / 22px 22px;
}

.viewer__dl {
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.viewer__dl:empty {
  display: none;
}

/* ---------- back to top + toast ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.1rem;
  z-index: 60;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s var(--ease-out), background 0.3s;
}

.to-top--show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  background: rgba(255, 255, 255, 0.1);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 14px);
  z-index: 120;
  max-width: calc(100vw - 32px);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.95);
  border: 1px solid var(--accent-line);
  box-shadow: 0 0 34px rgba(201, 171, 108, 0.25);
  color: var(--ink);
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.toast--on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out),
    border-color 0.35s,
    box-shadow 0.45s;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal.in.card-spot:hover {
  transform: translateY(-3px);
}

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .assets,
  .docs {
    grid-template-columns: repeat(2, 1fr);
  }

  .swatches {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 130px;
    gap: 56px;
    min-height: 0;
  }

  .hero__crest {
    order: -1;
  }

  .crest {
    width: 220px;
    padding: 30px 26px;
  }

  .lib {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 48px;
  }

  /* the directory becomes a collapsible index at the top */
  .dir {
    position: static;
  }

  .dir__summary {
    pointer-events: auto;
    cursor: pointer;
    padding-bottom: 0;
  }

  .dir__box[open] .dir__summary {
    padding-bottom: 12px;
  }

  .dir__summary i {
    display: inline;
  }

  .dir__box[open] .dir__summary i {
    transform: rotate(45deg);
  }

  .dir__box {
    padding: 16px 12px;
  }

  .notes {
    grid-template-columns: 1fr;
  }

  .lib__group {
    padding-bottom: 64px;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .lib,
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .assets,
  .assets--horizontal,
  .docs {
    grid-template-columns: 1fr;
  }

  .icons {
    grid-template-columns: 1fr 1fr;
  }

  /* one card per row, so shorter tiles keep the scroll manageable */
  .asset__tile--mark,
  .asset__tile--stacked {
    aspect-ratio: 16 / 11;
    padding: 8% 20%;
  }

  .icon__body {
    flex-direction: column;
    align-items: flex-start;
  }

  .icon__tile {
    height: 140px;
  }

  .swatches {
    gap: 10px;
  }

  .swatch__chip {
    height: 96px;
  }

  .swatch__body {
    padding: 14px 14px 10px;
  }

  .type {
    padding: 30px 22px 26px;
  }

  .type__specimen {
    font-size: clamp(1.3rem, 8vw, 2rem);
  }

  .viewer__stage {
    padding: 24px;
  }

  .viewer__stage img {
    max-height: calc(min(64svh, 640px) - 48px);
  }

  .viewer__bar {
    flex-wrap: wrap;
  }

  .viewer__name {
    flex-basis: calc(100% - 50px);
  }

  .viewer__grounds {
    order: 3;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .hero__line-inner {
    opacity: 1;
    transform: none;
  }
}

/* PNG sizes for the mark, as one segmented chip */
.seg {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  overflow: hidden;
}

.seg em {
  font-style: normal;
  color: var(--ink-faint);
  padding: 6px 4px 6px 12px;
}

.seg a {
  color: var(--ink-dim);
  text-decoration: none;
  padding: 6px 8px;
  transition: color 0.2s, background 0.2s;
}

.seg a:last-child {
  padding-right: 12px;
}

.seg a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.seg a:active {
  color: #120e05;
  background: var(--accent);
}

/* ============================================================
   MULTI-PAGE
   ============================================================ */

/* crossfade between pages; the nav and grain stay put */
@view-transition {
  navigation: auto;
}

.nav {
  view-transition-name: nav;
}

.grain {
  view-transition-name: grain;
}

::view-transition-old(root) {
  animation: page-out 0.26s var(--ease-out) both;
}

::view-transition-new(root) {
  animation: page-in 0.42s var(--ease-out) both;
}

::view-transition-group(nav),
::view-transition-group(grain) {
  animation-duration: 0.01ms;
}

@keyframes page-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- sub-page header ---------- */
.page-head {
  max-width: 1180px;
  margin: 0 auto;
  padding: 160px 28px 8px;
}

.page-head__title {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 16px;
}

.page-head__title em {
  font-weight: 400;
  color: var(--ink-dim);
}

.page-head + .lib {
  padding-top: 48px;
}

/* ---------- overview: one card per folder ---------- */
.tour {
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 28px 40px;
}

.tour__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.tour__card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

/* the last two share the bottom row */
.tour__card:nth-child(n + 4) {
  grid-column: span 3;
}

.tour__art {
  height: 190px;
  margin: 8px 8px 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--brand-black);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.tour__art img {
  max-height: 72%;
  max-width: 70%;
  object-fit: contain;
  transition: transform 0.6s var(--ease-out);
}

.tour__art--dark img[src$=".png"] {
  border-radius: 14px;
}

.tour__card:hover .tour__art img {
  transform: scale(1.05);
}

.tour__swatches {
  display: flex;
  width: 100%;
  height: 100%;
}

.tour__swatches i {
  flex: 1;
  background: var(--c);
  transition: flex 0.6s var(--ease-out);
}

.tour__swatches i:hover {
  flex: 1.6;
}

.tour__type {
  font-family: var(--font-brand);
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.32em;
  font-size: clamp(1.2rem, 2.6vw, 2rem);
  white-space: nowrap;
  transition: letter-spacing 0.6s var(--ease-out);
}

.tour__card:hover .tour__type {
  letter-spacing: 0.4em;
}

.tour__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tour__idx {
  color: var(--ink-faint);
  font-size: 0.7rem;
  margin-bottom: 8px;
}

.tour__body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.tour__body p {
  color: var(--ink-dim);
  font-size: 0.88rem;
  flex: 1;
}

.tour__go {
  margin-top: 16px;
  font-size: 0.74rem;
  color: var(--ink);
}

.tour__go i {
  font-style: normal;
  display: inline-block;
  transition: transform 0.35s var(--ease-out);
}

.tour__card:hover .tour__go i {
  transform: translateX(5px);
}

.tour__card:active {
  border-color: var(--accent-line) !important;
  box-shadow: 0 0 34px rgba(201, 171, 108, 0.22) !important;
}

/* ---------- pager (prev / next) ---------- */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

.pager__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 26px;
  text-decoration: none;
  color: var(--ink);
}

.pager__link--next {
  grid-column: 2;
  text-align: right;
  align-items: flex-end;
}

.pager__label {
  color: var(--ink-faint);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.pager__title {
  font-weight: 650;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.pager__title i {
  font-style: normal;
  color: var(--ink-dim);
  display: inline-block;
  transition: transform 0.35s var(--ease-out);
}

.pager__link--next:hover .pager__title i {
  transform: translateX(5px);
}

.pager__link--prev:hover .pager__title i {
  transform: translateX(-5px);
}

.pager__link:active {
  border-color: var(--accent-line) !important;
}

@media (max-width: 900px) {
  .page-head {
    padding-top: 130px;
  }

  .page-head + .lib {
    padding-top: 32px;
  }

  .tour {
    padding-top: 64px;
  }

  .tour__grid {
    grid-template-columns: 1fr 1fr;
  }

  .tour__card,
  .tour__card:nth-child(n + 4) {
    grid-column: span 1;
  }

  .tour__card:first-child {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .page-head,
  .tour {
    padding-left: 16px;
    padding-right: 16px;
  }

  .tour__grid,
  .pager {
    grid-template-columns: 1fr;
  }

  .tour__card:first-child {
    grid-column: auto;
  }

  .tour__art {
    height: 150px;
  }

  .pager__link--next {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
