:root {
  --night: #14112a;
  --night-2: #1d1938;
  --oxblood: #7a2632;
  --oxblood-deep: #5e1a25;
  --gold: #cfaa6e;
  --gold-soft: #e4cc9f;
  --sky: #f6e4a6;
  --ivory: #f7efe0;
  --ivory-dim: #c9c1d6;
  --serif: "Gloock", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spine: 3.25rem;
  --gutter: clamp(1.25rem, 5vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  scrollbar-color: var(--gold) var(--night);
}
::selection { background: var(--gold); color: var(--night); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.close :focus-visible { outline-color: var(--night); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -.01em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

/* ───── Hero: the wraparound cover, opened flat ───── */
.hero {
  position: relative;
  height: 100svh;
  min-height: 40rem;
  overflow: hidden;
  background: var(--night);
  perspective: 2400px;
}
.cover { position: absolute; inset: 0; transform-style: preserve-3d; }
.cover-half { position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; }
.cover-half img {
  position: absolute; top: 0; height: 100%; width: 200%; max-width: none;
  object-fit: cover; object-position: 50% 6%;
}
.cover-left { left: 0; transform-origin: 100% 50%; backface-visibility: hidden; }
.cover-left img { left: 0; }
.cover-right { right: 0; }
.cover-right img { left: -100%; }
/* scrim under the back-cover copy, drawn on the left board only */
.cover-left::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgb(20 17 42 / .96) 0%, rgb(20 17 42 / .86) 26%, rgb(20 17 42 / 0) 62%),
    linear-gradient(to right, rgb(20 17 42 / .5), rgb(20 17 42 / 0) 70%);
}
.cover-right::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgb(20 17 42 / .55), rgb(20 17 42 / 0) 22%);
}

.spine {
  position: absolute; z-index: 3; top: 0; bottom: 0; left: 50%;
  width: var(--spine); margin-left: calc(var(--spine) / -2);
  background: var(--night);
  border-inline: 1px solid rgb(207 170 110 / .55);
  box-shadow: 0 0 2.5rem .25rem rgb(8 6 20 / .55);
  display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  padding: 1.5rem 0 1rem;
  writing-mode: vertical-rl;
  font-size: .75rem; font-weight: 500; font-stretch: 112%;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-soft);
}
.spine a { text-decoration: none; padding: .6rem 0; transition: color .25s; }
.spine a:hover { color: #fff; }
.spine-title { display: block; padding: 0 !important; }
.spine-title img { display: block; width: 5.6rem; max-width: none; height: auto; transform: rotate(90deg); margin: 1.3rem -1.4rem; transition: filter .25s; }
.spine-title:hover img { filter: brightness(1.15); }
.spine-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; }
.spine-author { color: var(--ivory-dim); }
.lang {
  writing-mode: horizontal-tb;
  font: inherit; letter-spacing: .08em; color: var(--ivory-dim);
  background: none; border: 0; padding: .5rem 0; cursor: pointer;
  display: grid; gap: .15rem; text-align: center;
}
.lang span { display: block; padding: .1rem .3rem; }
html[lang^="pt"] .lang [data-lang="pt"],
html[lang^="en"] .lang [data-lang="en"] { color: var(--night); background: var(--gold); }

.back-cover {
  position: absolute; z-index: 2;
  left: var(--gutter); bottom: clamp(2rem, 7vh, 4.5rem);
  width: min(31rem, calc(50vw - var(--gutter) - var(--spine)));
}
.back-cover h1 { font-size: clamp(2.4rem, 4.3vw, 4.25rem); }
.lede { margin-top: 1.1rem; max-width: 27rem; color: #e9e2ee; }

.waitlist {
  margin-top: 1.75rem;
  --line: var(--gold);
  display: grid; grid-template-columns: 1fr auto; gap: 0;
}
.waitlist input {
  min-width: 0;
  font: inherit; color: var(--ivory); caret-color: var(--gold);
  background: transparent; border: 0; padding: .9rem .25rem .9rem 0;
}
.waitlist input::placeholder { color: #b9b0c9; opacity: 1; }
.waitlist input:focus-visible { outline: none; }
.waitlist:focus-within { --line: #fff; }
.waitlist button {
  font: inherit; font-size: .8125rem; font-weight: 600; font-stretch: 110%;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--night); background: var(--gold);
  border: 0; padding: 0 1.4rem; margin: .35rem 0; cursor: pointer;
  transition: background .25s, transform .25s var(--ease);
}
.waitlist button:hover { background: #fff; }
.waitlist button:active { transform: translateY(1px); }
.waitlist button[disabled] { opacity: .6; cursor: progress; }
.form-status {
  grid-column: 1 / -1; order: 3;
  font-size: .875rem; line-height: 1.45; color: var(--gold-soft);
  min-height: 0; margin: 0;
  border-top: 1px solid var(--line); box-shadow: 0 -1px 0 0 transparent;
  transition: border-color .25s;
}
.form-status:not(:empty) { padding: .7rem 0 .2rem; }
.waitlist.is-error { --line: #ff9d8a; }
.waitlist.is-error .form-status { color: #ffb5a6; }

.ticket {
  --ccxp-blue: #1f2a9c; --ccxp-orange: #f7a51c;
  position: absolute; z-index: 2;
  right: var(--gutter); bottom: clamp(2rem, 7vh, 4.5rem);
  width: 14.5rem; padding: 2.1rem 1.25rem 2rem;
  display: grid; justify-items: center; gap: .55rem;
  background: var(--ccxp-blue); color: #fff;
  text-decoration: none; text-align: center; text-transform: uppercase; line-height: 1;
  box-shadow: 0 .8rem 2rem -.4rem rgb(8 6 20 / .65);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; left: .9rem; right: .9rem; height: .5rem;
  background: radial-gradient(circle at 50% 100%, var(--ccxp-orange) 0 .5rem, transparent calc(.5rem + .5px)) 50% 0 / 1.3rem .5rem repeat-x;
}
.ticket::before { top: .55rem; }
.ticket::after { bottom: .55rem; transform: scaleY(-1); }
.ticket:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 1.2rem 2.4rem -.4rem rgb(8 6 20 / .75); }
.ticket-area { font-size: 1.5rem; font-weight: 900; font-style: italic; font-stretch: 110%; letter-spacing: -.01em; line-height: .92; max-width: 8ch; }
.ticket-table {
  margin-top: .35rem; padding: .45rem 1rem .4rem;
  background: var(--ccxp-orange); color: var(--ccxp-blue);
  font-size: 1.05rem; font-weight: 800; font-stretch: 112%; letter-spacing: .08em;
}
.ticket-date { text-wrap: balance; font-size: .75rem; font-weight: 600; font-stretch: 105%; letter-spacing: .1em; line-height: 1.3; }
.ticket-cta { font-size: 1.45rem; font-weight: 800; font-stretch: 62%; letter-spacing: .01em; }
.ticket-event { margin-top: .2rem; font-size: 1.05rem; font-weight: 900; font-stretch: 125%; letter-spacing: .02em; }
.ticket-event b { color: var(--ccxp-orange); font-weight: inherit; }
.spark { position: absolute; width: 1rem; height: 1rem; fill: #fff; }
.spark-a { top: 1.5rem; right: .9rem; }
.spark-b { bottom: 3.6rem; left: .8rem; width: .7rem; height: .7rem; }

.shop {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .9375rem; color: var(--gold-soft);
  text-decoration: underline; text-decoration-color: rgb(207 170 110 / .6);
  transition: color .25s, text-decoration-color .25s;
}
.shop:hover { color: #fff; text-decoration-color: #fff; }
.shop svg { width: .8em; height: .8em; flex: none; transition: transform .3s var(--ease); }
.shop:hover svg { transform: translate(2px, -2px); }
.back-cover .shop { margin-top: 1.4rem; }
.shelf {
  max-width: 74rem; margin: clamp(2.5rem, 5vw, 4rem) auto 0; padding-top: 1.6rem;
  border-top: 1px solid rgb(207 170 110 / .4);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem;
  font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.2;
}
.shelf .shop { font-family: var(--sans); font-size: 1.0625rem; }

/* ───── Look closer ───── */
.look { padding: clamp(5rem, 11vw, 9rem) var(--gutter) clamp(5rem, 10vw, 8rem); }
.look-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  gap: 1.5rem 4rem; align-items: end;
  max-width: 74rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}
.look-head h2 { font-size: clamp(3rem, 7.4vw, 6rem); }
.look-head p { color: var(--ivory-dim); padding-bottom: .6rem; }

.print { max-width: 74rem; margin: 0 auto; }
.stage {
  position: relative; overflow: hidden;
  outline: 1px solid rgb(207 170 110 / .5); outline-offset: .75rem;
  cursor: none; touch-action: pan-y;
  box-shadow: 0 2.5rem 5rem -2rem rgb(0 0 0 / .7);
}
.stage img { width: 100%; }
.loupe {
  --lx: 36%; --ly: 42%; --size: clamp(8.5rem, 17vw, 15rem);
  position: absolute; left: var(--lx); top: var(--ly);
  width: var(--size); height: var(--size); margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  border-radius: 50%;
  border: 2px solid var(--gold);
  background-color: var(--night);
  background-image: url("assets/cast-2880.jpg");
  background-repeat: no-repeat;
  box-shadow: 0 1.2rem 2.4rem -.4rem rgb(0 0 0 / .65), inset 0 0 0 1px rgb(255 255 255 / .35), inset 0 0 1.5rem rgb(20 17 42 / .35);
  touch-action: none; cursor: grab;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease);
}
.loupe:active { cursor: grabbing; }
.print figcaption {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 1.6rem;
  font-size: .75rem; font-weight: 500; font-stretch: 110%;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ivory-dim);
}
.hint { color: var(--gold); }

.covers-head {
  max-width: 74rem; margin: clamp(4.5rem, 9vw, 7.5rem) auto clamp(2rem, 4vw, 3rem);
  font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; line-height: 1.05;
  font-size: clamp(2rem, 4vw, 3.25rem);
}
.covers {
  list-style: none; padding: 0;
  max-width: 74rem; margin: 0 auto;
  display: grid; grid-template-columns: 3fr 3fr 4fr 3fr; gap: clamp(1rem, 2.6vw, 2.25rem);
  align-items: end;
}
.cover-item a { display: grid; gap: .3rem; text-decoration: none; }
.cover-item img {
  width: 100%; margin-bottom: .8rem;
  box-shadow: 0 1.4rem 2.2rem -1rem rgb(0 0 0 / .8);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.cover-item a:hover img, .cover-item a:focus-visible img { transform: translateY(-.6rem); box-shadow: 0 2.4rem 2.6rem -1.2rem rgb(0 0 0 / .85); }
.cover-title { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ivory); }
.is-new .cover-title { color: var(--gold); }
.cover-note { min-height: 3em; font-size: .75rem; font-weight: 500; font-stretch: 110%; letter-spacing: .14em; text-transform: uppercase; line-height: 1.5; color: var(--ivory-dim); }
.cover-item a:hover .cover-note { color: #fff; }

/* ───── CCXP ───── */
.ccxp {
  background: var(--oxblood); color: var(--ivory);
  padding: clamp(4.5rem, 9vw, 8rem) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 6rem); align-items: center;
}
.table-no {
  font-family: var(--serif); font-weight: 600; font-style: italic;
  font-size: clamp(7rem, 24vw, 21rem); line-height: .8; letter-spacing: -.03em;
  color: var(--gold-soft); text-align: right; white-space: nowrap;
}
.ccxp-copy { max-width: 30rem; }
.ccxp h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); }
.ccxp-copy > p { margin-top: 1.2rem; color: #f3dfd9; }
.ccxp dl { margin: 2.2rem 0 0; border-top: 1px solid rgb(228 204 159 / .5); }
.ccxp dl div {
  display: grid; grid-template-columns: 7rem 1fr; padding: .65rem 0;
  border-bottom: 1px solid rgb(228 204 159 / .5);
}
.ccxp dt { font-size: .75rem; font-weight: 500; font-stretch: 110%; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); align-self: center; }
.ccxp dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }

/* ───── Close ───── */
.close {
  background: var(--sky); color: var(--night);
  padding: clamp(5rem, 11vw, 9.5rem) var(--gutter);
  text-align: center;
}
.close h2 { font-size: clamp(2.8rem, 7vw, 6rem); }
.close > p { margin-top: 1.2rem; color: #3a3352; }
.waitlist-light { --line: var(--night); max-width: 32rem; margin: 2.4rem auto 0; text-align: left; }
.waitlist-light input { color: var(--night); caret-color: var(--oxblood); }
.waitlist-light input::placeholder { color: #5c5470; }
.waitlist-light:focus-within { --line: var(--oxblood); }
.waitlist-light button { background: var(--night); color: var(--sky); }
.waitlist-light button:hover { background: var(--oxblood); }
.waitlist-light .form-status { color: #3a3352; }
.waitlist-light.is-error { --line: #a01b1b; }
.waitlist-light.is-error .form-status { color: #8a1414; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem;
  padding: 1.6rem var(--gutter);
  font-size: .75rem; font-weight: 500; font-stretch: 110%;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ivory-dim);
}
.foot span:first-child { font-family: var(--serif); font-weight: 700; font-size: .95rem; letter-spacing: .14em; color: var(--ivory); }

/* ───── Motion: the cover opens once ───── */
@media (prefers-reduced-motion: no-preference) {
  .cover-left { animation: open 1.5s var(--ease) both; }
  .spine { animation: rise .9s var(--ease) .15s both; }
  .back-cover, .ticket { animation: settle 1s var(--ease) .75s both; }
  @keyframes open {
    from { transform: rotateY(-96deg); filter: brightness(.25); }
    to { transform: none; filter: none; }
  }
  @keyframes rise { from { clip-path: inset(50% 0); } to { clip-path: inset(0); } }
  @keyframes settle { from { opacity: 0; transform: translateY(1rem); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}

/* ───── Narrow: the book closes to its front cover ───── */
@media (max-width: 820px) {
  .hero { height: auto; min-height: 0; perspective: none; display: flex; flex-direction: column; }
  .cover { position: relative; inset: auto; height: 52svh; min-height: 20rem; order: 2; }
  .cover-left { display: none; }
  .cover-right { width: 100%; }
  .cover-right img { left: 0; width: 100%; object-position: 76% 0; }
  .cover-right::after { background: linear-gradient(to top, var(--night), rgb(20 17 42 / 0) 30%); }
  .spine {
    position: relative; order: 1; left: auto; top: auto; bottom: auto; width: auto; margin: 0;
    writing-mode: horizontal-tb; flex-direction: row; padding: .55rem var(--gutter);
    border-inline: 0; border-bottom: 1px solid rgb(207 170 110 / .55); box-shadow: none; animation: none;
  }
  .spine-links, .spine-author { display: none; }
  .spine-title img { width: 5.2rem; transform: none; margin: 0; }
  .lang { display: flex; gap: .2rem; }
  .back-cover { position: relative; order: 3; left: auto; bottom: auto; width: auto; padding: .5rem var(--gutter) 2.5rem; margin-top: -1.5rem; }
  .back-cover h1 { font-size: clamp(2.3rem, 10.5vw, 3.4rem); }
  .ticket { order: 4; position: relative; right: auto; bottom: auto; width: auto; margin: 0 var(--gutter) 3rem; box-shadow: none; }
  .ticket-area { max-width: none; }

  .look-head { grid-template-columns: 1fr; }
  .look-head p { padding-bottom: 0; }
  .stage { outline-offset: .4rem; }
  .covers { grid-template-columns: 1fr 1fr; gap: 2.2rem 1rem; align-items: start; }
  .ccxp { grid-template-columns: 1fr; }
  .table-no { text-align: left; font-size: clamp(7rem, 40vw, 13rem); }
}
@media (max-width: 420px) {
  .waitlist { grid-template-columns: 1fr; }
  .waitlist input { border-bottom: 1px solid var(--line); }
  .waitlist button { margin: .9rem 0 0; padding: 1rem 1.4rem; }
  .form-status { border-top: 0; }
}
