/* =========================
   RESET
========================= */

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

/* =========================
   BODY
========================= */

html,
body {

   width: 100%;
  min-height: 100%;

  overflow-x: hidden;
  overflow-y: auto;

  font-family: monospace;

  color: #d8d8d8;

  background:
    linear-gradient(
      rgba(0,0,0,0.35),
      rgba(0,0,0,0.65)
    ),
    url("assets/images/background.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  position: relative;
}

/* =========================
   CONTAINER
========================= */

.container {

  position: relative;

  z-index: 2;

  padding: 60px;
}

/* =========================
   HEADER
========================= */

header {

  position: relative;

  z-index: 2;

  text-align: center;

  padding-top: 50px;
}

.logo {

  font-size: 42px;

  letter-spacing: 12px;

  color: #f1f1f1;

  text-shadow:
    0 0 12px rgba(255,255,255,0.08);

  animation:
    logoFlicker 6s infinite;
}

.subtitle {

  margin-top: 20px;

  opacity: 0.7;

  font-size: 13px;

  letter-spacing: 2px;
}

/* =========================
   TITULOS
========================= */

.section-title {

  margin-top: 70px;
  margin-bottom: 25px;

  letter-spacing: 4px;

  font-size: 22px;
}

/* =========================
   GRID
========================= */

.grid {

  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(230px, 1fr));

  gap: 18px;
}

/* =========================
   CARDS LEVES
========================= */

.card {

  position: relative;

  padding: 30px;

  min-height: 150px;

  background:
    rgba(255,255,255,0.03);

  border:
    1px solid rgba(255,255,255,0.05);

  overflow: hidden;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    border 0.25s ease,
    box-shadow 0.25s ease;
}

/* hover leve */

.card:hover {

  transform:
    translateY(-5px)
    scale(1.01);

  border:
    1px solid rgba(255,255,255,0.15);

  box-shadow:
    0 0 18px rgba(255,255,255,0.05);
}

/* brilho suave */

.card::after {

  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      120deg,
      transparent,
      rgba(255,255,255,0.02),
      transparent
    );

  opacity: 0;

  transition: 0.3s;
}

.card:hover::after {

  opacity: 1;
}

/* card focado */

.card.sensed {

  border:
    1px solid rgba(255,255,255,0.22);

  box-shadow:
    0 0 25px rgba(255,255,255,0.08);

  z-index: 20;
}

/* =========================
   TEXTO CARD
========================= */

.card h3 {

  margin-bottom: 18px;

  font-size: 22px;

  letter-spacing: 2px;
}

.card p {

  opacity: 0.8;

  line-height: 1.6;

  font-size: 14px;
}

/* =========================
   NÉVOA LEVE
========================= */

.fog {

  position: fixed;

  top: -50%;
  left: -50%;

  width: 200vw;
  height: 200vh;

  background:
    radial-gradient(
      circle,
      rgba(255,255,255,0.03) 0%,
      transparent 70%
    );

  animation:
    fogMove 45s linear infinite;

  pointer-events: none;

  z-index: 1;
}

/* =========================
   RUÍDO
========================= */

.noise {

  position: fixed;

  inset: 0;

  background:
    url("https://i.imgur.com/8Km9tLL.png");

  opacity: 0.03;

  pointer-events: none;

  z-index: 999;
}

/* =========================
   ENTITY
========================= */

#entity {

  position: fixed;

  width: 240px;
  height: 340px;

  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  opacity: 0;

  pointer-events: none;

  z-index: 9999;

  transition:
    opacity 0.18s ease;

  filter:
    brightness(0.6)
    contrast(1.4);
}

/* =========================
   VHS OVERLAY LEVE
========================= */

#vhsEffect {

  position: fixed;

  inset: 0;

  pointer-events: none;

  opacity: 0.03;

  z-index: 998;

  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.02) 1px,
      transparent 2px,
      transparent 4px
    );
}

/* =========================
   TRANSIÇÃO
========================= */

#cinematicFlash {

  position: fixed;

  inset: 0;

  background: black;

  opacity: 0;

  pointer-events: none;

  z-index: 100000;

  transition: opacity 0.5s ease;
}

body.transitioning #cinematicFlash {

  opacity: 1;
}

/* =========================
   AUDIO BUTTON
========================= */

#audioButton {

  position: fixed;

  bottom: 25px;
  right: 25px;

  z-index: 100000;

  padding: 14px 20px;

  background:
    rgba(0,0,0,0.65);

  border:
    1px solid rgba(255,255,255,0.12);

  color: #d8d8d8;

  letter-spacing: 3px;

  cursor: pointer;

  transition: 0.25s ease;
}

#audioButton:hover {

  transform: scale(1.03);

  border-color:
    rgba(255,255,255,0.3);
}

/* =========================
   BOOT SCREEN
========================= */

#bootScreen {

  position: fixed;

  inset: 0;

  background: black;

  z-index: 200000;

  display: flex;

  align-items: center;
  justify-content: center;

  flex-direction: column;

  overflow: hidden;

  transition: opacity 1.5s ease;
}

#bootText {

  color: #00ff99;

  font-size: 14px;

  letter-spacing: 3px;

  text-align: center;

  z-index: 2;
}

#bootText p {

  opacity: 0;

  animation:
    bootAppear 1s forwards;
}

#bootText p:nth-child(1) {
  animation-delay: 0.5s;
}

#bootText p:nth-child(2) {
  animation-delay: 1.5s;
}

#bootText p:nth-child(3) {
  animation-delay: 2.5s;
}

#bootText p:nth-child(4) {
  animation-delay: 3.5s;
}

/* =========================
   WARNING
========================= */

.warningBoot {

  color: red;

  margin-top: 30px;

  font-size: 18px;

  text-shadow:
    0 0 10px red;

  animation:
    warningPulse 0.15s infinite;
}

/* =========================
   ENTITY EYES
========================= */

#entityEyes {

  position: fixed;

  width: 220px;
  height: 120px;

  background:
    url("assets/images/eyes.png");

  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  opacity: 0;

  pointer-events: none;

  z-index: 999999;

  transition:
    opacity 0.12s ease;

  filter:
    drop-shadow(0 0 12px red);
}

/* =========================
   SYSTEM ERROR
========================= */

.system-error {

  position: fixed;

  color: red;

  font-size: 13px;

  font-family: monospace;

  letter-spacing: 3px;

  z-index: 999999;

  pointer-events: none;

  text-shadow:
    0 0 10px red;

  animation:
    errorBlink 0.15s infinite;
}

/* =========================
   ANIMAÇÕES
========================= */

@keyframes fogMove {

  from {

    transform:
      translate(-10%, -10%);
  }

  to {

    transform:
      translate(10%, 10%);
  }
}

@keyframes logoFlicker {

  0% { opacity: 1; }

  48% { opacity: 1; }

  49% { opacity: 0.85; }

  50% { opacity: 0.65; }

  51% { opacity: 1; }

  100% { opacity: 1; }
}

@keyframes bootAppear {

  from {

    opacity: 0;

    transform:
      translateY(10px);
  }

  to {

    opacity: 1;

    transform:
      translateY(0px);
  }
}

@keyframes warningPulse {

  0% { opacity: 1; }

  50% { opacity: 0.4; }

  100% { opacity: 1; }
}

@keyframes errorBlink {

  0% { opacity: 1; }

  50% { opacity: 0.3; }

  100% { opacity: 1; }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  .container {

    padding: 20px;
  }

  .grid {

    display: flex;

    flex-direction: column;

    gap: 15px;
  }

  .logo {

    font-size: 30px;

    letter-spacing: 5px;
  }

  .subtitle {

    font-size: 11px;
  }

  #entity {

    width: 170px;
    height: 240px;
  }
}

/* =========================
   SCROLLBAR ARG
========================= */

::-webkit-scrollbar {

  width: 8px;
}

::-webkit-scrollbar-track {

  background: black;
}

::-webkit-scrollbar-thumb {

  background:
    rgba(255,255,255,0.15);

  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {

  background:
    rgba(255,255,255,0.3);
}