/* /wedding-dance/ only, loaded after styles.css and pages.css. The approved round-10 "balanced" design
   (approved 2026-11-24): a photo hero, then the twelve-week plan told as six moments.
   Daylight moments sit on mist, the day itself on night. Words never sit on a busy part of a photo.
   Phone first; from 760px the photos keep to one centred column. */

/* ---------- Hero: the empty floor, the words over its faded foot ---------- */
.ip-hero.wd-hero{position:relative;background:var(--night);color:var(--cream);padding:0}
.wd-hero-fig,.wd-fig{margin:0;position:relative}
.wd-img{display:block;width:100%;height:auto}
/* short phone screens: crop the hero photo so the button stays on the first screen */
.wd-hero .wd-img{height:min(calc(100vw * 1073 / 864), 58svh);object-fit:cover;object-position:50% 45%}
.wd-hero-fig::before,.wd-hero-fig::after{content:"";position:absolute;left:0;right:0;pointer-events:none}
.wd-hero-fig::before{top:0;height:24%;background:linear-gradient(180deg,rgba(18,14,24,.55),rgba(18,14,24,0))}
.wd-hero-fig::after{bottom:0;height:62%;background:linear-gradient(180deg,rgba(18,14,24,0) 0,rgba(18,14,24,.55) 40%,rgba(18,14,24,.92) 78%,var(--night) 100%)}
.wd-hero-copy{position:relative;z-index:1;margin-top:-11.25rem;padding:0 var(--gutter) 3.25rem}
.wd-hero .crumb{margin-bottom:.9rem;color:var(--on-dark-2);text-shadow:0 1px 10px rgba(18,14,24,.95),0 0 3px rgba(18,14,24,.8)}
.wd-hero .crumb a{display:inline-block;padding:.6rem 0;margin:-.6rem 0}
.wd-h1{font:300 clamp(2.6rem, 2rem + 3vw, 4.25rem)/1 var(--display);letter-spacing:-.03em;color:var(--cream);text-wrap:balance;text-shadow:0 2px 28px rgba(18,14,24,.6)}
.wd-lead{margin-top:1.1rem;font-size:1.05rem;line-height:1.6;color:var(--on-dark-2);max-width:36ch}
.wd-facts{margin-top:1.75rem;padding-top:1.25rem;border-top:1px solid var(--line-dark);font:400 1.15rem/1.4 var(--display);color:var(--cream);max-width:24rem}

/* ---------- The plan, on mist ---------- */
.wd-plan{background:var(--mist);color:var(--plum)}
.wd-head{padding:3.5rem var(--gutter) 1rem}
.wd-head h2{font:300 clamp(2.6rem, 2.1rem + 1.6vw, 3.4rem)/1.02 var(--display);letter-spacing:-.025em;text-wrap:balance}
.wd-dek{margin-top:1.1rem;padding-top:1.1rem;border-top:1px solid rgba(42,27,61,.14);font:italic 300 1.15rem/1.5 var(--display);color:#4a3d5c;max-width:30ch}
.wd-list{list-style:none;margin:0;padding:0}
.wd{position:relative;padding-bottom:3.25rem}
.wd-when{margin:0 0 .4rem;font:italic 400 1.05rem/1.2 var(--display);color:var(--violet-deep)}
.wd-title{font:300 2.4rem/1 var(--display);letter-spacing:-.03em;text-wrap:balance;color:var(--plum)}
.wd-text{padding:1rem var(--gutter) 0;line-height:1.6;color:#4a3d5c;max-width:calc(32ch + 2 * var(--gutter))}

/* step 1: the label and title bleed up into the photo's foot, which fades into the mist */
.wd-bleed{display:grid;padding-bottom:2.5rem}
.wd-bleed .wd-fig,.wd-bleed .wd-cap{grid-area:1/1}
.wd-bleed .wd-fig::after{content:"";position:absolute;inset:auto 0 0;height:65%;background:linear-gradient(180deg,rgba(248,246,252,0) 0,rgba(248,246,252,.78) 50%,var(--mist) 92%)}
.wd-bleed .wd-cap{position:relative;z-index:1;align-self:end;padding:0 var(--gutter)}
.wd-bleed .wd-title{font-size:3rem;line-height:.95}
.wd-bleed .wd-text{grid-area:2/1;padding-top:.9rem}

/* step 2: the photo, then the words on mist */
.wd-light{margin-top:1rem;padding-bottom:3rem}
.wd-light .wd-cap{padding:1.6rem var(--gutter) 0}

/* steps 3 to 5: words on mist, hairlines between */
.wd-plain{padding:0 var(--gutter) 2.25rem}
.wd-plain .wd-cap{padding-top:2rem;border-top:1px solid rgba(42,27,61,.12)}
.wd-plain .wd-title{font-size:2.1rem}
.wd-plain .wd-text{padding:.85rem 0 0}
.wd-plain:has(+ .wd-day){padding-bottom:3.5rem}

/* step 6, the day: the photo on night, the title centred over its faded foot */
.wd-day{display:grid;background:var(--night);color:var(--cream);text-align:center;padding-bottom:4.5rem}
.wd-day .wd-fig,.wd-day .wd-cap{grid-area:1/1}
.wd-day .wd-fig::before,.wd-day .wd-fig::after{content:"";position:absolute;left:0;right:0;pointer-events:none}
.wd-day .wd-fig::before{top:0;height:22%;background:linear-gradient(180deg,var(--night),rgba(18,14,24,0))}
.wd-day .wd-fig::after{bottom:0;height:52%;background:linear-gradient(180deg,rgba(18,14,24,0) 0,rgba(18,14,24,.74) 50%,var(--night) 100%)}
.wd-day .wd-cap{position:relative;z-index:1;align-self:end;padding:0 var(--gutter) .15rem}
.wd-day .wd-when{color:var(--lilac-100);font-size:1.15rem}
.wd-day .wd-title{font:italic 300 3.5rem/.95 var(--display);letter-spacing:-.035em;color:var(--cream);text-shadow:0 0 40px rgba(139,104,238,.6),0 2px 20px rgba(18,14,24,.7)}
.wd-day .wd-text{grid-area:2/1;justify-self:center;max-width:24ch;padding:1rem var(--gutter) 0;color:var(--cream);font-size:1.05rem}


/* tablets: one column on the same left edge as the sections below; photos stop at 40rem,
   the night photos' side edges soften into the dark, the daylight ones get the site's rounded corners */
@media (min-width:760px) and (max-width:959px){
  .wd-hero-fig{width:100%;max-width:40rem;margin:0 auto}
  .wd-fig{max-width:40rem;margin:0 var(--gutter)}
  .wd-day .wd-fig{width:100%;margin:0 auto}
  .wd-light .wd-fig{border-radius:1.25rem;overflow:hidden}
  .wd-bleed .wd-fig{border-radius:1.25rem 1.25rem 0 0;overflow:hidden}
  .wd-hero-fig .wd-img,.wd-day .wd-img{-webkit-mask-image:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent);mask-image:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent)}
  .wd-cap{max-width:calc(40rem + 2 * var(--gutter))}
  .wd-day .wd-text{max-width:28ch}
}

/* desktop: a spread on the same frame as the sections below. The hero is words | photo,
   the song and the shoes alternate photo and words, lessons 2 to 8 sit side by side,
   and the day is a night spread with the photo fading into the dark. */
@media (min-width:960px){
  .wd-hero,.wd-plan{--frame:max(var(--gutter), calc((100% - var(--max)) / 2));--col-gap:clamp(1.25rem, 2.5vw, 2.5rem)}

  /* hero */
  .ip-hero.wd-hero{display:grid;grid-template-columns:var(--frame) minmax(0,5fr) minmax(0,6fr);min-height:min(100svh, 58rem)}
  .wd-hero-fig{grid-column:3;grid-row:1}
  .wd-hero .wd-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 45%}
  .wd-hero-fig::before{height:20%}
  .wd-hero-fig::after{top:0;bottom:0;left:0;right:auto;width:42%;height:auto;background:linear-gradient(90deg,var(--night),rgba(18,14,24,0))}
  .wd-hero-copy{grid-column:2;grid-row:1;align-self:center;margin:0;padding:7.5rem clamp(2rem, 4vw, 4.5rem) 4.5rem 0;max-width:38rem}
  .wd-h1{text-shadow:none}
  .wd-lead{font-size:1.15rem;max-width:34ch}

  /* plan head: heading left, the plan in a line right, like the rest of the site */
  .wd-head{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:var(--col-gap) clamp(2.5rem, 6vw, 7rem);align-items:end;padding:clamp(5rem, 8vw, 7.5rem) var(--frame) clamp(3rem, 5vw, 4.5rem)}
  .wd-dek{margin-top:0;max-width:34ch}

  .wd-list{display:grid;grid-template-columns:var(--frame) repeat(3,minmax(0,1fr)) var(--frame)}
  .wd-fig .wd-img{max-height:min(48rem, 86svh);object-fit:cover}
  .wd-cap,.wd-text{max-width:none;margin:0}
  .wd-text{max-width:36ch}

  /* the song and the shoes: photo and words side by side, the words centred on the photo */
  .wd-bleed,.wd-light{grid-column:2/5;display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:1fr auto auto 1fr;column-gap:var(--col-gap);margin:0;padding-bottom:clamp(4.5rem, 8vw, 7rem)}
  .wd-bleed .wd-title,.wd-light .wd-title{font-size:clamp(3rem, 1.6rem + 2.6vw, 4.5rem);line-height:.95}
  .wd-bleed .wd-cap,.wd-light .wd-cap{grid-row:2;padding:0;align-self:end}
  .wd-bleed .wd-text,.wd-light .wd-text{grid-row:3;padding:1.25rem 0 0;font-size:1.05rem}
  /* the song: its photo fades into the mist on the right and the title bleeds over that edge */
  .wd-bleed .wd-fig{grid-column:1/8;grid-row:1/-1;border-radius:1.25rem 0 0 1.25rem;overflow:hidden}
  .wd-bleed .wd-img{-webkit-mask-image:linear-gradient(90deg,#000 62%,transparent);mask-image:linear-gradient(90deg,#000 62%,transparent)}
  .wd-bleed .wd-fig::after{display:none}
  .wd-bleed .wd-cap{grid-column:7/13}
  .wd-bleed .wd-text{grid-column:8/13}
  /* the shoes: words left, photo right */
  .wd-light .wd-fig{grid-column:7/13;grid-row:1/-1;border-radius:1.25rem;overflow:hidden}
  .wd-light .wd-cap,.wd-light .wd-text{grid-column:1/6}

  /* lessons 2 to 8: three columns, a hairline above each */
  .wd-plain{padding:0 var(--col-gap) clamp(5rem, 8vw, 7rem) 0}
  .wd-light + .wd-plain{grid-column:2}
  .wd-light + .wd-plain + .wd-plain{grid-column:3}
  .wd-light + .wd-plain + .wd-plain + .wd-plain{grid-column:4;padding-right:0}
  .wd-plain .wd-cap{padding-top:1.75rem;border-top:1px solid rgba(42,27,61,.14)}
  .wd-plain:has(+ .wd-day){padding-bottom:clamp(5rem, 8vw, 7rem)}
  .wd-plain .wd-title{font-size:clamp(1.9rem, 1rem + 1.4vw, 2.25rem)}

  /* the day: photo left fading into the night, the title and line beside it */
  .wd-day{grid-column:1/-1;grid-template-columns:var(--frame) repeat(12,minmax(0,1fr)) var(--frame);grid-template-rows:1fr auto auto 1fr;text-align:left;padding:clamp(4rem, 7vw, 6rem) 0}
  .wd-day .wd-fig{grid-column:2/9;grid-row:1/-1}
  .wd-day .wd-img{-webkit-mask-image:linear-gradient(180deg,transparent,#000 10%,#000 88%,transparent);mask-image:linear-gradient(180deg,transparent,#000 10%,#000 88%,transparent)}
  .wd-day .wd-fig::before{display:none}
  .wd-day .wd-fig::after{top:0;bottom:0;left:auto;right:0;width:45%;height:auto;background:linear-gradient(90deg,rgba(18,14,24,0),var(--night))}
  .wd-day .wd-cap{grid-column:8/14;grid-row:2;align-self:end;padding:0 0 0 var(--col-gap)}
  .wd-day .wd-title{font-size:clamp(3.5rem, 1.5rem + 3.6vw, 5.75rem)}
  .wd-bleed .wd-text,.wd-day .wd-text{position:relative;z-index:1}
  .wd-day .wd-text{grid-column:8/14;grid-row:3;justify-self:start;max-width:26ch;padding:1.25rem 0 0 var(--col-gap);font-size:1.15rem}
}
