/* ==========================================================================
   MY DREAMSEEDS page
   Builds on styles.css (tokens, buttons, header, prose, waves, doodles).
   Rhythm: intro → YouTube story + staggered reel → Music band with photo +
   magazine reel → quiet Writing → small Follow Along → expansive closing.
   ========================================================================== */

.ds-section {
  position: relative;
  overflow-x: clip;
  padding-block: var(--section-space);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* Current page in the nav */
.site-nav a[aria-current="page"]:not(.btn) { background-size: 100% 1.5px; }

/* ---------- Intro ---------- */
.ds-intro {
  padding-block: clamp(4rem, 9vw, 8rem) clamp(2rem, 4vw, 3rem);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.ds-intro__inner {
  max-width: 1200px; margin-inline: auto;
  display: flex; flex-direction: column; align-items: flex-start;
}
.ds-growth { width: 132px; height: 40px; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); overflow: visible; }
.ds-growth path, .ds-growth ellipse { stroke: var(--leaf); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.ds-growth__path { stroke: var(--ink-soft) !important; stroke-width: 2 !important; stroke-dasharray: 0.1 5.5; }
.ds-growth__seed { fill: var(--mustard-soft) !important; stroke: var(--ink-soft) !important; }
.ds-growth .leaf { fill: rgba(94, 127, 54, .16); }
.ds-growth .petals ellipse { fill: var(--mustard-soft); stroke: var(--ink); }
.ds-growth .heart { fill: var(--leaf); }

.ds-intro__title {
  font-size: var(--step-5);
  line-height: .95;
  letter-spacing: -0.035em;
  font-weight: 380;
}
.ds-intro__sub {
  margin-top: clamp(.75rem, 1.6vw, 1.25rem);
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "opsz" 72;
  font-style: italic;
  font-size: var(--step-3);
  line-height: 1.1;
  color: var(--leaf);
  text-wrap: balance;
}
.ds-chapters { margin-top: clamp(2.5rem, 5vw, 4rem); }
.ds-chapters ul { display: flex; flex-wrap: wrap; gap: .5rem 0; margin: 0; padding: 0; list-style: none; }
.ds-chapters li { display: flex; align-items: center; }
.ds-chapters li + li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--mustard); margin-inline: 1rem;
}
.ds-chapters a {
  font-weight: 600; text-decoration: none; color: var(--ink-soft);
  padding-block: .4rem;
  background: linear-gradient(var(--leaf), var(--leaf)) 0 100% / 0 1.5px no-repeat;
  transition: background-size .45s var(--ease), color .3s;
}
.ds-chapters a:hover { color: var(--ink); background-size: 100% 1.5px; }

/* ---------- Header: the title floats in the sky above the flowered hill ---------- */
.ds-intro {
  position: relative; isolation: isolate;
  padding-bottom: clamp(7rem, 15vw, 12rem);
}
.ds-intro__photo--hillside {
  position: absolute; inset: 0; z-index: -1;
  border-bottom-left-radius: var(--r-big);
  overflow: hidden;
}
.ds-intro__photo--hillside img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
/* a soft cream wash in the sky keeps the title crisp */
.ds-intro__photo--hillside::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(251, 247, 238, .45) 0%, rgba(251, 247, 238, .2) 40%, rgba(251, 247, 238, 0) 62%);
}

/* links sit on a soft cream backing so they stay readable over the flowers */
.ds-chapters {
  background: rgba(251, 247, 238, .9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: .35rem 1.35rem;
}
.ds-chapters a { color: var(--ink); }

/* ---------- Story blocks (heading beside the text on wide screens) ---------- */
.ds-story {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
  max-width: 1200px; margin-inline: auto;
}
.ds-story__title { font-size: var(--step-4); }
.ds-story__aside { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; display: flex; flex-direction: column; gap: clamp(2rem, 4vw, 3rem); }
.ds-story__photo { aspect-ratio: 4 / 5; width: min(100%, 380px); }
.ds-story__photo img { object-position: 50% 30%; }
.ds-story__text { max-width: 38rem; }

/* ---------- Video tiles ---------- */
.vid { margin: 0; min-width: 0; }
.vid__frame {
  position: relative; display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-soft);
  background:
    radial-gradient(120% 90% at 20% 15%, var(--mustard-soft) 0%, transparent 55%),
    radial-gradient(110% 100% at 85% 90%, rgba(142, 134, 203, .55) 0%, transparent 60%),
    var(--leaf-mist);
  color: var(--ink);
}
.vid__frame img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; /* also trims the black bars on YouTube's 4:3 thumbnails */
  transition: transform 1.2s var(--ease);
}
.vid__frame--no-thumb img { display: none; }
a.vid__frame:hover img { transform: scale(1.03); }
.vid__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.vid__play {
  position: absolute; left: 50%; top: 50%;
  width: clamp(56px, 7vw, 76px); aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: rgba(255, 253, 248, .92);
  box-shadow: 0 10px 30px -12px rgba(35, 58, 43, .55);
  transition: transform .5s var(--ease), background-color .3s;
}
.vid__play::after {
  content: ""; position: absolute; left: 54%; top: 50%;
  translate: -50% -50%;
  border-style: solid; border-color: transparent transparent transparent var(--ink);
  border-width: .55em 0 .55em .9em;
  font-size: clamp(14px, 1.6vw, 18px);
}
a.vid__frame:hover .vid__play, a.vid__frame:focus-visible .vid__play { transform: scale(1.08); background: var(--mustard); }
.vid__frame:focus-visible { outline-offset: 4px; border-radius: var(--r-soft); }

.vid figcaption {
  margin-top: .9rem;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "opsz" 24;
  font-size: var(--step-1);
  line-height: 1.3;
  text-wrap: balance;
}
.vid__kicker {
  display: block; margin-bottom: .3rem;
  font-family: var(--font-body);
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.vid--small figcaption { font-size: 1.125rem; }

/* ---------- YouTube reel: big feature, side video dropped lower, staggered pair ---------- */
.ds-reel {
  max-width: 1240px; margin: clamp(4rem, 8vw, 7rem) auto 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.ds-reel__more { display: contents; }

.ds-reel--youtube .vid--feature { grid-column: 1 / 9; }
.ds-reel--youtube .vid--side { grid-column: 9 / 13; align-self: end; margin-bottom: 3.5rem; }
.ds-reel--youtube .vid--small:nth-child(1) { grid-column: 2 / 7; margin-top: clamp(1rem, 3vw, 2.5rem); }
.ds-reel--youtube .vid--small:nth-child(2) { grid-column: 7 / 12; margin-top: clamp(4rem, 9vw, 7rem); }
.ds-reel--youtube .vid--feature .vid__frame { border-radius: var(--r-big) var(--r-soft) var(--r-soft) var(--r-soft); }

/* ---------- Music: lavender band, arch photo beside the story, magazine reel ---------- */
.ds-music {
  background: var(--lupine-mist);
  margin-block: clamp(3rem, 6vw, 5rem);
}
.ds-music__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  max-width: 1200px; margin-inline: auto;
  align-items: start;
}
.ds-music__photo {
  aspect-ratio: 3 / 4;
  position: sticky; top: calc(var(--header-h) + 2rem);
}
.ds-music__photo img { object-position: 50% 38%; }
.ds-music__text { display: flex; flex-direction: column; gap: clamp(1.5rem, 3vw, 2rem); max-width: 38rem; min-width: 0; }

.ds-declaration {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "opsz" 96;
  font-style: italic;
  font-size: var(--step-3);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--lupine-deep);
  padding-block: .4em;
  text-wrap: balance;
}

.ds-listen {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.5rem;
  margin-top: .75rem;
}
.ds-pills { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.ds-pills a {
  display: inline-flex; align-items: center; gap: .45em;
  min-height: 44px; padding: .5em 1.1em;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px rgba(35, 58, 43, .28);
  font-weight: 600; font-size: .9375rem; text-decoration: none;
  transition: box-shadow .3s, background-color .3s;
}
.ds-pills a::after { content: "↗"; font-weight: 400; color: var(--leaf); transition: transform .4s var(--ease); }
.ds-pills a:hover { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ds-pills a:hover::after { transform: translate(2px, -2px); }

/* one wide feature, then a row of three with the middle one dropped lower */
.ds-reel--music { align-items: start; }
.ds-reel--music .vid--feature { grid-column: 2 / 12; }
.ds-reel--music .vid--small:nth-child(1) { grid-column: 1 / 5; }
.ds-reel--music .vid--small:nth-child(2) { grid-column: 5 / 9; margin-top: clamp(2rem, 5vw, 4rem); }
.ds-reel--music .vid--small:nth-child(3) { grid-column: 9 / 13; }
.ds-reel--music .vid--feature .vid__frame { border-radius: var(--r-soft) var(--r-big) var(--r-soft) var(--r-soft); }

/* ---------- Writing: quiet, single centered column ---------- */
.ds-writing__grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
  gap: clamp(2.5rem, 7vw, 7rem); align-items: center;
  max-width: 1080px; margin-inline: auto;
}
.ds-writing__inner { max-width: 34rem; }
.ds-writing__photo { aspect-ratio: 3 / 4; width: 100%; max-width: 380px; justify-self: end; }
.ds-writing__photo img { object-position: 45% 35%; }
.ds-writing .ds-story__title { font-size: var(--step-3); margin-bottom: .35em; }
.ds-writing__hope {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "opsz" 36;
  font-style: italic;
  font-size: var(--step-1);
  color: var(--leaf);
}

/* ---------- Follow Along: small ---------- */
.ds-follow {
  padding-block: 0 var(--section-space);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.ds-follow__inner {
  max-width: 34rem; margin-inline: auto;
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1.5px dashed var(--line);
  display: flex; flex-direction: column; gap: 1rem;
}
.ds-follow__title { font-size: var(--step-2); }
.ds-follow__text { display: flex; flex-direction: column; gap: .6rem; color: var(--ink-soft); }
.ds-pills--follow { margin-top: .5rem; }

/* ---------- Closing: philosophy → open photo → their dream ---------- */
.ds-closing { position: relative; overflow-x: clip; padding-bottom: clamp(5rem, 10vw, 8rem); }
.ds-closing__philosophy {
  max-width: 38rem; margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  box-sizing: content-box;
  font-size: var(--step-1);
  line-height: 1.6;
}
.ds-closing__first {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-size: clamp(2.5rem, 1.9rem + 2.6vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: .3em;
}
.ds-closing__wish {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "opsz" 48;
  font-style: italic;
  font-size: var(--step-2);
  line-height: 1.25;
  color: var(--lupine-deep);
  padding-top: .3em;
}

.ds-closing__band {
  margin: clamp(4rem, 8vw, 7rem) 0 0;
  height: clamp(360px, 56vw, 760px);
  max-width: 1240px;
  overflow: hidden;
  border-radius: var(--r-big) var(--r-big) 0 0;
  margin-inline: max(var(--gutter), env(safe-area-inset-left, 0px));
}
@media (min-width: 1300px) { .ds-closing__band { margin-inline: auto; } }
.ds-closing__band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 46%; }

.ds-closing__ask {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: calc(var(--r-big) * -0.6) auto 0;
  width: min(100% - 2 * var(--gutter), 860px);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem) 0;
  background: var(--cream);
  border-radius: var(--r-big) var(--r-big) 0 0;
}
.ds-closing__title {
  font-size: var(--step-4);
  line-height: 1;
  letter-spacing: -0.03em;
}
.ds-closing__sub {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "opsz" 48;
  font-style: italic;
  font-size: var(--step-2);
  line-height: 1.2;
  color: var(--leaf);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

/* ---------- Tablet & phone ---------- */
@media (max-width: 899px) {
  .ds-story { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .ds-story__aside { position: static; }
  .ds-story__photo { width: min(72%, 320px); margin-left: auto; }

  .ds-music__grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .ds-music__photo { position: relative; top: 0; width: min(64%, 320px); margin-left: auto; order: 2; }
  .ds-music__text { order: 1; }

  .ds-reel { display: block; }
  .ds-reel .vid--feature, .ds-reel .vid--side { margin: 0 0 2.25rem; }

  /* secondary videos become a gentle swipe row */
  .ds-reel .ds-reel__more {
    display: flex; flex-direction: row; gap: 1rem;
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0 var(--gutter) .75rem;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
  }
  .ds-reel .ds-reel__more .vid {
    flex: 0 0 min(78%, 360px);
    scroll-snap-align: start;
    margin: 0;
  }
  .ds-reel--youtube .vid--side { width: 82%; margin-left: auto; }
}

@media (max-width: 899px) {
  .ds-intro { padding-bottom: clamp(9rem, 40vw, 13rem); }
  .ds-intro__photo--hillside { border-bottom-left-radius: 120px; }
  .ds-writing__grid { grid-template-columns: minmax(0, 1fr); }
  .ds-writing__photo { width: min(68%, 300px); }
}
@media (min-width: 600px) and (max-width: 899px) {
  .ds-intro { padding-bottom: 17rem; }
}
@media (max-width: 520px) {
  .ds-intro__title { font-size: 3.4rem; }
  /* chapters become a tidy 2 × 2 list with the seed dot leading each */
  .ds-chapters { border-radius: 22px; padding: .6rem 1.1rem; }
  .ds-chapters ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1rem; }
  .ds-chapters li::before, .ds-chapters li + li::before {
    content: ""; width: 5px; height: 5px; border-radius: 50%;
    background: var(--mustard); margin: 0 .6rem 0 0; flex: none;
  }
  .ds-closing__ask { padding-inline: 1rem; }
  .ds-closing__ask .btn--hero { font-size: 1.125rem; padding-inline: 1.2em; }
  .ds-declaration { font-size: 2.1rem; }
  .ds-closing__first { font-size: 2.6rem; }
  .ds-closing__title { font-size: 2.6rem; }
  .ds-closing__band { height: 440px; border-radius: 120px 120px 0 0; margin-inline: 0; }
  .ds-closing__band img { object-position: 50% 42%; }
  .ds-closing__ask { margin-top: -60px; }
  .ds-closing__ask .btn { width: 100%; }
  .ds-listen .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  a.vid__frame:hover img { transform: none; }
}
