@font-face {
  font-family: Book;
  src: url(assets/headline.otf) format("opentype");
  font-display: swap;
  font-weight: 700;
}

:root {
  --ink: #392538;
  --muted: #694f61;
  --paper: #fff9ee;
  --coral: #ab294f;
  --rule: #e3d4c8;
  --violet: #6b4fe6;
  --serif: Book, Georgia, serif;
  --gutter: clamp(20px, 6vw, 108px);
  --section-padding: clamp(42px, 6vw, 100px);
  --header-height: 73px;
  color: var(--ink);
  background: var(--paper);
  font: 100%/1.5 "Trebuchet MS", system-ui, sans-serif;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
  overscroll-behavior-y: none;
}

* { box-sizing: border-box; }
body { margin: 0; overflow-x: clip; }
button, a { color: inherit; font: inherit; }
a { text-decoration: none; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, .stage:focus-visible {
  outline: 3px solid #17668a;
  outline-offset: 4px;
}
[hidden] { display: none !important; }
::selection { background: #f5b3a1; color: var(--ink); }

.sr-only, .stage:not(:focus-visible) #keyboard-hint, .stage:focus-visible #gesture-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  z-index: 20;
  left: 12px;
  top: -100px;
  padding: 12px;
  background: white;
}
.skip:focus { top: 8px; }

#site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.header-inner, .footer-inner {
  max-width: 1540px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-inline: var(--gutter);
}
.header-inner { min-height: var(--header-height); }
.wordmark {
  font: 700 1.85rem/1 var(--serif);
  letter-spacing: -.04em;
  white-space: nowrap;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
}
.logo .bao-mark { width: 44px; height: 44px; }
nav { display: flex; align-items: center; gap: clamp(8px, 2vw, 30px); }
nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-weight: 700;
}
nav > a:hover { text-decoration: underline; text-underline-offset: 5px; }

.hero, .section-inner, .shop-inner {
  max-width: 1540px;
  margin-inline: auto;
  padding: var(--section-padding) var(--gutter);
}
.hero, .section-inner {
  display: grid;
  align-items: center;
  gap: clamp(24px, 4.5vw, 88px);
}
.hero {
  position: relative;
  grid-template-columns: .88fr 1.12fr;
  min-height: min(720px, 77vh);
}
h1, h2 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(4.1rem, 8vw, 7.2rem); }
h2 { font-size: clamp(2.7rem, 5vw, 5rem); }
em { color: var(--coral); font-family: Georgia, serif; font-weight: 400; }
p {
  color: var(--muted);
  max-width: 42ch;
  font-size: 1.07rem;
  margin: 1rem 0 0;
}
.lead {
  font: 700 clamp(1.45rem, 2.25vw, 2.25rem)/1.19 var(--serif);
  max-width: 16em;
  color: var(--ink);
  margin: 18px 0 0;
}
.actions { margin-top: 28px; }
.buy-wrap { position: relative; display: inline-flex; }
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75em;
  min-height: 48px;
  border-radius: 30px;
  padding: 10px 27px;
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  transition: background .18s;
}
.button:hover, .button:focus-visible { background: #59334e; }
#buy-hero { min-width: 124px; padding-inline: 24px 52px; }
#purchase { min-width: 190px; padding-inline: 25px 57px; }
.nav-buy { min-height: 44px; padding: 7px 24px; }
.button-arrow,
.button-sketch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.button-arrow { stroke: currentColor; }
.button-sketch { stroke: #ffc6a3; }
.button-arrow path { vector-effect: non-scaling-stroke; }
.button-sketch path {
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
}
@keyframes sketch-draw {
  0% { opacity: 0; stroke-dashoffset: 1; }
  8% { opacity: 1; }
  100% { opacity: 1; stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .button:focus-visible .button-sketch path { animation: sketch-draw .58s ease-out both; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .button:hover .button-sketch path { animation: sketch-draw .58s ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
  .button:is(:active,:focus-visible) .button-sketch path { opacity: 1; stroke-dashoffset: 0; }
}
@media (hover: hover) and (prefers-reduced-motion: reduce) {
  .button:hover .button-sketch path { opacity: 1; stroke-dashoffset: 0; }
}
#availability-note:not(:empty) {
  position: absolute;
  z-index: 5;
  left: 0;
  top: calc(100% + 7px);
  width: max-content;
  max-width: min(270px, 80vw);
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 4px 14px #39253812;
  color: var(--ink);
  font-size: .88rem;
  text-align: left;
}
nav #availability-note:not(:empty) { left: auto; right: 0; }

.stage {
  position: relative;
  isolation: isolate;
  border-radius: 48% 48% 20px 20px / 38% 38% 20px 20px;
  aspect-ratio: 1.12;
  max-height: 590px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 10px 12px;
  cursor: grab;
  touch-action: pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}
.stage:active { cursor: grabbing; }
.rainbow {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 93%, #fff2d3 0 44%, #ffe07a 44.2% 51%, #ffb775 51.2% 58%, #f78ba5 58.2% 65%, #d68bdc 65.2% 72%, #a6a4e6 72.2% 79%, #88cfe4 79.2% 86%, #a2dfbb 86.2%);
}
.performer {
  position: absolute;
  z-index: 2;
  inset: 0 2% 8%;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.portrait, #viewer { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.portrait { z-index: 1; filter: drop-shadow(0 10px 12px #59304d19); transform-origin: 50% 85%; }
.entrance-light {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  inset: 0;
  background: #fff;
  opacity: 0;
  visibility: hidden;
}
html[data-opening="playing"] .stage { z-index: 12; }
html[data-opening="playing"] .entrance-light { visibility: visible; }
.gesture-hint {
  position: relative;
  pointer-events: none;
  margin: 0;
  max-width: 100%;
  padding: 5px 14px;
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  font-size: .82rem;
  text-align: center;
}
.spark {
  position: absolute;
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 62%, 50% 100%, 37% 62%, 0 50%, 37% 37%);
  background: #fff9ee;
}
.s1 { width: 29px; height: 45px; left: 12%; top: 32%; }
.s2 { width: 20px; height: 31px; right: 13%; top: 20%; }
.s3 { width: 14px; height: 24px; right: 8%; top: 55%; }

.section-inner { grid-template-columns: 1fr 1fr; }
.film { background: #f3e2f2; }
.color-dance { background: #fff0d4; }
.film-copy, .shop h2 { min-width: 0; max-width: 100%; }

/* Reserve each line in its heading before the lettering module arrives. */
[data-lettering] {
  position: relative;
  display: inline-block;
  vertical-align: top;
  max-width: 100%;
  height: .97em;
  text-align: inherit;
}
[data-lettering="debut"] { width: 5.3em; }
[data-lettering="color"] { width: 3.74em; height: 1.22em; }
[data-lettering="home"] { width: 5.74em; }
[data-lettering][data-ink] > span {
  position: absolute;
  inset: 0;
  overflow: hidden;
  white-space: nowrap;
  color: transparent;
}
.ink-art {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.ink-strokes, .sketch-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ink-strokes { stroke: currentColor; stroke-width: 3.25; }
[data-ink="ready"] .ink-strokes path, [data-ink="writing"] .ink-strokes path {
  visibility: hidden;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}
.ink-pencil { visibility: hidden; }
[data-ink="writing"] .ink-pencil { visibility: visible; }
.margin-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.sketch-line { stroke-width: 1.8; }
.debut-marks { stroke: #a64b98; }
.debut-marks .glint { stroke: #8741a5; stroke-width: 2.2; }
.dance-ribbon path:nth-child(1) { stroke: #cf4976; stroke-width: 2.2; }
.dance-ribbon path:nth-child(2) { stroke: #d99a2a; }
.dance-ribbon path:nth-child(3) { stroke: #7752c2; }
@keyframes margin-stroke { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) {
  [data-ink-chapter="ready"] :is(.sketch-line,.shop-rainbow path) { visibility: hidden; }
  [data-ink-chapter="writing"] :is(.sketch-line,.shop-rainbow path) {
    stroke-dasharray: 1 1;
    animation: margin-stroke .74s ease-out .2s both;
  }
  [data-ink-chapter="writing"] .shop-rainbow path:nth-child(2n) { animation-delay: .32s; }
  [data-ink-chapter="writing"] .shop-rainbow path:nth-child(3n) { animation-delay: .46s; }
}
@media print, (forced-colors: active) {
  [data-lettering][data-ink] > span { position: static; color: inherit; }
  .ink-art, .margin-art { display: none; }
}
.movie {
  position: relative;
  justify-self: center;
  width: min(100%, 435px);
}
.movie video {
  width: 100%;
  height: auto;
  display: block;
  background: #4f3540;
}
.debut-movie { border-radius: 48% 48% 16px 16px / 35% 35% 16px 16px; }
.debut-movie video { border-radius: inherit; }
.dance-movie video { border-radius: 18px; }
.dance-movie:has(#color-play[role="button"]) video:not([controls]) { cursor: pointer; }
.film-copy { justify-self: center; }
#ambient-toggle {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: inherit;
  padding: 0;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}
#color-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgb(255 249 238 / 76%);
  border-radius: 50%;
  color: var(--ink);
  background: rgb(255 249 238 / 38%);
  box-shadow: 0 1px 4px rgb(57 37 56 / 18%);
  transition: background .18s;
}
#color-play:is(:hover,:focus-visible) { background: rgb(255 249 238 / 67%); }
#color-play svg { width: 22px; height: 22px; fill: currentColor; }
.media-status:empty { display: none; }
.media-status { font-size: .9rem; }

.shop-inner {
  display: grid;
  position: relative;
  justify-items: center;
  gap: 26px;
  text-align: center;
  padding-block: clamp(60px, 8vw, 118px);
}
.shop-rainbow {
  width: clamp(67px, 5.6vw, 84px);
  height: auto;
  transform: rotate(-4deg);
}
.shop #availability-note:not(:empty) { left: 50%; transform: translateX(-50%); }

footer { border-top: 1px solid var(--rule); }
.footer-inner { padding-block: 25px; }
.footer-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
#footer-bao, #back-to-top, #powered-by {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
#footer-bao {
  background: transparent;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transform-origin: 50% 85%;
}
#footer-bao img { display: block; width: 46px; height: 46px; }
#powered-by {
  gap: 5px;
  color: var(--muted);
  font-size: .87rem;
  white-space: nowrap;
  transition: color .2s;
}
#powered-by strong { font: 700 .91rem/1 system-ui, sans-serif; letter-spacing: .06em; }
#powered-by svg { width: 21px; height: 21px; margin-left: 2px; }
#powered-by:hover, #powered-by:focus-visible { color: var(--violet); }
.n-ascent { stroke-dasharray: 1; stroke-dashoffset: 1; }
#back-to-top {
  width: 54px;
  height: 54px;
  border: 1px solid #ad938d;
  border-radius: 50% 46% 49% 44%;
}
#back-to-top svg {
  width: 26px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes arrow-rise {
  45% { transform: translateY(-4px) rotate(-5deg); }
  75% { transform: translateY(1px); }
}
@keyframes bao-spin { to { transform: rotate(1turn); } }
@keyframes trace-ascent { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: no-preference) {
  #footer-bao:focus-visible img { animation: bao-spin .65s ease-in-out; }
  #back-to-top:focus-visible svg { animation: arrow-rise .5s ease-out; }
  #powered-by:is(:hover,:focus-visible) svg g { opacity: .6; }
  #powered-by:is(:hover,:focus-visible) .n-ascent { animation: trace-ascent .46s ease-out both; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #footer-bao:hover img { animation: bao-spin .65s ease-in-out; }
  #back-to-top:hover svg { animation: arrow-rise .5s ease-out; }
}
@media (max-width: 750px) {
  :root { --header-height: 62px; }
  .header-inner { padding-inline: 16px; gap: 12px; }
  .wordmark { font-size: 1.5rem; }
  .logo { gap: 6px; }
  .logo .bao-mark { width: 32px; height: 32px; }
  nav { gap: 3px; font-size: .9rem; }
  .nav-buy { padding-inline: 17px; margin-left: 4px; }
  .hero, .section-inner { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; gap: 38px; }
  .intro { max-width: 540px; }
  .lead { max-width: 18em; margin-top: 12px; }
  .actions { margin-top: 20px; }
  .stage { width: 100%; max-width: 570px; justify-self: center; aspect-ratio: 1.05; }
  .section-inner { gap: 26px; }
  .film .film-copy { grid-row: 1; }
  .film-copy, .movie { justify-self: start; }
  .footer-inner { gap: 12px; }
}
@media (max-width: 365px) {
  .header-inner { padding-inline: 10px; gap: 4px; }
  .wordmark { font-size: 1.26rem; }
  .logo { gap: 3px; }
  .logo .bao-mark { width: 27px; height: 27px; }
  .nav-buy { padding-inline: 12px; margin-left: 0; }
  nav { gap: 0; }
  .footer-inner { padding-inline: 14px; gap: 7px; }
  #back-to-top { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
.media-retry {
  min-height: 44px;
  border: 0;
  padding: 0 4px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
