/* Nintendinho Playtronic — artigo histórico (editorial, mobile-first) */
:root {
  --bg: #f4efe6;
  --paper: #fffcf7;
  --ink: #1b1814;
  --muted: #5a534a;
  --faint: #8a8278;
  --line: #d8d0c4;
  --red: #c41e18;
  --red-dark: #9a1612;
  --gold: #c4a35a;
  --hero-dark: #161412;
  --footer: #221f1b;
  --max: 1120px;
  --prose: 72ch;
  --font-sans: Inter, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-pixel: "Press Start 2P", ui-monospace, monospace;
  --ease: 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  min-height: 100%;
  overflow-x: clip;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--gold);
  color: var(--ink);
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
}

.skip-link:focus {
  top: 12px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--red-dark);
}

a:hover,
a:focus-visible {
  color: var(--red);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
  max-width: 100%;
}

.prose-wrap {
  width: min(100% - 1.5rem, var(--prose));
  margin-inline: auto;
  max-width: 100%;
}

[id] {
  scroll-margin-top: var(--header-h);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  background: var(--red);
  border-radius: 50%;
}

.nav-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
  min-width: 0;
}

.nav-mini a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 8px;
  white-space: nowrap;
}

.nav-mini a:hover,
.nav-mini a:focus-visible {
  color: var(--ink);
}

/* Hero */
.hero {
  position: relative;
  background: var(--hero-dark);
  color: #f6f1e8;
  padding: 1.6rem 0 0;
  overflow-x: clip;
  overflow-y: visible;
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 1.8rem;
}

.hero-grid > * {
  min-width: 0;
}

@media (min-width: 880px) {
  .hero {
    padding: 2.4rem 0 0;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
    align-items: end;
    padding-bottom: 3rem;
  }
}

.kicker,
.section-kicker,
.tl-year,
.cart-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
}

.kicker {
  color: var(--gold);
  margin: 0 0 0.9rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.55rem, 6.4vw, 3.15rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: #fff;
  overflow-wrap: break-word;
}

.lede {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #d8d0c4;
  margin: 0 0 1.25rem;
  max-width: 38rem;
}

.btn-read {
  display: inline-block;
  text-decoration: none;
  color: var(--hero-dark);
  background: var(--gold);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.15rem;
  border-radius: 3px;
}

.btn-read:hover,
.btn-read:focus-visible {
  color: var(--hero-dark);
  filter: brightness(1.06);
}

.hero-figure {
  margin: 0;
  min-width: 0;
}

.hero-photo {
  position: relative;
  overflow: hidden;
  background: #0e0c0a;
}

.hero-photo img {
  width: 100%;
  height: auto;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 0 1px,
    transparent 1px 5px
  );
  mix-blend-mode: overlay;
}

.hero-figure figcaption {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #b5ada3;
}

/* Sections */
.section {
  padding: 2.6rem 0;
}

@media (min-width: 760px) {
  .section {
    padding: 3.2rem 0;
  }
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-kicker,
.prose p.section-kicker {
  color: var(--red);
  margin: 0 0 0.75rem;
  font-size: 8px;
  line-height: 1.7;
}

.section h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.2vw, 2.15rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
  overflow-wrap: break-word;
}

.section-intro {
  margin: 0 0 1.2rem;
  max-width: 72ch;
}

.prose p {
  margin: 0 0 1.2rem;
}

.prose p:not(.section-kicker) {
  font-size: 1.08rem;
  line-height: 1.85;
}

.prose p.drop::first-letter {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 3.1rem;
  float: left;
  line-height: 0.85;
  padding: 0.12em 0.12em 0 0;
  color: var(--red);
}

.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 2rem 0 0.7rem;
  overflow-wrap: break-word;
}

.pullquote {
  margin: 2rem 0;
  padding: 1.2rem 0 1.2rem 1.2rem;
  border-left: 3px solid var(--red);
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.4vw, 1.28rem);
  line-height: 1.5;
  font-style: italic;
  color: var(--ink);
}

.cart-accent {
  background: linear-gradient(180deg, #3a3834 0%, #1f1d1a 100%);
  color: #efe8dc;
  padding: 1.15rem 1.2rem 1.25rem;
  margin: 2rem 0;
}

@media (min-width: 700px) {
  .cart-accent {
    clip-path: polygon(6% 0, 94% 0, 100% 8%, 100% 100%, 0 100%, 0 8%);
  }
}

.cart-accent p {
  margin: 0;
  font-size: 0.98rem;
  color: #efe8dc;
}

.cart-accent .cart-label,
.cart-accent p.cart-label {
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 0 0 0.55rem;
}

/* Photo figures */
.photo {
  margin: 1.8rem 0 2.1rem;
  min-width: 0;
}

.photo img {
  width: 100%;
  height: auto;
  background: #ece6db;
}

.photo figcaption {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}

.photo figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

.credit {
  display: block;
  margin-top: 0.2rem;
  color: var(--faint);
  font-size: 0.75rem;
}

.clone-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0 0.5rem;
}

.clone-grid > * {
  min-width: 0;
}

@media (min-width: 800px) {
  .clone-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

.clone-grid .photo {
  margin: 0;
}

.clone-grid img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.tl-item {
  display: grid;
  gap: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1rem;
  min-width: 0;
}

.tl-item > * {
  min-width: 0;
}

@media (min-width: 760px) {
  .timeline {
    gap: 2.2rem;
  }

  .tl-item {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 1.4rem;
    padding: 1.15rem;
    align-items: start;
  }
}

.tl-photo {
  margin: 0;
}

.tl-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #ece6db;
}

.tl-photo figcaption {
  margin: 0.5rem 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--faint);
}

.tl-year,
.tl-item p.tl-year {
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.8;
  letter-spacing: 0.08em;
  color: var(--red);
  margin: 0 0 0.45rem;
}

.tl-item h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.4vw, 1.28rem);
  margin: 0 0 0.55rem;
  overflow-wrap: break-word;
}

.tl-item p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* Gallery */
.gallery-grid {
  display: grid;
  gap: 1.4rem;
}

.gallery-grid > * {
  min-width: 0;
}

@media (min-width: 700px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.gallery-grid .photo {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.7rem 0.7rem 0.9rem;
}

.gallery-grid img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.gallery-grid .photo.tall img {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #f3eee6;
}

/* Curiosities */
.curios-grid {
  display: grid;
  gap: 0.85rem;
}

.curios {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0;
  min-width: 0;
}

.curios > summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.1rem;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  overflow-wrap: break-word;
}

.curios > summary::-webkit-details-marker {
  display: none;
}

.curios > summary::before {
  content: "+";
  display: inline-block;
  width: 1.3rem;
  color: var(--red);
  font-family: var(--font-sans);
  font-weight: 500;
}

.curios[open] > summary::before {
  content: "–";
}

.curios .curios-body {
  padding: 0 1.1rem 1.15rem 2.4rem;
  color: var(--muted);
}

.curios .curios-body p {
  margin: 0 0 0.8rem;
}

.curios .curios-body p:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background: var(--footer);
  color: #d8d0c4;
  padding: 2.6rem 0 2.8rem;
}

.disclaimer {
  background: #2c2924;
  color: #f4efe6;
  border-left: 3px solid var(--gold);
  padding: 1.2rem 1.2rem 1.3rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.disclaimer h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 0.7rem;
  color: #fff;
}

.fineprint {
  margin: 1.3rem 0 0;
  font-size: 0.85rem;
  color: #9c948a;
}

.fineprint a {
  color: var(--gold);
}

/* Reveal: never hide copy. Fade is additive. */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal.is-in {
    animation: nes-rise 0.65s var(--ease);
  }
}

@keyframes nes-rise {
  from {
    opacity: 0.55;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-photo::after,
  .reveal,
  .reveal.is-in,
  .btn-read {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .hero-photo::after {
    display: none;
  }
}
