:root {
  --ink: #14110f;
  --oat: #ece5d8;
  --greige: #ddd3c6;
  --taupe: #bcad9b;
  --oxblood: #6e2233;
  --white: #fff;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-card: cubic-bezier(0.16, 1, 0.3, 1);
  --active-width: 75vw;
  --inactive-shift: 50vw;
  --veil: #f7f3ec;
  --t-panel: 1180ms;
  --t-card: 860ms;
  --t-text: 680ms;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--oxblood);
  --transition-bg: var(--oxblood);
  color: var(--ink);
  font-family: "Hanken Grotesk", Arial, sans-serif;
}

body.is-page-entering > :not(.page-veil):not(.nav-layer):not(script),
body.is-page-leaving > :not(.page-veil):not(.nav-layer):not(script) {
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(1.008);
}

body.is-page-ready > :not(.page-veil):not(.nav-layer):not(script) {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 620ms var(--ease),
    transform 820ms var(--ease);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Header ── */
.shell-top {
  position: fixed;
  z-index: 50;
  top: 0; left: 0; right: 0;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  pointer-events: none;
}

.brand,
.menu-trigger {
  pointer-events: auto;
}

.brand {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  width: 98px;
  height: 42px;
  align-items: center;
  transition: left 1180ms var(--ease), opacity 640ms var(--ease);
}

.brand__logo {
  width: 100%;
  height: auto;
}

/* когда ext активен — лого в 1/4 полосе */
body[data-active="przedluzanie"] .brand {
  left: max(4px, calc(12.5vw - 49px));
  opacity: 0;          /* логотип скрыт — там другой цвет */
}

.menu-trigger {
  margin-left: auto;
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  color: rgba(236, 229, 216, 0.9);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.68rem;
  font-weight: 400;
  text-shadow: 0 1px 14px rgba(0,0,0,0.36);
  transition: color 320ms var(--ease);
}

.menu-trigger i {
  width: 18px; height: 12px;
  display: inline-block;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

/* ── Gate ── */
.service-gate {
  position: relative;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
}

.service-switcher {
  display: none;
}

/* ── Panels ── */
.svc-panel {
  position: absolute;
  z-index: 10;
  top: 0; bottom: 0;
  width: var(--active-width);
  overflow: hidden;
  outline: none;
  transition:
    transform var(--t-panel) var(--ease),
    filter var(--t-panel) var(--ease),
    box-shadow var(--t-panel) var(--ease);
  will-change: transform, filter;
}

.svc-panel img,
.svc-panel__wash {
  position: absolute;
  inset: 0;
}

.svc-panel img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1320ms var(--ease);
}

.svc-panel__wash {
  z-index: 1;
  pointer-events: none;
}

.service-gate__resonance {
  display: none;
}

/* ── Copy block ── */
.svc-panel__copy {
  position: absolute;
  z-index: 3;
  left: clamp(16px, 4.3vw, 24px);
  right: clamp(14px, 4vw, 22px);
  bottom: clamp(42px, 9vh, 84px);
  width: auto;
  min-height: 0;
  display: grid;
  gap: 10px;
  padding: clamp(17px, 4.8vw, 24px) clamp(16px, 4.6vw, 22px) clamp(18px, 5vw, 24px);
  background: rgba(242, 237, 228, 0.86);
  border-left: 2px solid rgba(255,255,255,0.46);
  box-shadow: 0 18px 48px rgba(20, 17, 15, 0.12);
}

.svc-panel__copy::before,
.svc-panel__copy::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 640ms var(--ease-card),
    transform var(--t-card) var(--ease-card);
}

.svc-panel__copy::before {
  inset: 0;
}

.svc-panel__copy::after {
  left: 0; right: 11%;
  bottom: -18px; height: 26px;
  transition-delay: 80ms;
}

.svc-panel__copy > span {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition:
    opacity var(--t-text) var(--ease),
    transform var(--t-text) var(--ease);
}

/* ── CARE panel (left, default active) ── */
.svc-panel--care {
  left: 0;
  z-index: 30;
  color: var(--ink);
  box-shadow: 18px 0 42px rgba(20, 17, 15, 0.24);
}

.svc-panel--care img { object-position: 58% 48%; }

.svc-panel--care .svc-panel__wash {
  background: linear-gradient(180deg, transparent 0%, transparent 58%, rgba(20,17,15,0.18) 100%);
}

.svc-panel--care .svc-panel__copy::before {
  background: transparent;
  transform: translate3d(-110px, 0, 0);
}

.svc-panel--care .svc-panel__copy::after {
  background: rgba(188,173,155,0.18);
  transform: translate3d(-140px, 0, 0);
}

/* ── EXT panel (right, default inactive) ── */
.svc-panel--ext {
  right: 0;
  z-index: 20;
  color: var(--oat);
  transform: translate3d(var(--inactive-shift), 0, 0) scale(0.992);
  filter: saturate(0.82) brightness(0.58);
  box-shadow: -18px 0 42px rgba(0,0,0,0.48);
}

.svc-panel--ext img { object-position: 50% 44%; }

.svc-panel--ext .svc-panel__wash {
  background: linear-gradient(180deg, transparent 0%, transparent 58%, rgba(0,0,0,0.24) 100%);
}

.svc-panel--ext .svc-panel__copy {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 16px, 0);
  background: rgba(10, 8, 6, 0.74);
  border-left-color: rgba(236,229,216,0.22);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.svc-panel--ext .svc-panel__copy::before {
  background: transparent;
  transform: translate3d(110px, 0, 0);
}

.svc-panel--ext .svc-panel__copy::after {
  background: rgba(236,229,216,0.05);
  transform: translate3d(140px, 0, 0);
}

.svc-panel--ext .svc-panel__copy > span {
  transform: translate3d(10px, 8px, 0);
}

/* ── Side labels & hints ── */
.svc-panel__side-label,
.svc-panel__hint {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  writing-mode: vertical-rl;
  transform: rotate(180deg) translateY(50%);
  transition: opacity 620ms var(--ease);
}

.svc-panel__side-label {
  top: 55%; bottom: auto;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 360;
  font-variation-settings: "SOFT" 70, "WONK" 0;
  font-size: clamp(1.4rem, 6.5vw, 2.4rem);
  line-height: 1;
  opacity: 0;
}

.svc-panel__hint {
  top: 32%;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  transform: rotate(180deg);
}

/* ── ACTIVE: PIELĘGNACJA ── */
body[data-active="pielegnacja"] .svc-panel--care .svc-panel__copy::before,
body[data-active="pielegnacja"] .svc-panel--care .svc-panel__copy::after {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 640ms;
}

body[data-active="pielegnacja"] .svc-panel--care .svc-panel__copy::after {
  transition-delay: 700ms;
}

body[data-active="pielegnacja"] .svc-panel--care .svc-panel__copy > span {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 920ms;
}

body[data-active="pielegnacja"] .svc-panel--care .svc-panel__number { transition-delay: 920ms; }
body[data-active="pielegnacja"] .svc-panel--care .svc-panel__title  { transition-delay: 970ms; }
body[data-active="pielegnacja"] .svc-panel--care .svc-panel__text   { transition-delay: 1030ms; }
body[data-active="pielegnacja"] .svc-panel--care .svc-panel__button { transition-delay: 1100ms; }

/* правая полоса неактивна */
body[data-active="pielegnacja"] .svc-panel--ext .svc-panel__side-label {
  left: calc(12.5vw - 17px);
  color: #fff;
  opacity: 1;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55), 0 0 32px rgba(0,0,0,0.35);
}

body[data-active="pielegnacja"] .svc-panel--ext .svc-panel__hint {
  left: calc(12.5vw - 7px);
  color: rgba(255,255,255,0.82);
  opacity: 1;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* ── ACTIVE: PRZEDŁUŻANIE ── */
body[data-active="przedluzanie"] .svc-panel--ext {
  z-index: 32;
  transform: translate3d(0, 0, 0) scale(1);
  filter: saturate(1.04) brightness(1.08);
  box-shadow: -22px 0 52px rgba(0,0,0,0.6);
}

body[data-active="przedluzanie"] .svc-panel--ext .svc-panel__copy {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

body[data-active="przedluzanie"] .svc-panel--ext .svc-panel__copy::before,
body[data-active="przedluzanie"] .svc-panel--ext .svc-panel__copy::after {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 640ms;
}

body[data-active="przedluzanie"] .svc-panel--ext .svc-panel__copy::after {
  transition-delay: 700ms;
}

body[data-active="przedluzanie"] .svc-panel--ext .svc-panel__copy > span {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 920ms;
}

body[data-active="przedluzanie"] .svc-panel--ext .svc-panel__number { transition-delay: 920ms; }
body[data-active="przedluzanie"] .svc-panel--ext .svc-panel__title  { transition-delay: 970ms; }
body[data-active="przedluzanie"] .svc-panel--ext .svc-panel__text   { transition-delay: 1030ms; }
body[data-active="przedluzanie"] .svc-panel--ext .svc-panel__button { transition-delay: 1100ms; }

body[data-active="przedluzanie"] .svc-panel--care {
  z-index: 18;
  transform: translate3d(calc(var(--inactive-shift) * -1), 0, 0) scale(0.992);
  filter: saturate(0.72) brightness(0.54);
}

body[data-active="przedluzanie"] .svc-panel--care .svc-panel__copy {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 16px, 0);
}

/* левая полоса неактивна */
body[data-active="przedluzanie"] .svc-panel--care .svc-panel__side-label {
  right: calc(12.5vw - 17px);
  color: #fff;
  opacity: 1;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45), 0 0 28px rgba(0,0,0,0.3);
}

body[data-active="przedluzanie"] .svc-panel--care .svc-panel__hint {
  right: calc(12.5vw - 7px);
  color: rgba(255,255,255,0.82);
  opacity: 1;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

/* ── Typography ── */
.svc-panel__number {
  font-size: 0.72rem;
  opacity: 0.62;
}

.svc-panel__title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 360;
  font-variation-settings: "SOFT" 70, "WONK" 0;
  font-size: clamp(1.54rem, 7.4vw, 2.74rem);
  line-height: 1.04;
}

.svc-panel__text {
  font-size: 0.72rem;
  line-height: 1.62;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.svc-panel__button {
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid currentColor;
  padding: 0 14px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.18;
  text-align: center;
  white-space: normal;
}

.svc-panel:hover img,
.svc-panel.is-pressing img {
  transform: scale(1.025);
}

/* ── Nav overlay ── */
.nav-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 28px;
  padding: 22px 22px 32px;
  background: rgba(236, 229, 216, 0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms var(--ease);
}

.nav-layer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav-layer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-layer__bar img { width: 104px; height: auto; }

.nav-layer__close {
  width: 38px; height: 38px;
  border: 0; background: transparent;
  position: relative; cursor: pointer;
}

.nav-layer__close::before,
.nav-layer__close::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; top: 19px;
  height: 1px; background: var(--ink);
}

.nav-layer__close::before { transform: rotate(45deg); }
.nav-layer__close::after  { transform: rotate(-45deg); }

.nav-layer__links {
  align-self: center;
  display: grid;
  gap: 8px;
}

.nav-layer__links a {
  padding: 11px 0 14px;
  border-bottom: 1px solid rgba(20,17,15,0.14);
  font-size: clamp(1.42rem, 7vw, 2.35rem);
  font-weight: 300;
  line-height: 1.24;
  letter-spacing: 0.02em;
  transition: color 240ms var(--ease), padding-left 300ms var(--ease);
}

.nav-layer__links a:hover { color: var(--oxblood); padding-left: 12px; outline: none; }

/* ── Page transition veil ── */
@media (min-width: 1100px) {
  :root {
    --active-width: 76vw;
    --inactive-shift: 52vw;
  }

  body {
    background: linear-gradient(90deg, #6e2233 0 76%, #11100e 76% 100%);
  }

  .service-switcher {
    position: fixed;
    z-index: 70;
    left: 50%;
    bottom: 28px;
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    padding: 5px;
    background: rgba(242, 237, 228, 0.92);
    border: 1px solid rgba(20, 17, 15, 0.14);
    box-shadow: 0 12px 36px rgba(20, 17, 15, 0.16);
    backdrop-filter: blur(14px);
    transform: translateX(-50%);
  }

  .service-switcher__option {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 15px;
    border: 0;
    background: transparent;
    color: rgba(20, 17, 15, 0.58);
    cursor: pointer;
    text-align: left;
    transition: background 240ms var(--ease), color 240ms var(--ease);
  }

  .service-switcher__option span {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .service-switcher__option strong {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .service-switcher__option.is-active {
    background: var(--oxblood);
    color: var(--oat);
  }

  .service-switcher__option:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
  }

  .svc-panel {
    width: var(--active-width);
  }

  .svc-panel img {
    inset: auto;
    top: 50%;
    bottom: auto;
    width: clamp(320px, 30vw, 470px);
    height: clamp(520px, 70vh, 680px);
    object-fit: cover;
    transform: translateY(-50%);
    box-shadow: 0 26px 68px rgba(20,17,15,0.28);
  }

  .svc-panel--care {
    background: #6e2233;
  }

  .svc-panel--care img {
    right: clamp(70px, 10vw, 170px);
    left: auto;
    object-position: 55% 48%;
  }

  .svc-panel--ext {
    background: #11100e;
  }

  .svc-panel--ext img {
    left: clamp(70px, 10vw, 170px);
    right: auto;
    object-position: 50% 44%;
  }

  .svc-panel__wash {
    background: rgba(0,0,0,0.08) !important;
  }

  .svc-panel__copy {
    width: clamp(380px, 34vw, 470px);
    max-width: 470px;
    right: auto;
    bottom: clamp(82px, 13vh, 138px);
    gap: 12px;
    padding: 28px 30px 30px;
    background: rgba(247,243,236,0.9);
    border-left: 1px solid rgba(20,17,15,0.22);
    box-shadow: 0 24px 64px rgba(20,17,15,0.14);
  }

  .svc-panel--care .svc-panel__copy {
    left: clamp(52px, 6vw, 96px);
  }

  .svc-panel--ext .svc-panel__copy {
    left: auto;
    right: clamp(52px, 6vw, 96px);
    background: rgba(17,16,14,0.82);
    border-left-color: rgba(236,229,216,0.2);
  }

  .svc-panel__title {
    max-width: 100%;
    font-size: clamp(2.55rem, 3vw, 3.65rem);
    line-height: 1;
    overflow-wrap: normal;
    text-wrap: balance;
  }

  .svc-panel__text {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .svc-panel__button {
    min-height: 44px;
    padding: 0 18px;
    font-size: 0.68rem;
  }

  body[data-active="pielegnacja"] .svc-panel--ext .svc-panel__side-label,
  body[data-active="pielegnacja"] .svc-panel--ext .svc-panel__hint {
    left: clamp(70px, 9vw, 138px);
  }

  body[data-active="przedluzanie"] .svc-panel--care .svc-panel__side-label,
  body[data-active="przedluzanie"] .svc-panel--care .svc-panel__hint {
    right: clamp(70px, 9vw, 138px);
  }

  .svc-panel__hint,
  body[data-active="pielegnacja"] .svc-panel--ext .svc-panel__hint,
  body[data-active="przedluzanie"] .svc-panel--care .svc-panel__hint {
    display: none;
  }
}

/* Framed direction cards belong to this overview page.
   Full-bleed treatment layouts are handled only on the inner service pages. */
@media (min-width: 1100px) {
  .service-gate {
    transition: background 920ms var(--ease);
  }

  .service-gate > .seo-breadcrumb {
    position: absolute;
    z-index: 45;
    top: 96px;
    left: clamp(24px, 6vw, 96px);
    width: auto;
    margin: 0;
    padding: 0;
    color: rgba(247, 243, 236, 0.68);
    text-shadow: 0 1px 16px rgba(20, 17, 15, 0.24);
  }

  .service-gate > .seo-breadcrumb a:hover,
  .service-gate > .seo-breadcrumb a:focus-visible {
    color: #fff;
  }

  body[data-active="pielegnacja"] .service-gate {
    background: linear-gradient(90deg, #6e2233 0 76%, #11100e 76% 100%);
  }

  body[data-active="przedluzanie"] .service-gate {
    background: linear-gradient(90deg, #6e2233 0 24%, #11100e 24% 100%);
  }

  .svc-panel--care,
  .svc-panel--ext {
    background: transparent;
  }

  .service-gate__resonance {
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    left: -15vw;
    display: block;
    width: 130vw;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.9;
  }

  .svc-panel img {
    z-index: 3;
    border: 1px solid rgba(247, 243, 236, 0.24);
  }

  .svc-panel__copy {
    z-index: 4;
  }

  .svc-panel__side-label,
  .svc-panel__hint {
    z-index: 5;
  }

  .svc-panel--ext {
    transform: translate3d(var(--inactive-shift), 0, 0);
  }

  body[data-active="przedluzanie"] .svc-panel--care {
    transform: translate3d(calc(var(--inactive-shift) * -1), 0, 0);
  }

  .svc-panel:hover img,
  .svc-panel.is-pressing img {
    transform: translateY(-50%);
  }
}

.page-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--transition-bg, var(--veil));
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-page-entering .page-veil {
  opacity: 1;
  pointer-events: auto;
}

.page-veil.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.page-veil.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}
