/* The night-sound pages (/night-sounds/ and one per sound), on top of doc.css and stories.css: a
   two-column head with the square painting beside the player, and cards that play in place. */

.n-hero { position: relative; padding: calc(68px + clamp(2rem, 6vw, 4.5rem)) 0 clamp(2rem, 5vw, 3.5rem); background: radial-gradient(120% 80% at 80% 0%, rgba(184, 175, 240, .12), transparent 60%), var(--night); }
.n-hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.8rem, 5vw, 4.5rem); align-items: center; }
.n-hero h1 { margin: 0; max-width: 16ch; font: 200 clamp(2.4rem, 5.6vw, 4.4rem)/1.02 var(--display); letter-spacing: -.03em; }
.n-hero h1 em { display: block; margin-top: .45em; font: 300 .42em/1.3 var(--display); font-style: italic; letter-spacing: -.01em; color: var(--lav); }
.n-hero .doc-lede { max-width: 38rem; margin: 1.3rem 0 0; color: var(--soft); }
.n-hero-hub h1 { max-width: 14ch; }
.n-painting { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--hair); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .8); aspect-ratio: 1; background: var(--ink); }
.n-painting img { width: 100%; height: 100%; object-fit: cover; }
.n-hero .rise { animation: rise 1.4s var(--ease) both; }
.n-hero .rise:nth-child(2) { animation-delay: .12s; } .n-hero .rise:nth-child(3) { animation-delay: .26s; }
@media (prefers-reduced-motion: reduce) { .n-hero .rise { animation: none; } }
.n-small { margin: .8rem 0 0; font-size: .82rem; color: var(--fine); max-width: 38rem; }

/* the player */
.n-player { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin-top: 1.6rem; padding: 1rem 1.2rem; max-width: 38rem; border-radius: 20px; border: 1px solid var(--hair); background: rgba(14, 18, 34, .7); }
.n-play { display: inline-flex; align-items: center; gap: .65rem; padding: .8rem 1.35rem .8rem 1rem; border: 0; border-radius: 999px; background: var(--cream); color: #16182A; font: 600 .95rem/1 var(--body); cursor: pointer; transition: transform .3s var(--ease), background .3s; }
.n-play:hover { transform: translateY(-1px); }
.n-icon { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent currentColor; }
.is-playing .n-icon { width: 11px; height: 14px; border: 0; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.is-playing .n-play { background: var(--lamp); }
.n-vol, .n-timer { display: flex; align-items: center; gap: .55rem; font-size: .82rem; color: var(--muted); }
.n-vol input { width: 8.5rem; accent-color: var(--lav); }
.n-timer select { padding: .35rem .5rem; border-radius: 10px; border: 1px solid var(--hair); background: var(--ink); color: var(--text); font: inherit; }
.n-status { flex-basis: 100%; margin: 0; font-size: .82rem; color: var(--fine); font-variant-numeric: tabular-nums; }
.n-player:not(.is-ready) .n-play { opacity: .6; }

/* cards: the hub's shelves, and "More night sounds" on each page */
.n-hub { padding-top: clamp(1rem, 3vw, 2rem); }
.n-shelf { margin: clamp(1.6rem, 4vw, 2.6rem) 0 1.1rem; font: 500 .74rem/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--lav); }
.n-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: 1.6rem 1.1rem; }
.n-grid-hub { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.n-grid-field { grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); }
.doc .n-grid li { margin: 0; padding: 0; }
.n-card { display: flex; flex-direction: column; }
.n-card-link { display: block; text-decoration: none; color: var(--text); }
.doc .n-card-link, .doc .n-card-link:hover { color: var(--text); text-decoration: none; }
.n-art { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 16px; border: 1px solid var(--hair); background: var(--ink); }
.n-art img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.88); transition: transform 1.2s var(--ease), filter 1.2s var(--ease); }
.n-card-link:hover .n-art img, .n-card-link:focus-visible .n-art img { transform: scale(1.04); filter: none; }
.n-art .chip { position: absolute; top: .7rem; left: .7rem; padding: .3rem .6rem; border-radius: 999px; background: var(--cream); color: #16182A; font: 600 .66rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; }
.n-card .n-player { margin-top: .7rem; padding: 0; border: 0; background: none; }
.n-card .n-play { padding: .55rem 1rem .55rem .8rem; font-size: .84rem; }
.n-here { color: var(--fine); font-weight: 400; }

@media (max-width: 860px) {
  .n-hero-in { grid-template-columns: minmax(0, 1fr); }
  .n-painting { order: -1; width: 100%; max-width: 26rem; }
}
@media (max-width: 480px) {
  .n-vol input { width: 6.5rem; }
}
@media print {
  .n-player, .n-grid { display: none !important; }
}
