/* ==========================================================================
   VNGRD — COMING SOON  (style.css)
   ========================================================================== */


/* ---- Font: Barlow Condensed, stored in the fonts/ folder ---- */
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/BarlowCondensed-Light.woff2") format("woff2");
  font-weight: 300;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/BarlowCondensed-Regular.woff2") format("woff2");
  font-weight: 400;
}


/* ---- Settings ---- */
:root {
  --lime:  #caff57;          /* VNGRD LIME */
  --red:   #ff4834;          /* TRIALS RED */
  --cyan:  #1fcfff;          /* ACADEMY CYAN — teaser.js swaps the text between these three */
  --pink:  #ff0062;          /* the eyes' colour, used in the glitch */
  --black: #000000;
}


/* ---- Basics ---- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;          /* one screen, no scrolling */
  background: var(--black);
}

body {
  color: var(--lime);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 300;
}

/* Hidden on screen, still read by screen readers and search engines */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


/* ---- The image: always fills the screen, eyes stay in the middle ----
   object-fit: cover = scale until the screen is filled; the black edges
   that don't fit are cut off. */
.background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}


/* ---- The glitching labels ----
   position: fixed + left/top = where on the screen. The values here are
   their starting spots (taken from the design); teaser.js changes them. */
.glitch-label {
  position: fixed;
  z-index: 1;
  white-space: pre;          /* keep the spaces inside the brackets */
  line-height: 1;
  letter-spacing: -0.01em;
  user-select: none;
}

.label-12   { left: 14.8%; top: 12%;   font-size: clamp(26px, 2.3vw, 64px); }
.label-14   { left: 94.8%; top: 39.8%; font-size: clamp(20px, 1.7vw, 48px); }
.label-26   { left: 8.4%;  top: 92.3%; font-size: clamp(18px, 1.4vw, 40px); }
.label-soon { left: 70.3%; top: 64%;   font-size: clamp(18px, 1.4vw, 40px); }

/* The glitch: for a split second the label shakes, splits into
   pink and lime copies and flickers. teaser.js adds the class
   "glitching" around each jump, then removes it again. */
@keyframes glitch {
  0%   { translate: 0 0;      text-shadow: 0.08em 0 var(--pink), -0.08em 0 var(--lime); opacity: 1; }
  25%  { translate: -4px 2px; text-shadow: -0.1em 0 var(--pink), 0.06em 0 var(--lime);  opacity: 0.4; }
  50%  { translate: 3px -2px; text-shadow: 0.12em 0 var(--pink), -0.1em 0 var(--lime);  opacity: 1; }
  75%  { translate: -2px 0;   text-shadow: -0.05em 0 var(--pink);                       opacity: 0.6; }
  100% { translate: 0 0;      text-shadow: none;                                        opacity: 1; }
}

.glitch-label.glitching {
  animation: glitch 0.22s steps(4) both;   /* steps = jumpy, not smooth */
}


/* ---- Countdown, just under the eyes ---- */
.countdown {
  position: fixed;
  z-index: 1;
  left: 50%;
  top: 59%;
  translate: -50% 0;         /* centre it on its own middle */
  white-space: pre;
  font-size: clamp(11px, 1.9vw, 26px);
  font-weight: 400;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;   /* every digit equally wide, so it doesn't wobble */
}


/* ---- Sound on/off button, bottom-right ---- */
.sound-toggle {
  position: fixed;
  z-index: 2;
  right: max(16px, 4vw);
  bottom: max(16px, 4vh);
  min-height: 44px;                    /* easy to tap on phones */
  padding: 0 4px;
  border: none;
  background: none;
  color: var(--lime);
  font: inherit;
  font-size: clamp(16px, 1.2vw, 24px);
  white-space: pre;
  cursor: pointer;
  opacity: 0.85;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  outline: none;
}


/* ---- Visitors who switched animations off: labels still move, no shaking ---- */
@media (prefers-reduced-motion: reduce) {
  .glitch-label.glitching {
    animation: none;
  }
}
