/* 3D welcome intro (adapted from the CRM intro). Shown once per visit on the home page. */
:root { --ease: cubic-bezier(0.22, 1, 0.36, 1); --spring: cubic-bezier(0.34, 1.56, 0.64, 1); --font-brand: "Playfair Display", Georgia, serif; }
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #030406;
  overflow: hidden;
  color: #f5f1e8;
  transition: opacity 0.9s var(--ease);
  cursor: pointer;
}
.intro canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.intro .vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, transparent 35%, rgba(0, 0, 0, 0.55) 75%, rgba(0, 0, 0, 0.9) 100%);
}
.intro .fallback-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 60%, rgba(226, 181, 78, 0.22), transparent 55%), #030406;
}
.intro-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 24px 9vh;
  perspective: 900px;
  pointer-events: none;
  transition: transform 1s var(--ease), opacity 0.8s var(--ease), filter 0.8s var(--ease);
}
.intro-emblem {
  width: clamp(84px, 9vw, 120px);
  margin-bottom: 18px;
  filter: drop-shadow(0 0 28px rgba(226, 181, 78, 0.5));
  animation: emblemIn 1.6s var(--ease) 0.3s both, emblemFloat 7s ease-in-out 2s infinite;
  transform-style: preserve-3d;
}
@keyframes emblemIn {
  from {
    opacity: 0;
    transform: translateZ(-400px) rotateY(-180deg) scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes emblemFloat {
  0%,
  100% {
    transform: rotateY(-12deg) translateY(0);
  }
  50% {
    transform: rotateY(12deg) translateY(-8px);
  }
}
.intro-welcome {
  font-size: clamp(12px, 1.35vw, 17px);
  font-weight: 600;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.78);
  margin-bottom: 12px;
  padding-left: 0.55em;
  animation: trackIn 1.4s var(--ease) 0.8s both;
}
@keyframes trackIn {
  from {
    opacity: 0;
    letter-spacing: 1.4em;
    filter: blur(6px);
  }
  to {
    opacity: 1;
  }
}
.intro-title {
  position: relative;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: clamp(30px, 6.4vw, 96px);
  line-height: 1.04;
  letter-spacing: 0.035em;
  transform-style: preserve-3d;
  max-width: 1200px;
}
.intro-title .w {
  display: inline-block;
  white-space: nowrap;
  margin: 0 0.16em;
  transform-style: preserve-3d;
  filter: drop-shadow(0 1px 0 #9a6d18) drop-shadow(0 2px 0 #7d5712) drop-shadow(0 3px 0 #5c400c) drop-shadow(0 4px 0 #3e2b08)
    drop-shadow(0 18px 24px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 40px rgba(226, 181, 78, 0.25));
}
.intro-title .l {
  display: inline-block;
  background-image: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%),
    linear-gradient(180deg, #fff6d0 0%, #f6d77c 30%, #dba843 52%, #a8761f 60%, #e9bf5a 78%, #fbe6a2 100%);
  background-size: 300% 100%, 100% 100%;
  background-position: 160% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform-origin: 50% 90%;
  animation: letterIn 1.15s var(--spring) both, letterShine 4.2s var(--ease) infinite;
  animation-delay: calc(1.35s + var(--i) * 0.055s), calc(3.4s + var(--i) * 0.045s);
}
@keyframes letterIn {
  0% {
    opacity: 0;
    transform: translateY(46px) translateZ(-260px) rotateX(-100deg);
    filter: blur(10px);
  }
  60% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}
@keyframes letterShine {
  0% {
    background-position: 160% 0, 0 0;
  }
  28%,
  100% {
    background-position: -60% 0, 0 0;
  }
}
.intro-tagline {
  margin-top: clamp(16px, 2.4vw, 30px);
  font-family: var(--font-brand);
  font-size: clamp(11px, 1.15vw, 15px);
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.6);
  animation: fadeUp 1.2s var(--ease) 3.3s both;
}
.intro-enter {
  margin-top: clamp(22px, 3.4vw, 42px);
  pointer-events: auto;
  animation: fadeUp 1s var(--ease) 3.7s both;
}
.intro-enter .btn {
  animation: enterGlow 2.4s ease-in-out 4s infinite;
}
@keyframes enterGlow {
  0%,
  100% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 30px -8px rgba(226, 181, 78, 0.6);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 50px 0 rgba(226, 181, 78, 0.9);
  }
}
.intro-hint {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(245, 241, 232, 0.45);
  animation: fadeUp 1s var(--ease) 4s both;
}
.intro-skip {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(245, 241, 232, 0.75);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12.5px;
  font-weight: 650;
  backdrop-filter: blur(8px);
  animation: fadeUp 0.6s var(--ease) 0.3s both;
}
.intro-skip:hover {
  color: #fff;
  border-color: rgba(226, 181, 78, 0.5);
}
.intro-skip svg {
  width: 15px;
  height: 15px;
}
.intro.leaving {
  opacity: 0;
  pointer-events: none;
}
.intro.leaving .intro-content {
  transform: scale(1.7) translateZ(120px);
  opacity: 0;
  filter: blur(14px);
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
html.intro-seen .intro { display: none; }
.intro { z-index: 200; }
.intro .globe-wait { opacity: 0; transition: opacity 1.4s var(--ease); }
.intro.ready canvas { opacity: 1; }
.intro canvas { opacity: 0; transition: opacity 1.6s var(--ease); }
.intro-quote { margin-top: clamp(18px, 2.6vw, 30px); display: grid; gap: 8px; }
.intro-quote p { font-family: "Inter", system-ui, sans-serif; font-size: clamp(16px, 2vw, 24px); font-weight: 500; color: #f5efe2; letter-spacing: .01em; opacity: 0; animation: quoteIn 1.2s var(--ease) both; }
.intro-quote p:nth-child(1) { animation-delay: 3.2s; }
.intro-quote p:nth-child(2) { animation-delay: 4.1s; color: rgba(245, 239, 226, .72); font-size: clamp(14px, 1.6vw, 19px); }
.intro-quote b { background: linear-gradient(180deg, #fff1c4, #e9bf5a 60%, #b8862a); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
@keyframes quoteIn { from { opacity: 0; transform: translateY(18px); filter: blur(8px); letter-spacing: .12em; } to { opacity: 1; transform: none; filter: none; } }
.intro-enter { animation-delay: 5s !important; }
.intro-enter .btn { animation-delay: 5.4s; height: 56px; padding: 0 30px; font-size: 16px; }
.intro-hint { animation-delay: 5.3s !important; }
.intro-skip { font-family: "Inter", system-ui, sans-serif; cursor: pointer; }
.intro-skip svg { fill: currentColor; }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }
