/* ============================================================================
   VibeKit - protótipos: base compartilhada
   Tokens de marca derivados do design system BRUTALIST-A (paper + ink + acento
   laranja queimado), com espaço para as direções mais loucas de cada
   protótipo sobrescreverem as variáveis.
   ========================================================================== */

@font-face {
  font-family: "Plex Sans";
  src: url("./fonts/ibm-plex-sans-variable.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("./fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("./fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage";
  src: url("./fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument";
  src: url("./fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("./fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Anton";
  src: url("./fonts/anton-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* --- Marca (fonte: globals.css do app) --- */
  --paper: oklch(0.964 0.012 88.6);
  --paper-2: oklch(0.985 0.006 88.6);
  --paper-3: oklch(0.93 0.016 88.6);
  --ink: oklch(0.145 0 0);
  --ink-2: oklch(0.32 0 0);
  --ink-3: oklch(0.52 0 0);
  --accent: oklch(0.5 0.19 45);
  --accent-hot: oklch(0.58 0.21 38);
  --accent-soft: oklch(0.93 0.05 55);
  --line: oklch(0.145 0 0);
  --line-soft: oklch(0.145 0 0 / 0.16);
  --success: oklch(0.45 0.12 145);
  --info: oklch(0.45 0.08 250);

  /* --- Tipografia --- */
  --font-sans: "Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Plex Mono", ui-monospace, "SF Mono", monospace;
  --font-display: "Bricolage", "Plex Sans", sans-serif;
  --font-serif: "Instrument", "Times New Roman", serif;
  --font-grotesk: "Space Grotesk", "Plex Sans", sans-serif;

  /* --- Geometria --- */
  --bw: 2px;
  --radius: 0px;
  --radius-lg: 0px;
  --shadow-hard: 6px 6px 0 0 var(--ink);
  --shadow-soft: 0 24px 60px -24px oklch(0.145 0 0 / 0.35);
  --shadow-glow: 0 0 0 1px var(--accent), 0 0 60px -10px var(--accent);
  --grain: 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='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");

  --shell: 78rem;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* --------------------------------------------------------------------------
   Reset enxuto
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--paper-2);
}

/* --------------------------------------------------------------------------
   Primitivas compartilhadas
   -------------------------------------------------------------------------- */

.vk-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.vk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vk-eyebrow::before {
  content: "";
  width: 1.75rem;
  height: var(--bw);
  background: var(--accent);
}

.vk-btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper-2);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.6em;
  border: var(--bw) solid var(--ink);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
    color 0.25s var(--ease-out);
}

.vk-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: translate3d(0, 101%, 0);
  transition: transform 0.45s var(--ease-out);
}

.vk-btn:hover {
  color: var(--paper-2);
  transform: translate3d(-3px, -3px, 0);
  box-shadow: 6px 6px 0 0 var(--accent);
}

.vk-btn:hover::after {
  transform: translate3d(0, 0, 0);
}

.vk-btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
}

.vk-btn--accent {
  --btn-bg: var(--accent);
  --btn-fg: var(--paper-2);
}

.vk-card {
  border: var(--bw) solid var(--ink);
  background: var(--paper-2);
}

.vk-grain::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 9998;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.14;
  mix-blend-mode: multiply;
}

/* Textura de papel da marca.
   O `url()` de uma custom property é resolvido em relação ao CSS que CONSOME a
   variável, não ao que a declara - por isso o tile vive aqui, dentro de
   vk-tokens.css, e é aplicado por esta classe. */
.vk-paper {
  background-color: var(--paper);
  background-image: url("./brand/fundo-tile.svg");
  background-repeat: repeat;
}

.vk-marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  gap: 0;
}

.vk-marquee__track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2.5rem;
  flex: none;
  animation: vk-marquee var(--marquee-duration, 26s) linear infinite;
}

@keyframes vk-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-100%, 0, 0);
  }
}

/* Splits de texto -------------------------------------------------- */

.vk-split {
  display: inline-block;
}

.vk-split__mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.vk-split__inner {
  display: inline-block;
  will-change: transform;
}

.vk-split--lines .vk-split__mask {
  display: block;
  overflow: hidden;
}

/* Cursor ------------------------------------------------------------ */

.vk-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
}

.vk-cursor__dot {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
}

.vk-cursor__ring {
  position: absolute;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  transition: transform 0.28s var(--ease-out), border-color 0.28s var(--ease-out);
}

/* estado de hover: o anel infla sobre links e botoes */
.vk-cursor.is-hover .vk-cursor__ring {
  transform: scale(1.45);
  border-color: #fff;
}

.vk-cursor.is-hover .vk-cursor__dot {
  opacity: 0.35;
}

/* Loader / fallback de JS desligado */

.vk-nojs {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
