:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --ink: #111110;
  --accent: #00ffff;
  --muted: #66645f;
  --rule: rgba(17, 17, 16, 0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.foundation-header,
.foundation-footer,
main {
  width: calc(100% - 8vw);
  max-width: 1440px;
  margin: 0 auto;
}

.foundation-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--ink);
  padding: 1.5rem 0;
}

.foundation-name {
  font-size: 1rem;
  font-weight: 600;
}

.header-register {
  color: var(--muted);
}

main {
  display: flex;
  flex: 1;
  align-items: center;
  padding: clamp(3rem, 9vh, 7rem) 0;
}

.index {
  width: 100%;
}

.index-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.index-heading h1,
.index-heading p {
  margin: 0;
}

.index-heading p {
  color: var(--muted);
}

.column-heading,
.instrument-row {
  display: grid;
  grid-template-columns: 90px minmax(170px, 1fr) minmax(280px, 2fr) minmax(180px, 1fr) 20px;
  gap: 1.5rem;
  align-items: center;
}

.column-heading {
  border-bottom: 1px solid var(--ink);
  padding: 0 0.75rem 0.75rem;
  color: var(--muted);
}

.instrument-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.instrument-list li {
  border-bottom: 1px solid var(--rule);
}

.instrument-row {
  padding: 1.5rem 0.75rem;
  transition: background 0.2s var(--ease);
}

.instrument-row:hover {
  background: rgba(17, 17, 16, 0.025);
}

.instrument-number,
.instrument-domain {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.instrument-number {
  color: var(--muted);
}

.instrument-title {
  font-size: 1.2rem;
  line-height: 1.3;
}

.instrument-description {
  color: var(--muted);
  line-height: 1.5;
}

.instrument-domain {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.instrument-arrow {
  color: var(--muted);
  text-align: right;
}

.instrument-row:hover .instrument-title,
.instrument-row:hover .instrument-arrow {
  color: var(--accent);
}

.foundation-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--ink);
  padding: 1.5rem 0;
}

.foundation-footer .meta {
  flex-shrink: 0;
  color: var(--muted);
}

.motto {
  margin: 0;
  font-size: 1rem;
  font-style: italic;
  font-variant-numeric: oldstyle-nums;
}

.reveal {
  animation: reveal 0.8s var(--ease) both;
}

.foundation-footer.reveal {
  animation-delay: 0.12s;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  main {
    align-items: flex-start;
  }

  .column-heading {
    display: none;
  }

  .instrument-list {
    border-top: 1px solid var(--ink);
  }

  .instrument-row {
    grid-template-columns: 70px 1fr 20px;
    gap: 0.65rem 1rem;
  }

  .instrument-number {
    grid-column: 1;
    grid-row: 1;
  }

  .instrument-title {
    grid-column: 2;
    grid-row: 1;
  }

  .instrument-description {
    grid-column: 2 / 4;
    grid-row: 2;
  }

  .instrument-domain {
    grid-column: 2 / 4;
    grid-row: 3;
  }

  .instrument-arrow {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 600px) {
  .foundation-header,
  .foundation-footer,
  main {
    width: calc(100% - 2.5rem);
  }

  .foundation-header,
  .foundation-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .header-register {
    align-self: flex-start;
  }

  .index-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
  }

  .instrument-row {
    grid-template-columns: 55px 1fr 20px;
    padding: 1.25rem 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
  }

  .instrument-row {
    transition: none;
  }
}
