/* Welcome screen: shown once per visit when a shopper lands on the site.
   A slowly drifting wall of product photos under a dark overlay, with
   "Welcome to Essential Spoils" building in the centre, then it fades away. */
.splash { display: none; }
html.show-splash body { overflow: hidden; }
html.show-splash .splash {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 60; overflow: hidden;
  height: 100vh; height: 100dvh;
  background: #0b0d0b; color: #fff; cursor: pointer;
}
.splash.is-leaving, .splash.is-return.is-leaving {
  animation: none; opacity: 0; transform: scale(1.04); pointer-events: none;
  transition: opacity 900ms cubic-bezier(.4, 0, .2, 1), transform 1100ms cubic-bezier(.4, 0, .2, 1);
}

/* Background: three rows of product photos drifting in opposite directions. */
.splash-wall {
  position: absolute; inset: -6% -10%; display: grid; grid-template-rows: repeat(3, 1fr); gap: 14px;
  transform: rotate(-6deg); opacity: 0;
  animation: splash-wall-in 1600ms ease-out 100ms forwards;
}
.splash-row { display: flex; gap: 14px; width: max-content; min-height: 0; animation: splash-drift 46s linear infinite; }
.splash-row:nth-child(2) { animation-direction: reverse; animation-duration: 52s; }
.splash-row:nth-child(3) { animation-duration: 40s; }
.splash-row img {
  height: 100%; aspect-ratio: 4 / 5; width: auto; object-fit: cover; border-radius: 6px;
  background: #1b1e1b; filter: grayscale(.25) contrast(1.05);
}
.splash-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, #0b0d0bd9 0%, #0b0d0bb8 45%, #0b0d0bf2 100%),
    linear-gradient(#0b0d0b66, #0b0d0b66);
}

/* Centre text */
.splash-copy { position: relative; z-index: 1; text-align: center; padding: 0 20px; }
.splash-eyebrow {
  margin: 0 0 18px; font-size: 12px; font-weight: 500; letter-spacing: .5em; text-transform: uppercase; color: #ffffffcc;
  opacity: 0; animation: splash-eyebrow 1200ms cubic-bezier(.22, 1, .36, 1) 350ms forwards;
}
.splash-title {
  margin: 0; font-size: clamp(2.6rem, 8vw, 6.25rem); font-weight: 250; line-height: 1.05; letter-spacing: .03em;
}
.splash-title .word { display: inline-block; white-space: nowrap; }
.splash-title .char {
  display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(8px);
  animation: splash-char 1000ms cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: calc(650ms + var(--i) * 55ms);
}
.splash-rule {
  display: block; width: 120px; height: 1px; margin: 26px auto 18px; background: #ffffff8c;
  transform: scaleX(0); animation: splash-rule 1000ms cubic-bezier(.65, 0, .35, 1) 1650ms forwards;
}
.splash-sub {
  margin: 0; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: #ffffffb3;
  opacity: 0; animation: splash-fade 900ms ease 2000ms forwards;
}
.splash-skip {
  position: absolute; z-index: 1; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  margin: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #ffffff66;
  opacity: 0; animation: splash-fade 600ms ease 1400ms forwards;
}

@keyframes splash-wall-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes splash-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes splash-eyebrow { from { opacity: 0; letter-spacing: .9em; } to { opacity: 1; letter-spacing: .5em; } }
@keyframes splash-char { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes splash-rule { to { transform: scaleX(1); } }
@keyframes splash-fade { to { opacity: 1; } }

@media (max-width: 600px) {
  .splash-wall { inset: -4% -40%; gap: 10px; }
  .splash-row { gap: 10px; }
  .splash-eyebrow { font-size: 11px; margin-bottom: 14px; }
  .splash-title .word { display: block; }
  .splash-sub { font-size: 11px; letter-spacing: .22em; }
}

/* ---------- Step 2: three full-screen collection cards ---------- */
.splash.is-choosing { cursor: default; }
.splash.is-choosing .splash-copy {
  opacity: 0; transform: translateY(-28px) scale(.97); filter: blur(6px);
  transition: opacity 700ms cubic-bezier(.4, 0, .2, 1), transform 900ms cubic-bezier(.4, 0, .2, 1), filter 700ms ease;
}
.splash.is-choosing .splash-skip { opacity: 0; animation: none; transition: opacity 300ms ease; }

.splash-choices {
  position: absolute; inset: 0; z-index: 2;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  visibility: hidden; pointer-events: none;
}
.splash.is-choosing .splash-choices { visibility: visible; pointer-events: auto; }

.choices-head {
  position: absolute; z-index: 3; top: max(22px, env(safe-area-inset-top)); left: 0; right: 0;
  margin: 0; text-align: center; pointer-events: none;
  font-size: 11px; font-weight: 500; letter-spacing: .38em; text-transform: uppercase; color: #ffffffcc;
  opacity: 0;
}
.choices-head span { margin: 0 .5em; color: #ffffff66; }
.splash.is-choosing .choices-head { animation: splash-fade 900ms ease 900ms forwards; }

.choice {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-end;
  padding: clamp(28px, 4.2vw, 64px) clamp(24px, 3.4vw, 52px) clamp(40px, 8vh, 88px);
  color: #fff; text-decoration: none; background: #111;
  clip-path: inset(100% 0 0 0);
}
.choice + .choice { border-left: 1px solid #ffffff1f; }
.splash.is-choosing .choice {
  animation: choice-rise 1100ms cubic-bezier(.76, 0, .24, 1) forwards;
  animation-delay: calc(250ms + var(--n) * 140ms);
}

/* Photo (or brand artwork) with an elegant dark veil. */
.choice-media { position: absolute; inset: 0; z-index: -2; transform: scale(1.14); transition: transform 1200ms cubic-bezier(.22, 1, .36, 1), filter 600ms ease; }
.splash.is-choosing .choice-media { animation: choice-settle 1800ms cubic-bezier(.22, 1, .36, 1) forwards; animation-delay: calc(250ms + var(--n) * 140ms); }
.choice-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.choice::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, #090a09f2 0%, #090a09b3 30%, #090a0933 62%, #090a0959 100%);
  transition: opacity 500ms ease;
}
.choice::after { /* fine gold hairline that draws across on hover */
  content: ""; position: absolute; left: clamp(24px, 3.4vw, 52px); right: clamp(24px, 3.4vw, 52px); bottom: clamp(26px, 5vh, 56px);
  height: 1px; background: #d9c39a; transform: scaleX(0); transform-origin: left;
  transition: transform 700ms cubic-bezier(.65, 0, .35, 1);
}

/* Frame each photo on its products. */
.choice-justbliss .choice-media img { object-position: center 55%; }
.choice-shzen .choice-media img { object-position: center 45%; }

.choice-copy {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  opacity: 0; transform: translateY(24px);
}
.splash.is-choosing .choice-copy {
  animation: choice-copy-in 1000ms cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: calc(900ms + var(--n) * 140ms);
}
.choice-num { font-size: 11px; font-weight: 500; letter-spacing: .3em; color: #d9c39a; }
.choice-title { font-size: clamp(2.4rem, 4.4vw, 4.4rem); font-weight: 250; line-height: 1; letter-spacing: .01em; }
.choice-desc { max-width: 26ch; font-size: 15px; line-height: 1.5; color: #ffffffc2; }
.choice-cta {
  margin-top: 10px; font-size: 11px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 12px;
}
.choice-cta i { font-style: normal; letter-spacing: 0; font-size: 15px; transition: transform 400ms cubic-bezier(.22, 1, .36, 1); }

/* Hover / focus: the pointed-at card lifts, the others recede. */
@media (hover: hover) {
  .splash-choices:hover .choice .choice-media { filter: brightness(.55) saturate(.8); }
  .splash-choices .choice:hover .choice-media { filter: none; transform: scale(1.05); }
  .choice:hover::after { transform: scaleX(1); }
  .choice:hover .choice-cta i { transform: translateX(6px); }
}
.choice:focus-visible { outline: none; }
.choice:focus-visible::after { transform: scaleX(1); }
.choice:focus-visible .choice-cta i { transform: translateX(6px); }

/* Choosing Just Bliss or Sh'zen: that card widens, the rest fade. */
.splash-choices { transition: grid-template-columns 750ms cubic-bezier(.65, 0, .35, 1); }
.splash.is-going .choice:not(.is-chosen) { opacity: .25; transition: opacity 500ms ease; }
.splash.is-going .splash-choices:has(.choice-justbliss.is-chosen) { grid-template-columns: .35fr 3fr .35fr; }
.splash.is-going .splash-choices:has(.choice-shzen.is-chosen) { grid-template-columns: .35fr .35fr 3fr; }
.splash.is-going .choice-copy { transition: opacity 400ms ease; }
.splash.is-going .choice:not(.is-chosen) .choice-copy { opacity: 0; }

/* Return visits (logo, Back button, links home): straight to the cards, a little quicker. */
.splash.is-return { animation: splash-in 450ms ease both; }
@keyframes splash-in { from { opacity: 0; } }
.splash.is-return .splash-copy, .splash.is-return .splash-skip { display: none; }
.splash.is-return.is-choosing .choice { animation-duration: 900ms; animation-delay: calc(60ms + var(--n) * 110ms); }
.splash.is-return.is-choosing .choice-media { animation-delay: calc(60ms + var(--n) * 110ms); }
.splash.is-return.is-choosing .choice-copy { animation-delay: calc(450ms + var(--n) * 110ms); }
.splash.is-return.is-choosing .choices-head { animation-delay: 350ms; }

@keyframes choice-rise { to { clip-path: inset(0 0 0 0); } }
@keyframes choice-settle { to { transform: scale(1); } }
@keyframes choice-copy-in { to { opacity: 1; transform: none; } }
@keyframes choice-light { from { transform: translate(-12%, -8%); } to { transform: translate(14%, 10%); } }

@media (max-width: 760px) {
  .splash-choices { grid-template-columns: 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .choice + .choice { border-left: 0; border-top: 1px solid #ffffff1f; }
  .choice { padding: 18px 22px 22px; }
  .choice-youghazi { padding-top: 52px; }
  .choice-copy { gap: 6px; }
  .choice-title { font-size: 2rem; }
  .choice-desc { font-size: 13px; }
  .choice-cta { margin-top: 4px; font-size: 10px; letter-spacing: .26em; }
  .choice::after { display: none; }
  .choice::before { background: linear-gradient(to top, #090a09eb 0%, #090a0999 45%, #090a0940 100%); }
  .choices-head { font-size: 10px; letter-spacing: .28em; }
  .splash.is-going .splash-choices { transition: none; }
}

/* Reduced motion: no drifting or letter animation, just a short gentle fade. */
@media (prefers-reduced-motion: reduce) {
  .splash-wall, .splash-row, .splash-eyebrow, .splash-title .char, .splash-rule, .splash-sub, .splash-skip {
    animation: none; opacity: 1; transform: none; filter: none;
  }
  .splash-wall { transform: rotate(-6deg); }
  .splash.is-leaving { transform: none; transition: opacity 500ms ease; }
  .splash.is-choosing .choice, .splash.is-choosing .choice-media, .splash.is-choosing .choice-copy, .splash.is-choosing .choices-head {
    animation: splash-fade 500ms ease forwards; clip-path: none; transform: none; opacity: 0;
  }
}
