:root {
  --ink: #241910;
  --ink-soft: #5c4d43;
  --paper: #f3eadf;
  --card: #fffaf6;
  --paprika: #e23d2b;
  --paprika-deep: #b42316;
  --saffron: #ffb703;
  --basil: #1f7a4d;
  --sea: #1d6a73;
  --berry: #8c2f5b;
  --line: rgba(36, 25, 16, 0.12);
  --shadow: 0 18px 50px rgba(60, 24, 12, 0.12);
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% -8%, rgba(255, 183, 3, 0.45), transparent 36%),
    radial-gradient(circle at 110% 0%, rgba(226, 61, 43, 0.16), transparent 32%),
    radial-gradient(circle at 80% 120%, rgba(29, 106, 115, 0.12), transparent 38%);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
}

h1, h2, h3, p {
  overflow-wrap: anywhere;
}

h1, h2, #related, #content {
  scroll-margin-top: 8.5rem;
}

h1, h2, h3, .feature-title, .card-title, .rail-title, .giant, .logo .word {
  font-family: var(--serif);
  font-weight: 650;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.98;
  margin: 0.2rem 0 0.8rem;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
  margin: 0 0 0.4rem;
}

h3 {
  font-size: 1.45rem;
  line-height: 1.15;
  margin: 0.2rem 0 0.6rem;
}

p {
  margin: 0 0 1rem;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.sr,
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--card);
  padding: 0.6rem 0.9rem;
  z-index: 40;
}

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

#site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 234, 223, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}

#site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(60, 24, 12, 0.06);
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0 0.35rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.mark {
  min-width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  padding: 0 0.35rem;
  background: var(--paprika);
  color: #fffaf6;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 0.7rem;
  transform: rotate(-8deg);
}

.logo .word {
  font-size: 1.7rem;
  line-height: 1;
}

.tagline {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.finder {
  display: flex;
  gap: 0.4rem;
}

.finder input,
.desk-form input,
.desk-form textarea {
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
}

.finder input {
  width: min(16rem, 40vw);
}

.desk-form textarea {
  border-radius: 1.1rem;
  width: 100%;
  resize: vertical;
}

button,
.missing a,
.desk-form button {
  font: 600 0.95rem/1 var(--sans);
  background: var(--paprika);
  color: #fffaf6;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.05rem;
  cursor: pointer;
}

button:hover,
.missing a:hover,
.desk-form button:hover {
  background: var(--paprika-deep);
}

.menu ul {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0.75rem;
  overflow-x: auto;
}

.menu a {
  display: inline-flex;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 250, 246, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.menu a:hover,
.menu a.is-current {
  background: var(--ink);
  color: #fffaf6;
  border-color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 1.2rem;
  align-items: stretch;
  padding-top: 1.3rem;
}

.feature,
.feature > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.feature > a {
  text-decoration: none;
  color: inherit;
}

.feature-media {
  display: block;
  flex: 1 1 auto;
  min-height: 16rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 1.7rem;
  background: #2a211c;
  box-shadow: var(--shadow);
}

.feature-media .photo,
.card-media .photo,
.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-plate {
  display: block;
  position: relative;
  margin: -4.2rem 1.1rem 0;
  background: var(--card);
  border-radius: 1.4rem;
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: var(--shadow);
}

.kicker {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paprika-deep);
}

.feature .kicker {
  background: var(--saffron);
  color: var(--ink);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  transform: rotate(-2deg);
}

.feature-title,
.card-title,
.rail-title {
  display: block;
  margin-top: 0.45rem;
}

.feature-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.02;
}

.feature .dek {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dek,
.card-dek {
  display: block;
  color: var(--ink-soft);
  margin-top: 0.55rem;
}

.meta-row,
.ticket {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: 0.8rem;
}

.ticket {
  list-style: none;
  padding: 0.7rem 0 0;
  margin: 0.4rem 0 0;
  border-top: 1px dashed rgba(36, 25, 16, 0.25);
}

.rail {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.rail h2 {
  font-size: 1.4rem;
  margin-bottom: 0.7rem;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.rail li {
  flex: 1;
  display: flex;
  min-height: 0;
}

.rail a {
  flex: 1;
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 250, 246, 0.72);
  border-radius: 1.2rem;
  padding: 0.55rem 0.7rem;
}

.rail a:hover {
  background: var(--card);
}

.avatar {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
}

.rail-title {
  font-size: 1.05rem;
  line-height: 1.2;
}

.ribbon {
  margin: 1.6rem 0 0.4rem;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 250, 246, 0.55);
}

.ribbon-track {
  display: flex;
  width: max-content;
  animation: drift 32s linear infinite;
}

.ribbon span {
  padding: 0.55rem 0;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.band {
  padding: 1.6rem 0 0.4rem;
}

.band-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.band-head p {
  max-width: 28rem;
  color: var(--ink-soft);
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

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

.cards-related .card-media {
  aspect-ratio: 16 / 10;
}

.cards-related .card-copy {
  flex: 1;
  padding: 0.75rem 0.9rem 0.85rem;
}

.cards-related .card-title {
  font-size: 1.15rem;
  line-height: 1.2;
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cards-related .card-dek {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
  font-size: 0.95rem;
  line-height: 1.4;
}

.cards-related .meta-row {
  margin-top: auto;
}

.card {
  background: var(--card);
  border-radius: 1.3rem;
  box-shadow: 0 10px 30px rgba(60, 24, 12, 0.06);
  min-width: 0;
}

.card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.card-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 1.3rem 1.3rem 0 0;
  background: #2a211c;
}

.card-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem 1.05rem;
}

.card-title {
  font-size: 1.35rem;
  line-height: 1.12;
}

.card > a:hover .card-title,
.feature > a:hover .feature-title,
.rail a:hover .rail-title {
  color: var(--paprika-deep);
}

.card[data-tone="printers"] .kicker { color: var(--sea); }
.card[data-tone="guides"] .kicker,
.method-card .kicker { color: var(--basil); }
.card[data-tone="materials"] .kicker { color: var(--berry); }
.card[data-tone="software"] .kicker { color: #8a4b12; }
.card[data-tone="applications"] .kicker { color: var(--paprika-deep); }

.method-grid,
.event-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.method-card,
.event-card {
  background: var(--card);
  border-radius: 1.3rem;
  padding: 1.1rem 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}

.step-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
}

.step-preview span,
.step-no {
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--basil);
  color: #fffaf6;
  font-size: 0.85rem;
  font-weight: 700;
}

.method-card a,
.ticket a,
.legal-links a,
#site-footer a,
.story-figure figcaption a {
  color: var(--ink);
}

.method-card a {
  display: inline-flex;
  margin-top: 0.4rem;
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.page-head {
  padding-top: 1.6rem;
}

.page-head .dek {
  max-width: 40rem;
  font-size: 1.15rem;
}

.story-top {
  padding-top: 1.4rem;
  max-width: 46rem;
}

.story-figure {
  margin: 1.2rem 0 0;
}

.story-figure .photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 1.5rem;
  background: #2a211c;
}

.story-figure figcaption {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-top: 0.45rem;
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.6rem;
  align-items: start;
  margin-top: 1.3rem;
}

.story-body {
  max-width: 42rem;
  font-size: 1.08rem;
}

.story-body > p:first-of-type::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.5rem;
  line-height: 0.8;
  padding: 0.15rem 0.45rem 0 0;
  color: var(--paprika);
}

.story-body h2 {
  margin-top: 1.6rem;
}

.prose-list {
  padding-left: 1.1rem;
}

.prose-list li {
  margin: 0.35rem 0;
}

.method {
  margin-top: 1.4rem;
  background: #fff3df;
  border-radius: 1.3rem;
  padding: 1rem 1rem 0.4rem;
}

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

.method li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 0.85rem;
}

.glance {
  position: sticky;
  top: 8.75rem;
  background: var(--card);
  border-left: 6px solid var(--saffron);
  border-radius: 1.2rem;
  padding: 1rem 1rem 0.4rem;
  box-shadow: var(--shadow);
}

.glance h2 {
  font-size: 1.5rem;
}

.glance dl {
  margin: 0;
}

.glance div {
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.glance dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.glance dd {
  margin: 0.15rem 0 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.25;
}

.related {
  margin-top: 1rem;
}

.sheet {
  padding-bottom: 2rem;
}

.event-list {
  margin-top: 0.5rem;
}

.desk-form {
  display: grid;
  gap: 0.8rem;
  max-width: 36rem;
  margin-top: 0.6rem;
}

.desk-form label {
  display: grid;
  gap: 0.3rem;
  font-weight: 650;
}

.desk-form input,
.search-form input {
  width: 100%;
}

.form-note,
.form-errors {
  background: var(--card);
  border-radius: 1rem;
  padding: 0.8rem 1rem;
  max-width: 36rem;
}

.form-errors {
  border: 1px solid var(--paprika);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.legal-links a,
#site-footer a {
  text-decoration: none;
  font-weight: 650;
}

.legal-links a:hover,
#site-footer a:hover,
.method-card a:hover,
.ticket a:hover {
  text-decoration: underline;
}

.missing {
  padding: 4rem 0 5rem;
}

.missing a {
  display: inline-flex;
  text-decoration: none;
  margin-top: 0.6rem;
}

.pager {
  margin: 1.3rem 0 0.2rem;
}

.pager ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.pager a,
.pager .is-current,
.pager .gap {
  display: inline-flex;
  min-width: 2.5rem;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}

.pager .is-current {
  background: var(--ink);
  color: #fffaf6;
  border-color: var(--ink);
}

.pager .gap {
  border: 0;
  background: transparent;
  min-width: 1.2rem;
  padding-inline: 0.2rem;
}

.pager a:hover {
  background: var(--ink);
  color: #fffaf6;
  border-color: var(--ink);
}

#site-footer {
  margin-top: 2.5rem;
  background: #241910;
  color: #fff6ee;
  padding: 2rem 0 1.2rem;
}

#site-footer h2 {
  font-size: 1.2rem;
  color: var(--saffron);
}

#site-footer a,
#site-footer .foot-note {
  color: #fff6ee;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}

.foot-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.giant {
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 0.78;
  margin: 0 0 0.4rem;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 246, 238, 0.45);
}

.foot-logo {
  font-family: var(--serif);
  font-size: 1.6rem;
  text-decoration: none;
}

.legal-line {
  margin-top: 1.4rem;
  color: rgba(255, 246, 238, 0.75);
  font-size: 0.9rem;
}

:focus-visible {
  outline: 3px solid var(--sea);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .hero,
  .story-layout,
  .cards,
  .cards-related,
  .method-grid,
  .event-list,
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .glance {
    position: static;
  }

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

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .tagline {
    display: none;
  }

  .finder input {
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .hero,
  .cards,
  .cards-related,
  .method-grid,
  .event-list,
  .story-layout,
  .band-head {
    grid-template-columns: 1fr;
  }

  .feature,
  .feature > a,
  .rail,
  .rail ol,
  .rail li {
    height: auto;
    flex: none;
  }

  .feature-media {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .feature-plate {
    margin: 0.8rem 0 0;
  }

  .band-head {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ribbon-track { animation: none; }
}
