/* nikiapart.com — variant C (2026-10-28): variant B with a centred hero title.
   Loads after site-b.css; only the hero differs.
   Hero v2 (2026-11-02): slider, one apartment per slide — text panel + photo with a slow zoom,
   tabs with a progress line (js/hero-slider.js). The image accordion it replaced → Library/home-page/nikiapart-c-v1.html. */

.hero-c { padding-block: clamp(40px, 5vw, 80px) clamp(56px, 6vw, 96px); }
.hero-c__head { text-align: center; }
.hero-c__head .eyebrow { margin-bottom: 18px; }
.hero-c h1 { font-size: var(--fs-display); line-height: 1.04; max-width: 18ch; margin-inline: auto; }

/* Slider. Without JS the slides are a swipe row; with JS (.nk-js .sl) they stack and switch. */
.sl { --sl-dur: 7s; --sl-ease: cubic-bezier(.65, 0, .2, 1); margin-top: clamp(24px, 3vw, 40px); }
.sl__stage {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.sl__stage::-webkit-scrollbar { display: none; }
.sl__slide { display: flex; flex-direction: column-reverse; gap: 12px; scroll-snap-align: start; min-width: 0; }

.sl__text {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start;
  background: var(--sand); border-radius: var(--radius-card); padding: clamp(24px, 3.2vw, 48px);
}
.sl__title { font-size: var(--fs-h2); font-weight: 600; line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; max-width: 16ch; }
.sl__desc { margin-top: 16px; color: var(--muted); max-width: 46ch; }
.sl__actions { margin-top: auto; padding-top: 28px; display: flex; align-items: center; gap: 12px; }
.sl__actions .circle { color: var(--ink); text-decoration: none; transition: background-color .3s ease, color .3s ease, border-color .3s ease; }
.sl__actions .circle:hover, .sl__actions .circle:focus-visible { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.sl__actions .circle svg { transition: transform .3s ease; }
.sl__actions .circle:hover svg { transform: translateX(2px); }

.sl__media {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius-card);
  aspect-ratio: 4 / 3; background: var(--dark);
}
.sl__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 60% 50%; }

.sl__tabs { display: none; }

/* ---------- With JS: stacked slides ---------- */
.nk-js .sl .sl__stage { display: grid; grid-template-areas: "s"; overflow: visible; touch-action: pan-y; }
.nk-js .sl .sl__slide { grid-area: s; visibility: hidden; z-index: 0; }
.nk-js .sl .sl__slide.is-active { visibility: visible; z-index: 2; }
.nk-js .sl .sl__slide.is-leaving { visibility: visible; z-index: 1; }

/* Incoming photo: a curtain opens from the right, then the photo keeps zooming in slowly */
.nk-js .sl .sl__slide.is-active .sl__media { animation: sl-curtain 1.1s var(--sl-ease) both; }
.nk-js .sl .sl__slide.is-active img,
.nk-js .sl .sl__slide.is-leaving img { animation: sl-zoom calc(var(--sl-dur) + 1.5s) linear both; }
.nk-js .sl.is-first .sl__slide.is-active .sl__media { animation: none; }

/* Incoming text: lines rise one after another; the panel itself stays put (same sand colour) */
.nk-js .sl .sl__slide.is-active .sl__text > * { animation: sl-up .8s cubic-bezier(.2, .7, .2, 1) both; }
.nk-js .sl .sl__slide.is-active .sl__text > :nth-child(2) { animation-delay: .08s; }
.nk-js .sl .sl__slide.is-active .sl__text > :nth-child(3) { animation-delay: .16s; }
.nk-js .sl .sl__slide.is-active .sl__text > :nth-child(4) { animation-delay: .24s; }
.nk-js .sl .sl__slide.is-leaving .sl__text > * { opacity: 0; transition: opacity .25s ease; }

@keyframes sl-curtain { from { clip-path: inset(0 0 0 100% round var(--radius-card)); } to { clip-path: inset(0 0 0 0 round var(--radius-card)); } }
@keyframes sl-zoom { from { transform: scale(1.02); } to { transform: scale(1.12); } }
@keyframes sl-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Tabs: apartment number (+ address from 900px) under a progress line that fills until the next slide */
.nk-js .sl { display: flex; flex-direction: column; }
.nk-js .sl .sl__tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; order: -1; margin-bottom: 12px; }
.sl__tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; min-height: 44px;
  padding: 0 0 4px; border: 0; background: none; color: var(--muted); font: inherit; text-align: left; cursor: pointer;
  transition: color .3s ease;
}
.sl__tab:hover, .sl__tab[aria-selected="true"] { color: var(--ink); }
.sl__tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: var(--radius-card); }
.sl__bar { position: relative; display: block; width: 100%; height: 2px; margin-bottom: 10px; background: var(--line); overflow: hidden; }
.sl__bar::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.sl__tab.is-done .sl__bar::after { transform: scaleX(1); background: var(--gold-soft); }
.sl__tab[aria-selected="true"] .sl__bar::after { animation: sl-progress var(--sl-dur) linear both; }
.sl__tab-n { font-size: min(var(--fs-label), 3.3vw); font-weight: 600; letter-spacing: min(.08em, .2vw); color: var(--gold); white-space: nowrap; }
.sl__tab-a { display: none; font-size: var(--fs-small); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@keyframes sl-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Paused (hover, keyboard focus, hidden tab, slider off screen): the line and the zoom stop where they are */
.sl.is-paused .sl__bar::after,
.sl.is-paused .sl__slide img { animation-play-state: paused; }

@media (min-width: 900px) {
  .sl__slide { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); flex-direction: row; min-height: clamp(440px, min(40vw, 54vh), 600px); }
  .sl__media { aspect-ratio: auto; }
  .sl__tab-a { display: block; }
  .nk-js .sl .sl__tabs { order: 0; margin: 16px 0 0; }
}

/* Short laptop screens: title + the slider (with its tabs) in the first screen */
@media (min-width: 900px) and (max-height: 900px) {
  .hero-c { padding-top: 32px; }
  .hero-c h1 { font-size: min(var(--fs-display), 6.5vh); }
  .hero-c__head .eyebrow { margin-bottom: 12px; }
  .sl { margin-top: 24px; }
  .sl__slide { min-height: clamp(300px, 46vh, 480px); }
  .sl__text { padding: clamp(24px, 4vh, 40px); }
  .sl__title { font-size: min(var(--fs-h2), 5.4vh); }
  .sl__desc { margin-top: 10px; }
  .sl__actions { padding-top: 20px; }
}
