/* Waterlijn section blocks: types (Expanded Cards), steps (Step Path), speclist (Hover List).
   Vanilla ports of three Scrolltide components, restyled to the Waterlijn tokens in global.css.
   Content is plain HTML; sections.js only adds state classes (is-open, is-live, is-shown, is-stacked). */

/* ================= 1. TYPES: Expanded Cards ================= */
.st-types{
  --n:5; --rail:10.5cqw; --gap:1.1cqw; --pad:clamp(1rem,2.2cqw,1.6rem);
  --open:calc(100cqw - (var(--n) - 1)*(var(--rail) + var(--gap)));
  --speed:.7s; --ease:cubic-bezier(.22,1,.36,1);
  container-type:inline-size; width:100%; -webkit-tap-highlight-color:transparent;
}
.st-types__rail{list-style:none;margin:0;padding:0;position:relative;height:clamp(21rem,40cqw,32rem);overflow:hidden;overflow:clip}
.st-type{
  --i:0; --after:0; --vis:var(--rail);
  position:absolute;top:0;left:0;height:100%;width:var(--open);
  transform:translate3d(calc(var(--i)*(var(--rail) + var(--gap)) + var(--after)*(var(--open) - var(--rail))),0,0);
  clip-path:inset(0 calc(var(--open) - var(--vis)) 0 0 round var(--r));
  transition:transform var(--speed) var(--ease),clip-path var(--speed) var(--ease);
  background:var(--basin);color:#fff;
}
.st-type:nth-child(2){--i:1}.st-type:nth-child(3){--i:2}.st-type:nth-child(4){--i:3}
.st-type:nth-child(5){--i:4}.st-type:nth-child(6){--i:5}.st-type:nth-child(7){--i:6}
.st-type.is-open{--vis:var(--open)}
.st-type.is-open ~ .st-type{--after:1}
.st-type__link{position:absolute;inset:0;display:block;color:#fff;text-decoration:none;border-radius:var(--r)}
.st-type__link:hover{color:#fff}
.st-type__link:focus-visible{outline:3px solid var(--buoy);outline-offset:-5px;border-radius:var(--r)}
.st-type__img{
  position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;
  transform:translateX(calc((var(--vis) - var(--open))*.42)) scale(1.1);
  transition:transform var(--speed) var(--ease);
}
.st-type.is-open .st-type__img{transform:translateX(0) scale(1)}
.st-type__veil,.st-type__scrim{position:absolute;inset:0;pointer-events:none;transition:opacity var(--speed) var(--ease)}
.st-type__veil{background:linear-gradient(180deg,rgba(6,42,54,.62) 0%,rgba(6,42,54,.3) 26%,rgba(6,42,54,.36) 55%,rgba(6,42,54,.78) 100%)}
.st-type__scrim{background:linear-gradient(180deg,rgba(6,42,54,.5) 0%,rgba(6,42,54,0) 20%,rgba(6,42,54,0) 32%,rgba(6,42,54,.62) 62%,rgba(6,42,54,.94) 100%);opacity:0}
.st-type.is-open .st-type__veil{opacity:0}
.st-type.is-open .st-type__scrim{opacity:1}
.st-type__num{position:absolute;top:var(--pad);left:0;width:var(--rail);text-align:center;font-family:var(--display);font-weight:800;font-size:.85rem;letter-spacing:.1em;color:#7fd3de;font-variant-numeric:tabular-nums}
.st-type__tab{
  position:absolute;left:0;bottom:var(--pad);width:var(--rail);display:flex;justify-content:center;pointer-events:none;
  transition:opacity .3s ease .25s;
}
.st-type__tab span{writing-mode:vertical-rl;transform:rotate(180deg);font-family:var(--display);font-weight:800;font-size:clamp(.95rem,1.7cqw,1.25rem);letter-spacing:-.01em;white-space:nowrap;text-shadow:0 1px 10px rgba(6,42,54,.6)}
.st-type.is-open .st-type__tab{opacity:0;transition-delay:0s;transition-duration:.15s}
.st-type__cap{
  position:absolute;left:var(--pad);right:var(--pad);bottom:var(--pad);display:flex;align-items:flex-end;gap:1rem;
  opacity:0;transform:translateY(14px);transition:opacity .18s ease,transform .18s ease;
}
.st-type.is-open .st-type__cap{opacity:1;transform:none;transition:opacity .5s ease .22s,transform .6s var(--ease) .22s}
.st-type__txt{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}
.st-type__name{font-family:var(--display);font-weight:800;font-size:clamp(1.5rem,2.7cqw,2.1rem);line-height:1.1;letter-spacing:-.015em;color:#fff;margin:0}
.st-type__line{font-size:1.02rem;line-height:1.45;color:#e6f3f4;max-width:30rem}
.st-type__price{display:inline-block;margin-top:.2rem;padding:.3rem .75rem;border-radius:999px;background:rgba(255,255,255,.14);box-shadow:inset 0 0 0 1px rgba(255,255,255,.3);font-family:var(--display);font-weight:700;font-size:.88rem;line-height:1.3;color:#fff;font-variant-numeric:tabular-nums}
.st-type__go{flex:none;display:grid;place-items:center;width:2.9rem;height:2.9rem;border-radius:50%;background:var(--buoy);color:var(--buoy-ink)}
.st-type__go svg,.st-spec__arrow svg{width:46%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* phones and narrow columns: a swipe rail, every caption shown */
@container (max-width:720px){
  .st-types__rail{height:auto;display:flex;gap:.75rem;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;padding:0 0 .75rem;scrollbar-width:thin;scrollbar-color:var(--line) transparent;overscroll-behavior-x:contain}
  .st-type{position:relative;flex:0 0 min(80cqw,21rem);width:auto;height:auto;aspect-ratio:4/5;transform:none;clip-path:none;border-radius:var(--r);overflow:hidden;scroll-snap-align:start}
  .st-type__img,.st-type.is-open .st-type__img{transform:none}
  .st-type__veil{opacity:0}
  .st-type__scrim{opacity:1}
  .st-type__tab{display:none}
  .st-type__num{width:auto;left:var(--pad);text-align:left;text-shadow:0 1px 8px rgba(6,42,54,.7)}
  .st-type__cap{opacity:1;transform:none}
  .st-type__name{font-size:1.5rem}
  .st-type__line{font-size:.98rem}
}

/* ================= 2. STEPS: Step Path ================= */
.st-steps{
  --cols:4; --drop:3.4cqw;
  --st-line:var(--water-deep); --st-disc:var(--water-deep); --st-disc-ink:#fff; --st-title:var(--ink); --st-text:var(--ink-2);
  container-type:inline-size;position:relative;width:100%;
}
.wet .st-steps{--st-line:#7fd3de;--st-disc:#7fd3de;--st-disc-ink:var(--basin);--st-title:#fff;--st-text:#b9d6da}
.st-steps__svg{position:absolute;inset:0;width:100%;height:100%;max-width:none;overflow:visible;pointer-events:none}
.st-steps__list{list-style:none;margin:0;padding:3.75rem 0 0;position:relative;z-index:1;display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));column-gap:clamp(1.25rem,3cqw,2.5rem)}
.st-step{--i:0;--d:0s;margin-top:calc(var(--drop)*var(--i))}
.st-step:nth-child(2){--i:1}.st-step:nth-child(3){--i:2}.st-step:nth-child(4){--i:3}.st-step:nth-child(5){--i:4}
.st-step__n{display:grid;place-items:center;width:2.75rem;height:2.75rem;border-radius:50%;background:var(--st-disc);color:var(--st-disc-ink);font-family:var(--display);font-weight:800;font-size:1.1rem;line-height:1;font-variant-numeric:tabular-nums}
.st-step__body{margin-top:1rem}
.st-step__title{margin:0;font-family:var(--display);font-weight:800;font-size:clamp(1.15rem,1.9cqw,1.4rem);line-height:1.2;color:var(--st-title)}
.st-step__text{margin:.5rem 0 0;max-width:30ch;font-size:.98rem;line-height:1.55;color:var(--st-text)}
.st-steps__path{stroke:var(--st-line)}
.st-steps__draw{stroke-dasharray:1 1;stroke-dashoffset:0}
/* motion states, only once sections.js is running */
.st-steps.is-live .st-steps__draw{stroke-dashoffset:1}
.st-steps.is-live .st-step__body{opacity:0;transform:translateY(14px)}
.st-steps.is-live .st-step__n{opacity:0;transform:scale(.4)}
.st-steps.is-live.is-shown .st-steps__draw{stroke-dashoffset:0;transition:stroke-dashoffset var(--st-draw,1.8s) linear}
.st-steps.is-live.is-shown .st-step__body{opacity:1;transform:none;transition:opacity .6s ease calc(var(--d) + .1s),transform .7s cubic-bezier(.22,1,.36,1) calc(var(--d) + .1s)}
.st-steps.is-live.is-shown .st-step__n{opacity:1;transform:none;transition:opacity .25s ease var(--d),transform .5s cubic-bezier(.34,1.56,.64,1) var(--d)}
/* stacked: set by sections.js under 640px, and by the container query when JS is off */
.st-steps.is-stacked .st-steps__list{grid-template-columns:1fr;row-gap:2rem;padding-top:.25rem}
.st-steps.is-stacked .st-step{margin-top:0;display:grid;grid-template-columns:2.75rem minmax(0,1fr);column-gap:1rem;align-items:start}
.st-steps.is-stacked .st-step__body{margin-top:.45rem}
.st-steps.is-stacked .st-step__text{max-width:none}
@container (max-width:639px){
  .st-steps__list{grid-template-columns:1fr;row-gap:2rem;padding-top:.25rem}
  .st-step{margin-top:0;display:grid;grid-template-columns:2.75rem minmax(0,1fr);column-gap:1rem;align-items:start}
  .st-step__body{margin-top:.45rem}
  .st-step__text{max-width:none}
}

/* ================= 3. SPECLIST: Hover List ================= */
.st-spec{
  --n:7; --row:clamp(4.6rem,7.2cqw,5.6rem); --open:clamp(11.5rem,19cqw,14rem); --title:clamp(1.55rem,3.3cqw,2.5rem);
  --pic-w:25cqw; --pic-left:57%; --from:62deg; --rest:-4deg;
  --st-idle:#5b757e; --st-active:var(--ink); --st-desc:var(--ink-2); --st-rule:rgba(11,37,48,.16); --st-numc:var(--water-deep);
  container-type:inline-size;width:100%;-webkit-tap-highlight-color:transparent;
}
.wet .st-spec{--st-idle:#8fb4bb;--st-active:#fff;--st-desc:#b9d6da;--st-rule:rgba(255,255,255,.18);--st-numc:#7fd3de}
.st-spec__list{list-style:none;margin:0;padding:0;border-bottom:1px solid var(--st-rule)}
.st-spec__row{position:relative;border-top:1px solid var(--st-rule)}
.st-spec__link{
  display:grid;grid-template-columns:8.5% minmax(0,1fr) auto auto;grid-template-areas:"num body count arrow";column-gap:1rem;align-items:start;
  padding:1.1rem 0 1.15rem;color:var(--st-active);text-decoration:none;
}
.st-spec__link:hover{color:var(--st-active)}
.st-spec__link:focus-visible{outline:3px solid var(--buoy);outline-offset:-3px;border-radius:6px}
.st-spec__num{grid-area:num;font-family:var(--display);font-weight:800;font-size:calc(var(--title)*.5);line-height:calc(var(--title)*1.1);color:var(--st-numc);font-variant-numeric:tabular-nums}
.st-spec__body{grid-area:body;min-width:0}
.st-spec__title{margin:0;font-family:var(--display);font-weight:800;font-size:var(--title);line-height:1.1;letter-spacing:-.02em;color:var(--st-active)}
.st-spec__text{display:block;margin-top:.5rem;font-size:1.02rem;line-height:1.5;color:var(--st-desc)}
.st-spec__count{grid-area:count;display:flex;align-items:center;min-height:calc(var(--title)*1.1);font-size:.9rem;font-weight:600;color:var(--st-desc);white-space:nowrap;font-variant-numeric:tabular-nums}
.st-spec__count:empty{display:none}
.st-spec__arrow{grid-area:arrow;display:grid;place-items:center;width:2.5rem;height:2.5rem;margin-top:calc((var(--title)*1.1 - 2.5rem)/2);border-radius:50%;box-shadow:inset 0 0 0 1.5px var(--st-rule);color:var(--st-active)}
.st-spec__pic{display:none;margin:0}
.st-spec__pic img{display:block;width:100%;height:100%;max-width:none;object-fit:cover}

/* pointer devices with room: closed rows, the open one grows and swings its picture in */
@media (hover:hover){
  @container (min-width:721px){
    .st-spec__list{min-height:calc((var(--n) - 1)*var(--row) + var(--open) + 1px)}
    .st-spec__row{height:var(--row);transition:height .45s cubic-bezier(.22,1,.36,1)}
    .st-spec__link{height:100%;overflow:hidden;padding:calc((var(--row) - var(--title)*1.1)/2) 0 0}
    .st-spec__num,.st-spec__title{transition:color .35s ease,opacity .35s ease}
    .st-spec__title{color:var(--st-idle);white-space:nowrap}
    .st-spec__num{opacity:.6}
    .st-spec__text{max-width:calc(var(--pic-left) - 12%);margin-top:.7rem;opacity:0;transform:translateY(10px);transition:opacity .2s ease,transform .3s ease}
    .st-spec__arrow{transform:rotate(-45deg);transition:transform .45s cubic-bezier(.34,1.56,.64,1),background-color .3s ease,color .3s ease,box-shadow .3s ease}
    .st-spec__pic{
      display:block;position:absolute;z-index:3;top:calc(var(--open)/2);left:var(--pic-left);width:var(--pic-w);aspect-ratio:3/2;
      margin-top:calc(var(--pic-w)/-3);overflow:hidden;border-radius:var(--r);border:5px solid #fff;
      box-shadow:0 22px 50px -22px rgba(6,42,54,.6);pointer-events:none;
      opacity:0;transform:rotate(var(--from)) scale(.7);transition:opacity .22s ease,transform .32s ease-in;
    }
    .st-spec__row.is-open,
    .st-spec:not(.is-live) .st-spec__row:is(:hover,:focus-within){height:var(--open);z-index:2}
    :is(.st-spec__row.is-open,.st-spec:not(.is-live) .st-spec__row:is(:hover,:focus-within)) .st-spec__title{color:var(--st-active)}
    :is(.st-spec__row.is-open,.st-spec:not(.is-live) .st-spec__row:is(:hover,:focus-within)) .st-spec__num{opacity:1}
    :is(.st-spec__row.is-open,.st-spec:not(.is-live) .st-spec__row:is(:hover,:focus-within)) .st-spec__text{opacity:1;transform:none;transition:opacity .35s ease .12s,transform .45s ease .12s}
    :is(.st-spec__row.is-open,.st-spec:not(.is-live) .st-spec__row:is(:hover,:focus-within)) .st-spec__arrow{transform:none;background:var(--buoy);color:var(--buoy-ink);box-shadow:none}
    :is(.st-spec__row.is-open,.st-spec:not(.is-live) .st-spec__row:is(:hover,:focus-within)) .st-spec__pic{opacity:1;transform:rotate(var(--rest)) scale(1);transition:opacity .5s ease,transform .9s cubic-bezier(.16,1,.3,1)}
  }
}
/* phones: tighter grid, count under the description */
@container (max-width:1000px){
  .st-spec__list{--pic-w:21cqw;--pic-left:55%}
}
@container (max-width:720px){
  .st-spec__list{--title:clamp(1.3rem,6cqw,1.7rem)}
  .st-spec__link{grid-template-columns:2.4rem minmax(0,1fr) auto;grid-template-areas:"num body arrow" "num count arrow";column-gap:.6rem;padding:1rem 0}
  .st-spec__count{min-height:0;margin-top:.35rem;font-size:.85rem}
  .st-spec__text{font-size:.98rem;margin-top:.3rem}
  .st-spec__arrow{width:2.25rem;height:2.25rem;margin-top:0;align-self:center}
}

@media (prefers-reduced-motion:reduce){
  .st-types,.st-types *,.st-steps *,.st-spec *{transition:none!important;animation:none!important}
  .st-type__img{transform:none}
  .st-spec__pic{--from:var(--rest)}
}
