/* =========================================================
   BEAUTY VIBES — Welcome page
   Builds on styles.css tokens, buttons, .duo, .streaks, .particles
   ========================================================= */

.welcome {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 45% 60% at 80% 40%, rgba(229, 9, 20, .28), transparent 70%),
    radial-gradient(ellipse 40% 70% at 12% 60%, rgba(122, 7, 16, .55), transparent 70%),
    var(--black);
}

/* ---------- Background layers ---------- */
.w-bg { position: absolute; inset: -3%; z-index: -3; will-change: transform; transition: transform .9s var(--ease-out); }
.w-bg__model, .w-bg__products { position: absolute; top: 0; bottom: 0; }
.w-bg__model {
  left: 0; width: 54%;
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 96%);
  mask-image: linear-gradient(90deg, #000 45%, transparent 96%);
  animation: wBgIn 2.8s var(--ease-out) both;
}
.w-bg__model img { object-position: 50% 22%; }
.w-bg__products {
  right: 0; width: 42%; --op: .8;
  -webkit-mask-image: linear-gradient(270deg, #000 40%, transparent 96%);
  mask-image: linear-gradient(270deg, #000 40%, transparent 96%);
  animation: wBgIn 2.8s var(--ease-out) .25s both;
}
@keyframes wBgIn { from { opacity: 0; transform: scale(1.14); filter: blur(10px); } to { opacity: var(--op, 1); transform: none; filter: none; } }

.w-vignette {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 42% 58% at 50% 50%, rgba(5, 5, 5, .88) 0%, rgba(5, 5, 5, .55) 60%, rgba(5, 5, 5, .15) 100%),
    linear-gradient(0deg, rgba(5, 5, 5, .9), transparent 28%),
    linear-gradient(180deg, rgba(5, 5, 5, .75), transparent 22%);
}
.welcome .streaks, .welcome .particles { z-index: -1; }

/* corner frame */
.w-frame { position: absolute; inset: 22px; z-index: 1; pointer-events: none; }
.w-frame i { position: absolute; width: 56px; height: 56px; border: 0 solid var(--red); opacity: .8; animation: wFade 1.2s var(--ease) 2.1s both; }
.w-frame i:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.w-frame i:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.w-frame i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.w-frame i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* ---------- Top bar ---------- */
.w-top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 34px clamp(24px, 5vw, 70px) 0;
  font-size: 13px; color: var(--silver); letter-spacing: .04em;
  animation: wFadeDown 1s var(--ease-out) 2.5s both;
}
.w-top p { display: flex; align-items: center; gap: 10px; }
.w-top .ico { color: var(--red); }
.w-social { display: flex; gap: 6px; }

/* ---------- Centre ---------- */
.w-center {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px 20px;
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}

.w-logo { position: relative; width: 240px; height: 240px; margin-bottom: 26px; transition: transform .9s var(--ease-out); }
.w-logo img {
  position: relative; z-index: 2; width: 100%; height: 100%; border-radius: 50%;
  mix-blend-mode: screen;
  animation: wLogoIn 1.6s var(--ease-out) .5s both, logoGlow 3.2s ease-in-out 2.2s infinite;
}
@keyframes wLogoIn { from { opacity: 0; transform: scale(.82); filter: blur(14px); } to { opacity: 1; transform: none; filter: none; } }
.w-logo__glow {
  position: absolute; inset: -60px; z-index: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 9, 20, .38), transparent 62%);
  animation: wFade 1.6s var(--ease) .6s both, pulse 3.6s ease-in-out 2.2s infinite;
}
.w-ring { position: absolute; inset: -18px; z-index: 1; width: calc(100% + 36px); height: calc(100% + 36px); transform: rotate(-90deg); overflow: visible; }
.w-ring circle { fill: none; }
.w-ring__track { stroke: rgba(229, 9, 20, .25); stroke-width: .6; stroke-dasharray: 2 5; }
.w-ring__draw {
  stroke: var(--red-bright); stroke-width: 1.2; stroke-linecap: round;
  stroke-dasharray: 610; stroke-dashoffset: 610;
  filter: drop-shadow(0 0 4px rgba(255, 10, 22, .9));
  animation: wRing 2s var(--ease) .2s forwards;
}
@keyframes wRing { to { stroke-dashoffset: 0; } }

.w-eyebrow {
  font: 500 13px/1 var(--sans); letter-spacing: .48em; text-transform: uppercase; color: var(--red-bright);
  margin-bottom: 18px; padding-left: .48em;
  animation: wFadeUp .9s var(--ease-out) 1.1s both;
}
.w-title { display: flex; flex-direction: column; align-items: center; }
.w-title__line {
  font: 500 clamp(40px, 6.2vw, 92px)/1 var(--serif);
  letter-spacing: .08em; text-transform: uppercase; padding-left: .08em;
}
.w-title__line .l { display: inline-block; white-space: pre; animation: wLetter .9s var(--ease-out) both; animation-delay: calc(1.3s + var(--l) * 45ms); }
@keyframes wLetter { from { opacity: 0; transform: translateY(40%) scale(.96); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.w-title__script {
  font: 400 clamp(46px, 5.6vw, 84px)/1.15 var(--script);
  color: var(--red-bright); text-shadow: 0 0 30px rgba(229, 9, 20, .55);
  margin-top: -.08em; padding: 0 .2em .1em;
  clip-path: inset(-20% 100% -20% -5%);
  animation: wClip 1.5s var(--ease) 2s forwards;
}
@keyframes wClip { to { clip-path: inset(-20% -5% -20% -5%); } }
.w-text {
  max-width: 540px; margin: 22px auto 34px;
  font-size: clamp(15px, 1.25vw, 17.5px); line-height: 1.7; color: #d3cdc7;
  animation: wFadeUp .9s var(--ease-out) 2.3s both;
}
.w-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; animation: wFadeUp .9s var(--ease-out) 2.5s both; }
.w-enter { padding: 16px 38px; font-size: 16px; }
.w-hint { margin-top: 20px; font-size: 12px; color: #7d7d7d; letter-spacing: .08em; animation: wFade 1s var(--ease) 3s both; }
.w-hint kbd { font: 500 11px var(--sans); padding: 2px 8px; margin: 0 4px; border: 1px solid #333; border-radius: 5px; color: var(--silver); }

/* ---------- Collections strip ---------- */
.w-cats {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 0;
  padding: 0 20px 22px;
  animation: wFadeUp 1s var(--ease-out) 2.7s both;
}
.w-cats a {
  position: relative; padding: 6px 24px;
  font: 500 12.5px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--silver);
  transition: color .35s, text-shadow .35s;
}
.w-cats a + a::before { content: ""; position: absolute; left: -2px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--red); box-shadow: var(--glow-sm); }
.w-cats a::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: -2px; height: 1px; background: var(--red-bright); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.w-cats a:hover { color: var(--red-bright); text-shadow: 0 0 12px rgba(255, 10, 22, .5); }
.w-cats a:hover::after { transform: scaleX(1); }

.w-bottom {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; gap: 12px;
  padding: 16px clamp(24px, 5vw, 70px) 34px;
  font-size: 12px; color: #7d7d7d; letter-spacing: .06em;
  animation: wFade 1s var(--ease) 2.9s both;
}
.w-bottom i { font-style: normal; color: var(--red); margin: 0 6px; }
.w-bottom b { color: var(--red-bright); font-weight: 400; }

@keyframes wFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wFadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes wFadeDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }

/* Hold the whole intro until fonts + hero image are ready */
.welcome-page:not(.is-ready) .welcome *,
.welcome-page:not(.is-ready) .welcome *::before,
.welcome-page:not(.is-ready) .welcome *::after { animation-play-state: paused !important; }

/* Exit */
.welcome-page.is-leaving .w-center { opacity: 0; transform: scale(1.05); }
.welcome-page.is-leaving .w-bg { transform: scale(1.08) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .w-top__mid { display: none; }
  .w-bg__model { width: 100%; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 85%); mask-image: linear-gradient(180deg, #000 30%, transparent 85%); }
  .w-bg__products { width: 70%; top: auto; height: 45%; --op: .55; -webkit-mask-image: radial-gradient(ellipse at 80% 80%, #000 30%, transparent 70%); mask-image: radial-gradient(ellipse at 80% 80%, #000 30%, transparent 70%); }
  .w-vignette { background: radial-gradient(ellipse 80% 55% at 50% 52%, rgba(5, 5, 5, .9), rgba(5, 5, 5, .55) 70%, rgba(5, 5, 5, .3)), linear-gradient(0deg, rgba(5, 5, 5, .95), transparent 30%); }
}
@media (max-width: 640px) {
  .w-top { padding: 26px 22px 0; font-size: 12px; }
  .w-top > p:first-child { font-size: 11.5px; }
  .w-frame { inset: 12px; }
  .w-frame i { width: 34px; height: 34px; }
  .w-logo { width: 170px; height: 170px; margin-bottom: 20px; }
  .w-eyebrow { font-size: 11px; letter-spacing: .34em; }
  .w-title__line { letter-spacing: .04em; }
  .w-ctas { flex-direction: column; align-items: stretch; width: min(320px, 100%); }
  .w-ctas .btn { justify-content: center; }
  .w-hint { display: none; }
  .w-cats { gap: 6px 0; }
  .w-cats a { padding: 6px 14px; font-size: 11px; letter-spacing: .16em; }
  .w-cats a::after { left: 14px; right: 14px; }
  .w-bottom { flex-direction: column; align-items: center; padding: 12px 22px 26px; }
}
@media (hover: none) { .w-hint { display: none; } }
