/* ------------------------------------------------------------------
   The Mascot Pad — whitelist gate
   The opening film is untouched: it stays full-bleed, frame for frame.
   Everything here is overlay living in the video's own negative space
   (top band + floor-reflection band), never on the robots.
   ------------------------------------------------------------------ */

@font-face{
  font-family:"Bricolage Grotesque";
  src:url("assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight:400 800;
  font-stretch:75% 100%;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"IBM Plex Mono";
  src:url("assets/fonts/plexmono-400.woff2") format("woff2");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"IBM Plex Mono";
  src:url("assets/fonts/plexmono-500.woff2") format("woff2");
  font-weight:500;
  font-style:normal;
  font-display:swap;
}

:root{
  --void:#0b0b0d;
  --paper:#f7f4ee;
  --paper-dim:#a8a29a;
  --paper-faint:#6f6a64;
  --gold:#f2c88c;
  --error:#ff9d8a;
  --hair:rgba(247,244,238,.14);
  --hair-soft:rgba(247,244,238,.08);
  --glass:rgba(17,16,15,.62);
  --display:"Bricolage Grotesque",ui-sans-serif,system-ui,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --ease:cubic-bezier(.2,.7,.2,1);
}

*,*::before,*::after{box-sizing:border-box}

html,body{height:100%;margin:0}

html{background:var(--void)}

body{
  background:var(--void);
  color:var(--paper);
  font-family:var(--mono);
  overflow:hidden;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* ---------------- the film (unchanged) ---------------- */

.film{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:50% 50%;
  background:transparent;
  pointer-events:none;
  outline:none;
  -webkit-tap-highlight-color:transparent;
}

/* Barely-there scrim: lifts contrast for type without touching the art. */
.grade{
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(180deg,rgba(8,8,9,.58) 0%,rgba(8,8,9,.16) 26%,rgba(8,8,9,0) 42%),
    linear-gradient(0deg,rgba(8,8,9,.72) 0%,rgba(8,8,9,.24) 22%,rgba(8,8,9,0) 38%),
    radial-gradient(72% 58% at 50% 50%,transparent 55%,rgba(8,8,9,.5) 100%);
}

/* ---------------- overlay scaffolding ---------------- */

.overlay{
  position:fixed;
  inset:0;
  z-index:2;
  display:grid;
  place-items:center;
  padding:clamp(14px,3vh,38px) clamp(18px,4vw,48px);
  text-align:center;
  pointer-events:none;
}

.overlay > *{pointer-events:auto}

/* Masthead pins to the top band of the animation (the only truly empty
   area), so the centred card never pushes it around. */
.mast{
  position:absolute;
  top:clamp(16px,3.2vh,40px);
  left:0;
  right:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  pointer-events:none;
}

/* The card sits dead centre in the viewport, as requested — the film is
   still fully visible behind it through the glass. */
.card-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
}

.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);
  white-space:nowrap;border:0;
}

/* ---------------- masthead ---------------- */

.eyebrow{
  margin:0 0 clamp(10px,1.8vh,20px);
  display:inline-flex;
  align-items:center;
  gap:9px;
  font-size:10px;
  font-weight:500;
  letter-spacing:.24em;
  text-transform:uppercase;
  color:var(--paper-dim);
  opacity:0;
  animation:rise .8s var(--ease) .25s forwards;
}

.eyebrow__dot{
  width:5px;height:5px;
  background:var(--gold);
  border-radius:50%;
  box-shadow:0 0 0 0 rgba(242,200,140,.55);
  animation:pulse 2.8s ease-out infinite;
}

/* ---------------- wordmark: letter tiles ----------------
   Each letter is its own white block, exactly like the letter cubes the
   robots carry. Tiles are rotated a few degrees at alternating signs so
   the lockup looks hand-stacked, not typeset. */

.title{
  margin:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:clamp(4px,.7vh,9px);
  font-family:var(--display);
  font-weight:800;
  font-stretch:75%;
  font-variation-settings:"wght" 800,"wdth" 75;
  font-size:clamp(1.5rem,3.4vw,2.7rem);
  font-size:min(3.6vw,6.2vh);
  line-height:1;
  letter-spacing:0;
  opacity:0;
  animation:rise 1s var(--ease) .38s forwards;
}

.title__w{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(3px,.55vw,7px);
}

.tile{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.5em;
  height:1.5em;
  padding-bottom:.06em;
  background:var(--paper);
  color:#0b0b0d;
  border-radius:.16em;
  box-shadow:
    0 .06em 0 rgba(0,0,0,.42),
    0 .5em 1.3em -.5em rgba(0,0,0,.85),
    inset 0 -.05em 0 rgba(0,0,0,.13);
  text-transform:uppercase;
  /* neutralise the variable axes so every tile reads identical */
  font-variation-settings:"wght" 780,"wdth" 100;
  font-weight:780;
  font-stretch:100%;
  /* slight random tilt, alternating around zero */
  --tilt:0deg;
  transform:rotate(var(--tilt)) translateY(var(--lift,0));
  animation:tile-in .62s var(--ease) both;
  animation-delay:calc(.46s + var(--i,0) * .045s);
}

/* Deterministic scatter: no JS, no layout thrash, same look every load. */
.title__w:nth-child(1) .tile:nth-child(1){--tilt:-3.5deg;--lift:-2px;--i:0}
.title__w:nth-child(1) .tile:nth-child(2){--tilt:2.2deg;--lift:1px;--i:1}
.title__w:nth-child(1) .tile:nth-child(3){--tilt:-1.6deg;--lift:-1px;--i:2}

.title__w:nth-child(2) .tile:nth-child(1){--tilt:3.1deg;--lift:-2px;--i:3}
.title__w:nth-child(2) .tile:nth-child(2){--tilt:-2.4deg;--lift:2px;--i:4}
.title__w:nth-child(2) .tile:nth-child(3){--tilt:1.4deg;--lift:-1px;--i:5}
.title__w:nth-child(2) .tile:nth-child(4){--tilt:-3.2deg;--lift:1px;--i:6}
.title__w:nth-child(2) .tile:nth-child(5){--tilt:2.6deg;--lift:-2px;--i:7}
.title__w:nth-child(2) .tile:nth-child(6){--tilt:-1.2deg;--lift:1px;--i:8}

.title__w:nth-child(3) .tile:nth-child(1){--tilt:-2.8deg;--lift:-1px;--i:9}
.title__w:nth-child(3) .tile:nth-child(2){--tilt:3.4deg;--lift:2px;--i:10}
.title__w:nth-child(3) .tile:nth-child(3){--tilt:-1.9deg;--lift:-2px;--i:11}

/* Last word carries the accent, same gold the page already uses. */
.title__w:last-child .tile{
  background:var(--gold);
  box-shadow:
    0 .06em 0 rgba(120,80,20,.55),
    0 .5em 1.3em -.5em rgba(0,0,0,.85),
    inset 0 -.05em 0 rgba(120,80,20,.28);
}

@keyframes tile-in{
  from{opacity:0;transform:rotate(0deg) translateY(14px) scale(.86)}
  to{opacity:1;transform:rotate(var(--tilt)) translateY(var(--lift,0)) scale(1)}
}

.lede{
  display:none;
}

/* subtitle slot under the headline */
.sub{
  margin:clamp(10px,1.6vh,18px) auto 0;
  max-width:34ch;
  min-height:0;
  font-family:var(--mono);
  font-size:clamp(10px,.8vw,11.5px);
  font-weight:500;
  line-height:1.6;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--paper-faint);
  opacity:0;
  animation:rise .9s var(--ease) .5s forwards;
}

.sub:empty{display:none}

/* ---------------- join card ---------------- */

.card{
  width:min(430px,100%);
  padding:clamp(14px,1.9vh,20px);
  background:rgba(8,8,9,.9);
  border:1px solid var(--hair);
  border-radius:7px;
  box-shadow:
    0 30px 70px -30px rgba(0,0,0,.95),
    0 2px 10px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.06);
  -webkit-backdrop-filter:blur(20px) saturate(1.2);
  backdrop-filter:blur(20px) saturate(1.2);
  text-align:left;
  opacity:0;
  animation:rise .9s var(--ease) .7s forwards;
}

.card__label{
  margin:0 0 12px;
  font-family:var(--mono);
  font-size:10px;
  font-weight:500;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--paper-faint);
}

.field{
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px 5px 5px 13px;
  background:rgba(247,244,238,.045);
  border:1px solid var(--hair-soft);
  border-radius:5px;
  transition:border-color .22s var(--ease),background .22s var(--ease);
}

.field:focus-within{
  border-color:rgba(242,200,140,.5);
  background:rgba(247,244,238,.07);
}

.card.is-error .field{
  border-color:rgba(255,157,138,.55);
}

.field__input{
  flex:1 1 auto;
  min-width:0;
  padding:11px 0;
  background:none;
  border:0;
  outline:none;
  color:var(--paper);
  font-family:var(--mono);
  font-size:13px;
  letter-spacing:.01em;
}

.field__input::placeholder{color:#8d8880}

.field__submit{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:10px 15px;
  border:0;
  border-radius:4px;
  background:var(--paper);
  color:#0b0b0d;
  font-family:var(--mono);
  font-size:11px;
  font-weight:500;
  letter-spacing:.14em;
  text-transform:uppercase;
  cursor:pointer;
  transition:background .2s var(--ease),transform .2s var(--ease),opacity .2s;
}

.field__submit:hover{background:var(--gold)}

.field__submit:active{transform:translateY(1px)}

.field__submit:disabled{opacity:.55;cursor:default;transform:none}

.field__arrow{
  width:13px;height:13px;
  transition:transform .25s var(--ease);
}

.field__submit:hover .field__arrow{transform:translateX(2px)}

.card__note{
  margin:10px 0 0;
  min-height:14px;
  font-size:10.5px;
  line-height:1.5;
  letter-spacing:.03em;
  color:var(--paper-faint);
}

.card.is-error .card__note{color:var(--error)}

/* ---------------- success state ---------------- */

.done{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  column-gap:12px;
  row-gap:3px;
  padding:2px 0 1px;
}

.done[hidden]{display:none}

.done__mark{
  grid-column:1;
  grid-row:1 / span 2;
  align-self:center;
  width:26px;height:26px;
  padding:4px;
  color:var(--gold);
  border:1px solid rgba(242,200,140,.4);
  border-radius:50%;
  animation:pop .5s var(--ease) both;
}

.done__text{
  grid-column:2;
  grid-row:1;
  margin:0;
  font-family:var(--display);
  font-weight:680;
  font-stretch:104%;
  font-variation-settings:"wght" 680,"wdth" 104;
  font-size:clamp(1.1rem,1.5vw,1.35rem);
  line-height:1.1;
  letter-spacing:-.02em;
  color:var(--paper);
  animation:rise .5s var(--ease) .08s both;
}

.done__sub{
  grid-column:2;
  grid-row:2;
  margin:0;
  font-size:10.5px;
  letter-spacing:.03em;
  color:var(--paper-faint);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  animation:rise .5s var(--ease) .16s both;
}

.done__sub:empty{display:none}

/* ---------------- motion ---------------- */

@keyframes rise{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}

@keyframes pop{
  from{opacity:0;transform:scale(.7)}
  to{opacity:1;transform:scale(1)}
}

@keyframes pulse{
  0%{box-shadow:0 0 0 0 rgba(242,200,140,.5)}
  70%{box-shadow:0 0 0 7px rgba(242,200,140,0)}
  100%{box-shadow:0 0 0 0 rgba(242,200,140,0)}
}

@keyframes shake{
  25%{transform:translateX(-3px)}
  50%{transform:translateX(3px)}
  75%{transform:translateX(-1.5px)}
}

.card.is-error .field{animation:shake .34s ease-in-out}

/* ---------------- socials: bottom-right ---------------- */

.socials{
  position:fixed;
  right:clamp(18px,4vw,48px);
  bottom:clamp(16px,3vh,34px);
  z-index:3;
  display:flex;
  align-items:center;
  gap:clamp(8px,1vw,12px);
  pointer-events:auto;
}

.social{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:clamp(30px,2.6vw,36px);
  height:clamp(30px,2.6vw,36px);
  border:1px solid var(--hair);
  border-radius:5px;
  background:rgba(9,9,10,.62);
  color:var(--paper-dim);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  text-decoration:none;
  transition:color .2s var(--ease),border-color .2s var(--ease),
             background .2s var(--ease),transform .2s var(--ease);
}

.social svg{
  width:15px;height:15px;
  display:block;
}

a.social:hover{
  color:var(--paper);
  border-color:rgba(247,244,238,.34);
  background:rgba(20,20,21,.9);
  transform:translateY(-1px);
}

a.social:focus-visible{
  outline:1px solid var(--gold);
  outline-offset:2px;
}

/* Discord + Telegram are not live yet: no pointer affordance, but still
   legible — the glyph must stay crisp, only the affordance is missing. */
.social.is-soon{
  opacity:.66;
  cursor:default;
  color:#cfcac2;
}

.social.is-soon:hover{
  color:#cfcac2;
  border-color:var(--hair);
  background:rgba(9,9,10,.62);
  transform:none;
}

/* ---------------- responsive ---------------- */

/* Short viewports: the stacked wordmark is tall, so shrink it and drop
   the eyebrow before anything can collide. */
@media (max-height:760px){
  .title{font-size:min(3.2vw,5.4vh)}
}

@media (max-height:660px){
  .lede{display:none}
  .title{font-size:min(3vw,4.8vh);gap:3px}
  .title__w{gap:3px}
}

@media (max-height:560px){
  .eyebrow{display:none}
  .card{padding:14px}
  .title{font-size:min(2.7vw,4.4vh)}
}

/* Portrait phones: video letterboxes, so the safe bands grow. */
@media (max-aspect-ratio:1/1){
  .film{object-fit:contain}
  .grade{
    background:
      linear-gradient(180deg,rgba(8,8,9,.35) 0%,rgba(8,8,9,0) 30%),
      linear-gradient(0deg,rgba(8,8,9,.4) 0%,rgba(8,8,9,0) 30%);
  }
  /* Symmetric padding only: the card must land dead centre at every
     aspect ratio, so no asymmetric vertical padding here. */
  .overlay{padding:clamp(14px,3vh,38px) clamp(18px,4vw,48px)}
  .title{font-size:clamp(1.4rem,5.4vw,2rem)}
  .card{width:100%}
  .socials{right:clamp(12px,3vw,20px);bottom:clamp(12px,2.4vh,20px)}
}

@media (max-width:420px){
  .field{flex-wrap:wrap;padding:9px}
  .field__input{padding:8px 4px;flex-basis:100%}
  .field__submit{width:100%;justify-content:center;padding:11px}
}

@media (prefers-reduced-motion:reduce){
  .eyebrow,.title,.lede,.card,.done__text,.done__sub,.done__mark{
    animation:none;opacity:1;transform:none;
  }
  .tile{animation:none;opacity:1;transform:rotate(var(--tilt)) translateY(var(--lift,0))}
  .eyebrow__dot{animation:none}
}
