/* Sleepy Frontiers — brand: midnight navy, muted teal, warm ivory serif. */
:root {
  color-scheme: dark;
  --navy: #06162F;
  --navy-2: #0A1F3D;
  --deep: #0B3850;
  --teal: #5AA7AE;
  --teal-soft: #8CC3C8;
  --ivory: #F4E8C8;
  --mist: #B8C6D0;
  --mist-2: #8EA0B3;
  --line: rgba(184, 198, 208, .16);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--mist);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-soft); }
a:hover { color: var(--ivory); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ivory); line-height: 1.12; margin: 0; letter-spacing: .005em; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.45rem, 2.3vw, 1.8rem); }
p { margin: 0 0 1rem; }

.wrap { width: min(1140px, 100% - 2rem); margin-inline: auto; }
.eyebrow {
  margin: 0 0 .75rem;
  font: 600 .8rem/1.3 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
}
.meta { font-size: .92rem; color: var(--mist-2); }

.skip { position: absolute; left: 1rem; top: -10rem; z-index: 50; padding: .6rem 1rem; background: var(--ivory); color: var(--navy); border-radius: 6px; }
.skip:focus { top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem;
  border: 1px solid var(--ivory); border-radius: 999px;
  background: var(--ivory); color: var(--navy);
  font: 600 1rem/1 var(--sans); text-decoration: none;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn:hover { background: #fff7e2; color: var(--navy); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ivory); border-color: rgba(244, 232, 200, .45); }
.btn-ghost:hover { background: rgba(244, 232, 200, .1); color: var(--ivory); border-color: var(--ivory); }
.btn-sm { min-height: 40px; padding: .5rem 1.05rem; font-size: .92rem; }
.text-link { font-weight: 600; text-decoration: none; }
.text-link::after { content: " →"; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Header */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(6, 22, 47, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ivory); text-decoration: none; font: 600 1.35rem/1 var(--serif); letter-spacing: .02em; }
.brand:hover { color: var(--ivory); }
.brand img { flex: none; border-radius: 50%; }
.nav nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav nav a { color: var(--mist); text-decoration: none; font-size: .95rem; }
.nav nav a:hover { color: var(--ivory); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  min-height: min(100svh, 900px);
  display: flex; align-items: center;
  padding: 120px 0 clamp(150px, 24vh, 230px);
  background: linear-gradient(180deg, #020a19 0%, #06162F 45%, #0d2c4a 100%);
}
.hero-inner { position: relative; z-index: 1; }

/* Drawn night sky: stars, moon, sea, reflection and a small longship */
.sky { position: absolute; inset: 0; pointer-events: none; }
.stars {
  position: absolute; inset: 0 0 25%;
  background-image:
    radial-gradient(1.2px 1.2px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 140px 90px, rgba(255,255,255,.8), transparent),
    radial-gradient(1.5px 1.5px at 90px 160px, rgba(244,232,200,.9), transparent),
    radial-gradient(1px 1px at 230px 50px, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 300px 190px, rgba(255,255,255,.6), transparent),
    radial-gradient(1.3px 1.3px at 50px 240px, rgba(184,198,208,.9), transparent),
    radial-gradient(1px 1px at 190px 270px, rgba(255,255,255,.5), transparent);
  background-size: 330px 300px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
          mask-image: linear-gradient(180deg, #000 30%, transparent);
  animation: twinkle 7s ease-in-out infinite alternate;
}
.stars::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 60px 80px, rgba(255,255,255,.75), transparent),
    radial-gradient(1.4px 1.4px at 170px 20px, rgba(244,232,200,.85), transparent),
    radial-gradient(1px 1px at 110px 200px, rgba(255,255,255,.6), transparent);
  background-size: 230px 250px;
  animation: twinkle 5s ease-in-out infinite alternate-reverse;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
.moon {
  position: absolute; right: 13%; top: 17%;
  width: clamp(70px, 9vw, 130px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fffaf0 0%, #f4e8c8 42%, #d8c595 100%);
  box-shadow: 0 0 50px 12px rgba(244, 232, 200, .28), 0 0 180px 70px rgba(90, 167, 174, .12);
}
.moon::before, .moon::after { content: ""; position: absolute; border-radius: 50%; background: rgba(190, 170, 125, .22); filter: blur(2px); }
.moon::before { width: 22%; height: 22%; left: 52%; top: 30%; }
.moon::after { width: 14%; height: 14%; left: 30%; top: 58%; }
.sea {
  position: absolute; left: 0; right: 0; bottom: 0; height: clamp(130px, 22vh, 210px);
  background: linear-gradient(180deg, #0f3552 0%, #0a2742 30%, var(--navy) 100%);
  border-top: 1px solid rgba(140, 195, 200, .25);
}
.sea::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 14px, rgba(140, 195, 200, .05) 14px 15px); -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent); }
.glint {
  position: absolute; top: 0; bottom: 20%; right: calc(13% + clamp(35px, 4.5vw, 65px) - 45px); width: 90px;
  background: repeating-linear-gradient(180deg, rgba(244, 232, 200, .55) 0 2px, transparent 2px 9px);
  -webkit-mask-image: radial-gradient(ellipse 50% 100% at 50% 0%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 50% 100% at 50% 0%, #000 20%, transparent 75%);
  animation: shimmer 5s ease-in-out infinite alternate;
}
@keyframes shimmer { from { opacity: .55; transform: scaleX(.9); } to { opacity: 1; transform: scaleX(1.1); } }
.ship { position: absolute; left: 56%; top: 0; width: clamp(80px, 9vw, 130px); transform: translateY(-80%); fill: #020812; animation: bob 8s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes bob { 0%, 100% { transform: translateY(-80%) rotate(-.8deg); } 50% { transform: translateY(-76%) rotate(.8deg); } }
.hero h1 { font-size: clamp(2.7rem, 7vw, 5.4rem); font-weight: 500; max-width: 12ch; }
.hero h1 em { font-style: italic; color: var(--teal-soft); }
.hero .lede { max-width: 34rem; margin-top: 1.4rem; font-size: 1.15rem; color: var(--mist); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* The channel's three ivory Zs, drifting up near the moon */
.zzz { position: absolute; top: 9%; right: calc(13% + clamp(80px, 10vw, 150px)); font: 600 clamp(2rem, 4vw, 3.4rem)/1 var(--serif); color: var(--ivory); pointer-events: none; }
.zzz span { position: absolute; opacity: .7; animation: drift 9s ease-in-out infinite; text-shadow: 0 0 24px rgba(244, 232, 200, .35); }
.zzz span:nth-child(1) { right: 6rem; top: 3.2rem; font-size: .7em; }
.zzz span:nth-child(2) { right: 3.2rem; top: 1.6rem; font-size: .85em; animation-delay: 1.4s; }
.zzz span:nth-child(3) { right: 0; top: 0; animation-delay: 2.8s; }
@keyframes drift {
  0%, 100% { opacity: .45; transform: translateY(6px); }
  50% { opacity: .95; transform: translateY(-8px); }
}

/* Sections */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: linear-gradient(180deg, var(--navy-2), var(--navy)); border-block: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: 2.6rem; }
.section-head h2 + p { margin-top: 1rem; }

/* Episodes */
.episodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1.6rem; }
.episode { display: flex; flex-direction: column; background: rgba(11, 56, 80, .18); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-link { position: absolute; inset: 0; display: block; }
.player-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .4s; }
.player-link:hover img { transform: scale(1.025); filter: brightness(1.08); }
.play {
  position: absolute; left: .9rem; bottom: .9rem; width: 56px; height: 56px;
  border-radius: 50%; background: rgba(6, 22, 47, .55); border: 1px solid rgba(244, 232, 200, .7);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: background .25s, transform .25s;
}
.play::after { content: ""; position: absolute; left: 22px; top: 17px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent var(--ivory); }
.player-link:hover .play { background: rgba(90, 167, 174, .55); transform: scale(1.06); }
.length { position: absolute; right: .75rem; bottom: .75rem; padding: .2rem .55rem; border-radius: 6px; background: rgba(6, 22, 47, .82); color: var(--ivory); font-size: .82rem; font-weight: 600; }
.episode-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem 1.6rem 1.7rem; }
.episode-body h3 { margin-bottom: .8rem; }
.episode-body h3 span { display: block; margin-top: .25rem; font-style: italic; font-size: .78em; color: var(--teal-soft); }
.episode-body .text-link { margin-top: auto; }

/* Format */
.timeline { max-width: 760px; margin-bottom: 3rem; }
.tl-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--navy); border: 1px solid var(--line); }
.tl-story { flex: 1; background: linear-gradient(90deg, #f4e8c8, #d9c99c); }
.tl-calm { flex: 3; background: linear-gradient(90deg, #4e979e, var(--deep) 75%, #0a2c42); }
.tl-labels { display: grid; grid-template-columns: 1fr 3fr; margin-top: .8rem; font-size: .95rem; }
.tl-labels strong { display: block; font: 600 1.4rem/1.1 var(--serif); color: var(--ivory); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1.2rem; counter-reset: step; }
.steps li { position: relative; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(6, 22, 47, .5); counter-increment: step; }
.steps li::before { content: "0" counter(step); display: block; margin-bottom: .6rem; font: 600 .8rem/1 var(--sans); letter-spacing: .14em; color: var(--teal); }
.steps h3 { font-size: 1.45rem; margin-bottom: .4rem; }
.steps p { margin: 0; }

/* Pillars */
.pillars { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pillars li { padding: 1.8rem 1.5rem; background: var(--navy); transition: background .3s; }
.pillars li:hover { background: var(--navy-2); }
.pillars .num { display: block; margin-bottom: 1.2rem; font: italic 500 1.6rem/1 var(--serif); color: var(--teal); }
.pillars h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.pillars p { margin: 0; font-size: .97rem; }

/* Store */
.store { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.store-listen h2 { margin-bottom: 1rem; }
.store-listen p { max-width: 34rem; }
audio { width: min(100%, 30rem); margin-top: .8rem; }
.store-buy { padding: 1.2rem 1.2rem 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(11, 56, 80, .22); }
.store-buy img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; margin-bottom: 1.3rem; }
.store-buy h3 { margin-bottom: .3rem; }
.store-buy .btn { width: 100%; margin-top: .4rem; }
.soon { display: inline-block; margin: .4rem 0 0; padding: .45rem .9rem; border: 1px dashed rgba(90, 167, 174, .6); border-radius: 999px; color: var(--teal-soft); font-size: .92rem; }

/* Closing call to action */
.cta {
  padding: clamp(4.5rem, 10vw, 7.5rem) 0; text-align: center;
  background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(244, 232, 200, .12), transparent 70%), var(--navy);
}
.cta p { margin: 1rem auto 2rem; max-width: 30rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 2.2rem 0; font-size: .92rem; color: var(--mist-2); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer p { margin: 0; }
.footer .brand { font-size: 1.15rem; }

/* Small screens */
@media (max-width: 860px) {
  .nav nav { display: none; }
  .nav-inner { justify-content: space-between; }
  .store { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .brand { font-size: 1.2rem; }
  .brand img { width: 34px; height: 34px; }
  .hero { min-height: 0; padding: 200px 0 210px; }
  .moon { top: 86px; right: 9%; width: 64px; }
  .glint { right: calc(9% + 32px - 45px); }
  .zzz { top: 70px; right: calc(9% + 70px); font-size: 1.5rem; }
  .ship { left: 8%; width: 72px; }
  .zzz span:nth-child(1) { right: 3.3rem; top: 1.7rem; }
  .zzz span:nth-child(2) { right: 1.7rem; top: .8rem; }
  .actions .btn { flex: 1 1 100%; }
  .tl-labels { font-size: .85rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .zzz span { animation: none; opacity: .9; }
  .stars, .stars::after, .glint, .ship { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
