/* Shine Bright Series
   Palette pulled from the book's paintings: evening sky, violet cape,
   golden star, butter-yellow dress, and the warm glow of the text pages. */
:root {
  --night: #16193F;
  --dusk: #2A2462;
  --cape: #6B30C2;
  --star: #F6C94E;
  --butter: #FCEAAB;
  --dawn: #F29D6C;
  --glow: #FFF6DC;
  --ink: #2E2352;
  --ink-soft: #5A4C7E;
  --measure: 36rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--night);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--star); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-weight: 600; line-height: 1.15; margin: 0 0 .6em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, 64rem); margin-inline: auto; }
.narrow { max-width: var(--measure); }

/* Buttons: a warm golden "light" and a quiet outline */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font: 600 1.05rem/1 "Lora", Georgia, serif;
  padding: .95em 1.5em; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-light { background: var(--star); color: var(--night); box-shadow: 0 0 0 0 rgba(246,201,78,.0), 0 8px 26px rgba(246,201,78,.35); }
.btn-light:hover { box-shadow: 0 10px 34px rgba(246,201,78,.55); }
.btn-quiet { border-color: currentColor; color: inherit; background: transparent; }
.btn[aria-disabled="true"] { opacity: .7; cursor: default; transform: none; }

/* ---------- Home page ---------- */
/* The whole page is one sky: morning glow at the top deepening to night at the bottom. */
.home {
  background: linear-gradient(180deg,
    var(--glow) 0%, var(--butter) 20%, #F7C489 36%, #F4AE7C 50%, var(--dawn) 60%,
    #A9588F 67%, var(--dusk) 75%, var(--night) 87%, var(--night) 100%);
}

.hero { position: relative; min-height: 100svh; display: grid; align-items: end; color: var(--glow); overflow: hidden; }
.hero-art { position: absolute; inset: 0; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero-art::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,25,63,.55) 0%, rgba(22,25,63,0) 38%, rgba(22,25,63,0) 60%, rgba(22,25,63,.75) 100%); }
.hero-inner { position: relative; padding-block: 2rem 3.5rem; }
.hero-title { position: absolute; top: clamp(1.5rem, 6vh, 4rem); left: 0; right: 0; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5.4rem); color: var(--star); text-shadow: 0 2px 18px rgba(10,10,40,.6); margin: 0; }
.hero h1 span { display: block; font-style: italic; font-weight: 500; font-size: .62em; color: var(--glow); }
.hero-sub { font-size: clamp(1.1rem, 2.4vw, 1.35rem); max-width: 30rem; text-shadow: 0 1px 10px rgba(10,10,40,.8); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }

section { padding-block: clamp(2.25rem, 5vw, 3.75rem); }

.song-lines { text-align: center; }
.song-lines blockquote { margin: 0 auto 1.6rem; font-style: italic; font-size: clamp(1.4rem, 4.4vw, 2.6rem); line-height: 1.35; color: var(--ink); }
.song-lines p { margin-inline: auto; color: var(--ink-soft); }

.book { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 760px) { .book { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.book-cover { border-radius: 6px; box-shadow: 0 24px 60px rgba(46,35,82,.35), 0 2px 6px rgba(46,35,82,.3); transform: rotate(-1.5deg); }
.book-facts { font-size: 1rem; color: var(--ink-soft); }

/* A peek inside: paintings laid like pages on a table, not a grid of cards */
.inside { color: var(--ink); }
.pages { display: flex; gap: 1.25rem; overflow-x: auto; padding: 1rem .25rem 2rem; scroll-snap-type: x mandatory; }
.pages figure { flex: 0 0 min(72vw, 19rem); margin: 0; scroll-snap-align: center; }
.pages img { border-radius: 4px; box-shadow: 0 16px 40px rgba(10,8,40,.45); }
.pages figcaption { font-style: italic; font-size: .98rem; margin-top: .8rem; opacity: .92; }

.grownups { color: var(--glow); }
.seeds { font-style: italic; font-size: clamp(1.3rem, 3vw, 1.7rem); line-height: 1.5; border-left: 3px solid var(--star); padding-left: 1.2rem; margin: 0 0 2.5rem; }
.questions { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.questions li { padding-left: 1.8rem; position: relative; }
.questions li::before { content: "\2605"; position: absolute; left: 0; color: var(--star); font-size: .9em; top: .1em; }

/* Signup under the stars */
.signup { color: var(--glow); position: relative; }
.signup::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 64%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 46% 14%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 40%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 81% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 70%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 7% 82%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 88%, #fff 50%, transparent 51%); }
.signup .wrap { position: relative; }

form.join { display: grid; gap: .8rem; max-width: 30rem; margin-top: 1.5rem; }
.join label { font-size: .95rem; }
.join input[type=text], .join input[type=email] {
  width: 100%; font: 1.05rem "Lora", Georgia, serif; padding: .85em 1em; border-radius: 12px;
  border: 1.5px solid rgba(255,246,220,.35); background: rgba(255,246,220,.08); color: var(--glow);
}
.join input::placeholder { color: rgba(255,246,220,.55); }
.join .btn { justify-self: start; margin-top: .4rem; }
.hidden { position: absolute; left: -9999px; }
.fine { font-size: .9rem; opacity: .75; }

.author { color: var(--glow); }
.author .narrow p { color: rgba(255,246,220,.88); }

footer.site { color: rgba(255,246,220,.7); font-size: .95rem; padding-block: 3rem 3.5rem; border-top: 1px solid rgba(255,246,220,.12); }
footer.site a { color: var(--glow); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }

/* ---------- The song page (/twinkle): always night, built for a phone at bedtime ---------- */
.night { background: radial-gradient(120% 60% at 50% 0%, var(--dusk) 0%, var(--night) 70%); color: var(--glow); min-height: 100svh; }
.player { text-align: center; padding-top: clamp(2.5rem, 8vh, 5rem); }
.player .art { width: min(62vw, 15rem); margin: 0 auto 1.6rem; border-radius: 8px; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.player h1 { color: var(--star); font-size: clamp(2rem, 7vw, 3rem); margin-bottom: .2em; }
.player .by { font-style: italic; opacity: .85; margin-bottom: 2rem; }

.play {
  --size: 6.5rem;
  width: var(--size); height: var(--size); border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 50% 45%, #FFF1BE 0%, var(--star) 45%, #E0A52C 100%);
  box-shadow: 0 0 0 10px rgba(246,201,78,.12), 0 0 50px rgba(246,201,78,.55);
  display: inline-grid; place-items: center; color: var(--night);
}
.play svg { width: 42%; height: 42%; }
.play .i-pause { display: none; }
.play.on .i-play { display: none; }
.play.on .i-pause { display: block; }
.play.on { animation: breathe 4s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 10px rgba(246,201,78,.12), 0 0 40px rgba(246,201,78,.45); }
  50% { box-shadow: 0 0 0 18px rgba(246,201,78,.08), 0 0 80px rgba(246,201,78,.75); }
}
@media (prefers-reduced-motion: reduce) { .play.on { animation: none; } }

.track { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; max-width: 24rem; margin: 1.6rem auto 0; font-size: .9rem; opacity: .9; }
.track input[type=range] { width: 100%; accent-color: var(--star); }

.lyrics-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.lyrics-head h2 { margin: 0; }
.toggle { display: inline-flex; border: 1.5px solid rgba(255,246,220,.35); border-radius: 999px; padding: 3px; }
.toggle button { font: 600 .95rem "Lora", Georgia, serif; color: var(--glow); background: none; border: 0; padding: .5em 1em; border-radius: 999px; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--star); color: var(--night); }
.toggle-note { font-size: .95rem; opacity: .8; font-style: italic; margin: -0.6rem 0 1.6rem; }

.verse { margin: 0 0 2rem; font-size: 1.2rem; line-height: 1.75; }
.verse .end { font-style: italic; color: var(--star); }
.lyrics.short .verse:not(.core) { display: none; }

.divider { height: 1px; background: rgba(255,246,220,.14); margin: 1rem 0; border: 0; }
.bookline { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.2rem; align-items: center; }
.bookline img { border-radius: 4px; }

.sunrise { width: 100%; max-width: 44rem; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 62%; border-radius: 6px; margin-bottom: 2.5rem; box-shadow: 0 20px 50px rgba(0,0,0,.4); }

.author p, .seeds { text-wrap: balance; }

/* Title sits in the sky where Annie is looking (up and to the right) on wider screens */
.hero h1 { text-align: right; }
@media (min-width: 760px) {
  .hero-title { top: 20%; }
  .hero-title .wrap { display: flex; justify-content: flex-end; }
}

/* A peek inside: three paintings */
.peek { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); margin-top: 1.5rem; }
.peek figure { margin: 0; }
.peek img { border-radius: 4px; box-shadow: 0 16px 40px rgba(10,8,40,.35); }
.peek figcaption { font-style: italic; font-size: .98rem; margin-top: .8rem; }

/* About the author: photo beside a smaller bio */
.author-grid { display: grid; gap: clamp(1.5rem, 4vw, 2.75rem); align-items: center; grid-template-columns: minmax(0, 1fr); max-width: 50rem; }
@media (min-width: 760px) { .author-grid { grid-template-columns: 13rem minmax(0, 1fr); } }
.author-photo { width: 100%; max-width: 13rem; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; box-shadow: 0 18px 44px rgba(0,0,0,.4); justify-self: center; }
.author-photo.missing { display: none; }
.author-text p { font-size: 1rem; line-height: 1.7; color: rgba(255,246,220,.88); }

.author-photo { border: 3px solid rgba(246,201,78,.55); }

/* Signup: centered, a little smaller */
.signup .wrap { text-align: center; }
.sunrise { max-width: 37.5rem; display: block; margin-inline: auto; }
.signup h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
.signup .narrow { margin-inline: auto; font-size: 1rem; }
form.join { margin-inline: auto; max-width: 24rem; text-align: left; }
.join .btn { justify-self: center; }
.join .fine { text-align: center; }
.join input[type=text], .join input[type=email] { padding: .7em .9em; font-size: 1rem; }
.signup .narrow, .join .fine { text-wrap: balance; }
.join .fine { max-width: none; }

/* Keep "A peek inside" text crisp against the warm sky */
.inside h2, .inside p, .peek figcaption { color: var(--ink); text-shadow: 0 0 14px rgba(255, 240, 214, .55); }
.peek figcaption { font-size: 1.02rem; font-weight: 500; }

/* Two editions side by side */
.editions { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); margin-top: 1.4rem; }
.edition { background: rgba(255, 246, 220, .55); border: 1px solid rgba(46, 35, 82, .12); border-radius: 14px; padding: 1.1rem 1.2rem 1.25rem; }
.edition h3 { font-size: 1.15rem; margin: 0 0 .2rem; }
.edition p { font-size: .95rem; color: var(--ink-soft); margin: 0 0 .9rem; }
.edition .btn { font-size: .95rem; padding: .8em 1.2em; }
#book .btn-quiet { color: var(--ink); }
.edition { display: flex; flex-direction: column; align-items: flex-start; }
.edition .btn { margin-top: auto; }
