/* ============================================================
   Bahia Games — Linktree "Arcade"
   Estilos específicos. Depende de tokens.css (design system).
   ============================================================ */

:root {
  --wrap-max: 460px;
  /* Grão sutil (espírito dos posts impressos) — feTurbulence inline */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
}

html { background: var(--canvas); }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--canvas);
}

.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- focus visível (regra DS: 2px amarelo) ---------- */
:where(a, button):focus-visible {
  outline: 2px solid var(--bg-yellow);
  outline-offset: 2px;
}

/* ============================================================
   1. SPLASH — "INSERT COIN"
   ============================================================ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  /* cinza claro: o mascote branco "salta" (como nos posts da marca) */
  background: #E7E6E1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity var(--dur-panel) var(--ease-out);
}
.splash.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.splash__logo {
  width: 230px;
  max-width: 70vw;
  height: auto;
}
.splash__coin {
  font-family: var(--font-accent);
  font-size: var(--fs-13);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--bg-yellow);
  background: var(--ink-900);
  padding: 8px 18px;
  border-radius: var(--r-full);
  animation: blink 1s steps(2, start) infinite;
}
.splash__hint {
  font-family: var(--font-body);
  font-size: var(--fs-12);
  color: var(--ink-500);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   2. CONSOLE HEADER (player card)
   ============================================================ */
.console {
  position: relative;
  isolation: isolate; /* contém o glow z-index:-1 acima do fundo, atrás da logo */
  overflow: hidden;
  background: #E7E6E1;
  border-radius: var(--r-xl);
  padding: 28px 24px 24px;
  text-align: center;
  color: var(--ink-900);
  box-shadow: var(--shadow-lg);
}
.console__logo {
  width: 160px;
  max-width: 62%;
  height: auto;
  margin: 0 auto;
  display: block;
}
.console__tag {
  font-family: var(--font-body);
  font-size: var(--fs-13);
  color: var(--ink-500);
  margin-top: 14px;
}
.console__tag b { color: var(--ink-900); font-weight: var(--fw-bold); }

.hours {
  display: inline-block;
  margin-top: 12px;
  background: var(--ink-700);
  color: var(--paper);
  padding: 9px 14px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  line-height: 1.5;
}
.hours b { color: var(--bg-yellow); font-weight: var(--fw-bold); }

/* ============================================================
   3. MENU (lista de links)
   ============================================================ */
.menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}
.menu__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px 18px 18px;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  color: var(--ink-900);
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform var(--dur-micro) var(--ease-out),
              box-shadow var(--dur-default) var(--ease-out),
              border-color var(--dur-default) var(--ease-out);
}
/* cursor seletor: triângulo amarelo à esquerda */
.menu__item::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 8px;
  border-color: transparent transparent transparent var(--bg-yellow);
  opacity: 0;
  transform: translate(-6px, -50%);
  transition: opacity var(--dur-default) var(--ease-out),
              transform var(--dur-default) var(--ease-out);
}
.menu__item.is-active,
.menu__item:hover {
  border-color: var(--bg-yellow);
  box-shadow: var(--shadow-md);
}
.menu__item.is-active::before,
.menu__item:hover::before {
  opacity: 1;
  transform: translate(0, -50%);
}
.menu__item:active { transform: scale(0.98); }

.menu__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--bg-yellow);
  color: var(--ink-900);
}
.menu__icon svg { width: 22px; height: 22px; }

/* ícones via máscara: pega só o formato do SVG e pinta no tom escuro da marca */
.menu__ic {
  width: 24px;
  height: 24px;
  background-color: var(--ink-900);
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.menu__ic--whats  { -webkit-mask-image: url("../assets/icons/whatsapp.svg");             mask-image: url("../assets/icons/whatsapp.svg"); }
.menu__ic--repair { -webkit-mask-image: url("../assets/icons/circuit-board-repair.svg"); mask-image: url("../assets/icons/circuit-board-repair.svg"); }
.menu__ic--games  { -webkit-mask-image: url("../assets/icons/games.svg");                mask-image: url("../assets/icons/games.svg"); }

.menu__text { flex: 1 1 auto; min-width: 0; }
.menu__label {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-16);
  line-height: 1.2;
}
.menu__sub {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-13);
  color: var(--ink-500);
  margin-top: 3px;
}
.menu__sub b { color: var(--ink-900); font-weight: var(--fw-bold); }
.menu__arrow { flex: 0 0 auto; color: var(--ink-300); }
.menu__arrow svg { width: 20px; height: 20px; }
.menu__item:hover .menu__arrow,
.menu__item.is-active .menu__arrow { color: var(--ink-700); }

/* ============================================================
   4. FOOTER
   ============================================================ */
.foot {
  text-align: center;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.foot__addr {
  font-family: var(--font-body);
  font-size: var(--fs-13);
  color: var(--ink-500);
  line-height: var(--lh-normal);
}
.foot__addr b { color: var(--ink-700); }
.foot__phone {
  align-self: center;
  margin-top: 4px;
  color: var(--ink-700);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-15);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.foot__phone:hover { color: var(--ink-900); }
.foot__logo {
  width: 96px;
  height: auto;
  margin: 8px auto 0;
  opacity: 0.85;
}

/* ============================================================
   PÁGINA: assistencia.html
   ============================================================ */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-13);
  color: var(--ink-500);
  text-decoration: none;
}
.back svg { width: 16px; height: 16px; }
.back:hover { color: var(--ink-900); }

.hero {
  position: relative;
  overflow: hidden;
  background: #E7E6E1
    radial-gradient(circle at 18% 50%, rgba(255, 208, 55, 0.26), rgba(255, 208, 55, 0) 55%);
  border-radius: var(--r-xl);
  padding: 24px;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-lg);
}
.hero__mascot { width: 92px; height: auto; flex: 0 0 auto; }
.hero__title {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-30);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}
.hero__title b { color: var(--bg-yellow-deep); }
.hero__sub {
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: var(--fs-13);
  color: var(--ink-500);
}

.panel {
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.panel h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-20);
  margin: 0 0 14px;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-accent);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-900);
  background: var(--bg-yellow-soft);
  padding: 7px 12px;
  border-radius: var(--r-md);
}

.steps {
  list-style: none;
  margin: 0; padding: 0;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-family: var(--font-body);
  font-size: var(--fs-15);
  color: var(--ink-700);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--bg-yellow);
  color: var(--ink-900);
  font-family: var(--font-accent);
  font-size: var(--fs-13);
}
.steps b { color: var(--ink-900); }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--bg-yellow);
  color: var(--ink-900);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-16);
  text-decoration: none;
  border: none;
  transition: background var(--dur-default) var(--ease-out),
              box-shadow var(--dur-default) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}
.cta svg { width: 20px; height: 20px; }
.cta:hover { background: var(--bg-yellow-deep); box-shadow: var(--shadow-glow-yellow); }
.cta:active { transform: scale(0.98); }

/* ============================================================
   Polimento arcade (sunburst pulsante · scanlines CRT · reação)
   ============================================================ */
/* sunburst pulsante: halo amarelo "respirando" atrás da logo preenchida.
   como o mascote agora é opaco, o glow fica ao redor (não vaza na face) */
.console::before,
.splash::before {
  content: "";
  position: absolute;
  z-index: -1; /* atrás da logo, mas acima do fundo do card */
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 208, 55, 0.6), rgba(255, 208, 55, 0) 68%);
  animation: sun-pulse 2.6s var(--ease-out) infinite;
}
.console::before { left: 50%; top: 88px; width: 210px; height: 210px; transform: translate(-50%, -50%); }
.splash::before  { left: 50%; top: 40%;  width: 300px; height: 300px; transform: translate(-50%, -50%); }
@keyframes sun-pulse {
  0%, 100% { opacity: 0.4;  transform: translate(-50%, -50%) scale(0.9); }
  50%      { opacity: 0.95; transform: translate(-50%, -50%) scale(1.1); }
}

/* entrada do splash (fade + leve zoom) */
.splash__logo { animation: splash-in 0.5s var(--ease-out) both; }
@keyframes splash-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* reação rápida do mascote ao tocar */
.console__logo { transition: transform 200ms var(--ease-out); }
.console__logo.react { transform: translateY(-5px) scale(1.05); }

/* scanlines CRT + leve flicker no splash (cara de fliperama) */
.splash::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(17, 20, 24, 0.05) 0 1px,
    transparent 1px 3px
  );
  animation: crt-flicker 5s steps(1) infinite;
}
@keyframes crt-flicker {
  0%, 46%, 49%, 93%, 100% { opacity: 1; }
  47.5% { opacity: 0.82; }
  94%   { opacity: 0.88; }
}

/* ============================================================
   reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
