:root {
  color-scheme: dark;
  --ink: #f3e9d8;
  --night: #100c09;
  --muted: #b9aa96;
  --accent: #ed9a57;
  --ember: #e68a62;
  --green: #a4ad82;
  --surface: #1a130e;
  --line: rgba(243, 233, 216, .17);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #7f4930 var(--night); }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 16px/1.5 Arial, Helvetica, sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 38%, #8f321e35, transparent 55%),
    radial-gradient(ellipse at 20% 90%, #3943261f, transparent 50%);
  pointer-events: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
#scene { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
#scene canvas { width: 100%; height: 100%; display: block; }
.polaroid-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .4;
  mask-image: radial-gradient(ellipse at 24% 48%, #0001 12%, #0007 48%, #000 80%);
}
.polaroid-band {
  --print-size: clamp(110px, 10.5vw, 168px);
  --duration: 90s;
  --drift-delay: -14s;
  --direction: normal;
  position: absolute;
  top: 19%;
  left: -12vw;
  width: 124vw;
  transform: translateY(calc(-50% + var(--scroll-shift, 0px))) rotate(-3deg);
}
.polaroid-band:nth-child(2) { top: 52%; --duration: 110s; --drift-delay: -47s; --direction: reverse; }
.polaroid-band:nth-child(3) { top: 85%; --duration: 100s; --drift-delay: -29s; }
.polaroid-track {
  display: flex;
  width: max-content;
  animation: polaroid-drift var(--duration) linear infinite;
  animation-delay: var(--drift-delay);
  animation-direction: var(--direction);
  will-change: transform;
}
.polaroid-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-around;
  min-width: 124vw;
  gap: clamp(24px, 3vw, 52px);
  padding-inline: clamp(12px, 1.5vw, 26px);
}
.polaroid {
  flex: 0 0 var(--print-size);
  width: var(--print-size);
  filter: drop-shadow(0 16px 20px #0009);
  transform: rotate(var(--tilt));
  animation: polaroid-float 9s ease-in-out infinite alternate;
  animation-delay: var(--float-delay);
}
.polaroid img { display: block; width: 100%; height: auto; }
.polaroid-background.is-paused .polaroid-track,
.polaroid-background.is-paused .polaroid { animation-play-state: paused; }
@keyframes polaroid-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@keyframes polaroid-float {
  from { transform: translate3d(0, -6px, 0) rotate(var(--tilt)) rotateY(-8deg); }
  to { transform: translate3d(0, 8px, 0) rotate(calc(var(--tilt) + 3deg)) rotateY(8deg); }
}
.fallback {
  position: fixed;
  inset: 17% 8% 15% 56%;
  transform: rotate(9deg);
  z-index: 0;
}
.fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 20px 30px 80px #0009;
}
header {
  position: absolute;
  z-index: 4;
  top: 0;
  width: 100%;
  padding: 26px 4.4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark { font-size: 24px; font-weight: 600; letter-spacing: -1px; }
.wordmark span { font-weight: 400; color: var(--accent); margin: 0 5px; }
.edition, .header-link { font-size: 12px; letter-spacing: 1.3px; }
.edition { color: var(--green); }
.header-link { border-bottom: 1px solid var(--accent); padding-bottom: 3px; font-size: 14px; letter-spacing: 0; }
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 90px 7% 80px;
}
.hero-copy { width: min(46vw, 650px); will-change: opacity, transform; }
.hero-quote { margin: 0 0 30px; }
.hero-quote blockquote { margin: 0; }
.hero-quote figcaption { color: var(--ink); font-size: clamp(16px, 1.4vw, 20px); font-weight: 600; line-height: 1.4; letter-spacing: .04em; }
.hero-quote cite { font-style: normal; }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: 2.1px; font-weight: 600; margin: 0 0 26px; }
h1, h2, p { margin-top: 0; }
.hero-quote h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(40px, 4.35vw, 70px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.035em;
  margin-bottom: 24px;
}
h1 em, h2 em { font-weight: 400; color: var(--ember); }
.intro { color: var(--muted); font-size: 18px; line-height: 1.65; margin-bottom: 32px; max-width: 380px; }
.text-link { font-size: 14px; border-bottom: 1px solid var(--accent); padding-bottom: 8px; }
.text-link span { color: var(--accent); margin-left: 20px; }
.text-link:hover, .header-link:hover { color: var(--accent); }
.hero-bottom {
  position: absolute;
  bottom: 26px;
  left: 4.4%;
  right: 4.4%;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.3px;
  line-height: 1.8;
}
.hero-bottom span:last-child { color: var(--accent); }
.hero-bottom span:first-child { color: var(--green); }
.inside { height: 80svh; position: relative; z-index: 1; pointer-events: none; }
.spread-label { position: absolute; top: 4svh; width: 100%; text-align: center; }
.spread-label h2 { font: 400 clamp(28px, 4vw, 55px)/1.1 Georgia, serif; letter-spacing: -.03em; margin-bottom: 12px; }
.spread-label p:last-child { color: var(--muted); font-size: 15px; }
.spread-label .eyebrow { margin-bottom: 16px; }
.edition-section {
  position: relative;
  z-index: 2;
  background: var(--surface);
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding: 64px 9%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9%;
  align-items: start;
}
.author { grid-column: 1; grid-row: 1; max-width: 440px; }
.edition-copy { grid-column: 2; grid-row: 1; max-width: 500px; }
.author h2, .edition-copy h2 { font: 400 clamp(50px, 5.5vw, 86px)/1.02 Georgia, serif; letter-spacing: -.04em; margin-bottom: 24px; }
.edition-copy h2 { font-size: clamp(40px, 5.5vw, 74px); }
.edition-copy > p a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .18em; }
.edition-copy > p a:hover { color: var(--accent); }
.author > p, .edition-copy > p { color: var(--muted); font-size: 17px; line-height: 1.7; }
.author .eyebrow, .edition-copy .eyebrow { color: var(--green); font-size: 12px; }
dl { margin: 28px 0; font-size: 14px; }
dl div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
dd { margin: 0; text-align: right; }
dt { color: var(--muted); }
.purchase { border: 0; border-radius: 0; background: var(--accent); color: #26150d; padding: 18px 23px; width: 100%; cursor: pointer; text-align: center; }
.purchase:not(:disabled):hover { background: #f3b27c; }
.purchase:disabled { cursor: default; opacity: .75; }
.purchase-note { font-size: 13px !important; margin-top: 15px !important; min-height: 44px; }
footer { position: relative; z-index: 2; background: var(--surface); color: var(--muted); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 22px 4.4%; font-size: 11px; letter-spacing: 1px; }
footer a { color: var(--ink); text-decoration: underline; font-size: 12px; }
.noscript { position: fixed; bottom: 0; background: #21190f; color: var(--ink); z-index: 9; padding: 20px; width: 100%; }

@media (max-width: 700px) {
  .polaroid-background { mask-image: radial-gradient(ellipse at 50% 28%, #0001 12%, #0009 55%, #000 90%); }
  .polaroid-band { --print-size: 110px; }
  header { padding: 19px 6%; }
  .edition { display: none; }
  .hero { min-height: 620px; padding: 100px 7% 80px; align-items: flex-start; }
  .hero-copy { padding-top: 20px; width: 100%; }
  .hero-quote h1 { font-size: clamp(32px, 8.2vw, 50px); margin-bottom: 18px; }
  .hero-quote { margin-bottom: 26px; }
  .hero-quote figcaption { font-size: 16px; }
  .intro { font-size: 16px; max-width: 280px; }
  .eyebrow { font-size: 11px; margin-bottom: 19px; }
  .hero-bottom { font-size: 10px; left: 6%; right: 6%; }
  .hero-bottom span:last-child { max-width: 110px; text-align: right; }
  .spread-label h2 { font-size: 30px; }
  .spread-label { top: 5svh; padding: 0 6%; }
  .edition-section { grid-template-columns: 1fr; padding: 40px 7%; gap: 22px; }
  .author, .edition-copy { grid-column: auto; grid-row: auto; }
  .author { border-top: 1px solid var(--line); padding-top: 32px; }
  .author h2, .edition-copy h2 { font-size: 56px; }
  .edition-copy h2 { font-size: clamp(40px, 11.5vw, 56px); }
  .fallback { inset: 53% 15% 9% 32%; }
  footer { flex-wrap: wrap; font-size: 10px; padding: 22px 7%; }
}

@media (max-width: 700px) and (max-height: 740px) {
  .hero-copy { padding-top: 0; }
  .hero-copy .eyebrow { margin-bottom: 14px; }
  .hero-quote h1 { font-size: clamp(30px, 8vw, 42px); margin-bottom: 16px; }
  .hero-quote { margin-bottom: 22px; }
  .intro { margin-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy { will-change: auto; }
  .polaroid-track, .polaroid { animation: none; will-change: auto; }
}
