/* WonderPlace landing page. Palette: brand/brand.json ("Sunset Workshop"). Type: Bricolage Grotesque. */

:root {
  --plum: #2A1420;
  --plum-light: #3A1E2E;
  --coral: #FF7A59;
  --peach: #FFD8A8;
  --cream: #FFF1E6;
  --mauve: #D9B3A6;
  --deep-coral: #E0552F;
  --rust: #B23E1E;
  --muted-plum: #6B4A55;

  /* light theme (default) */
  --bg: var(--cream);
  --bg-raised: #FFE7D6;
  --ink: var(--plum);
  --ink-soft: var(--muted-plum);
  --accent: var(--rust);
  --accent-fill: var(--deep-coral);
  --on-accent: var(--cream);
  --line: rgba(42, 20, 32, 0.12);
  --glow-core: rgba(255, 122, 89, 0.42);
  --glow-halo: rgba(255, 216, 168, 0.75);
  --vignette: rgba(217, 179, 166, 0.55);
  --grain-opacity: 0.06;
  --shadow: 0 30px 60px -30px rgba(42, 20, 32, 0.45), 0 0 0 1px var(--line);

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --max: 1080px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--plum);
    --bg-raised: var(--plum-light);
    --ink: var(--cream);
    --ink-soft: var(--mauve);
    --accent: var(--coral);
    --accent-fill: var(--coral);
    --on-accent: var(--plum);
    --line: rgba(255, 241, 230, 0.12);
    --glow-core: rgba(255, 122, 89, 0.30);
    --glow-halo: rgba(178, 62, 30, 0.35);
    --vignette: rgba(18, 8, 14, 0.85);
    --grain-opacity: 0.09;
    --shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line);
  }
}

:root[data-theme="dark"] {
  --bg: var(--plum);
  --bg-raised: var(--plum-light);
  --ink: var(--cream);
  --ink-soft: var(--mauve);
  --accent: var(--coral);
  --accent-fill: var(--coral);
  --on-accent: var(--plum);
  --line: rgba(255, 241, 230, 0.12);
  --glow-core: rgba(255, 122, 89, 0.30);
  --glow-halo: rgba(178, 62, 30, 0.35);
  --vignette: rgba(18, 8, 14, 0.85);
  --grain-opacity: 0.09;
  --shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Hero: one warm light source in a dark room ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 96px var(--gutter) 120px;
  overflow: hidden;
  text-align: center;
}

.hero__glow {
  position: absolute;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(closest-side at 50% 46%, var(--glow-core), transparent 70%),
    radial-gradient(60% 50% at 50% 50%, var(--glow-halo), transparent 80%),
    radial-gradient(120% 90% at 50% 50%, transparent 40%, var(--vignette) 100%);
  animation: breathe 9s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  z-index: -1;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: var(--grain-opacity);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

@keyframes breathe {
  from { transform: scale(1); opacity: 0.88; }
  to   { transform: scale(1.06); opacity: 1; }
}

.hero__inner {
  width: 100%;
  max-width: 760px;
  animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.hero__mark { margin: 0 auto; width: min(100%, 640px); }
.hero__mark img { width: 100%; }

.hero__promise {
  margin: 2rem auto 0;
  max-width: 34rem;
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: balance;
}

.hero__promise em { font-style: normal; color: var(--ink); font-weight: 500; }

.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.button__icon { width: 18px; height: 18px; }

.button--primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  box-shadow: 0 10px 30px -10px var(--accent-fill);
}

.button--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px var(--accent-fill); }

.button--ghost { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.button--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-soft); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px var(--ink-soft);
  opacity: 0.7;
}

.hero__scroll span {
  position: absolute;
  left: 50%;
  top: 9px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent);
  animation: drip 2.2s ease-in-out infinite;
}

@keyframes drip {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Latest episode ---------- */

main { padding: 0 var(--gutter); }

.latest {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 10vw, 112px) 0 clamp(40px, 7vw, 80px);
}

.episode {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

@media (min-width: 860px) {
  .episode { grid-template-columns: 1.35fr 1fr; }
}

.episode__frame {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.episode__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.episode__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(42, 20, 32, 0.55));
  pointer-events: none;
}

.episode__frame:hover img { transform: scale(1.035); }

.episode__play {
  position: absolute;
  z-index: 1;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: rgba(42, 20, 32, 0.7);
  color: var(--cream);
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1.5px rgba(255, 241, 230, 0.3);
  transition: background-color .25s ease, color .25s ease;
}

.episode__play svg { width: 16px; height: 16px; }

@media (max-width: 600px) {
  .episode__play { left: 10px; bottom: 10px; padding: 6px 12px 6px 8px; font-size: 0.8125rem; }
}

.episode__frame:hover .episode__play { background: var(--coral); color: var(--plum); }

.episode__time {
  position: absolute;
  z-index: 1;
  right: 12px;
  top: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(42, 20, 32, 0.8);
  color: var(--cream);
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.episode__title {
  margin: 0;
  font-size: clamp(1.75rem, 4.2vw, 2.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.episode__summary { margin: 1rem 0 1.5rem; color: var(--ink-soft); }

.textlink {
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
}

.textlink span { display: inline-block; transition: transform .2s ease; }
.textlink:hover span { transform: translateX(4px); }

/* ---------- Creed ---------- */

.creed {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) 0 clamp(64px, 10vw, 120px);
  border-top: 1px solid var(--line);
}

.creed__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}

@media (min-width: 760px) {
  .creed__list { grid-template-columns: repeat(3, 1fr); }
}

.creed__list h3 {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.creed__list h3::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 1rem;
  border-radius: 2px;
  background: var(--accent-fill);
}

.creed__list p { margin: 0; color: var(--ink-soft); }

/* ---------- Footer ---------- */

.footer {
  position: relative;
  padding: 64px var(--gutter) 48px;
  text-align: center;
  background:
    radial-gradient(60% 120% at 50% 100%, var(--glow-core), transparent 70%),
    var(--bg-raised);
  border-top: 1px solid var(--line);
}

.footer__icon { margin: 0 auto 0.75rem; }

.footer__tag {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.footer__links { margin: 1.25rem 0 0; }
.footer__links a { font-weight: 500; color: var(--accent); text-underline-offset: 4px; }

.footer__fine {
  margin: 1.5rem auto 0;
  max-width: 34rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-soft);
  opacity: 0.85;
}

/* ---------- Motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
