/* Introduction reprise de bise-nouille-13 : le logo se dessine, « Tashi delek » s'écrit, puis la page s'ouvre. */
@font-face { font-family: Tibetan; src: url('../fonts/noto-serif-tibetan.ttf') format('truetype'); font-display: swap; }

.preloader { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; color: var(--gold); font-family: Manrope, Arial, sans-serif; pointer-events: auto; }
.preloader[hidden] { display: none; }
.loader-half { position: absolute; top: 0; bottom: 0; width: 50.1%; background: var(--plum); transition: transform 0.95s cubic-bezier(0.77, 0, 0.18, 1); }
.loader-half.left { left: 0; }
.loader-half.right { right: 0; }
.loader-content { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; text-align: center; transition: opacity 0.35s; }
.logo-build { width: min(560px, 78vw); height: auto; overflow: visible; }
.logo-stroke { stroke-dasharray: 1; stroke-dashoffset: 1; animation: logo-ink 1.4s cubic-bezier(0.3, 0, 0.35, 1) both; }
.crest-stroke { animation-duration: 1.3s; }
.noodle-stroke { animation-delay: 0.55s; animation-duration: 1.5s; }
.bowl-stroke { animation-delay: 0.95s; animation-duration: 1.1s; }
.letter-stroke { animation-delay: 1.15s; animation-duration: 1.1s; }
.word-stroke { animation-delay: 1.8s; animation-duration: 1s; }
.logo-noodles { transform-origin: 450px 340px; animation: noodle-pull 2.5s 0.55s ease-in-out both; }
.loader-greeting { margin: 30px 0 0; font-size: 30px; line-height: 1.8; animation: greeting-arrive 0.7s 2.1s both; }
.loader-greeting > svg { display: block; width: 8.8em; max-width: 100%; height: auto; margin: auto; overflow: visible; }
.loader-greeting svg text { font: 70px Tibetan, serif; fill: currentColor; }
.loader-greeting .ink-trace { stroke-dasharray: 1; stroke-dashoffset: 1; animation: tibetan-writing 3.1s 2.1s ease-in-out both; }
.loader-note { margin-top: 12px; font-size: 9px; letter-spacing: 0.13em; animation: greeting-arrive 0.7s 2.2s both; }
.loader-skip { position: absolute; right: 30px; bottom: 25px; padding: 15px; border: 0; background: none; font: inherit; font-size: 12px; color: inherit; cursor: pointer; }
.loader-skip:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.preloader.departed { pointer-events: none; }
.departed .loader-half.left { transform: translateX(-100%); }
.departed .loader-half.right { transform: translateX(100%); }
.departed .loader-content, .departed .loader-skip { opacity: 0; }
.departed .loader-skip { transition: opacity 0.2s; }

@keyframes logo-ink { to { stroke-dashoffset: 0; } }
@keyframes noodle-pull { 0% { transform: translateY(-18px) scaleY(0.93); } 60% { transform: translateY(4px) scaleY(1.015); } 100% { transform: none; } }
@keyframes greeting-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tibetan-writing { 0% { stroke-dashoffset: 1; } 18% { stroke-dashoffset: 0.83; } 25% { stroke-dashoffset: 0.8; } 43% { stroke-dashoffset: 0.58; } 49% { stroke-dashoffset: 0.56; } 68% { stroke-dashoffset: 0.32; } 75% { stroke-dashoffset: 0.3; } 100% { stroke-dashoffset: 0; } }

@media (max-width: 700px) {
  .logo-build { width: 88vw; }
  .loader-greeting { margin-top: 25px; font-size: 26px; }
  .loader-note { font-size: 8px; letter-spacing: 0.07em; }
  .loader-skip { right: 15px; bottom: 15px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .preloader { display: none; }
}
