/* A copy of kit/web/src/brand/lockup.css, written by website/scripts/apply-brand.mjs. Do not edit here. site.css sets
   --brand-ink, --brand-accent, --bg and --font for it. */
/* The lockup and the opening animation (docs/DESIGN.md Logo). Plain global classes, because three renderers write the
   same markup: Brand.tsx (the app), web/site/render.ts (the static pages) and intro.ts (the intro). Loaded by
   web/src/main.tsx and web/site/site.css.

   The lockup: the F as tall as the wordmark's tall letters, both on one baseline; the address in lowercase, its ending
   lighter. Colors are the theme's --brand-ink and --brand-accent (a theme without them falls back to text and accent). */
.fl {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1;
  white-space: nowrap;
  color: var(--brand-ink, var(--text));
}
.fl-sm {
  font-size: 14px;
}
.fl-lg {
  font-size: 24px;
}
.fl-mark {
  display: block;
  flex: none;
  width: 0.74em;
  height: 0.74em;
  overflow: visible;
}
.fl-ink {
  fill: var(--brand-ink, var(--text));
}
.fl-accent {
  fill: var(--brand-accent, var(--accent));
}
.fl-tld {
  font-weight: 500;
  opacity: 0.6;
}

/* ---------------------------------------------------------------------------------------------------------------
   The intro. The bootstrap script (intro.ts INTRO_BOOT, inside THEME_BOOT_SCRIPT) sets <html data-intro="in"> on the
   first page of a visit, never when the visitor asks for reduced motion. Without the attribute nothing below shows.
   Timeline: three levels rise (0 to 0.6s), a quarter turn lands them as the F (0.75 to 1.25s), the F slides left as the
   name's room opens (1.3 to 1.7s), the address types in (1.75 to 2.25s) and holds centered for 0.75s. Then the script moves the lockup onto the
   header's own ([data-brand-home]) and the page shows. If the script never runs, the last rule here fades the intro
   by itself, so content is never held for more than about four seconds. */
.fl-intro {
  display: none;
}
html[data-intro] .fl-intro {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  animation: introGone 0.4s linear 5.15s both;
}
.fl-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg);
  transition: opacity 0.45s ease;
}
.fl-intro .fl {
  position: relative;
  gap: 0;
  font-size: clamp(24px, 6.4vw, 60px);
  transform-origin: 0 0;
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
/* the name's room: a grid column that opens from nothing, so the F starts exactly centered and slides left */
.introRoom {
  display: grid;
  grid-template-columns: 0fr;
  animation: introRoom 0.4s cubic-bezier(0.65, 0, 0.35, 1) 1.3s both;
}
.introRoom .fl-word {
  position: relative;
  min-width: 0;
  padding-left: 0.3em;
  clip-path: inset(-0.3em 100% -0.3em 0);
  animation: introType 1.25s linear 1.75s both;
}
/* the caret that leads the typing */
.introRoom .fl-word::after {
  content: '';
  position: absolute;
  left: 0.3em;
  bottom: -0.06em;
  width: 0.07em;
  height: 0.86em;
  border-radius: 0.04em;
  background: var(--brand-accent, var(--accent));
  opacity: 0;
  animation: introCaret 0.625s linear 1.75s both;
}

/* the mark: three levels in chart coordinates; the turn and the two shifts land them as the F's rows */
.introMark .introTurn {
  transform-box: view-box;
  transform-origin: 12px 12px;
  animation: introTurn 0.5s cubic-bezier(0.65, 0, 0.35, 1) 0.75s both;
}
.introMark .introS1 {
  animation: introS1 0.45s cubic-bezier(0.65, 0, 0.35, 1) 0.75s both;
}
.introMark .introS2 {
  animation: introS2 0.45s cubic-bezier(0.65, 0, 0.35, 1) 0.75s both;
}
.introMark rect {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: introRise 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.introMark .introB1 {
  animation-delay: 0.05s;
}
.introMark .introB2 {
  fill-opacity: 0.75;
  animation:
    introRise 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both,
    introSolid 0.5s linear 0.75s both;
}
.introMark .introB3 {
  animation-delay: 0.25s;
}

@keyframes introRise {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
@keyframes introSolid {
  from {
    fill-opacity: 0.75;
  }
  to {
    fill-opacity: 1;
  }
}
@keyframes introTurn {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-90deg);
  }
}
@keyframes introS1 {
  to {
    transform: translate(0, -18px);
  }
}
@keyframes introS2 {
  to {
    transform: translate(0, -9px);
  }
}
@keyframes introRoom {
  to {
    grid-template-columns: 1fr;
  }
}
/* typed by 0.5s, then the finished lockup holds centered for 0.75s: the script moves it when this animation ends */
@keyframes introType {
  40%,
  to {
    clip-path: inset(-0.3em 0 -0.3em 0);
  }
}
@keyframes introCaret {
  0% {
    left: 0.3em;
    opacity: 1;
  }
  80% {
    left: 100%;
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}
@keyframes introGone {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
@keyframes introHold {
  from,
  to {
    visibility: hidden;
  }
}

/* while the intro plays, the header's own lockup waits (the intro's lands on it); it shows by itself if the script is gone */
html[data-intro] [data-brand-home] {
  animation: introHold 5.35s steps(1, end);
}
/* leaving: the canvas clears while the lockup travels to the header (the script sets the transform) */
html[data-intro='out'] .fl-intro {
  pointer-events: none;
}
html[data-intro='out'] .fl-intro::before {
  opacity: 0;
}
html[data-intro='out'] .introRoom .fl-word::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  html[data-intro] .fl-intro {
    display: none;
  }
  html[data-intro] [data-brand-home] {
    animation: none;
  }
}
