@font-face {
  font-family: "Starlight Song";
  src: url("../assets/fonts/song-display.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --display-song: "Starlight Song", "Songti SC", SimSun, var(--brush);
  --champagne: #efd0ac;
  --ivory: #fff0dd;
}
html:is([data-scene="starlight"], [data-scene="bloom"]) .sky {
  background: #080e1a;
}
html:is([data-scene="starlight"], [data-scene="bloom"]) .sky-cloud {
  inset: -5%;
  opacity: .91;
  background-image: url("../assets/images/midnight-dust.webp");
}
html[data-scene="starlight"] .sky::after {
  background: radial-gradient(ellipse at 50% 42%, #080f1a07 14%, #070d194b 72%, #060a149e),
              linear-gradient(0deg, #090d1bd6, transparent 29%, transparent 82%, #080d1970);
}
html[data-scene="bloom"] .sky-cloud {
  opacity: .71;
  background-position: 61% 56%;
}
html[data-scene="bloom"] .sky::after {
  background: radial-gradient(ellipse at 50% 45%, #0b12243b 10%, #0a10203d 48%, #080d17bb),
              linear-gradient(0deg, #0810206b, transparent 28%, #10102535 68%, #080d1a80);
}
html:is([data-scene="starlight"], [data-scene="bloom"]) .sky-stars { opacity: .87; }
html:is([data-scene="starlight"], [data-scene="bloom"]) .masthead,
html:is([data-scene="starlight"], [data-scene="bloom"]) .colophon { border-color: #e8c6a838; }
html:is([data-scene="starlight"], [data-scene="bloom"]) .brand > span {
  font-family: var(--serif);
  font-size: clamp(14px, 1.25vw, 20px);
  letter-spacing: .16em;
}
html:is([data-scene="starlight"], [data-scene="bloom"]) .brand i { font-size: 1.25em; }
.music-control {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .04em;
  background: transparent;
  border: 0;
  padding: 0 6px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 8px;
}
.music-control > span:first-child { color: var(--champagne); font-size: 15px; }
.music-control[aria-pressed="true"] > span:first-child { text-shadow: 0 0 9px #f5bd8ba1; }

#starlight {
  display: grid;
  grid-template: auto auto / minmax(0, 1fr);
  min-height: 0;
  justify-items: center;
  align-content: center;
  isolation: isolate;
  padding-block: 2px clamp(25px, 5svh, 55px);
}
#starlight .intro-art {
  grid-area: 1/1;
  width: min(77vw, 620px);
  max-width: 100%;
  height: clamp(175px, 27.5svh, 325px);
  aspect-ratio: auto;
  margin: 0 0 clamp(-29px, -2.15svh, -11px);
}
#starlight .lunar-disc {
  inset: -13% 9% -3% 13%;
  filter: drop-shadow(-5px 3px 18px #e6b1844d);
  animation: lunar-drift 18s ease-in-out infinite alternate;
}
html[data-paused] #starlight .lunar-disc { animation-play-state: paused; }
#starlight .orbits { inset: 0 0 auto; height: 109%; }
.orbit-light { fill: #ffdfb5; filter: drop-shadow(0 0 5px #ffc69c); }
#starlight .intro-copy {
  grid-area: 2/1;
  width: min(100%, 690px);
  padding: 0;
  text-align: center;
  isolation: isolate;
}
#starlight .wordmark {
  position: relative;
  z-index: 1;
  width: auto;
  margin: 0 auto clamp(13px, 2.6svh, 29px);
  text-align: center;
  font: italic 400 clamp(66px, min(12vw, 15svh), 160px)/.76 var(--serif);
  letter-spacing: -.056em;
  color: var(--ivory);
  text-shadow: 0 2px 29px #04091171;
}
#starlight .wordmark em {
  width: auto;
  margin: .105em .125em 0 0;
  color: #e8b59e;
}
.title-orbit {
  position: absolute;
  z-index: -1;
  inset: clamp(31px, 8svh, 85px) 0 auto;
  width: min(96%, 620px);
  margin: auto;
  overflow: visible;
  pointer-events: none;
}
#starlight .eyebrow, #bloom .eyebrow {
  font: 400 clamp(11px, 2.65vw, 18px)/1.2 var(--serif);
  letter-spacing: .22em;
  color: var(--champagne);
}
.gold-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--champagne);
  font-size: 13px;
  line-height: 1;
}
.gold-rule::before, .gold-rule::after {
  content: "";
  width: clamp(23px, 10vw, 73px);
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2b68f92);
}
.gold-rule::after { transform: rotate(180deg); }
#starlight .gold-rule { margin-top: clamp(8px, 1.9svh, 17px); }
#starlight .intro-dedication {
  margin-block: clamp(8px, 1.65svh, 16px) clamp(17px, 3.3svh, 33px);
  color: #f1ddc8;
  font: 400 clamp(19px, 5vw, 31px)/1.35 var(--display-song);
  letter-spacing: .23em;
  text-indent: .23em;
}
#starlight .button--light, #bloom .button--light {
  background: linear-gradient(113deg, #dfbba0, #fff0d6 45%, #e8c39d);
  border: 1px solid #fff1d597;
  color: #251e2a;
  font-family: var(--display-song);
  font-size: clamp(14px, 3.9vw, 18px);
  box-shadow: 0 0 0 3px #d6a99037, 0 4px 29px #dfa66b36;
}
#starlight .button--light {
  min-width: clamp(190px, 52vw, 298px);
  min-height: clamp(46px, 6.2svh, 60px);
  justify-content: space-between;
  padding-inline: clamp(16px, 4vw, 25px);
  animation: cover-action-in .68s .16s cubic-bezier(.25,.68,.3,1) both;
}
#starlight .button--light:hover, #bloom .button--light:hover {
  background: linear-gradient(113deg, #eac8af, #fff8e8 45%, #f7d7b4);
  box-shadow: 0 0 0 3px #d6a99061, 0 4px 33px #dfa66b4d;
}

#bloom {
  grid-template: auto auto auto auto / minmax(0, 1fr) minmax(0, 1fr);
  align-content: center;
  gap: 0 clamp(11px, 3.1vw, 36px);
  padding-block: clamp(18px, 3.3svh, 35px) clamp(23px, 4svh, 42px);
  overflow: clip;
}
#bloom .bloom-heading { grid-area: 1/1/2/3; }
#bloom .bloom-title {
  margin: .14em 0 .36em;
  color: var(--ivory);
  font: 400 clamp(35px, 9vw, 65px)/1.13 var(--display-song);
  letter-spacing: .09em;
  text-shadow: 0 1px 27px #eeb17f24;
}
#bloom .flower-stage {
  grid-area: 2/1/3/3;
  width: min(100%, max(225px, 45.5svh), 540px);
  aspect-ratio: 1.06;
  margin: 11px 0 -3px;
}
#bloom .flower-stage::before {
  inset: -11% -14% -9%;
  background: radial-gradient(ellipse at 51% 33%, #e4a5ba43, #7c628c27 38%, transparent 64%);
  transition: opacity 2s ease;
  opacity: .48;
}
#bloom.is-open .flower-stage::before { opacity: 1; }
#bloom .flower-visual {
  position: absolute;
  inset: 0 0 -3%;
  display: grid;
  place-items: center;
}
#bloom .flower-photo {
  grid-area: 1/1;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: saturate(.98) drop-shadow(0 6px 14px #100b28a8);
  transform-origin: 49% 93%;
  mask-image: linear-gradient(#000 83%, transparent 99%);
}
#bloom.is-open .flower-visual { animation: sway 8s ease-in-out infinite alternate; transform-origin: 48% 92%; }
html[data-paused] #bloom .flower-visual { animation-play-state: paused; }
#bloom .flower-orbit { overflow: visible; inset: 0; width: 100%; height: 100%; color: #e3bfc568; }
#bloom .bloom-line { align-self: start; justify-self: center; z-index: 2; margin-bottom: clamp(9px, 1.7svh, 18px); }
#bloom .bloom-line--first { grid-area: 3/1; justify-self: end; }
#bloom .bloom-line--second { grid-area: 3/2; justify-self: start; }
#bloom .bloom-line .eyebrow { gap: 7px; font-size: clamp(10px, 2.8vw, 17px); }
#bloom .bloom-line .eyebrow::before, #bloom .bloom-line .eyebrow::after {
  content: "";
  flex: none;
  width: clamp(10px, 2.5vw, 27px);
  height: 1px;
  background: linear-gradient(90deg, transparent, #e8c29c7f);
}
#bloom .bloom-line .eyebrow::after { transform: rotate(180deg); }
#bloom .bloom-line .brush {
  color: #f6dfc5;
  font: 400 clamp(29px, 8.2vw, 51px)/1.18 var(--display-song);
  letter-spacing: .08em;
  margin: .17em -.08em 0 0;
  text-shadow: 0 0 21px #d394a548;
}
#bloom .bloom-end { grid-area: 4/1/5/3; }
#bloom .bloom-dedication {
  color: #edd7cc;
  font: 400 clamp(14px, 3.75vw, 21px)/1.65 var(--display-song);
  margin-bottom: clamp(12px, 2.5svh, 22px);
  letter-spacing: .085em;
}
#bloom .actions { gap: clamp(9px, 2.5vw, 21px); }
#bloom .text-button {
  background: #0c132457;
  border-color: #e7c2b851;
  font: 400 clamp(13px, 3.6vw, 17px) var(--display-song);
}
#bloom .text-button:hover { background: #302841b8; }
#bloom .button { box-shadow: 0 4px 23px #dfa66b2c; }
#bloom .falling i {
  width: 8px;
  height: 14px;
  border-radius: 76% 17% 70% 36%;
  background: radial-gradient(at 26% 14%, #fbe2d3, #d793a9 70%, #8e557d);
}
@keyframes lunar-drift { from { transform: translateY(-1.3%); } to { transform: translateY(1.4%); } }
@keyframes cover-action-in {
  from { opacity: .35; translate: 0 8px; }
  to { opacity: 1; translate: none; }
}

@media (min-width: 850px) {
  #bloom { grid-template: auto 1fr auto / 1fr minmax(320px, 48vw) 1fr; }
  #bloom .bloom-heading { grid-area: 1/1/2/4; }
  #bloom .flower-stage { grid-area: 2/2; width: min(100%, max(310px, 50.5svh), 570px); }
  #bloom .bloom-line { align-self: center; }
  #bloom .bloom-line--first { grid-area: 2/1; justify-self: center; }
  #bloom .bloom-line--second { grid-area: 2/3; justify-self: center; }
  #bloom .bloom-line .brush { font-size: clamp(34px, 4.4vw, 66px); }
  #bloom .bloom-end { grid-area: 3/1/4/4; }
}
@media (max-width: 599px) {
  html[data-scene="starlight"] .sky-cloud { background-position: 56% center; }
  #starlight .wordmark { font-size: clamp(64px, 20.5vw, 119px); }
  #starlight .title-orbit { opacity: .64; }
  #starlight .intro-art { width: 100%; }
  #starlight .orbits { transform: scale(1.08); }
  #starlight .lunar-disc { inset: -20% 17.5% 4%; }
  #bloom .bloom-line .eyebrow { letter-spacing: .15em; }
  #bloom .bloom-line .brush { font-size: clamp(26px, 7.8vw, 43px); }
  #bloom .bloom-dedication { letter-spacing: .03em; }
}
@media (max-width: 760px) and (max-height: 660px) {
  #starlight .intro-art { height: max(133px, 27svh); }
  #starlight .wordmark { font-size: clamp(56px, 18.5vw, 78px); }
  #starlight .title-orbit { top: 39px; }
  #bloom .flower-stage { width: min(100%, max(192px, 42svh)); }
}
@media (min-width: 620px) and (max-height: 540px) and (orientation: landscape) {
  #starlight { grid-template: minmax(0, 1fr) / minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding-block: 10px; }
  #starlight .intro-copy { grid-area: 1/1; }
  #starlight .intro-art { grid-area: 1/2; height: 63svh; margin: 0; }
  #starlight .wordmark { font-size: clamp(54px, 15svh, 80px); }
  #starlight .title-orbit { top: 12svh; }
  #bloom { grid-template: auto auto auto / 1fr minmax(190px, 35vw) 1fr; padding-block: 12px; }
  #bloom .bloom-heading { grid-area: 1/1/2/4; }
  #bloom .bloom-line { align-self: center; justify-self: center; }
  #bloom .bloom-line--first { grid-area: 2/1; }
  #bloom .bloom-line--second { grid-area: 2/3; }
  #bloom .bloom-line .brush { font-size: clamp(27px, 4vw, 49px); }
  #bloom .bloom-title { font-size: 33px; }
  #bloom .flower-stage { grid-area: 2/2; width: min(100%, max(180px, 49svh)); }
  #bloom .bloom-end { grid-area: 3/1/4/4; }
}

