@font-face {
  font-family: "Young Serif";
  src: url("assets/fonts/YoungSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/InstrumentSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/InstrumentSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #121714;
  --bg-strong: #0c110f;
  --panel: #18201c;
  --panel-strong: #1e2923;
  --line: rgba(222, 236, 224, 0.14);
  --line-strong: rgba(222, 236, 224, 0.22);
  --text: #eef4ef;
  --text-soft: #bfcdc2;
  --accent: #d9744b;
  --accent-soft: #8cb0a8;
  --signal: #d2e7bf;
  --shell: 72rem;
  --radius: 8px;
  --shadow: 0 26px 80px rgba(2, 4, 3, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Instrument Sans", sans-serif;
  background:
    linear-gradient(to bottom, rgba(13, 18, 16, 0.96), rgba(13, 18, 16, 1)),
    #121714;
  color: var(--text);
}

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

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  width: min(calc(100% - 2rem), var(--shell));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--signal);
  color: var(--bg-strong);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(10, 15, 13, 0.88), rgba(10, 15, 13, 0.56));
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: linear-gradient(to bottom, rgba(10, 15, 13, 0.96), rgba(10, 15, 13, 0.72));
}

.brand-link {
  width: min(12rem, 36vw);
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem 1rem;
}

.site-nav a {
  position: relative;
  padding-bottom: 0.2rem;
  color: var(--text-soft);
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 -0.1rem;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  min-height: 82svh;
  overflow: clip;
  background: var(--bg-strong);
}

.hero-media,
.hero-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  object-fit: cover;
  object-position: center;
}

.hero-scrim {
  background:
    linear-gradient(180deg, rgba(7, 10, 9, 0.3), rgba(7, 10, 9, 0.62) 42%, rgba(7, 10, 9, 0.92)),
    linear-gradient(90deg, rgba(9, 12, 11, 0.88), rgba(9, 12, 11, 0.22) 62%, rgba(9, 12, 11, 0.74));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: 82svh;
  padding-top: 7rem;
  padding-bottom: 4.5rem;
}

.eyebrow,
.path-kicker,
.loop-step,
.footer-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--signal);
}

h1,
h2,
h3,
summary {
  margin: 0;
  font-family: "Young Serif", serif;
  font-weight: 400;
  line-height: 1.08;
}

h1 {
  max-width: 14ch;
  margin-top: 0.65rem;
  font-size: 4.6rem;
}

h2 {
  max-width: 16ch;
  font-size: 2.8rem;
}

h3,
summary {
  font-size: 1.45rem;
}

p,
dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-copy {
  max-width: 36rem;
  margin-top: 1rem;
  font-size: 1.2rem;
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  text-decoration: none;
}

.button-primary {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--bg-strong);
}

.button-secondary {
  background: rgba(12, 18, 15, 0.56);
  color: var(--text);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  max-width: 52rem;
  margin-top: 2rem;
}

.hero-facts div {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-strong);
}

.hero-facts dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--signal);
}

.hero-facts dd {
  margin-top: 0.35rem;
  color: var(--text);
}

.section {
  position: relative;
  padding: 5.5rem 0;
  scroll-margin-top: 7rem;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, transparent 0, transparent calc(100% - 1px), rgba(255, 255, 255, 0.02) calc(100% - 1px)),
    linear-gradient(to bottom, transparent 0, transparent calc(100% - 1px), rgba(255, 255, 255, 0.02) calc(100% - 1px));
  background-size: 4.5rem 4.5rem;
  opacity: 0.18;
}

.section-ink {
  background:
    linear-gradient(to bottom, rgba(24, 32, 28, 0.88), rgba(16, 22, 19, 0.96)),
    var(--panel);
}

.section-heading {
  max-width: 45rem;
}

.section-heading p,
.section-copy > p {
  margin-top: 1rem;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: 2rem;
  align-items: start;
}

.section-grid-media {
  grid-template-columns: minmax(18rem, 0.86fr) minmax(0, 1.14fr);
}

.section-grid-media .section-copy {
  order: 2;
}

.section-grid-media .section-figure {
  order: 1;
}

.trait-grid,
.loop-grid,
.subgenre-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

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

.loop-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subgenre-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2.2rem;
}

.trait-card,
.loop-card,
.subgenre-card,
.path-output {
  min-height: 100%;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 16, 14, 0.46);
  box-shadow: var(--shadow);
}

.trait-card h3,
.loop-card h3,
.subgenre-card h3,
.path-output h3 {
  margin-bottom: 0.7rem;
}

.loop-step {
  display: inline-block;
  margin-bottom: 0.8rem;
}

.section-figure {
  margin: 0;
}

.section-figure img {
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.section-figure figcaption {
  margin-top: 0.9rem;
  color: var(--text-soft);
}

.path-picker {
  margin-top: 2rem;
}

.path-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.path-button {
  min-height: 2.9rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.path-button.is-active,
.path-button[aria-selected="true"] {
  border-color: var(--signal);
  background: rgba(210, 231, 191, 0.11);
  color: var(--text);
}

.path-output {
  margin-top: 1rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  border-top: 1px solid var(--line-strong);
  padding-top: 1rem;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  max-width: 48rem;
  margin-top: 0.8rem;
}

.site-footer {
  padding: 2.2rem 0 3rem;
  border-top: 1px solid var(--line);
  background: var(--bg-strong);
}

.footer-layout {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.footer-mark {
  width: 3rem;
  height: 3rem;
}

.footer-title {
  display: block;
  margin-top: 0.9rem;
}

.footer-copy {
  max-width: 26rem;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 64rem) {
  h1 {
    font-size: 3.8rem;
  }

  h2 {
    font-size: 2.4rem;
  }

  .section-grid,
  .section-grid-media,
  .subgenre-grid,
  .loop-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-grid-media .section-copy,
  .section-grid-media .section-figure {
    order: initial;
  }

  .section-grid,
  .section-grid-media {
    align-items: stretch;
  }

  .hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 48rem) {
  .site-header {
    align-items: start;
    flex-direction: column;
  }

  .brand-link {
    width: min(13rem, 70vw);
  }

  .site-nav {
    gap: 0.55rem 0.9rem;
    justify-content: start;
  }

  .hero,
  .hero-content {
    min-height: 76svh;
  }

  h1 {
    font-size: 3.1rem;
  }

  h2 {
    font-size: 2rem;
  }

  .section {
    padding: 4.2rem 0;
  }

  .section-grid,
  .section-grid-media,
  .trait-grid,
  .loop-grid,
  .subgenre-grid,
  .hero-facts,
  .footer-layout {
    grid-template-columns: 1fr;
  }

  .footer-layout {
    display: grid;
  }
}

@media (max-width: 30rem) {
  .shell {
    width: min(calc(100% - 1.25rem), var(--shell));
  }

  h1 {
    font-size: 2.6rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  p,
  dd {
    font-size: 1rem;
  }

  .button,
  .path-button {
    width: 100%;
  }

  .path-buttons {
    display: grid;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
