/* ============================================================
   TML W2 v3 — Intro cinématique
   ============================================================ */

.intro-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 60px 40px 80px;
  position: relative;
  overflow: hidden;
}

/* particle field behind the logo */
.intro-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.intro-particles i {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #FFD86B;
  box-shadow: 0 0 8px #FFD86B, 0 0 14px rgba(255,216,107,.4);
  opacity: 0;
  --x: 0px; --y: 0px;
  --tx: 0px; --ty: 0px;
  --delay: 0s;
  animation: particleConverge 3s cubic-bezier(.4,.1,.3,1) forwards;
  animation-delay: var(--delay);
  left: calc(50% + var(--x));
  top: calc(42% + var(--y));
}
@keyframes particleConverge {
  0%   { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(.3); }
  15%  { opacity: 1; }
  70%  { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(0,0) scale(.6); }
}

/* sparkles that drift gently forever after intro */
.intro-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.intro-sparkles i {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px #FFD86B;
  opacity: 0;
  animation: sparkleDrift 6s linear infinite;
}
@keyframes sparkleDrift {
  0%   { opacity: 0; transform: translateY(0) scale(.5); }
  20%  { opacity: 1; }
  80%  { opacity: .8; }
  100% { opacity: 0; transform: translateY(-120px) scale(1.2); }
}

/* the logo container */
.logo-stage {
  position: relative;
  z-index: 2;
  margin-top: 40px;
  margin-bottom: 40px;
  width: min(820px, 100%);
  display: flex; flex-direction: column; align-items: center;
  transition: transform 800ms cubic-bezier(.22,.9,.3,1);
}

/* butterfly SVG */
.butterfly {
  width: 360px;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 40px rgba(255,216,107,.5)) drop-shadow(0 0 80px rgba(255,46,147,.3));
  opacity: 0;
  transform: scale(.4) rotate(-8deg);
  animation: butterflyIn 1600ms cubic-bezier(.34,1.4,.64,1) 600ms forwards;
  margin-bottom: -20px;
}
@keyframes butterflyIn {
  0%   { opacity: 0; transform: scale(.4) rotate(-8deg); }
  60%  { opacity: 1; transform: scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* SVG stroke tracing */
.butterfly .stroke-path {
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--len, 1000);
  animation: traceStroke 1800ms cubic-bezier(.6,.0,.3,1) 800ms forwards;
}
@keyframes traceStroke {
  to { stroke-dashoffset: 0; }
}

/* fills fade in after tracing */
.butterfly .fill-delayed {
  opacity: 0;
  animation: fillIn 800ms ease 2400ms forwards;
}
@keyframes fillIn {
  to { opacity: 1; }
}

/* gentle breath after arrival */
.butterfly.settled {
  animation: butterflyBreath 4s ease-in-out infinite;
}
@keyframes butterflyBreath {
  0%, 100% { transform: scale(1) translateY(0); }
  50%      { transform: scale(1.02) translateY(-4px); }
}

/* the wordmark */
.wordmark {
  margin-top: -4px;
  display: flex;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: .18em;
  font-size: clamp(28px, 3.8vw, 48px);
  color: transparent;
  background: linear-gradient(180deg, #FFE89C 0%, #FFD86B 45%, #E8A628 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 40px rgba(255,216,107,.3);
}
.wordmark span {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) rotateX(-80deg);
  transform-origin: 50% 100%;
  animation: letterIn 700ms cubic-bezier(.34,1.4,.64,1) forwards;
}
@keyframes letterIn {
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

/* subtitle "Conseil des Six" */
.intro-subtitle {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 28px);
  color: var(--ink-dim);
  margin-top: 18px;
  opacity: 0;
  letter-spacing: .04em;
  animation: fadeUp 800ms ease 3600ms forwards;
}
.intro-subtitle em {
  background: linear-gradient(135deg, #FFD86B, #FF2E93);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* horizontal ceremonial divider */
.intro-divider {
  display: flex; align-items: center; gap: 14px;
  margin-top: 26px;
  opacity: 0;
  animation: fadeUp 800ms ease 3900ms forwards;
}
.intro-divider .line {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,216,107,.6), transparent);
}
.intro-divider .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #FFD86B; box-shadow: 0 0 10px #FFD86B;
}
.intro-divider .diamond {
  width: 9px; height: 9px;
  background: linear-gradient(135deg, #FFD86B, #E8A628);
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(255,216,107,.6);
}

/* countdown */
.countdown {
  display: flex; gap: 12px;
  margin-top: 32px;
  opacity: 0;
  animation: fadeUp 900ms ease 4200ms forwards;
}
.cd-cell {
  min-width: 78px;
  padding: 14px 10px 12px;
  border: 1px solid rgba(255,216,107,.2);
  border-radius: var(--r-m);
  background: rgba(255,216,107,.04);
  backdrop-filter: blur(10px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cd-cell::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(80% 80% at 50% 0%, rgba(255,216,107,.15), transparent 70%);
  pointer-events: none;
}
.cd-num {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 36px; line-height: 1;
  letter-spacing: -.02em;
  background: linear-gradient(180deg, #FFE89C, #E8A628);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.cd-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: .2em;
  color: var(--ink-muted);
  margin-top: 6px;
  text-transform: uppercase;
}
.cd-sep {
  display: grid; place-items: center;
  color: rgba(255,216,107,.4);
  font-family: 'Instrument Serif', serif;
  font-size: 30px;
  font-style: italic;
}

/* tagline */
.intro-tagline {
  margin-top: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--gold-1);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 800ms ease 4500ms forwards;
}

/* the picker grid — appears after intro */
.intro-wrap .landing-inner-after {
  margin-top: 72px;
  width: min(1100px, 100%);
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 900ms cubic-bezier(.22,.9,.3,1) 5000ms forwards;
  position: relative; z-index: 2;
}
.intro-wrap .landing-inner-after .kicker-small {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--ink-muted);
  margin-bottom: 24px;
  text-transform: uppercase;
}

/* stagger picker cards */
.intro-wrap .picker {
  opacity: 0;
  transform: translateY(30px);
  animation: cardUp 700ms cubic-bezier(.22,.9,.3,1) forwards;
}
.intro-wrap .picker:nth-child(1) { animation-delay: 5300ms; }
.intro-wrap .picker:nth-child(2) { animation-delay: 5400ms; }
.intro-wrap .picker:nth-child(3) { animation-delay: 5500ms; }
.intro-wrap .picker:nth-child(4) { animation-delay: 5600ms; }
.intro-wrap .picker:nth-child(5) { animation-delay: 5700ms; }
.intro-wrap .picker:nth-child(6) { animation-delay: 5800ms; }
@keyframes cardUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ambient radial glow that pulses behind logo */
.intro-wrap::before {
  content: "";
  position: absolute;
  top: 10%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background:
    radial-gradient(circle, rgba(255,216,107,.14), transparent 50%),
    radial-gradient(circle, rgba(255,46,147,.1), transparent 70%);
  z-index: 0;
  opacity: 0;
  animation: glowIn 2s ease 400ms forwards, glowPulse 6s ease-in-out 2400ms infinite;
  pointer-events: none;
}
@keyframes glowIn {
  to { opacity: 1; }
}
@keyframes glowPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
  50%      { transform: translateX(-50%) scale(1.1); opacity: .7; }
}

@media (max-width: 720px) {
  .butterfly { width: 240px; margin-bottom: -12px; }
  .cd-cell { min-width: 60px; padding: 10px 6px 8px; }
  .cd-num { font-size: 28px; }
  .intro-wrap .landing-inner-after { margin-top: 56px; }
}

@media (max-width: 768px) {
  .butterfly { width: 200px; margin-bottom: -8px; }
  .wordmark { font-size: clamp(22px, 7vw, 36px); }
  .intro-tagline { font-size: 10px; letter-spacing: .18em; }
  .cd-cell { min-width: 56px; padding: 8px 4px 6px; }
  .cd-num { font-size: 24px; }
  .cd-lbl { font-size: 8px; }
  .intro-wrap .landing-inner-after { margin-top: 40px; }
  .intro-wrap .landing-inner-after .subtitle,
  .landing .subtitle { font-size: clamp(16px, 4.5vw, 20px); }
  .picker-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .picker .monogram { font-size: 56px; }
}
