/* Homepage intro: five seconds, once per browser session, the same at every
   size. On cream, among drifting embers like the app's loading screen, the two
   halves of the flame are stamped on, left then right, each throwing a burst of
   embers outward; then the name is written out by hand. On a phone the lockup
   is the size the app draws it. Without JavaScript there are no embers; with
   reduced motion there is no intro at all. The embers are drawn by intro.js. */
.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden; background: #faf7f0; animation: intro-out .5s ease-in 4.5s forwards; }
.intro[data-skip] { animation: intro-out .2s ease-in forwards; }
html[data-intro="seen"] .intro { display: none; }
.intro-sky { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The app draws its lockup 200 logical pixels wide, centred. */
.intro-lockup { position: relative; width: 200px; height: auto; overflow: visible; }
.intro-tongue { fill: #bf5700; }
.intro-letter { fill: #292e25; }
.intro-stop { fill: #bf5700; }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }

.intro-lockup { animation: intro-lift .5s ease-in 4.5s forwards; }
.intro-glow { position: absolute; left: 50%; top: 50%; width: 500px; height: 500px; margin: -277px 0 0 -250px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 132, 104, .34), rgba(255, 170, 110, .16) 45%, rgba(250, 247, 240, 0) 72%); opacity: 0; transform: scale(.35); animation: intro-glow 1.2s cubic-bezier(.2, .7, .2, 1) .2s forwards, intro-breathe 1.8s ease-in-out 1.5s infinite alternate; }
@media (min-width: 1024px) {
  .intro-lockup { width: 300px; }
  .intro-glow { width: 760px; height: 760px; margin: -420px 0 0 -380px; }
}


  /* The flame is stamped on: the left half appears at once at its exact size,
     then the right. Nothing grows, moves or fades. intro.js throws its embers
     at the same moments. */
  .intro-tongue { opacity: 0; animation: intro-stamp .01s step-end forwards; }
  .intro-tongue:nth-child(1) { animation-delay: .3s; }
  .intro-tongue:nth-child(2) { animation-delay: .7s; }

  /* The name, written out by hand. Each letter sits behind a mask; a wide pen
     line travels along each stroke in writing order and uncovers the letter as
     it goes (the line's length is normalised to 1). The pen line is never seen. */
  .intro-pen { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: intro-write var(--for) cubic-bezier(.4, 0, .6, 1) var(--at) forwards; }
  .intro-whole { opacity: 0; animation: intro-whole .01s linear var(--at) forwards; }
  /* PEN-TIMING:START (written by tool/export_lockup.py) */
  .intro-pen-1 { --at: 1.00s; --for: 0.102s; }
  .intro-pen-2 { --at: 1.12s; --for: 0.054s; }
  .intro-whole-1 { --at: 1.17s; }
  .intro-pen-3 { --at: 1.19s; --for: 0.061s; }
  .intro-pen-4 { --at: 1.27s; --for: 0.034s; }
  .intro-whole-2 { --at: 1.30s; }
  .intro-pen-5 { --at: 1.32s; --for: 0.061s; }
  .intro-pen-6 { --at: 1.40s; --for: 0.068s; }
  .intro-whole-3 { --at: 1.47s; }
  .intro-pen-7 { --at: 1.49s; --for: 0.150s; }
  .intro-whole-4 { --at: 1.64s; }
  .intro-pen-8 { --at: 1.66s; --for: 0.082s; }
  .intro-pen-9 { --at: 1.75s; --for: 0.116s; }
  .intro-whole-5 { --at: 1.87s; }
  .intro-pen-10 { --at: 1.89s; --for: 0.068s; }
  .intro-whole-6 { --at: 1.96s; }
  .intro-pen-11 { --at: 1.98s; --for: 0.102s; }
  .intro-pen-12 { --at: 2.09s; --for: 0.116s; }
  .intro-whole-7 { --at: 2.21s; }
  .intro-pen-13 { --at: 2.23s; --for: 0.116s; }
  .intro-whole-8 { --at: 2.34s; }
  .intro-pen-14 { --at: 2.36s; --for: 0.150s; }
  .intro-whole-9 { --at: 2.51s; }
  .intro-word .intro-stop { --at: 2.53s; }
  /* PEN-TIMING:END */
  /* The full stop is set down last. */
  .intro-word .intro-stop { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; animation: intro-stop .45s cubic-bezier(.3, 1.8, .5, 1) var(--at) both; }

  @keyframes intro-stamp { to { opacity: 1; } }
  @keyframes intro-write { to { stroke-dashoffset: 0; } }
  @keyframes intro-whole { to { opacity: 1; } }
  @keyframes intro-stop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
  @keyframes intro-glow { to { opacity: 1; transform: none; } }
  @keyframes intro-breathe { from { opacity: 1; } to { opacity: .72; } }
  @keyframes intro-lift { to { transform: translateY(-14px) scale(1.03); } }

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