/* ==========================================================================
   Kenchii Professional — landing page
   ========================================================================== */

:root {
  --ink: #0b0b0c;
  --ink-2: #121214;
  --ivory: #eee8dd;
  --muted: rgba(238, 232, 221, .58);
  --gold: #c6a768;
  --line: rgba(238, 232, 221, .12);

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.77, 0, .175, 1);      /* smooth in-out */
  --ease-out: cubic-bezier(.16, 1, .3, 1);    /* soft landing */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  color: var(--ivory);
  font: 300 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html.js:not(.intro-open) body,
html.is-leaving body { overflow: hidden; }

a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: var(--ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Fine film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Header & footer
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: clamp(22px, 4.5vh, 44px) 24px;
  pointer-events: none;
}

.brand {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.brand__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1;
  letter-spacing: .34em;
  margin-right: -.34em;
  text-transform: uppercase;
}

.brand__sub {
  font-size: 9px;
  letter-spacing: .52em;
  margin-right: -.52em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px clamp(24px, 4vw, 56px);
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

.site-footer__group { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { pointer-events: auto; transition: color .4s var(--ease-out); }
.site-footer a:hover,
.site-footer a:focus-visible { color: var(--ivory); }

/* --------------------------------------------------------------------------
   Split choice panels
   -------------------------------------------------------------------------- */

.choices {
  display: flex;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
}

.panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  padding: clamp(32px, 5.5vw, 96px);
  padding-bottom: clamp(110px, 17vh, 180px);
  overflow: hidden;
  isolation: isolate;
  outline: none;
  transition: flex-grow 1.2s var(--ease);
}

/* Hairline divider between panels */
.panel + .panel::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 1px;
  z-index: 2;
  background: linear-gradient(to bottom, transparent, var(--line) 22%, var(--line) 78%, transparent);
  transition: opacity .6s;
}

.panel:focus-visible { outline: 1px solid rgba(198, 167, 104, .6); outline-offset: -14px; }

/* Background layers */
.panel__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  transform: scale(1.06);
  transition: transform 2.2s var(--ease-out), filter 1s var(--ease-out);
}

.panel--grooming .panel__bg {
  background:
    radial-gradient(90% 70% at 10% 100%, rgba(198, 167, 104, .20), transparent 62%),
    radial-gradient(60% 50% at 100% 0%, rgba(198, 167, 104, .07), transparent 70%),
    linear-gradient(160deg, #151412 0%, var(--ink) 72%);
}

.panel--styling .panel__bg {
  background:
    radial-gradient(90% 70% at 90% 100%, rgba(214, 206, 226, .13), transparent 62%),
    radial-gradient(60% 50% at 0% 0%, rgba(198, 167, 104, .06), transparent 70%),
    linear-gradient(200deg, #131416 0%, var(--ink) 72%);
}

/* Crossfading slideshow — idle shows a faint still; plays on hover or click */
.panel__slides {
  position: absolute;
  inset: 0;
  opacity: .14;
  transition: opacity 1.6s var(--ease-out);
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: grayscale(.35) contrast(1.04) brightness(.92);
  transform: scale(1.08);
  /* fade out, then quietly reset the zoom once invisible */
  transition: opacity 2s var(--ease), transform 0s linear 2s;
}

.slide.is-active {
  opacity: 1;
  transition: opacity 2s var(--ease), transform 9s linear;
}

.panel.is-playing .panel__slides { opacity: .58; }
.panel.is-playing .slide.is-active { transform: scale(1); }

/* Legibility shade */
.panel__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 11, 12, .82), rgba(11, 11, 12, 0) 62%);
}

/* Content */
.panel__content {
  position: relative;
  display: block;
  flex-shrink: 0;
  max-width: 460px;
  transition: opacity .8s var(--ease-out);
}

.panel__content > * { display: block; }

.panel__index {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  font-size: 11px;
  letter-spacing: .4em;
  color: var(--gold);
}

.panel__index::after {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.panel__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(46px, 5.6vw, 92px);
  line-height: .98;
  letter-spacing: -.005em;
  margin-bottom: 22px;
}

.panel__title em { font-style: italic; }

.panel__desc {
  max-width: 34ch;
  margin-bottom: 40px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.panel__cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-size: 11px;
  letter-spacing: .38em;
  text-transform: uppercase;
}

.panel__arrow {
  position: relative;
  width: 44px;
  height: 1px;
  background: currentColor;
  transition: width .8s var(--ease-out);
}

.panel__arrow::after {
  content: "";
  position: absolute;
  right: 0; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

/* Hover / focus */
.panel:focus-visible .panel__bg { transform: scale(1); }
.panel:focus-visible .panel__arrow { width: 84px; }

@media (hover: hover) {
  .panel:hover .panel__bg { transform: scale(1); }
  .panel:hover .panel__arrow { width: 84px; }

  .choices:has(.panel:hover) .panel:not(:hover) .panel__bg { filter: brightness(.55) saturate(.6); }
  .choices:has(.panel:hover) .panel:not(:hover) .panel__content { opacity: .4; }
}

@media (hover: hover) and (min-width: 901px) {
  .panel:hover { flex-grow: 1.3; }
}

/* --------------------------------------------------------------------------
   Reveal (after intro) — elements rise in with a stagger set by --d
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 1.1s var(--ease-out),
    transform 1.3s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1s + .55s);
}

.js.intro-open .reveal { opacity: 1; transform: none; }
.js .panel__index.reveal { display: flex; }
.js .panel__cta.reveal { display: inline-flex; }

/* --------------------------------------------------------------------------
   Curtain: intro + outro
   -------------------------------------------------------------------------- */

.curtain {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  pointer-events: none;
}

.js .curtain { display: block; pointer-events: auto; cursor: default; }
.js.intro-open .curtain { pointer-events: none; }
html.js.is-leaving .curtain { pointer-events: auto; }

.curtain__half {
  position: absolute;
  left: 0; right: 0;
  height: calc(50% + 1px);
  display: flex;
  justify-content: center;
  background: var(--ink);
  transition: transform 1.5s var(--ease);
  will-change: transform;
}

.curtain__half--top {
  top: 0;
  align-items: flex-end;
  padding-bottom: clamp(18px, 3.2vh, 32px);
}

.curtain__half--bottom {
  bottom: 0;
  align-items: flex-start;
  padding-top: clamp(20px, 3.4vh, 34px);
}

/* Gold blade edges — drawn during intro, carried away as the halves part */
.curtain__half::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 18%, var(--gold) 82%, transparent);
  opacity: .85;
  transform: scaleX(0);
  transition: transform 1.8s var(--ease-out);
}

.curtain__half--top::after { bottom: 0; }
.curtain__half--bottom::after { top: 0; }

.intro-play .curtain__half::after { transform: scaleX(1); }

.intro-open .curtain__half--top { transform: translateY(-101%); }
.intro-open .curtain__half--bottom { transform: translateY(101%); }

/* Wordmark */
.intro__mark {
  display: flex;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(50px, 11vw, 150px);
  line-height: 1.05;
  letter-spacing: .2em;
  margin-right: -.2em;
  text-transform: uppercase;
}

.intro__mark .ch { display: inline-block; overflow: hidden; }

.intro__mark .ch > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.3s var(--ease-out);
  transition-delay: calc(.35s + var(--i) * .08s);
}

.intro-play .intro__mark .ch > span { transform: none; }

.intro__lower {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  text-align: center;
}

.intro__sub {
  font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: .7em;
  margin-right: -.5em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transition:
    opacity 1.4s var(--ease-out) 1.05s,
    letter-spacing 2.2s var(--ease-out) 1.05s;
}

.intro-play .intro__sub { opacity: 1; letter-spacing: .5em; }

.intro__tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--muted);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 1.2s var(--ease-out) 1.5s,
    transform 1.2s var(--ease-out) 1.5s;
}

.intro-play .intro__tag { opacity: 1; transform: none; }

/* Returning visitor in the same session: skip straight to the reveal */
.intro-quick .intro__mark .ch > span,
.intro-quick .intro__sub,
.intro-quick .intro__tag,
.intro-quick .curtain__half::after { transition: none; }

/* Destination label shown as the curtain closes */
.curtain__eyebrow,
.curtain__dest {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

.curtain__eyebrow {
  bottom: calc(50% + 24px);
  font-size: 10.5px;
  letter-spacing: .5em;
  margin-right: -.5em;
  text-transform: uppercase;
  color: var(--gold);
  transform: translateY(8px);
}

.curtain__dest {
  top: calc(50% + 18px);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
  transform: translateY(-8px);
}

/* --------------------------------------------------------------------------
   Outro: chosen panel expands, content falls away, blades close
   -------------------------------------------------------------------------- */

html.js.is-leaving .reveal {
  opacity: 0;
  transform: translateY(-14px);
  transition-duration: .55s, .7s;
  transition-delay: 0s;
}

html.is-leaving .panel {
  flex-grow: 0;
  transition: flex-grow 1.2s var(--ease), padding 1.2s var(--ease);
}
html.is-leaving .panel:not(.is-chosen) { padding: 0; }
html.is-leaving .panel.is-chosen { flex-grow: 1; }
html.is-leaving .panel + .panel::before { opacity: 0; }
html.is-leaving .panel.is-chosen .panel__bg { transform: scale(1.12); filter: none; transition-duration: 2s; }
html.is-leaving .panel:not(.is-chosen) .panel__bg { filter: brightness(.3); }
html.is-leaving .panel.is-chosen .panel__slides { opacity: .85; }

html.is-leaving .intro__mark,
html.is-leaving .intro__lower { visibility: hidden; }

html.is-leaving .curtain__half {
  transform: none;
  transition: transform 1.1s var(--ease) .3s;
}

html.is-leaving .curtain__eyebrow,
html.is-leaving .curtain__dest {
  opacity: 1;
  transform: none;
  transition:
    opacity .9s var(--ease-out) 1.05s,
    transform 1.1s var(--ease-out) 1.05s;
}

/* --------------------------------------------------------------------------
   Mobile: stack the panels
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .choices { flex-direction: column; min-height: 640px; }

  .panel { padding: 28px 26px 30px; }
  .panel--grooming { padding-top: 112px; }
  .panel--styling { padding-bottom: 104px; }

  .panel + .panel::before {
    top: 0; right: 0; bottom: auto;
    width: auto; height: 1px;
    background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
  }

  .panel__index { margin-bottom: 14px; }
  .panel__title { font-size: clamp(40px, 11.5vw, 56px); margin-bottom: 10px; }
  .panel__desc { font-size: 14px; line-height: 1.6; margin-bottom: 20px; }

  .site-footer {
    flex-direction: column;
    gap: 6px;
    padding-top: 14px;
    font-size: 9.5px;
    letter-spacing: .14em;
  }
  .site-footer__group { justify-content: center; gap: 6px 16px; }
  .hide-sm { display: none; }

  .intro__mark { letter-spacing: .14em; margin-right: -.14em; }
}

/* --------------------------------------------------------------------------
   Reduced motion: keep everything, drop the movement
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}
