:root {
  --bg: #14100d;
  --surface: #1c1712;
  --surface-strong: #241d17;
  --ink: #f3ece0;
  --muted: #b3a696;
  --line: #4a4038;
  --line-soft: #332b24;
  --blue: #6f8dff;
  --blue-dark: #2f4fd8;
  --green: #63c47a;
  --red: #e0574f;
  --ps1-pink: #e0579e;
  --radius: 10px;
  --shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  --read: 760px;
  --wide: 1120px;

  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --font-display: "Rajdhani", var(--font-sans);
  --font-lcd: "VT323", var(--font-mono);
}

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

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.025), rgba(255,255,255,.025)),
    var(--bg);
  font-family: var(--font-sans);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Scanline sutil de CRT sobre o site inteiro */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,.09) 0px,
    rgba(0,0,0,.09) 1px,
    transparent 2px,
    transparent 3px
  );
  opacity: .35;
  mix-blend-mode: multiply;
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    opacity: .18;
  }
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

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

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

button {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

/* =========================================
   SHELL / MEDIA SPINE (home e sobre)
   ========================================= */

.site-shell {
  width: min(calc(100% - 24px), 1500px);
  margin: 12px auto;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  min-height: calc(100vh - 24px);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(20, 16, 13, 0.86);
  box-shadow: var(--shadow);
}

.media-spine {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 26px 18px 22px;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.spine-top,
.spine-bottom {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: .74rem;
}

.spine-top span:not(.spine-burst),
.spine-bottom span:not(.compact-disc) {
  font-family: var(--font-lcd);
  font-size: 1.15rem;
  letter-spacing: .04em;
}

.spine-bottom {
  justify-content: end;
}

.spine-name,
.spine-role {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  justify-self: center;
  align-self: center;
}

.spine-name {
  font-family: "Luckiest Guy", var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  letter-spacing: .03em;
  color: #f7efdd;
  -webkit-text-stroke: 1.3px #1a140f;
  text-shadow: 2px 2px 0 #2a2a30, 4px 4px 8px rgba(0,0,0,.5);
}

.spine-role {
  color: var(--blue);
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: .86rem;
  letter-spacing: .06em;
}

.spine-burst {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
}

.spine-burst::before {
  content: "▲";
  font-size: 1rem;
  line-height: 1;
  color: var(--green);
  animation: ps1-symbol-cycle 4.8s steps(1) infinite;
  animation-delay: -1.2s;
}

.compact-disc {
  font-size: .62rem;
  line-height: 1.1;
}

.compact-disc b {
  font-size: 1.3rem;
  letter-spacing: -.08em;
}

.site-main {
  min-width: 0;
}

/* =========================================
   HEADER (compartilhado por todas as páginas)
   ========================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 76px;
  padding: 0 clamp(24px, 4vw, 54px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(20, 16, 13, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.status-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.status-dot::before {
  content: "▲";
  font-size: 11px;
  line-height: 1;
  color: var(--green);
  animation: ps1-symbol-cycle 4.8s steps(1) infinite;
}

@keyframes ps1-symbol-cycle {
  0%   { content: "▲"; color: var(--green); }
  25%  { content: "●"; color: var(--red); }
  50%  { content: "✕"; color: var(--blue); }
  75%  { content: "■"; color: var(--ps1-pink); }
  100% { content: "▲"; color: var(--green); }
}

.navigation {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  font-family: var(--font-mono);
  font-size: .8rem;
  text-transform: uppercase;
}

.navigation a,
.text-link,
.case-link,
.contact-item,
.button,
.backlink,
.case-nav a {
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.navigation a:hover,
.text-link:hover,
.backlink:hover,
.case-nav a:hover {
  color: var(--blue);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 6px;
}

/* =========================================
   HERO (home)
   ========================================= */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  min-height: 470px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(46px, 7vw, 88px) clamp(28px, 5vw, 70px);
}

.hero h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: .95;
  letter-spacing: .01em;
  font-family: "Luckiest Guy", var(--font-display);
  font-size: clamp(2.9rem, 6.2vw, 6.4rem);
}

.hero h1 span {
  color: #f7efdd;
  -webkit-text-stroke: 2px #1a140f;
  text-shadow:
    3px 3px 0 #33343a,
    6px 6px 0 #16255e,
    8px 8px 14px rgba(0,0,0,.5);
}

.hero h1 strong {
  color: var(--blue);
  -webkit-text-stroke: 1.5px #1a140f;
  font-size: .48em;
  line-height: 1.1;
  letter-spacing: .01em;
  text-shadow:
    2px 2px 0 #16255e,
    4px 4px 10px rgba(0,0,0,.5);
}

.hero-positioning {
  max-width: 650px;
  margin: 30px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  font-weight: 600;
}

.hero-context {
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .93rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 0 22px;
  border: 2px solid var(--blue);
  background: var(--surface-strong);
  box-shadow: 4px 4px 0 0 var(--blue);
  font-family: var(--font-mono);
  font-size: .84rem;
  text-transform: uppercase;
  transition: transform 100ms steps(2), box-shadow 100ms steps(2), background 120ms ease, color 120ms ease;
}

.button-primary {
  min-width: 205px;
  color: var(--ink);
}

.button-secondary {
  min-width: 110px;
  color: var(--ink);
}

.button:hover {
  background: var(--blue);
  color: #14100d;
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 0 var(--blue-dark);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 30px;
  margin-top: 28px;
  color: var(--muted);
  font-family: var(--font-lcd);
  font-size: 1rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.hero-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* =========================================
   CENA DA TV — substitui o disco solto no hero.
   Sequência única (roda uma vez ao carregar): a silhueta
   entra, insere o disco, a TV liga e mostra o nome do
   portfólio, e a cena assenta no estado de loop — a pessoa
   sentada jogando, com a tela pulsando cor.
   ========================================= */

.tv-scene {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 24px;
  background:
    radial-gradient(circle at 25% 20%, rgba(111,141,255,.12), transparent 45%),
    linear-gradient(180deg, #1c1c20 0%, #0f0f12 100%);
}

.tv-scene-art {
  width: min(100%, 380px);
}

.tv-power-light {
  fill: var(--blue);
  filter: drop-shadow(0 0 3px rgba(111,141,255,.8));
}

.tv-screen-bg {
  fill: #1a2436;
}

.tv-screen-glow {
  fill: #26344c;
  animation: tv-screen-pulse 3.4s ease-in-out infinite;
}

@keyframes tv-screen-pulse {
  0%, 100% { fill: #26344c; opacity: .85; }
  50%      { fill: #3a2c46; opacity: .6; }
}

.tv-word {
  font-family: "Press Start 2P", var(--font-mono);
  font-size: 8px;
  fill: #f7efdd;
  opacity: 0;
  animation: tv-word-cycle 22s ease-in-out infinite;
}

.tv-word-2  { animation-delay: -2.2s; }
.tv-word-3  { animation-delay: -4.4s; }
.tv-word-4  { animation-delay: -6.6s; }
.tv-word-5  { animation-delay: -8.8s; }
.tv-word-6  { animation-delay: -11s; }
.tv-word-7  { animation-delay: -13.2s; }
.tv-word-8  { animation-delay: -15.4s; }
.tv-word-9  { animation-delay: -17.6s; }
.tv-word-10 { animation-delay: -19.8s; }

@keyframes tv-word-cycle {
  0%        { opacity: 0; }
  1.5%      { opacity: 1; }
  8%        { opacity: 1; }
  9.5%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tv-word {
    animation: none;
    opacity: 0;
  }
  .tv-word-1 {
    opacity: 1;
  }
}

/* =========================================
   DISCO — reaproveitado só na transição de carregamento
   entre a home e um case (ver .case-loading). Um CD real:
   superfície metálica com o efeito arco-íris de difração
   (o conic-gradient), etiqueta impressa no miolo e o furo
   do encaixe sempre exatamente no centro.
   ========================================= */

.disc-visual {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 100%;
  background:
    radial-gradient(circle at 65% 40%, rgba(255,255,255,.09), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,.03), rgba(0,0,0,.15));
}

/* estojo (jewel case): moldura plástica atrás do disco, com
   reflexo diagonal e a aba de encaixe na base, como numa capa
   de CD real. */
.disc-visual::before {
  content: "";
  position: absolute;
  inset: 9%;
  border: 3px solid #1a140f;
  background: linear-gradient(
    118deg,
    rgba(255,255,255,.1) 0%,
    rgba(255,255,255,.02) 40%,
    rgba(0,0,0,.1) 100%
  );
  box-shadow: 8px 8px 0 0 rgba(0,0,0,.4);
  pointer-events: none;
}

.disc-visual::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: 16%;
  height: 2.4%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.3);
  border: 2px solid #1a140f;
  border-top: 0;
  pointer-events: none;
}

.disc-cd {
  position: relative;
  z-index: 1;
  width: min(52%, 300px);
  aspect-ratio: 1;
  animation: disc-spin 7s linear infinite;
}

.disc-visual:hover .disc-cd,
.disc-visual:focus-within .disc-cd {
  animation-play-state: paused;
}

@keyframes disc-spin {
  to { transform: rotate(360deg); }
}

.disc-cd::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid #1a140f;
  background:
    conic-gradient(from 0deg,
      rgba(255,255,255,.8) 0deg,
      rgba(111,141,255,.28) 22deg,
      rgba(255,255,255,.72) 45deg,
      rgba(99,196,122,.26) 70deg,
      rgba(255,255,255,.8) 95deg,
      rgba(111,141,255,.28) 130deg,
      rgba(255,255,255,.72) 160deg,
      rgba(224,87,158,.26) 195deg,
      rgba(255,255,255,.8) 225deg,
      rgba(111,141,255,.28) 255deg,
      rgba(255,255,255,.72) 285deg,
      rgba(99,196,122,.26) 320deg,
      rgba(255,255,255,.8) 360deg),
    radial-gradient(circle, #cfc9bd 0 33%, transparent 34%),
    linear-gradient(135deg, #e7e1d4, #c3bcae);
  box-shadow: 7px 7px 0 0 rgba(0,0,0,.45);
}

.disc-cd::after {
  content: "";
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  border: 2px solid #1a140f;
  background: var(--surface-strong);
}

.disc-cd span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #111;
  z-index: 1;
}

.disc-grid {
  position: absolute;
  right: 9%;
  top: 9%;
  width: 130px;
  height: 130px;
  opacity: .2;
  background-image: radial-gradient(var(--ink) .8px, transparent .8px);
  background-size: 10px 10px;
}

/* =========================================
   TRABALHO SELECIONADO (home)
   ========================================= */

.selected-work {
  padding: 0;
}

.control-hint {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-family: var(--font-lcd);
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.control-hint kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
}

.section-heading {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--line-soft);
}

.section-heading-borderless {
  border-bottom: 0;
}

.eyebrow {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.work-grid {
  display: flex;
  flex-direction: column;
}

.work-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 22px 22px 46px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 120ms ease;
}

.work-card:last-child {
  border-bottom: 0;
}

.work-card::before {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translate(-4px, -50%);
  color: var(--blue);
  font-size: .9rem;
  opacity: 0;
  transition: opacity 100ms ease, transform 100ms ease;
}

.work-card:hover,
.work-card:focus-within {
  background: rgba(255,255,255,.05);
  box-shadow: inset 4px 0 0 0 var(--blue);
}

.work-card:hover::before,
.work-card:focus-within::before {
  opacity: 1;
  transform: translate(0, -50%);
}

.work-number {
  flex: 0 0 auto;
  color: var(--blue);
  font-family: var(--font-lcd);
  font-size: 2.1rem;
  letter-spacing: .02em;
}

.work-main {
  flex: 1 1 auto;
  min-width: 0;
}

.work-company {
  margin: 0 0 6px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
}

.work-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
  line-height: 1.2;
  letter-spacing: -.006em;
  font-weight: 700;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 4px 8px;
  border: 1px solid rgba(111,141,255,.4);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: .63rem;
}

.work-card .case-link {
  flex: 0 0 auto;
}

.case-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 2px solid var(--blue);
  background: var(--surface-strong);
  box-shadow: 3px 3px 0 0 var(--blue);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  transition: transform 100ms steps(2), box-shadow 100ms steps(2), background 120ms ease, color 120ms ease;
}

.case-link:hover {
  color: #14100d;
  background: var(--blue);
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--blue-dark);
}

/* =========================================
   PROFILE (home)
   ========================================= */

.home-about {
  border-top: 1px solid var(--line);
}

.about-panel {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 28px 30px;
  border-top: 1px solid var(--line-soft);
}

.portrait-photo {
  width: 180px;
  height: 220px;
  object-fit: cover;
  object-position: center 35%;
  border: 1px solid var(--line-soft);
  background: var(--surface-strong);
  filter: grayscale(1);
}

.about-copy {
  max-width: 760px;
}

.about-lead {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
}

.about-support {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .88rem;
}

.about-actions {
  margin-top: 24px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--blue);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: .76rem;
  text-transform: uppercase;
}

/* =========================================
   CONTATO (compartilhado)
   ========================================= */

.contact-strip {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-item {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 32px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: .85rem;
}

.contact-item + .contact-item {
  border-left: 1px solid var(--line);
}

.contact-item:hover {
  background: rgba(255,255,255,.06);
}

.contact-icon {
  color: var(--ink);
  font-size: 1.35rem;
}

.copy-label {
  margin-left: auto;
  color: var(--muted);
  font-size: .68rem;
  text-transform: uppercase;
}

.linkedin-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  font-family: var(--font-sans);
  font-weight: 800;
}

/* =========================================
   FOOTER RICO (home e sobre)
   ========================================= */

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr 1.4fr;
  min-height: 95px;
}

.site-footer > * {
  min-width: 0;
  padding: 16px 22px;
  border-right: 1px solid var(--line-soft);
}

.site-footer > *:last-child {
  border-right: 0;
}

.footer-status,
.footer-message,
.footer-right {
  display: grid;
  align-content: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: .67rem;
}

.footer-status {
  grid-template-columns: auto 1fr;
}

.footer-status small {
  grid-column: 2;
}

.footer-status .status-dot {
  margin-top: 3px;
}

.footer-status small,
.footer-message small,
.footer-right small {
  color: var(--muted);
}

.player {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px;
  align-items: center;
}

.player-screen {
  min-height: 56px;
  display: grid;
  align-content: center;
  padding: 7px 12px;
  color: #f7f2e9;
  background: #111;
  font-family: var(--font-mono);
}

.player-screen small {
  font-size: .55rem;
  opacity: .7;
}

.player-screen span {
  margin-top: 2px;
  font-family: var(--font-lcd);
  font-size: 1.7rem;
  letter-spacing: .1em;
  color: #7bffb0;
  text-shadow: 0 0 6px rgba(123,255,176,.55);
}

.player-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 46px;
  border: 1px solid var(--line);
}

.player-controls span {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  font-size: .76rem;
}

.player-controls span:last-child {
  border-right: 0;
}

.footer-right {
  grid-template-columns: 1fr auto;
}

.footer-right small {
  grid-column: 1;
}

.barcode {
  align-self: stretch;
  width: 100px;
  min-height: 36px;
  background:
    repeating-linear-gradient(
      90deg,
      #111 0 2px,
      transparent 2px 4px,
      #111 4px 5px,
      transparent 5px 8px,
      #111 8px 11px,
      transparent 11px 13px
    );
}

.barcode-small {
  width: 95px;
  height: 16px;
  min-height: 16px;
}

.noscript-message {
  padding: 12px;
  text-align: center;
  background: #111;
  color: #fff;
  font-family: var(--font-mono);
  font-size: .8rem;
}

/* =========================================
   FOOTER SIMPLES (páginas de case)
   ========================================= */

.site-footer-case {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px max(24px, calc((100% - var(--wide)) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
}

.site-footer-case p {
  margin: 0;
}

.site-footer-case div {
  display: flex;
  gap: 20px;
}

/* =========================================
   CASE — INTRO
   ========================================= */

.case-shell {
  width: min(calc(100% - 32px), var(--wide));
  margin: 0 auto;
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 38px 0 24px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .76rem;
  text-transform: uppercase;
}

.case-intro {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 74px);
  border: 1px solid var(--line);
  background: var(--surface);
}

.case-intro::after {
  content: "";
  position: absolute;
  top: -110px;
  right: -110px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 50px rgba(255,255,255,.02),
    0 0 0 100px rgba(255,255,255,.015);
  pointer-events: none;
}

.case-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 20px;
  color: var(--blue);
  font-family: var(--font-lcd);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.case-intro h1 {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  line-height: .98;
  letter-spacing: -.008em;
  font-weight: 700;
}

.dek {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: clamp(.98rem, 1.4vw, 1.12rem);
}

.case-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 0;
  margin: 38px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-meta > div {
  padding: 18px 18px 18px 0;
}

.case-meta > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--line-soft);
}

.case-meta dt {
  margin-bottom: 5px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: .65rem;
  text-transform: uppercase;
}

.case-meta dd {
  margin: 0;
  font-size: .89rem;
}

/* =========================================
   CASE — CORPO
   ========================================= */

.case-body {
  padding: 72px 0 24px;
}

.beat {
  width: min(calc(100% - 32px), var(--read));
  margin: 0 auto 76px;
  scroll-margin-top: 96px;
}

.beat-label {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
  color: var(--blue);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.beat-label .num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border: 1px solid var(--blue);
  font-family: var(--font-lcd);
  font-size: 1.05rem;
}

.beat-label .name {
  font-size: .76rem;
  letter-spacing: .06em;
}

.beat h2 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -.006em;
  font-weight: 700;
}

.beat p {
  margin: 0 0 20px;
  font-size: 1.06rem;
}

.beat p.soft {
  color: var(--muted);
}

.pullquote {
  margin: 38px 0;
  padding: 26px 28px;
  border-left: 4px solid var(--blue);
  background: rgba(255,255,255,.04);
}

.pullquote p {
  margin: 0;
  font-size: clamp(1.35rem, 2.7vw, 1.95rem);
  line-height: 1.2;
  letter-spacing: -.03em;
  font-weight: 750;
}

/* =========================================
   CASE — ARTEFATOS / IMAGENS
   ========================================= */

.artifact-wide {
  width: min(calc(100% - 32px), var(--wide));
  margin: 42px auto 64px;
}

.artifact-reading {
  width: min(calc(100% - 32px), 860px);
  margin: 42px auto 64px;
}

.artifact-window {
  overflow: hidden;
  border: 1px solid #8f8a82;
  border-radius: 9px;
  background: #d9d4ca;
  box-shadow: var(--shadow);
}

.artifact-bar {
  min-height: 38px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 0 13px;
  border-bottom: 1px solid #9f9990;
  background: linear-gradient(#ebe7df, #d7d2c9);
  font-family: var(--font-mono);
  font-size: .66rem;
  color: #3e3a35;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.25);
}

.window-dots i:nth-child(1) { background: #d95a4f; }
.window-dots i:nth-child(2) { background: #d6b24a; }
.window-dots i:nth-child(3) { background: #68a55e; }

.artifact-file {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-code {
  color: var(--blue);
}

.artifact-stage {
  padding: clamp(12px, 2.2vw, 24px);
  background:
    linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.12)),
    #cfc9bf;
}

.artifact-stage.dark {
  background: #23262e;
}

.artifact-stage img {
  width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid rgba(17,17,17,.18);
  background: #fff;
}

.artifact-window figcaption {
  padding: 12px 14px 14px;
  border-top: 1px solid #a8a299;
  background: #e7e2d9;
  color: #59554f;
  font-family: var(--font-mono);
  font-size: .7rem;
}

.artifact-pair {
  width: min(calc(100% - 32px), var(--wide));
  margin: 42px auto 64px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
  align-items: start;
}

.artifact-triptych {
  width: min(calc(100% - 32px), var(--wide));
  margin: 42px auto 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
  align-items: start;
}

.artifact-triptych .artifact-stage {
  padding: 10px;
}

/* =========================================
   CASE — RESULTADOS + CONTADOR
   ========================================= */

.result-statement,
.result-callout {
  margin-top: 30px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
}

.result-statement p {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.48rem);
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -.02em;
}

.result-callout {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.result-callout .n {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
}

.result-callout .l {
  max-width: 440px;
  color: var(--muted);
}

.project-divider {
  width: min(calc(100% - 32px), var(--read));
  height: 1px;
  margin: 120px auto 88px;
  background: var(--line);
}

#base-de-conhecimento,
#reforma-tributaria {
  scroll-margin-top: 100px;
}

.case-nav {
  width: min(calc(100% - 32px), var(--read));
  margin: 72px auto 40px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .76rem;
  text-transform: uppercase;
}

.case-nav .fwd {
  color: var(--blue);
}

/* =========================================
   SOBRE
   ========================================= */

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  border-bottom: 1px solid var(--line);
}
.about-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 7vw, 90px) clamp(28px, 5vw, 70px);
}
.about-kicker,
.about-section-label {
  margin: 0;
  color: var(--blue);
  font-family: var(--font-lcd);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.about-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
}
.about-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7.5vw, 7.6rem);
  line-height: .92;
  letter-spacing: -.01em;
  font-weight: 700;
}
.about-hero h1 strong {
  display: block;
  color: var(--blue);
}
.about-intro {
  max-width: 620px;
  margin: 28px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}
.about-photo-wrap {
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 60px);
  border-left: 1px solid var(--line-soft);
  background: var(--surface-strong);
}
.about-photo-frame {
  width: min(100%, 390px);
  border: 1px solid var(--line);
  background: #d8d2c8;
  box-shadow: var(--shadow);
}
.about-photo-bar {
  min-height: 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--muted);
}
.about-photo-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: grayscale(1);
}
.about-story {
  display: grid;
  grid-template-columns: 190px minmax(0, 760px);
  gap: clamp(28px, 6vw, 88px);
  padding: clamp(54px, 7vw, 92px) clamp(28px, 5vw, 70px);
  border-bottom: 1px solid var(--line);
}
.about-story-copy h2,
.about-columns h2,
.about-principles h2,
.about-experience h2 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -.008em;
  font-weight: 700;
}
.about-story-copy p,
.about-columns p {
  margin: 0 0 18px;
  font-size: 1.04rem;
}
.about-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.about-columns article {
  min-height: 300px;
  padding: 34px 30px;
  border-right: 1px solid var(--line-soft);
}
.about-columns article:last-child { border-right: 0; }
.about-columns h2 {
  margin-top: 20px;
  font-size: 1.35rem;
}
.about-columns p {
  color: var(--muted);
  font-size: .94rem;
}
.about-principles {
  padding: clamp(54px, 7vw, 86px) clamp(28px, 5vw, 70px);
  border-bottom: 1px solid var(--line);
}
.about-principles h2 {
  margin-top: 18px;
  max-width: 760px;
}
.principle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 38px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.principle-grid > div {
  min-height: 170px;
  padding: 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.principle-grid span {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 1.15rem;
}
.principle-grid p {
  margin: 30px 0 0;
  font-size: .98rem;
  font-weight: 650;
}
.about-experience {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(54px, 7vw, 86px) clamp(28px, 5vw, 70px);
  border-bottom: 1px solid var(--line);
}
.about-experience h2 { margin-top: 18px; }
.experience-list { border-top: 1px solid var(--line); }
.experience-list a {
  display: grid;
  grid-template-columns: 1.25fr 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid var(--line-soft);
}
.experience-list a:hover { color: var(--blue); }
.experience-list span { font-weight: 750; }
.experience-list small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .72rem;
}
.experience-list b { color: var(--blue); }

/* =========================================
   RESPONSIVO — DESKTOP GRANDE / TABLET
   ========================================= */

@media (max-width: 1120px) {
  .site-shell {
    grid-template-columns: 94px minmax(0, 1fr);
  }
  .spine-name {
    font-size: 1.35rem;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .tv-scene {
    min-height: 300px;
    border-top: 1px solid var(--line-soft);
  }
  .about-panel {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .portrait-photo {
    width: 160px;
    height: 205px;
  }
  .site-footer {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer > * {
    border-bottom: 1px solid var(--line-soft);
  }
}

@media (max-width: 980px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-photo-wrap {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
  .about-story,
  .about-experience { grid-template-columns: 1fr; }
  .principle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .case-meta {
    grid-template-columns: 1fr 1fr;
  }
  .case-meta > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
  .case-meta > div:nth-child(4) {
    border-top: 1px solid var(--line-soft);
  }
  .artifact-pair,
  .artifact-triptych {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   RESPONSIVO — MOBILE (breakpoint único para o header,
   compartilhado por todas as páginas do site)
   ========================================= */

@media (max-width: 780px) {
  .site-shell {
    width: min(calc(100% - 12px), 1500px);
    margin: 6px auto;
    grid-template-columns: 1fr;
  }
  .media-spine {
    display: none;
  }
  .site-header {
    min-height: 64px;
    padding: 0 18px;
  }
  .menu-button {
    display: inline-flex;
  }
  .navigation {
    position: absolute;
    top: 64px;
    right: 12px;
    width: min(260px, calc(100vw - 24px));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .navigation.is-open {
    display: flex;
  }
  .navigation a {
    padding: 12px;
  }
  .hero-copy {
    padding: 48px 20px 34px;
  }
  .hero h1 {
    font-size: clamp(2.7rem, 13vw, 4.8rem);
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .button,
  .button-primary,
  .button-secondary {
    min-width: 0;
    width: 100%;
  }
  .tv-scene {
    min-height: 250px;
  }
  .work-grid {
    display: flex;
    flex-direction: column;
  }
  .work-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 18px 20px 34px;
  }
  .work-card::before {
    left: 12px;
  }
  .work-card .case-link {
    align-self: flex-start;
  }
  .about-panel {
    grid-template-columns: 1fr;
    padding: 22px 20px 26px;
  }
  .portrait-photo {
    width: min(200px, 58vw);
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .contact-strip {
    grid-template-columns: 1fr;
  }
  .contact-item + .contact-item {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .site-footer {
    grid-template-columns: 1fr;
  }
  .site-footer > * {
    border-right: 0;
  }
  .about-columns { grid-template-columns: 1fr; }
  .about-columns article {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .principle-grid { grid-template-columns: 1fr; }
  .experience-list a {
    grid-template-columns: 1fr auto;
    padding: 14px 0;
  }
  .experience-list small { grid-column: 1; }
  .experience-list b {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .case-shell {
    width: min(calc(100% - 16px), var(--wide));
  }
  .case-intro {
    padding: 34px 20px;
  }
  .case-intro h1 {
    font-size: clamp(2.35rem, 13vw, 4rem);
  }
  .case-meta {
    grid-template-columns: 1fr;
  }
  .case-meta > div,
  .case-meta > div + div {
    padding: 14px 0;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
  .case-meta > div:first-child {
    border-top: 0;
  }
  .case-body {
    padding-top: 54px;
  }
  .beat {
    width: min(calc(100% - 28px), var(--read));
    margin-bottom: 60px;
  }
  .beat p {
    font-size: 1rem;
  }
  .artifact-wide,
  .artifact-reading,
  .artifact-pair,
  .artifact-triptych {
    width: min(calc(100% - 16px), var(--wide));
  }
  .artifact-bar {
    grid-template-columns: auto 1fr;
  }
  .artifact-code {
    display: none;
  }
  .project-divider {
    width: min(calc(100% - 28px), var(--read));
    margin: 80px auto 60px;
  }
  .case-nav {
    flex-direction: column;
    width: min(calc(100% - 28px), var(--read));
  }
  .site-footer-case {
    flex-direction: column;
    padding: 24px 18px;
  }
  .site-footer-case div {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }
  .hero-meta {
    gap: 12px 18px;
  }
  .section-heading,
  .about-panel {
    padding-left: 18px;
    padding-right: 18px;
  }
  .contact-item {
    padding: 0 18px;
    font-size: .75rem;
  }
  .barcode-small,
  .hero-meta span:nth-last-child(-n+2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #746a5e;
    --muted: #d6cabb;
  }
}

/* =========================================
   UTILITÁRIO
   ========================================= */

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

/* =========================================
   TELA DE ABERTURA (boot screen)
   Só existe na home. Some sozinha em 5s, ou antes disso ao
   apertar qualquer tecla, tocar a tela ou usar o botão de
   pular — o que vier primeiro.
   ========================================= */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  background: var(--bg);
  cursor: pointer;
  opacity: 1;
  transition: opacity 320ms ease;
}

.boot-screen:not([hidden]) {
  display: flex;
}

.boot-screen.is-leaving {
  opacity: 0;
}

.boot-crt {
  position: relative;
  display: grid;
  place-items: center;
  animation: boot-flicker 420ms steps(6) 1;
}

.boot-initials,
.boot-fullname {
  grid-area: 1 / 1;
  font-family: "Press Start 2P", var(--font-mono);
  color: var(--ink);
  text-align: center;
  text-shadow: 0 0 18px rgba(111, 141, 255, .35);
}

.boot-initials {
  font-size: clamp(3.2rem, 14vw, 6.5rem);
  animation: boot-initials-seq 5s ease-in-out forwards;
}

.boot-fullname {
  font-size: clamp(1.1rem, 4.4vw, 2rem);
  letter-spacing: .08em;
  opacity: 0;
  animation: boot-fullname-seq 5s ease-in-out forwards;
}

@keyframes boot-flicker {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  30%  { opacity: .2; }
  45%  { opacity: 1; }
  60%  { opacity: .4; }
  100% { opacity: 1; }
}

@keyframes boot-initials-seq {
  0%   { opacity: 0; letter-spacing: .55em; }
  10%  { opacity: 1; letter-spacing: .15em; }
  55%  { opacity: 1; letter-spacing: .15em; }
  70%  { opacity: 0; letter-spacing: .05em; }
  100% { opacity: 0; }
}

@keyframes boot-fullname-seq {
  0%   { opacity: 0; letter-spacing: .5em; }
  64%  { opacity: 0; letter-spacing: .5em; }
  85%  { opacity: 1; letter-spacing: .08em; }
  100% { opacity: 1; letter-spacing: .08em; }
}

.boot-prompt {
  color: var(--muted);
  font-family: var(--font-lcd);
  font-size: 1.05rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  animation: boot-prompt-blink 1.1s steps(1) infinite;
}

@keyframes boot-prompt-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: .2; }
}

.boot-skip {
  position: absolute;
  right: max(18px, calc((100% - var(--wide)) / 2));
  bottom: 22px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.boot-skip:hover {
  color: var(--ink);
  border-color: var(--muted);
}

/* =========================================
   CARREGANDO CASE (transição entre home e um case)
   Reaproveita o próprio .disc-cd, só que girando mais rápido,
   como um disco sendo lido antes de abrir o "jogo".
   ========================================= */

.case-loading {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background: var(--bg);
  opacity: 0;
  transition: opacity 180ms ease;
}

.case-loading:not([hidden]) {
  display: flex;
}

.case-loading.is-active {
  opacity: 1;
}

.case-loading-disc {
  width: 96px;
}

.case-loading-disc .disc-cd {
  width: 100%;
  animation: disc-spin 550ms linear infinite;
}

.case-loading-text {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-lcd);
  font-size: 1.2rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.case-loading-bar {
  width: min(70vw, 220px);
  height: 6px;
  border: 1px solid var(--line);
}

.case-loading-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--blue);
}

.case-loading.is-active .case-loading-bar span {
  width: 100%;
  transition: width 550ms linear;
}
