:root {
  --ivory: #f7f0e7;
  --paper: #fbf7f0;
  --ink: #1c1a17;
  --muted: #665d53;
  --gold: #9b6a2f;
  --champagne: #d8bd8c;
  --line: rgba(155, 106, 47, 0.28);
  --charcoal: #1c1a17;
  --taupe: #5b5147;
  --oxblood: #5a1f1b;
  --rail: 172px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ivory);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Avenir, "Avenir Next", Helvetica, Arial, sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at 30% 12%, rgba(255, 250, 242, 0.85), transparent 34%),
    url("assets/textures/ivory-paper.svg"),
    var(--ivory);
}

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

p,
ul {
  margin: 0;
}

ul {
  padding-left: 1.1rem;
}

li + li {
  margin-top: 0.45rem;
}

h1,
h2,
h3,
.eyebrow,
.tagline,
.rail-name,
.rail-sub,
.rail-foot,
.specimen-display {
  font-family: Didot, "Bodoni 72", Georgia, "Times New Roman", serif;
  font-weight: 400;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(4rem, 9vw, 9rem);
  line-height: 0.95;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

h2 {
  max-width: 1120px;
  font-size: clamp(2.4rem, 5.5vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h3 {
  color: var(--gold);
  font-size: 0.96rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.brand-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: var(--rail);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2rem;
  padding: 42px 28px;
  border-right: 1px solid var(--line);
  background: rgba(247, 240, 231, 0.86);
  backdrop-filter: blur(10px);
}

.rail-name {
  margin: 0 0 22px;
  color: var(--gold);
  font-size: 1.02rem;
  letter-spacing: 0.42em;
}

.rail-rule {
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--champagne), transparent);
}

.rail-rule::after {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  margin: -4px auto 0;
  transform: rotate(45deg);
  background: var(--gold);
}

.rail-sub,
.rail-foot {
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.rail-sub {
  margin-top: 28px;
  text-align: center;
}

.rail-foot {
  display: grid;
  gap: 10px;
  text-align: center;
}

.brand-rail img {
  align-self: center;
  opacity: 0.16;
}

main {
  margin-left: var(--rail);
}

.page {
  min-height: 100vh;
  padding: clamp(64px, 7vw, 120px) clamp(32px, 6vw, 118px);
  border-bottom: 1px solid var(--line);
  break-after: page;
}

.section-head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(42px, 6vw, 86px);
}

.section-head.centered {
  justify-items: center;
  text-align: center;
}

.title-rule {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 30px 0;
}

.title-rule::before,
.title-rule::after {
  content: "";
  width: 92px;
  height: 1px;
  background: var(--champagne);
}

.title-rule span {
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: var(--gold);
}

.cover {
  display: grid;
  align-items: center;
}

.cover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
}

.cover-copy {
  display: grid;
  justify-items: start;
}

.tagline {
  color: var(--gold);
  font-size: clamp(1rem, 1.4vw, 1.34rem);
  letter-spacing: 0.18em;
}

.cover-crest {
  margin: 0;
  display: grid;
  justify-items: center;
}

.cover-crest img {
  width: min(38vw, 390px);
  min-width: 280px;
}

.essay-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.editorial-copy,
.avoid-panel,
.attribute-grid article,
.notes-grid article,
.asset-columns article {
  background: rgba(251, 247, 240, 0.72);
}

.editorial-copy,
.avoid-panel {
  padding: clamp(28px, 4vw, 54px);
}

.editorial-copy p,
.avoid-panel p,
.notes-grid p,
.asset-columns p,
.component-stack p,
.variant-grid p,
.ring-grid p,
.composition-examples p {
  color: var(--muted);
}

.editorial-copy p + p {
  margin-top: 1rem;
}

.attribute-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  background: var(--line);
}

.attribute-grid article {
  display: grid;
  grid-template-columns: 96px 1fr;
  min-height: 116px;
  overflow: hidden;
}

.attribute-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.84) contrast(0.96);
}

.attribute-grid span {
  align-self: center;
  padding: 18px;
  color: var(--gold);
  font-family: Georgia, serif;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.symbolic-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(360px, 1fr) minmax(220px, 0.72fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.symbolic-crest {
  position: relative;
  margin: 0;
  display: grid;
  justify-items: center;
}

.symbolic-crest img {
  width: min(100%, 460px);
}

.symbolic-crest svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.symbolic-crest path {
  fill: none;
  stroke: var(--champagne);
  stroke-width: 1.2;
}

.symbolic-crest .dash {
  stroke-dasharray: 8 9;
  opacity: 0.62;
}

.callout-list {
  display: grid;
  gap: 26px;
}

.callout-list article {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.callout-list img {
  width: 72px;
  height: 96px;
  object-fit: contain;
}

.callout-list p {
  margin-top: 8px;
  color: var(--muted);
}

.construction-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 4vw, 52px);
  align-items: start;
}

.construction-sheet {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

.construction-sheet img {
  width: 100%;
}

.component-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.component-stack article {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
  background: rgba(251, 247, 240, 0.78);
}

.component-stack img {
  width: 76px;
  height: 104px;
  object-fit: contain;
}

.variant-grid,
.application-grid,
.notes-grid,
.asset-columns {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

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

.variant-grid article,
.application-grid article,
.ring-grid article,
.composition-examples article {
  background: rgba(251, 247, 240, 0.74);
}

.variant-grid article {
  min-width: 0;
  padding: 32px 24px;
  text-align: center;
}

.variant-pair {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 1px;
  margin-bottom: 24px;
  background: var(--line);
  border: 1px solid rgba(155, 106, 47, 0.2);
}

.variant-pair figure {
  margin: 0;
  padding: 16px 12px 12px;
  background: rgba(251, 247, 240, 0.86);
}

.variant-pair img {
  width: 100%;
  height: 210px;
  object-fit: contain;
}

.variant-pair figure:last-child img {
  object-fit: cover;
}

.variant-pair figcaption {
  margin-top: 10px;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
}

.variant-grid h3,
.application-grid h3,
.ring-grid h3,
.composition-examples h3 {
  margin-bottom: 10px;
}

.guideline-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 52px;
  border: 1px solid var(--line);
  background: var(--line);
}

.guideline-band p {
  padding: 30px;
  background: rgba(251, 247, 240, 0.76);
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 1.08rem;
}

.application-rules {
  margin: -18px 0 52px;
}

.colorway-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.colorway-row figure {
  margin: 0;
  padding: 34px 20px 28px;
  background: rgba(251, 247, 240, 0.72);
  text-align: center;
}

.colorway-row figure.dark {
  background: var(--charcoal);
}

.colorway-pair {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 26px;
}

.colorway-pair img {
  width: 100%;
  height: 205px;
  object-fit: contain;
  background: rgba(251, 247, 240, 0.55);
}

figcaption {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 0.86rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.dark figcaption {
  color: var(--champagne);
}

.ring-hero {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}

.ring-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ring-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1px;
  margin-top: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-top: 0;
}

.ring-grid article {
  padding: 26px;
}

.ring-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 22px;
  border: 1px solid rgba(155, 106, 47, 0.18);
}

.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-bottom: 52px;
  background: var(--line);
  border: 1px solid var(--line);
}

.photo-pair figure {
  margin: 0;
  background: var(--paper);
}

.photo-pair img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

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

.application-grid article {
  padding: 18px;
}

.application-grid img {
  width: 100%;
  aspect-ratio: 1.46 / 1;
  object-fit: cover;
  border: 1px solid rgba(155, 106, 47, 0.16);
}

.application-grid h3 {
  margin-top: 18px;
  font-size: 0.78rem;
}

.type-color-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.type-specimen,
.palette {
  background: rgba(251, 247, 240, 0.76);
  padding: clamp(28px, 4vw, 58px);
}

.specimen-display {
  margin: 12px 0 18px;
  font-size: clamp(2.3rem, 5vw, 5rem);
  letter-spacing: 0.24em;
}

.specimen-body {
  max-width: 520px;
  margin: 12px 0 38px;
  color: var(--muted);
  font-size: 1.08rem;
}

.specimen-script-mark {
  width: min(210px, 58vw);
  height: 260px;
  object-fit: contain;
  object-position: left center;
  margin-top: 16px;
}

.palette {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding: 1px;
  background: var(--line);
}

.palette article {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
  background: rgba(251, 247, 240, 0.9);
}

.palette span {
  width: 72px;
  height: 72px;
  border: 1px solid rgba(28, 26, 23, 0.16);
  background: var(--swatch);
}

.palette h3 {
  margin-bottom: 4px;
}

.palette p,
.type-specimen p {
  color: var(--muted);
}

.composition-examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 52px;
  background: var(--line);
  border: 1px solid var(--line);
}

.composition-examples article {
  padding: 34px;
  text-align: center;
}

.composition-examples img {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 auto 24px;
  object-fit: cover;
  border: 1px solid rgba(155, 106, 47, 0.18);
}

.black-example {
  background: var(--charcoal) !important;
}

.black-example p {
  color: var(--champagne);
}

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

.notes-grid article {
  min-height: 240px;
  padding: 30px;
}

.notes-grid h3,
.asset-columns h3 {
  margin-bottom: 14px;
}

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

.asset-columns article {
  padding: 36px;
}

.source-system {
  margin: 0 0 52px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.source-system img,
.asset-matrix img {
  width: 100%;
}

.asset-matrix {
  margin: 52px 0 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

.final-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 34px;
  text-align: center;
}

.final-page img {
  width: min(280px, 48vw);
}

.final-page h2 {
  max-width: 1180px;
}

@media (max-width: 1320px) {
  :root {
    --rail: 0px;
  }

  .brand-rail {
    display: none;
  }

  main {
    margin-left: 0;
  }

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

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

@media (max-width: 980px) {
  .cover-grid,
  .essay-grid,
  .symbolic-grid,
  .construction-grid,
  .ring-grid,
  .photo-pair,
  .type-color-grid,
  .asset-columns {
    grid-template-columns: 1fr;
  }

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

  .colorway-row,
  .composition-examples {
    grid-template-columns: 1fr;
  }

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

  .symbolic-crest svg {
    display: none;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 58px 20px;
  }

  h1,
  h2 {
    letter-spacing: 0.08em;
  }

  h1 {
    font-size: clamp(2.35rem, 11vw, 3.35rem);
  }

  .variant-grid,
  .attribute-grid,
  .component-stack,
  .application-grid,
  .notes-grid,
  .palette,
  .guideline-band {
    grid-template-columns: 1fr;
  }

  .component-stack article,
  .attribute-grid article,
  .palette article {
    grid-template-columns: 1fr;
  }

  .cover-crest img {
    min-width: 220px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 11mm;
  }

  html,
  body {
    background: #fff;
  }

  .brand-rail {
    display: none;
  }

  main {
    margin-left: 0;
  }

  .page {
    min-height: 0;
    padding: 18mm;
    break-after: page;
    page-break-after: always;
    border: 0;
  }

  .cover,
  .final-page {
    min-height: 170mm;
  }

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

  .application-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .notes-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .photo-pair,
  .ring-grid,
  .type-color-grid,
  .asset-columns,
  .composition-examples {
    break-inside: avoid;
  }

  .application-grid article,
  .variant-grid article,
  .notes-grid article {
    break-inside: avoid;
  }
}
