/* Giri Académie — Splash v6
   Maison de luxe. Sobre. Élégant. Aérien.
*/

:root {
  --black:     #0A0A0E;
  --black-2:   #12121A;
  --gold:      #C9A961;
  --gold-soft: #B8924F;
  --gold-pale: #E8D29A;
  --gold-deep: #8E6D2C;
  --ivory:     #F4ECD8;
  --ivory-dim: #C9C2AE;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

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

html, body {
  height: 100%;
  background: var(--black);
  color: var(--ivory);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
}

/* ─── Scène ───────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, #16151E 0%, var(--black) 65%),
    var(--black);
  opacity: 0;
  animation: stageReveal 1.2s var(--ease) forwards;
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.splash.leaving { opacity: 0; transform: translateY(-12px); pointer-events: none; }
@keyframes stageReveal { to { opacity: 1; } }

/* ─── Lueur dorée unique, douce, derrière le contenu ── */
.glow {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  width: 90vmin;
  height: 90vmin;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(201,169,97,0.18), rgba(201,169,97,0.05) 35%, transparent 65%);
  transform: translate3d(-50%, -55%, 0);
  opacity: 0;
  animation: glowIn 2.2s 0.4s var(--ease) forwards,
             glowBreath 9s 2.8s ease-in-out infinite;
  will-change: opacity, transform;
  z-index: 1;
}
@keyframes glowIn {
  to { opacity: 0.85; }
}
@keyframes glowBreath {
  0%, 100% { opacity: 0.75; transform: translate3d(-50%, -55%, 0) scale(1); }
  50%      { opacity: 0.95; transform: translate3d(-50%, -55%, 0) scale(1.04); }
}

/* ─── Frame centrale ─────────────────────────────── */
.frame {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px;
  max-width: 640px;
  width: 100%;
}

/* ─── Logo ───────────────────────────────────────── */
.logo {
  display: block;
  max-width: min(420px, 68vw);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.97);
  filter: drop-shadow(0 10px 32px rgba(201,169,97,0.20)) drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  animation: logoIn 1.8s 0.3s var(--ease) forwards,
             logoBreath 7s 2.5s ease-in-out infinite;
  will-change: opacity, transform;
}
@keyframes logoIn {
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes logoBreath {
  0%, 100% { transform: translate3d(0, 0, 0)     scale(1); }
  50%      { transform: translate3d(0, -2px, 0)  scale(1.008); }
}

/* ─── Diviseur (✦ ornement) ───────────────────────── */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
  height: 14px;
  opacity: 0;
  animation: dividerIn 1.4s 1.4s var(--ease) forwards;
}
@keyframes dividerIn { to { opacity: 1; } }

.divider .line {
  display: block;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  animation: lineGrow 1.6s 1.7s var(--ease) forwards;
}
.divider .line:last-of-type {
  animation-direction: reverse;
  animation-delay: 1.7s;
  background: linear-gradient(270deg, transparent 0%, var(--gold) 50%, transparent 100%);
  width: 0;
  animation: lineGrow 1.6s 1.7s var(--ease) forwards;
}
@keyframes lineGrow { to { width: 90px; } }

.divider .dot {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  box-shadow: 0 0 6px rgba(201,169,97,0.6);
  animation: dotIn 0.5s 2.5s var(--ease) forwards;
}

.divider .diamond {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg) scale(0);
  box-shadow: 0 0 8px rgba(201,169,97,0.6);
  animation: diamondIn 0.7s 2.0s var(--ease) forwards;
}

@keyframes dotIn      { to { opacity: 1; } }
@keyframes diamondIn  { to { transform: rotate(45deg) scale(1); } }

/* ─── Tagline italique ───────────────────────────── */
.tagline {
  margin-top: 18px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 24px);
  letter-spacing: 0.14em;
  color: var(--ivory-dim);
  line-height: 1.5;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  animation: taglineIn 1.4s 2.6s var(--ease) forwards;
  will-change: opacity, transform;
}
@keyframes taglineIn {
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ─── Portes ─────────────────────────────────────── */
.doors {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 38px;
  width: 100%;
}

.door {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  padding: 15px 38px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition:
    background 350ms var(--ease),
    color 350ms var(--ease),
    border-color 350ms var(--ease),
    transform 350ms var(--ease),
    letter-spacing 400ms var(--ease),
    box-shadow 350ms var(--ease);
  will-change: transform, background;
}

.door-primary {
  background: var(--gold);
  color: #1A1308;
  border: 1px solid var(--gold);
  box-shadow:
    0 2px 14px rgba(201,169,97,0.18),
    inset 0 1px 0 rgba(255,240,200,0.30);
  animation: doorIn 1s 3.1s var(--ease) forwards;
}
.door-primary:hover, .door-primary:focus-visible {
  background: var(--gold-pale);
  border-color: var(--gold-pale);
  color: #14100A;
  transform: translate3d(0, -2px, 0);
  letter-spacing: 0.26em;
  box-shadow:
    0 8px 24px rgba(232,210,154,0.32),
    inset 0 1px 0 rgba(255,250,220,0.5);
}

.door-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201,169,97,0.4);
  animation: doorIn 1s 3.3s var(--ease) forwards;
}
.door-secondary:hover, .door-secondary:focus-visible {
  background: rgba(201,169,97,0.06);
  border-color: var(--gold);
  color: var(--gold-pale);
  transform: translate3d(0, -2px, 0);
  letter-spacing: 0.26em;
}

.door:active { transform: translate3d(0, 0, 0); transition-duration: 100ms; }
.door:focus-visible { outline: 1px solid var(--gold-pale); outline-offset: 4px; }

@keyframes doorIn { to { opacity: 1; transform: translate3d(0, 0, 0); } }

/* ─── Porte du Hall (publique, première porte) ─────── */
.door-hall {
  background: linear-gradient(180deg, rgba(201,169,97,0.10) 0%, rgba(201,169,97,0.03) 100%);
  color: var(--gold-pale);
  border: 1px solid var(--gold);
  position: relative;
  animation: doorIn 1s 2.95s var(--ease) forwards;
  box-shadow:
    0 2px 12px rgba(201,169,97,0.12),
    inset 0 1px 0 rgba(255,240,200,0.10);
}
.door-hall::before {
  content: '';
  position: absolute;
  top: -1px; left: 18%; right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-pale), transparent);
  opacity: 0.7;
}
.door-hall:hover, .door-hall:focus-visible {
  background: linear-gradient(180deg, rgba(201,169,97,0.20) 0%, rgba(201,169,97,0.08) 100%);
  color: var(--gold-pale);
  border-color: var(--gold-pale);
  transform: translate3d(0, -2px, 0);
  letter-spacing: 0.26em;
  box-shadow:
    0 8px 24px rgba(201,169,97,0.22),
    inset 0 1px 0 rgba(255,250,220,0.20);
}

/* ─── Footer signature ───────────────────────────── */
.footer {
  position: absolute;
  bottom: 16px;
  width: 100%;
  justify-content: center;
  left: 0;
  right: 0;
  transform: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(201,169,97,0.45);
  opacity: 0;
  animation: footerIn 1.4s 3.6s var(--ease) forwards;
}
.footer-sep { color: rgba(201,169,97,0.3); }
@keyframes footerIn { to { opacity: 1; } }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 640px) {
  .frame { padding: 24px; }
  .logo { max-width: min(300px, 72vw); }
  .divider { gap: 10px; margin-top: 18px; }
  .divider .line, .divider .line:last-of-type { }
  .tagline { margin-top: 14px; font-size: 15px; letter-spacing: 0.10em; }
  .doors { margin-top: 30px; gap: 10px; }
  .door { min-width: 260px; padding: 13px 30px; font-size: 11px; letter-spacing: 0.20em; }
  .footer { bottom: 20px; font-size: 9px; letter-spacing: 0.28em; gap: 8px; }
}

@media (max-width: 360px) {
  .logo { max-width: 240px; }
  .door { min-width: 240px; }
}

@media (min-height: 1200px) {
  .logo { max-width: 480px; }
}

/* Sécurité hauteur basse — pas de scroll, on rapproche tout */
@media (max-height: 720px) {
  .logo { max-width: min(340px, 60vw); }
  .divider { margin-top: 16px; }
  .tagline { margin-top: 12px; }
  .doors { margin-top: 28px; }
}

@media (max-height: 580px) {
  .logo { max-width: min(260px, 55vw); }
  .divider { margin-top: 12px; }
  .tagline { margin-top: 8px; font-size: 14px; }
  .doors { margin-top: 20px; }
  .footer { display: none; }
}

/* ─── Réduction de mouvement ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-iteration-count: 1 !important;
    transition-duration: 0.1s !important;
  }
  .splash, .glow, .logo, .divider, .divider .line, .divider .dot,
  .divider .diamond, .tagline, .door, .footer {
    opacity: 1 !important;
    transform: none !important;
  }
  .divider .line { width: 90px !important; }
  .divider .diamond { transform: rotate(45deg) !important; }
}
