@font-face {
  font-family: "Barlow Condensed";
  src: url("./fonts/barlow-condensed-extra-bold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("./fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --ink: #241532;
  --plum: #371f4b;
  --paper: #fffaf1;
  --gold: #ffcd48;
  --lilac: #be9ae7;
  --display: "Barlow Condensed", Impact, sans-serif;
  font: 100%/1.55 "DM Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid #873fb5; outline-offset: 5px; }
header :focus-visible, .hero :focus-visible, footer :focus-visible { outline-color: var(--gold); }
.wrap { width: min(calc(100% - 3rem), 72rem); margin-inline: auto; }
.skip {
  position: absolute;
  z-index: 5;
  left: 1rem;
  top: .5rem;
  transform: translateY(-170%);
  padding: .75rem 1.25rem;
  background: var(--paper);
}
.skip:focus { transform: none; }

.masthead, .colophon { background: var(--ink); color: var(--paper); }
.masthead { position: relative; z-index: 1; border-bottom: 1px solid #523c61; }
.masthead-inner, .footer-inner, nav { display: flex; align-items: center; }
.masthead-inner { min-height: 4.8rem; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { width: 9.2rem; }
nav { gap: clamp(1rem, 3vw, 2.25rem); }
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .94rem;
  font-weight: 650;
  text-decoration: none;
}
.nav-text:hover, footer nav a:hover { text-decoration: underline; text-underline-offset: .3em; }
.nav-button { border: 1px solid #ac9264; border-radius: .25rem; color: #ffdfa0; padding: .45rem 1.15rem; }
.nav-button:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--plum);
  color: var(--paper);
  border-bottom: .3rem solid var(--ink);
}
/* Printed dots and rays gather behind the poster, leaving the copy on solid ink. */
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero::before {
  background: repeating-conic-gradient(from 14deg at 76% 52%, transparent 0deg 11deg, #452857 11deg 13deg, transparent 13deg 22deg);
  mask-image: linear-gradient(90deg, transparent 4%, #000 82%);
}
.hero::after {
  background-image: radial-gradient(#b688d3 1px, transparent 1.4px);
  background-size: 6px 6px;
  opacity: .34;
  mask-image: linear-gradient(145deg, transparent 52%, #000);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(3.5rem, 5vw, 5rem);
}
.hero-copy { padding-bottom: .4rem; }
h1, h2, summary { font-family: var(--display); font-weight: 800; }
h1 {
  font-size: clamp(4rem, 7.8vw, 7.6rem);
  letter-spacing: -.028em;
  line-height: .92;
  text-transform: uppercase;
  text-shadow: .035em .045em 0 #1c1028;
}
h1 span { display: block; }
.hero-copy p { max-width: 30rem; margin-block: 1.65rem 1.85rem; font-size: 1.13rem; line-height: 1.65; color: #f4e9fa; }
.guide-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 3.2rem;
  padding: .8rem 1.45rem;
  background: var(--gold);
  border: 2px solid var(--ink);
  border-radius: .3rem;
  box-shadow: 4px 4px 0 #1b1025;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}
.guide-button:hover { background: #ffda70; }
.book { display: inline-flex; width: 1.2rem; height: .9rem; }
.book::before, .book::after { content: ""; flex: 1; border: 1.6px solid currentColor; }
.book::before { border-radius: 2px 4px 0 1px; transform: skewY(8deg); }
.book::after { border-radius: 4px 2px 1px 0; transform: skewY(-8deg); margin-left: -1px; }

.cover { position: relative; width: min(100% - 2rem, 27.5rem); justify-self: center; isolation: isolate; }
.cover::before {
  content: "";
  position: absolute;
  inset: 2% -1.5% -1.5% 2%;
  background: var(--lilac);
  transform: rotate(-4deg);
  border: 2px solid var(--ink);
}
.poster {
  display: block;
  position: relative;
  padding: clamp(5px, .75vw, 10px);
  transform: rotate(3deg);
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 5px 6px 0 #21142b;
}
.poster img { width: 100%; }
.spark {
  position: absolute;
  z-index: 1;
  width: clamp(2rem, 4vw, 3.7rem);
  aspect-ratio: 1;
  background: var(--gold);
  clip-path: polygon(51% 0, 60% 39%, 100% 49%, 62% 61%, 49% 100%, 38% 62%, 0 51%, 37% 38%);
}
.spark-top { right: -7%; top: -4%; transform: rotate(11deg); }
.spark-bottom { left: -7%; bottom: 4%; width: clamp(1.4rem, 2.5vw, 2.3rem); }

.dictionary { padding-block: clamp(3.25rem, 5.5vw, 5.5rem); scroll-margin-top: 1.5rem; }
.dictionary-inner { display: grid; grid-template-columns: .95fr 1.2fr; gap: clamp(2rem, 6.5vw, 6.5rem); }
h2 { font-size: clamp(3rem, 4.5vw, 4.35rem); line-height: 1; letter-spacing: -.025em; }
.dictionary-intro p { max-width: 23rem; margin-top: 1rem; color: #594c59; line-height: 1.7; }
.entries { border-top: 2px solid var(--ink); }
details { border-bottom: 1px solid #cfc4c3; }
summary {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding-block: 1rem;
  font-size: 1.9rem;
  line-height: 1.1;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary:hover { color: #683c80; }
.toggle { margin-left: auto; position: relative; width: 1.1rem; height: 1.1rem; }
.toggle::before, .toggle::after { content: ""; position: absolute; background: currentColor; inset: calc(50% - 1px) 0; }
.toggle::after { transform: rotate(90deg); }
details[open] .toggle::after { display: none; }
.definition { max-width: 58ch; padding: 0 2rem 1.45rem 0; color: #4e434d; line-height: 1.65; }

.footer-inner { padding-block: 1.55rem; gap: 2rem; }
footer .brand img { width: 7rem; }
footer nav { margin-left: auto; }
footer small { border-left: 1px solid #725c7d; padding-left: 1.5rem; color: #dccee3; }

@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.8rem; padding-block: 3rem; }
  .hero-copy { max-width: 34rem; }
  h1 { font-size: clamp(4.1rem, 12vw, 6.1rem); }
  .hero-copy p { margin-block: 1.2rem 1.4rem; font-size: 1.05rem; }
  .cover { width: min(78vw, 22rem); }
  .dictionary-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .dictionary-intro p { max-width: 34rem; }
  .footer-inner { flex-wrap: wrap; gap: .65rem 1.7rem; }
  footer small { border: 0; padding: 0; }
}

@media (max-width: 520px) {
  .wrap { width: calc(100% - 2.25rem); }
  .masthead-inner { min-height: 4.2rem; gap: .4rem; }
  .masthead .brand img { width: clamp(5.25rem, 23vw, 7rem); }
  .masthead nav { gap: .7rem; }
  .masthead nav a { font-size: .875rem; }
  .nav-button { padding-inline: .6rem; }
  .definition { padding-left: 0; padding-right: .5rem; }
  .footer-inner { display: grid; gap: .6rem; }
  footer nav { margin: 0; flex-wrap: wrap; gap: .2rem 1.4rem; }
}
