/* ==========================================================================
   ANEMIC SOFT — INDEPENDENT GAME STUDIO (anemicsoft.com)
   Matched to the official "ANEMIC SOFT · THE FOUNDERS" & 90s CRT Artwork
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg-obsidian: #121316;
  --bg-card: #181b20;
  --bg-elev: #1e2229;
  --ink-cream: #f4eee1;
  --ink-body: #d1d5db;
  --ink-muted: #9ca3af;
  --lime: #84cc16;
  --lime-bright: #a3e635;
  --gold: #eab308;
  --founder-javi: #e86a48;
  --founder-jorge: #e062b5;
  --founder-luis: #deb34b;
  --founder-alberto: #5eb4e8;
  --border-subtle: rgba(255, 255, 255, 0.11);
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --max-w: 1100px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-obsidian);
  color: var(--ink-cream);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-obsidian);
  background-image:
    radial-gradient(ellipse 75% 45% at 50% -10%, rgba(132, 204, 22, 0.09), transparent 70%),
    linear-gradient(180deg, #121316 0%, #15171c 60%, #101114 100%);
  overflow-x: hidden;
}

.pixel-art {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link:focus-visible {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 999;
  padding: 0.6rem 1rem;
  background: var(--lime);
  color: #0b0f05;
  font-weight: 800;
  border-radius: 4px;
  text-decoration: none;
}

:where(a:any-link, button, summary):focus-visible {
  outline: 3px solid var(--lime-bright);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2rem, var(--max-w));
  margin-inline: auto;
}

/* Signature Lime Top Rule matching the official Anemic Soft Founder Board */
.top-lime-bar {
  height: 6px;
  background: linear-gradient(90deg, #65a30d 0%, #84cc16 50%, #a3e635 100%);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 19, 22, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  flex-wrap: wrap;
}

.studio-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink-cream);
}

.studio-brand img {
  width: 36px;
  height: 36px;
  display: block;
}

.studio-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.studio-brand-name {
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ink-cream);
}

.studio-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-block-size: 36px;
  padding: 0.35rem 0.7rem;
  color: var(--ink-body);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--lime-bright);
  background: rgba(132, 204, 22, 0.08);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg-card);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  min-inline-size: 36px;
  min-block-size: 34px;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
  background: var(--lime);
  color: #0b0f05;
}

/* Hero Section */
.hero {
  padding-block: 2.5rem 2.75rem;
}

.hero-intro {
  max-width: 780px;
  margin: 0 auto 1.85rem;
  text-align: center;
}

.est-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(132, 204, 22, 0.42);
  background: rgba(132, 204, 22, 0.1);
  color: var(--lime-bright);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.hero h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.65rem, 3.2vw, 2.45rem);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.015em;
  color: var(--ink-cream);
}

.hero-lead {
  margin: 0 auto;
  max-width: 65ch;
  color: var(--ink-body);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
}

.artwork-showcase {
  max-width: 980px;
  margin-inline: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  background: #17181b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.artwork-showcase img {
  display: block;
  width: 100%;
  height: auto;
}

/* Founders & 90s CRT Section */
.founders-section {
  padding-block: 2.5rem 3.5rem;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2rem;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 0.4rem;
}

.section-header h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.4rem, 2.5vw, 1.95rem);
  font-weight: 800;
  color: var(--ink-cream);
}

.section-header p {
  margin: 0;
  color: var(--ink-body);
}

.crt-panorama-frame {
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  background: #0b0e1c;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

.crt-panorama-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.crt-caption {
  margin: 0;
  padding: 0.65rem 1rem;
  background: #14171e;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-muted);
  text-align: center;
}

/* 4 Founder Columns matching exact left-to-right artwork order & color underlines */
.founders-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.founder-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-bottom: 4px solid var(--founder-accent, var(--lime));
  border-radius: 6px;
  padding: 1.25rem 1.15rem;
}

.founder-stage {
  height: 98px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.65rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.9rem;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.founder-sprite {
  height: 76px;
  width: auto;
  display: block;
}

.founder-sprite.is-kid {
  height: 62px;
}

.founder-evo-arrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  align-self: center;
}

.founder-era {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--founder-accent, var(--lime));
  margin-bottom: 0.25rem;
}

.founder-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ink-cream);
}

.founder-role {
  margin: 0 0 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-body);
}

.founder-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

/* Timeline 1988 -> 2024-2026 */
.story-section {
  padding-block: 3rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(24, 27, 32, 0.45);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-card {
  padding: 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.timeline-year {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  color: #0b0f05;
  background: var(--lime);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  margin-bottom: 0.65rem;
}

.timeline-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.06rem;
  color: var(--ink-cream);
}

.timeline-card p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--ink-body);
}

/* Flagship Game Showcase -> indiecycling.com */
.games-section {
  padding-block: 3.5rem 4rem;
  border-top: 1px solid var(--border-subtle);
}

.flagship-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.85rem;
  align-items: center;
  padding: 1.65rem;
  background: linear-gradient(135deg, #161b26 0%, #10141d 100%);
  border: 1px solid rgba(234, 179, 8, 0.45);
  border-radius: 8px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.55);
}

.flagship-preview {
  border: 2px solid #eab308;
  border-radius: 4px;
  overflow: hidden;
  background: #000000;
}

.flagship-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.flagship-logo {
  height: 54px;
  width: auto;
  display: block;
  margin-bottom: 0.75rem;
}

.flagship-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fde047;
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.4);
  padding: 0.22rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.flagship-copy h3 {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
  color: var(--ink-cream);
}

.flagship-copy p {
  margin: 0 0 1rem;
  color: var(--ink-body);
  font-size: 0.95rem;
}

.pkg-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.pkg-pills li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.22rem 0.55rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--ink-body);
}

.flagship-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-block-size: 44px;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  background: #eab308;
  color: #0b0d12;
  font-weight: 800;
  font-size: 0.94rem;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.flagship-cta:hover {
  background: #facc15;
}

/* Secondary Archival Curiosity Card: Coral Sea (MSX, 1988) */
.archive-curiosity {
  margin-top: 1.5rem;
  padding: 1.25rem 1.4rem;
  background: rgba(24, 27, 32, 0.78);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid #38bdf8;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.35rem;
  align-items: center;
}

.archive-thumb {
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  background: #000000;
}

.archive-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.archive-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin-bottom: 0.25rem;
}

.archive-curiosity h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  color: var(--ink-cream);
}

.archive-curiosity p {
  margin: 0 0 0.85rem;
  font-size: 0.89rem;
  color: var(--ink-body);
}

.archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.archive-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-block-size: 36px;
  padding: 0.38rem 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elev);
  color: var(--ink-cream);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.archive-btn:hover {
  border-color: #7dd3fc;
  background: #252b36;
}

.archive-btn.is-play {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
  color: #bae6fd;
}

.archive-btn.is-play:hover {
  background: #38bdf8;
  color: #06131f;
}

/* Native Accessible Modals for Coral Sea Emulator, BASIC Code & Magazine Scan */
dialog.studio-modal {
  width: min(860px, calc(100vw - 1.5rem));
  max-height: 90vh;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top: 3px solid #38bdf8;
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--ink-cream);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.88);
}

dialog.studio-modal::backdrop {
  background-color: rgba(5, 7, 12, 0.82);
  backdrop-filter: blur(3px);
}

.studio-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  background: #111318;
  border-bottom: 1px solid var(--border-subtle);
}

.studio-modal-head h2 {
  margin: 0;
  font-size: 1.02rem;
}

.studio-modal-close {
  appearance: none;
  min-block-size: 36px;
  min-inline-size: 36px;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-elev);
  color: var(--ink-cream);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.studio-modal-body {
  padding: 1.15rem 1.25rem;
  overflow-y: auto;
  max-height: calc(90vh - 64px);
}

.msx-iframe-wrap {
  width: 100%;
  background: #000000;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

.msx-iframe {
  display: block;
  width: 100%;
  height: 470px;
  border: 0;
  background: #000000;
}

.msx-help-note {
  margin: 0.75rem 0 0;
  font-size: 0.84rem;
  color: var(--ink-body);
}

.msx-credit-note {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.basic-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.basic-code-pre {
  margin: 0;
  padding: 1rem;
  background: #0b0e14;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: #a7f3d0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.48;
  max-height: 60vh;
  overflow: auto;
}

.mag-scans-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: start;
}

.mag-scans-grid figure {
  margin: 0;
  background: #111318;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
}

.mag-scans-grid img {
  display: block;
  width: 100%;
  height: auto;
}

.mag-scans-grid figcaption {
  padding: 0.55rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
}

/* Legal / Privacy Document Layout (privacidad.html) */
.legal-page-main {
  padding-block: 2.75rem 4rem;
}

.legal-doc {
  max-width: 800px;
  margin-inline: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--lime);
  border-radius: 8px;
  padding: clamp(1.4rem, 3vw, 2.4rem);
}

.legal-doc h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
}

.legal-updated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--lime-bright);
  margin: 0 0 1.5rem;
}

.legal-doc h2 {
  font-size: 1.12rem;
  color: var(--ink-cream);
  margin: 1.65rem 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-doc p,
.legal-doc li {
  color: var(--ink-body);
  font-size: 0.94rem;
}

.legal-doc a {
  color: var(--lime-bright);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #0c0d10;
  padding-block: 1.75rem;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-block-size: 32px;
  color: var(--ink-body);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: var(--lime-bright);
}

@media (max-width: 940px) {
  .founders-grid,
  .timeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .flagship-card,
  .archive-curiosity,
  .mag-scans-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .founders-grid,
  .timeline-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .msx-iframe {
    height: 360px;
  }
}

@media (pointer: coarse) {
  .lang-btn {
    min-block-size: 40px;
    min-inline-size: 40px;
  }
}
