/* Services: the hub (plan.md, "Services (Part 2): the hub"). Layout B: the general clip to the window's edges, the words
   centered at the top over a paper shade, the search below them at the left, hanging over the header's foot; then the
   four doors (the signature) and the split close (components.css). Tokens only. */

/* ---------- the header ---------- */
.svh { position: relative; z-index: 2; display: grid; grid-template-rows: auto 1fr auto; min-height: clamp(700px, calc(100svh - var(--header-h)), 880px); padding-top: clamp(2.75rem, 1.5rem + 4.5vh, 5rem); }
.svh__stage { position: absolute; inset: 0; overflow: hidden; background: var(--c-paper-alt); }
/* the clip drawn at 135% from its top left corner, so the day being circled sits at the lower right, clear of the words
   and of the search (the source is 1920 px wide: sharp at that size) */
.svh__zoom { position: absolute; top: 0; left: 0; width: 135%; height: 135%; }
.svh__slide { --pos: 0% 30%; }

/* the kit's header (kit.md), as it gives it */
[data-kit-scene="rotate"] [data-kit-slide] { position: absolute; inset: 0; margin: 0; visibility: hidden; overflow: hidden; }
[data-kit-scene="rotate"] [data-kit-slide][data-kit-on] { visibility: visible; z-index: 2; opacity: var(--kit-move, 1); transform: translateX(var(--kit-glide, calc((1 - var(--kit-move, 1)) * 4%))); }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-prev])) [data-kit-slide][data-kit-on] { transform: none; opacity: 1; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { visibility: visible; z-index: 1; }
[data-kit-scene="rotate"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { visibility: visible; }
[data-kit-scene="rotate"] [data-kit-slide] video { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; clip-path: inset(2px); }
[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }

/* the grade: one still layer over both slides, the paper behind the words fading to the clear footage */
.svh__stage::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--c-paper) 94%, transparent) 0%,
    color-mix(in srgb, var(--c-paper) 86%, transparent) 36%,
    color-mix(in srgb, var(--c-paper) 38%, transparent) 54%,
    color-mix(in srgb, var(--c-paper) 0%, transparent) 70%);
}
.svh__words { position: relative; z-index: 4; max-width: 74rem; }
.svh__demo { position: relative; z-index: 4; align-self: start; margin-top: .75rem; }
.scene.svh__scene { width: min(520px, 100%); margin-inline: auto; padding-bottom: 84px; }
/* the new-request card hangs under the list, never over its last row (finding 1 of step 13) */
.scene.svh__scene .sd-pop { bottom: -66px; }
.svh__stop { top: 18px; right: 18px; }

/* ---------- the four doors ---------- */
.doors__stage { position: relative; }
.doors__stop { top: -54px; right: 0; }
.doors__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.9rem, .4rem + 1.3vw, 1.5rem); align-items: end; }
.door { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 2px solid transparent; border-radius: var(--radius-l); background: var(--c-card); box-shadow: var(--shadow-m); transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out); }
.door:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); }
.door:has(.door__a:focus-visible) { outline: 3px solid var(--c-brand); outline-offset: 3px; }
.door--4 { border-color: var(--c-accent); }
/* each door a step taller than the one before, like the logo's bars */
.door__pic { position: relative; margin: 0; overflow: hidden; height: calc(clamp(170px, 8rem + 6vw, 230px) + var(--step) * clamp(34px, 1.2rem + 1.6vw, 52px)); }
.door--1 { --step: 0; }
.door--2 { --step: 1; }
.door--3 { --step: 2; }
.door--4 { --step: 3; }
.door__chip { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: .5rem; max-width: calc(100% - 24px); margin: 0; padding: .45rem .85rem .45rem .45rem; border-radius: 999px; background: var(--c-card); box-shadow: var(--shadow-m); font: 600 .86rem/1.2 var(--font-text); color: var(--c-brand); }
.door__tick { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--c-brand) 9%, var(--c-card)); }
.door__tick svg { width: 13px; height: 13px; fill: none; stroke: var(--c-brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.door--4 .door__tick { background: var(--c-accent); }
.door--4 .door__tick svg { stroke: var(--c-on-accent); }
.door__words { display: grid; gap: .5rem; padding: 1.15rem 1.25rem 1.35rem; }
.door__name { font-size: var(--fs-h3); }
.door__a { color: inherit; text-decoration: none; }
.door__a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.door__a:focus-visible { outline: none; text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.door__line { font-size: var(--fs-small); line-height: 1.45; color: var(--c-ink-soft); }
.door__more { justify-self: start; margin-top: .2rem; font-size: .95rem; }

@media (max-width: 1023.98px) {
  .doors__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- the phone ---------- */
@media (max-width: 759.98px) {
  /* the phone: the words on the paper, then the calendar as a band under the whole search (the band no taller than
     its first picture's 960 px file can fill sharply) */
  .svh { grid-template-rows: auto auto; grid-template-areas: "words" "demo"; min-height: 0; padding-top: 2.25rem; }
  .svh__words { grid-area: words; padding-bottom: 1.5rem; }
  .svh__stage { position: relative; grid-area: demo; inset: auto; }
  .svh__zoom { width: 100%; height: 100%; }
  .svh__slide { --pos: 56% 40%; }
  .svh__stage::after {
    background: linear-gradient(180deg,
      var(--c-paper) 0%,
      color-mix(in srgb, var(--c-paper) 0%, transparent) 22%);
  }
  .svh__demo { grid-area: demo; width: 100%; margin: 0; padding-top: 120px; }
  .scene.svh__scene { width: 100%; }
  .svh__stop { top: 64px; right: 12px; }
  .doors__stop { top: -50px; }
  .doors__list { grid-template-columns: minmax(0, 1fr); }
  .door__pic { height: auto; aspect-ratio: 16 / 10; }
}
