/* TH.ONE Faya: the front door (#259), loaded only by the sign-in, on top of ui.css.
   A guest-list pass held up in front of the club's door (#261): the scene fills the screen (a
   still, then its loop), the pass floats over it in smoked glass with a ring of light running
   round its edge, and it tilts toward the pointer. The pass itself: the wordmark and "closed
   list" at the head, a spec sheet in mono, a perforation sealed by a spectrum, then the form.
   The door is always at night, whatever the system theme. Everything that repeats runs only
   under .live, which door.js sets and its button takes away (WCAG 2.2.2); the one-off entrance
   lives in the block for people who allow motion, at the end. */
body.door { color-scheme: dark; --bg: #05080b; --card: rgb(9 14 19 / .74); --raise: #19242c;
  --ink: #e7eef2; --muted: #a7b4bf; --line: rgb(231 238 242 / .1); --field: #6d7f8c;
  --accent: #4fc1ca; --on-accent: #0b1319; --accent-soft: #12303a; --accent-ink: #8adbe1;
  --err: #ff8f9b; --on-err: #0b1319; --err-soft: #3a1a20; --err-ink: #ffb3bb;
  --shadow: 0 40px 100px -24px rgb(0 0 0 / .85); background: var(--bg); }
@media (prefers-contrast: more) { body.door { --muted: var(--ink); --line: var(--field); } }
.door .shell { gap: 16px; }
/* The scene: the still at once, the loop fading in over it when it plays; a vignette and a
   film grain keep the pass the brightest thing on screen. */
.stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.stage img, .stage video { position: absolute; inset: 0; inline-size: 100%; block-size: 100%;
  object-fit: cover; }
.stage video { opacity: 0; transition: opacity 1.2s ease; }
.stage video.on { opacity: 1; }
/* The passage after a sign-in (#295) plays over the loop, quickly, with the vignette gone. */
.stage video.passage { transition-duration: .35s; }
.entering .stage::after { opacity: 0; transition: opacity .6s ease; }
.stage::before, .stage::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.stage::after { background: radial-gradient(ellipse 75% 65% at 50% 45%, transparent 45%,
  rgb(5 8 11 / .6) 100%), linear-gradient(transparent 55%, rgb(5 8 11 / .5)); }
.stage::before { z-index: 2; inset: -10%; opacity: .07; mix-blend-mode: overlay; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* The pass: smoked glass, a light that follows the pointer (--mx, --my), a tilt (--rx, --ry),
   flat again while someone types in it. */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.pass { --pad: 28px; position: relative; overflow: hidden; display: grid; gap: 18px;
  padding: calc(var(--pad) + 6px) var(--pad) var(--pad); border-radius: var(--r-l);
  border: 1px solid rgb(231 238 242 / .1); box-shadow: var(--shadow);
  background: radial-gradient(28rem circle at var(--mx, 50%) var(--my, 0%),
    rgb(79 193 202 / .13), transparent 60%), var(--card);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.pass:focus-within { transform: none; }
/* The ring of light running round the edge. */
.pass::after { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit;
  pointer-events: none; background: conic-gradient(from var(--spin), transparent 0 62%,
  rgb(79 193 202 / .9) 80%, transparent 92%);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@media (max-width: 400px) { .pass { --pad: 20px; } .spec { font-size: .75rem; }
  .spec div { gap: 10px; } .spec dt { letter-spacing: .04em; } }
/* The slot a lanyard goes through. */
.pass::before { content: ""; position: absolute; inset-block-start: 12px; inset-inline-start: 50%;
  translate: -50% 0; inline-size: 44px; block-size: 6px; border-radius: 3px;
  background: var(--bg); box-shadow: inset 0 1px 2px rgb(0 0 0 / .5); }
.pass-head { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; }
.pass-mark { font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; }
.pass-mark span { color: var(--accent); }
.pass-tag, .spec { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pass-tag { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; padding: 2px 10px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.spec { margin: 0; display: grid; font-size: .8125rem; }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding-block: 7px;
  border-block-end: 1px dotted var(--line); }
.spec dt { color: var(--muted); text-transform: uppercase; letter-spacing: .08em;
  flex: none; }
.spec dd { margin: 0; text-align: end; text-wrap: balance; }
/* The perforation: a dashed rule with a notch cut into each edge of the pass. */
.tear { position: relative; margin-inline: calc(var(--pad) * -1);
  padding: 16px var(--pad) 0; border-block-start: 2px dashed var(--line); }
.tear::before, .tear::after { content: ""; position: absolute; inset-block-start: -11px;
  inline-size: 20px; block-size: 20px; border-radius: 50%; background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line); }
.tear::before { inset-inline-start: -11px; }
.tear::after { inset-inline-end: -11px; }
.spectrum { display: block; inline-size: 100%; block-size: 28px; fill: var(--accent); }
.spectrum rect { transform-box: fill-box; transform-origin: 50% 100%; }
/* The soundtrack (#310): its cover is the play button, the title beside it, above the spectrum.
   While it plays the spectrum follows it, in bars door.js sets from the music itself. */
.track { display: flex; align-items: center; gap: 12px; margin-block-end: 12px; }
.track[hidden] { display: none; }
.track-play { position: relative; flex: none; inline-size: var(--hit, 44px);
  block-size: var(--hit, 44px); min-block-size: 0; padding: 0; overflow: hidden;
  border-radius: var(--r-s, 8px); border: 1px solid rgb(231 238 242 / .16);
  background: var(--raise); box-shadow: 0 6px 18px -6px rgb(0 0 0 / .8); }
.track-play img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.track-play::after { content: ""; position: absolute; inset: 0; background: rgb(5 8 11 / .42);
  transition: background .2s; }
.track-play::before { content: ""; position: absolute; z-index: 1; inset: 0; margin: auto;
  inline-size: 14px; block-size: 16px; background: var(--ink);
  clip-path: polygon(15% 0, 100% 50%, 15% 100%); }
.track.on .track-play::before { clip-path: none; inline-size: 12px; block-size: 14px;
  background: linear-gradient(90deg, var(--ink) 0 34%, transparent 34% 66%, var(--ink) 66%); }
.track-play:hover::after { background: rgb(5 8 11 / .2); }
.track-meta { display: grid; min-inline-size: 0; margin: 0; font-family: var(--mono);
  line-height: 1.35; }
.track-title { color: var(--ink); font-size: .875rem; overflow-wrap: anywhere; }
.track-by { color: var(--muted); font-size: .75rem; letter-spacing: .06em;
  text-transform: uppercase; overflow-wrap: anywhere; }
.track.on .track-title { color: var(--accent-ink); }
/* The form is the pass's stub. */
.sign-in { display: grid; gap: 14px; }
.sign-in > p:empty { position: absolute; }
.sign-in input, .sign-in button { min-block-size: var(--hit); }
.sign-in input { background: rgb(5 8 11 / .55); }
.secret { display: flex; flex-wrap: wrap; gap: 8px; }
.secret input { flex: 1 1 8rem; }
.door .aside { font-size: .875rem; padding-inline: 4px; color: var(--muted);
  text-shadow: 0 1px 8px rgb(0 0 0 / .8); }
.door .aside a { color: var(--accent); }
.scene-toggle { position: static; justify-self: end; }
/* Fixed in a corner only where there is room for it beside the pass (WCAG 2.4.11). */
@media (min-width: 600px) and (min-height: 700px) { .door .scene-toggle { position: fixed;
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  inset-inline-end: max(16px, env(safe-area-inset-right)); padding-inline: 16px;
  min-block-size: var(--hit); border-radius: 999px; font-size: .8125rem;
  background: rgb(9 14 19 / .6); border: 1px solid rgb(231 238 242 / .14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); } }
/* Shown by door.js only while the scene plays first (#293). */
.door .scene-skip { position: fixed; z-index: 2; inset-block-end: max(24px, env(safe-area-inset-bottom));
  inset-inline: 0; margin-inline: auto; inline-size: fit-content; padding-inline: 20px;
  min-block-size: var(--hit); border-radius: 999px; background: rgb(9 14 19 / .6);
  border: 1px solid rgb(231 238 242 / .18); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); }
.door :is(.scene-skip, .scene-toggle):hover { background: rgb(9 14 19 / .85); }
/* What repeats, only while the scene runs. */
.live .pass::after { animation: ring-spin 7s linear infinite; }
.live .spectrum rect { animation: breathe 2.4s ease-in-out infinite alternate; }
.live .spectrum rect:nth-child(3n) { animation-duration: 1.9s; animation-delay: -.7s; }
.live .spectrum rect:nth-child(4n+1) { animation-duration: 2.9s; animation-delay: -1.3s; }
.live .spectrum rect:nth-child(5n+2) { animation-duration: 1.6s; animation-delay: -.3s; }
.live.tuned .spectrum rect { animation-name: none; transform: scaleY(var(--l, .45));
  transition: transform 90ms linear; }
.live .stage::before { animation: grain .9s steps(4) infinite; }
@media (forced-colors: active) {
  .pass, .pass-tag, .scene-toggle { border: 1px solid CanvasText; }
  .pass::before, .tear::before, .tear::after { border: 1px solid CanvasText; }
  .pass::after, .stage { display: none; }
  .spectrum { fill: CanvasText; }
  .track-play { border: 1px solid CanvasText; }
  .track-play::before { forced-color-adjust: none; background: ButtonText; }
  .track.on .track-play::before { background: linear-gradient(90deg, ButtonText 0 34%,
    transparent 34% 66%, ButtonText 66%); }
}
/* The entrance, once, about two seconds (WCAG 2.2.2 asks under five): the door lights up out of
   the dark, the pass rises on a spring (linear() traces one), the wordmark comes into focus, the
   stamp lands, the spec sheet prints row by row, the spectrum runs along the perforation. Only
   opacity, transforms, filter and clip-path, so a phone composites it; the form is in place by
   1.5 s. */
@media (prefers-reduced-motion: no-preference) {
  .stage img { animation: dawn 2.2s cubic-bezier(.2, .7, .2, 1) 0s both; }
  .pass { animation: spring 1.1s var(--spring) .3s both, fade .5s ease-out .3s both; }
  .pass-mark { animation: focus .7s ease-out .6s both; }
  .pass-tag { animation: stamp .45s cubic-bezier(.3, 1.6, .5, 1) .85s both; }
  .spec div, .sign-in, .door .aside, .scene-toggle { animation: rise .6s ease-out .7s both; }
  .spec div:nth-child(2) { animation-delay: .73s; }
  .spec div:nth-child(3) { animation-delay: .76s; }
  .spec div:nth-child(4) { animation-delay: .79s; }
  .spec div:nth-child(5) { animation-delay: .82s; }
  .spec div:nth-child(6) { animation-delay: .85s; }
  .spec div:nth-child(7) { animation-delay: .88s; }
  .spec div:nth-child(8) { animation-delay: .9s; }
  .sign-in { animation-delay: .9s; }
  .door .aside, .scene-toggle { animation-delay: 1.3s; }
  .spectrum { animation: sweep .9s cubic-bezier(.4, 0, .2, 1) 1s both; }
  /* The scene first (#293): where scripts run, the pass and its parts wait unseen (still in the
     page for a screen reader, and the keyboard brings them back) until door.js adds .revealed,
     after one full loop or a press of "Pular a abertura". If the script never runs, the hold
     ends by itself at 11.6 s. Then the entrance above plays from its start. Forced colors hide
     the scene, so nothing is held there; the pause button stays visible in its corner. */
  @media (scripting: enabled) and (forced-colors: none) {
    .door:not(.revealed) :is(.pass, .pass-mark, .pass-tag, .spec div, .sign-in, .spectrum,
      .aside) { animation: hold .6s ease-out 11s both; }
    .door:not(.revealed) .stage::after { opacity: .4; }
    .stage::after { transition: opacity 1.2s ease; }
    .door .scene-skip { animation: rise .6s ease-out 1.2s both; }
    .door .scene-skip:focus-visible { animation: none; }
  }
  .entering :is(.pass, .aside, .scene-toggle) { animation: leave .5s ease-in both; }
  @media (scripting: enabled) and (forced-colors: none) and (max-width: 599px),
    (scripting: enabled) and (forced-colors: none) and (max-height: 699px) {
    .door:not(.revealed) .scene-toggle { animation: hold .6s ease-out 11s both; }
  }
}
:root { --spring: linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017,
  1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%,
  1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1.004 83.8%, 1); }
@keyframes dawn { from { opacity: 0; filter: brightness(.2); scale: 1.08; } }
@keyframes spring { from { translate: 0 56px; scale: .94; } }
@keyframes fade { from { opacity: 0; } }
@keyframes hold { from { opacity: 0; } }
@keyframes leave { to { opacity: 0; scale: .96; translate: 0 -12px; } }
@keyframes focus { from { opacity: 0; filter: blur(8px); scale: 1.06; } }
@keyframes stamp { from { opacity: 0; scale: 1.8; rotate: -8deg; } }
@keyframes rise { from { opacity: 0; translate: 0 10px; } }
@keyframes sweep { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes ring-spin { to { --spin: 360deg; } }
@keyframes breathe { from { transform: scaleY(.45); } to { transform: scaleY(1); } }
@keyframes grain { 0% { translate: 0 0; } 25% { translate: -4% 3%; } 50% { translate: 3% -2%; }
  75% { translate: -2% -4%; } }
