/* Among the Stars: homepage sections. The shared theme (sky, header, buttons, footer) is in style.css. */
.home {
  --home-serif: var(--serif);
  --home-gold: var(--gold);
  --home-muted: var(--muted);
}
.home main { padding: 0; overflow: clip; }
/* Hero held hidden until its entrance animation takes over (set in the page head, lifted by
   home.js or a 3 s fallback), so the text never flashes visible and then vanishes. */
.is-entering .entrance, .is-entering .cosmic-portrait__image, .is-entering .cosmic-portrait__orbit,
.is-entering .cosmic-portrait figcaption, .is-entering .scroll-cue { visibility: hidden; }
.home .cosmic-hero__copy { text-shadow: 0 2px 16px #080d19, 0 0 40px #080d19aa; }
.home-chapter .chapter-copy, .home .life-heading, .home .words-chapter figure, .home .closing-chapter { text-shadow: 0 2px 16px #080d19, 0 0 40px #080d19bb; }
.cosmic-hero { position: relative; isolation: isolate; max-width: 1600px; margin: auto; min-height: min(850px, calc(100svh - 95px)); padding: 4rem 8% 8rem; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 2rem; }
.cosmic-hero__glow { position: absolute; pointer-events: none; width: 80%; height: 100%; right: -15%; top: -10%; background: radial-gradient(ellipse, #7184ad22, transparent 65%); z-index: -1; }
.cosmic-hero__copy { position: relative; z-index: 2; }
.home .cosmic-name { font: 400 clamp(4.5rem, 7.8vw, 8.5rem)/.92 var(--home-serif); letter-spacing: -.04em; color: #f8f0e5; margin: 0 0 1.8rem; }
.cosmic-name em { font-weight: 400; font-size: .53em; letter-spacing: -.035em; }
.cosmic-name > span { position: absolute; color: var(--home-gold); font: 1.5rem Georgia, serif; margin: .9em 0 0 .75em; }
.cosmic-dates { font-size: .95rem; color: var(--home-muted); letter-spacing: .04em; margin-bottom: 1.8rem; }
.cosmic-intro { color: #d1d1d8; font-size: 1.2rem; line-height: 1.65; margin-bottom: 2rem; }
.cosmic-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.cosmic-portrait { position: relative; margin: 0; width: 100%; max-width: 440px; justify-self: end; }
.cosmic-portrait__image { overflow: hidden; border-radius: 48% 48% 3px 3px; position: relative; }
.cosmic-portrait__image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #14203808 55%, #080d1966); pointer-events: none; }
.cosmic-portrait img { display: block; width: 100%; height: auto; filter: saturate(.76); }
.cosmic-portrait__orbit { position: absolute; inset: -7% -11%; border: 1px solid #c7a27640; border-radius: 50%; transform: rotate(18deg); }
.cosmic-portrait__orbit::before, .cosmic-portrait__orbit::after { content: ''; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--home-gold); box-shadow: 0 0 16px #e6bb83; top: 16%; left: 15%; }
.cosmic-portrait__orbit::after { top: auto; left: auto; bottom: 16%; right: 15%; width: 4px; height: 4px; }
.cosmic-portrait figcaption { position: relative; text-align: center; margin-top: 1.2rem; color: var(--home-muted); font: italic 1.15rem var(--home-serif); letter-spacing: .025em; }
.scroll-cue { position: absolute; bottom: 2.2rem; left: 8%; display: flex; align-items: center; gap: 1rem; color: var(--home-muted); text-decoration: none; font-size: .82rem; letter-spacing: .05em; }
.scroll-cue > span { display: block; width: 1px; height: 2.7rem; background: linear-gradient(var(--home-gold), transparent); transform-origin: top; }
.hero-coordinate { position: absolute; right: 8%; bottom: 2.6rem; color: var(--home-muted); font-size: .75rem; letter-spacing: .06em; }
.home-chapter { max-width: 1250px; margin: auto; padding: 8rem 5%; position: relative; }
.home-chapter h2 { font: 400 clamp(3rem, 5.4vw, 5.4rem)/1 var(--home-serif); letter-spacing: -.025em; color: #f8f0e5; margin: 0 0 1.7rem; }
.home-chapter h2 em { color: var(--home-gold); font-weight: 400; }
.home-chapter p { color: #c1c5d1; }
.music-chapter { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10%; padding-top: 9rem; }
.chapter-copy > p:not(.eyebrow) { max-width: 26rem; }
.chapter-copy > .button { margin-top: .75rem; }
.home .chapter-footnote { color: var(--home-muted); font-size: .85rem; margin: 1.1rem 0 0; }
.record-art { position: relative; width: 100%; max-width: 430px; aspect-ratio: 1; display: grid; place-items: center; }
.record-art::before, .record-art::after { content: ''; position: absolute; inset: -7%; border-radius: 50%; border: 1px solid #c0b29a26; transform: rotate(-24deg) scaleY(.65); pointer-events: none; }
.record-art::after { inset: -16%; transform: rotate(35deg) scaleY(.76); border-color: #c0b29a12; }
.record-art__disc { width: 88%; aspect-ratio: 1; border: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: repeating-radial-gradient(circle, #131b2a 0 2px, #202a3a 3px, #111a2a 4px 6px); box-shadow: 0 0 90px #8c664322, 0 20px 50px #0006; position: relative; cursor: grab; touch-action: none; user-select: none; }
.record-art__disc:active { cursor: grabbing; }
.record-art__disc::after { pointer-events: none; }
.record-art__disc > *, .record-art__star { pointer-events: none; }
.record-hint { position: absolute; top: 108%; left: 0; right: 0; text-align: center; font-size: .85rem; margin: 0; }
.record-art__disc::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: conic-gradient(transparent 0deg, #b9cce214 45deg, transparent 85deg, transparent 180deg, #b9cce214 225deg, transparent 265deg); }
.record-art__label { background: #b59771; color: #181c28; width: 34%; aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 400 clamp(1.3rem, 3vw, 2.5rem)/1.1 var(--home-serif); }
.record-art__label em { font-size: .4em; margin-top: .6rem; }
.record-art__star { position: absolute; top: 3%; right: 2%; color: var(--home-gold); font-size: 1.8rem; }
.life-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; }
.life-heading h2 { margin-bottom: 0; }
.life-heading > p { margin: 0 0 .4rem; }
/* The strip can be dragged or swiped sideways; vertical swipes still scroll the page. */
.js .memory-strip { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.js .memory-strip.is-dragging { cursor: grabbing; }
.js .memory-strip.is-dragging .memory-photo { pointer-events: none; }
.memory-strip { overflow: hidden; mask-image: linear-gradient(90deg, transparent, black 9%, black 91%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, black 9%, black 91%, transparent); }
.js .memory-strip { overflow: hidden; }
.memory-track { display: flex; width: max-content; gap: 1.6rem; }
.memory-group { display: flex; gap: 1.6rem; padding-right: 1.6rem; flex: 0 0 auto; }
.memory-photo { display: block; flex: 0 0 auto; width: clamp(220px, 27vw, 340px); color: #f4e7d4; text-decoration: none; }
.home .motion-control { display: block; margin: 1.5rem auto 0; padding: .45rem .8rem; border: 1px solid #e6bb8377; border-radius: 3px; background: #101a30b3; color: #f8f0e5; font: 400 .9rem var(--text); cursor: pointer; }
.home .motion-control[hidden] { display: none; }
.home .carousel-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.home .carousel-controls[hidden], .quote-timer[hidden] { display: none; }
.home .carousel-controls .motion-control { margin: 0; min-width: 8rem; min-height: 44px; }
.home .carousel-arrow { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #e6bb8388; border-radius: 50%; background: #101a30cc; color: #f8e5c9; font: 400 1.5rem/1 var(--text); cursor: pointer; }
@media (hover: hover) { .home .carousel-arrow:hover { background: #e6bb8329; border-color: var(--home-gold); } }
.home .carousel-arrow:active { background: #e6bb8340; border-color: var(--home-gold); }
.quote-timer { width: min(23rem, 100%); height: 3px; margin: 2rem auto 0; overflow: hidden; background: #e6bb8326; }
.quote-timer > span { display: block; width: 100%; height: 100%; background: var(--home-gold); transform: scaleX(0); transform-origin: left; }
.home .life-links .button { font-size: 1.2rem; padding: 1rem 2rem; }
.home .life-links .button--quiet { background: #0b1428d9; }
.memory-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; display: block; filter: saturate(.7); transition: filter .4s; }
.memory-photo:hover img { filter: saturate(1); }
.memory-photo span { display: block; margin-top: 1rem; min-height: 3em; line-height: 1.5; font-size: .9rem; }
.life-links { display: flex; justify-content: center; align-items: center; gap: 2rem; margin-top: 3rem; }
.life-links > span { color: var(--home-gold); font-size: .8rem; }
.words-chapter { text-align: center; max-width: 950px; padding-top: 5rem; padding-bottom: 7rem; }
.quote-star { color: var(--home-gold); font-size: 2rem; display: inline-block; margin: .5rem 0 1.5rem; }
.words-chapter figure { margin: 0 0 2rem; }
.words-chapter blockquote { min-height: 12rem; display: grid; align-items: center; }
.words-chapter blockquote { margin: 0 auto 2rem; font: 400 clamp(2rem, 4vw, 3.3rem)/1.25 var(--home-serif); color: #f1e9dd; }
.words-chapter figcaption { font-size: .95rem; color: #e6bb83; }
.words-chapter figcaption span { color: var(--home-muted); }
.closing-chapter { text-align: center; padding-top: 8rem; padding-bottom: 10rem; }
.closing-chapter::before { content: ''; position: absolute; width: 70%; left: 15%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, #d4b17b44, transparent); }
.closing-chapter .button { margin-top: 1rem; }
.home .closing-memorial { display: table; margin: 1.2rem auto 0; color: var(--home-muted); }
.home .closing-memorial:hover { color: var(--home-gold); }
@media (min-width: 1000px) and (max-height: 780px) {
  .cosmic-hero { min-height: 680px; padding-top: 2rem; }
  .cosmic-portrait { max-width: 350px; }
}
@media (max-width: 62rem) {
  .cosmic-hero { padding: 4rem 6% 7rem; gap: 2rem; }
  .home .cosmic-name { font-size: clamp(4rem, 8.5vw, 6rem); }
  .cosmic-actions { gap: .8rem; }
  .home-chapter { padding-left: 7%; padding-right: 7%; }
}
@media (max-width: 650px) {
  .cosmic-hero { grid-template-columns: 1fr; padding: 2.3rem 7% 7rem; gap: 3rem; }
  .home .cosmic-name { font-size: clamp(4rem, 16vw, 6rem); }
  .home .eyebrow { font-size: .75rem; letter-spacing: .13em; }
  .cosmic-portrait { width: 78%; max-width: 340px; justify-self: center; }
  .cosmic-portrait__orbit { inset: -5% -9%; }
  .cosmic-dates { font-size: .9rem; }
  .hero-coordinate { display: none; }
  .scroll-cue { left: 7%; bottom: 1.7rem; }
  .home-chapter { padding: 5rem 7%; }
  .music-chapter { grid-template-columns: 1fr; gap: 4rem; }
  .record-art { width: 75%; max-width: 320px; margin: auto; }
  .record-art__label { font-size: 2rem; }
  .life-heading { display: block; }
  .life-heading > p { margin-top: 1.5rem; }
  .memory-photo { width: 240px; }
  .memory-group { gap: 1rem; padding-right: 1rem; }
  .memory-track { gap: 1rem; }
  .home .life-links .button { width: 100%; text-align: center; font-size: 1.1rem; }
  .words-chapter blockquote { min-height: 22rem; }
  .memory-photo span { font-size: .85rem; }
  .life-links { gap: 1.3rem; flex-wrap: wrap; }
  .life-links > span { display: none; }
  .closing-chapter { padding-bottom: 7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .memory-strip { overflow-x: auto; }
  .memory-group[aria-hidden="true"] { display: none; }
}
html:not(.js) .memory-track { animation: none; }
html:not(.js) .memory-group[aria-hidden="true"] { display: none; }
html:not(.js) .memory-strip { overflow-x: auto; }
