:root {
  --ink: #111114;
  --brand: #1E3A6B;
  --ink-2: #2A2A30;
  --muted: #3F3F46;
  --paper: #FFFFFF;
  --soft: #F3F3F5;
  --bar: #0B0B0D;
  --accent: #FF6A2B;
  --accent-ink: #140A04;
  --display: "Archivo", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; }
.hero-bg { background: url('../images/pastel-isometric-bg-tiled.jpg') repeat-y center top; background-size: 100% auto; }
img, video { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: #B83D0C; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.display { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 1; margin: 0; color: var(--brand); }
.h2 { font-size: clamp(40px, 5.5vw, 72px); }
.pill { display: inline-block; align-self: flex-start; padding: 8px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 800; font-size: 15px; text-transform: uppercase; }
.pill-sm { padding: 6px 14px; font-size: 14px; }

.btn { display: inline-block; padding: 16px 28px; border-radius: 10px; font-family: var(--display); font-weight: 800; font-size: 16px; text-transform: uppercase; text-decoration: none; }
.btn-dark { background: var(--brand); color: #fff; }
.btn-dark:hover { background: #2A4D82; color: #fff; }
.btn-line { border: 2px solid var(--brand); color: var(--brand); }
.btn-line:hover { background: var(--brand); color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--brand); }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.nav-logo img { height: 52px; width: auto; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-links a { padding: 12px 16px; font-family: var(--display); font-weight: 800; font-size: 16px; text-transform: uppercase; text-decoration: none; color: #fff; }
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero { display: flex; flex-direction: column; gap: 28px; padding-top: 104px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(52px, 8vw, 120px); line-height: 0.95; letter-spacing: -0.02em; text-shadow: 3px 3px 0 rgba(30, 58, 107, 0.15); }
.lead { margin: 0; font-size: 21px; line-height: 1.55; color: var(--muted); max-width: 640px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 14px; margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; gap: 2px; }
.stats dd { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(30px, 6vw, 58px); color: var(--brand); }
.stats dt { font-size: 15px; font-weight: 500; color: var(--muted); }
.stat-short { display: none; }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 180px)); justify-content: center; gap: 16px; align-items: center; padding-bottom: 72px; }
.photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }
.photos img:nth-child(1) { transform: rotate(-2deg); }
.photos img:nth-child(2) { transform: rotate(1.5deg); }
.photos img:nth-child(3) { transform: rotate(-1deg); }
.photos img:nth-child(4) { transform: rotate(2deg); }

/* Games */
.games { display: flex; flex-direction: column; gap: 40px; padding-top: 32px; padding-bottom: 112px; }
.games-banner { background: var(--brand); padding: 18px 24px; text-align: center; }
.games-banner h2 { color: #fff; font-size: clamp(24px, 6.0vw, 40px); }
.games-banner p { margin: 8px 0 0; font-size: 18px; color: rgba(255,255,255,0.75); }
.games-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.games-head p { margin: 0; font-size: 18px; color: var(--muted); }

.home-screen { background: var(--soft); border-radius: 32px; padding: 32px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 28px 8px; }
.app { background: none; border: 0; padding: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink); font: inherit; border-radius: 20px; }
.app-tile { width: 76px; height: 76px; border-radius: 18px; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12); transition: transform 160ms ease, box-shadow 160ms ease; }
.app-tile img { width: 100%; height: 100%; object-fit: cover; }
.app-mark { font-family: var(--display); font-weight: 900; font-size: 28px; color: #fff; }
.app-label { font-size: 14px; font-weight: 500; text-align: center; line-height: 1.25; max-width: 104px; }
.app:hover .app-tile { transform: scale(1.04); }
.app[aria-pressed="true"] .app-tile { transform: scale(1.06); box-shadow: 0 0 0 3px var(--soft), 0 0 0 6px var(--ink); }
.app[aria-pressed="true"] .app-label { font-weight: 700; }

/* Player */
.stage { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; scroll-margin-top: 80px; }
.frame { position: relative; overflow: hidden; border: 12px solid var(--brand); box-shadow: 0 0 0 2px #3A3A40, 0 24px 60px rgba(0, 0, 0, 0.18); transition: background 200ms ease; }
.frame video { width: 100%; height: 100%; object-fit: cover; }
.frame .playable { width: 100%; height: 100%; border: 0; }
.mute-btn { position: absolute; bottom: 16px; right: 16px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: background 150ms ease; }
.mute-btn:hover { background: rgba(0,0,0,0.75); }
.mute-btn .icon-unmuted { display: none; }
.mute-btn.is-unmuted .icon-muted { display: none; }
.mute-btn.is-unmuted .icon-unmuted { display: block; }
.frame-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.frame-fallback img { width: 40%; max-width: 180px; border-radius: 22%; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); }

.stage.is-portrait { justify-content: center; }
.stage.is-portrait .frame { flex: 0 1 360px; max-width: 100%; aspect-ratio: 9 / 16; max-height: 740px; border-radius: 48px; }
.stage.is-portrait .info { flex: 0 1 480px; }
.stage.is-landscape { justify-content: flex-start; }
.stage.is-landscape .frame { flex: 999 1 620px; min-width: 0; aspect-ratio: 16 / 9; border-radius: 40px; }
.stage.is-landscape .info { flex: 1 1 300px; }

.info { display: flex; flex-direction: column; gap: 18px; min-width: 260px; }
.info h3 { font-size: clamp(36px, 4vw, 56px); }
.info p { margin: 0; font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.info .stat { font-family: var(--display); font-weight: 900; font-size: 28px; text-transform: uppercase; color: var(--brand); }
.store { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.badge { display: inline-flex; flex-direction: column; justify-content: center; padding: 8px 20px; min-height: 48px; border-radius: 10px; background: var(--brand); color: #fff; text-decoration: none; line-height: 1.1; }
.badge small { font-size: 11px; }
.badge span { font-size: 20px; font-weight: 600; }
.badge:hover { background: #2A4D82; color: #fff; }
.badge-play { flex-direction: row; align-items: center; gap: 10px; padding: 14px 24px; font-family: var(--display); font-weight: 800; font-size: 17px; text-transform: uppercase; }
.games .all { align-self: center; }

/* About */
.about { background: var(--soft); }
.about .wrap { display: flex; flex-direction: column; gap: 56px; padding-top: 112px; padding-bottom: 112px; }
.about-lead { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.about-lead h2 { flex: 1 1 420px; }
.about-body { flex: 1 1 420px; display: flex; flex-direction: column; gap: 20px; font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.about-body p { margin: 0; max-width: 62ch; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.pillar { background: #fff; border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.pillar h3 { font-size: 22px; color: var(--brand); }
.pillar p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }

/* Contact */
.contact { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; padding-top: 112px; padding-bottom: 112px; }
.contact > div { flex: 1 1 400px; display: flex; flex-direction: column; gap: 24px; }
.contact-intro p { margin: 0; font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 520px; }
.contact-intro .btn { align-self: flex-start; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.card { border: 2px solid var(--ink); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.card a { font-size: 18px; font-weight: 600; }
.card address { font-style: normal; font-size: 17px; line-height: 1.5; }
.jobs { background: var(--brand); color: #fff; border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.jobs h3 { font-size: 26px; color: #fff; }
.jobs p { margin: 0; font-size: 17px; line-height: 1.6; color: #D4D4D8; }
.jobs a { color: #fff; font-weight: 600; }

/* Footer */
.site-footer { background: var(--brand); color: #D4D4D8; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 32px; padding-bottom: 32px; font-size: 15px; }
.site-footer img { height: 44px; width: auto; }
.site-footer a { color: #fff; text-decoration: none; font-weight: 600; }

@media (max-width: 640px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .nav { justify-content: center; }
  .nav-logo img { height: 44px; }
  .nav-links a { padding: 10px 12px; font-size: 15px; }
  .hero { padding-top: 64px; }
  .stats { gap: 28px; }
  .stat-full { display: none; }
  .stat-short { display: inline; }
  .stats dd { font-size: 20px; }
  .home-screen { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 16px 10px; gap: 14px 2px; }
  .app-tile { width: 52px; height: 52px; border-radius: 13px; }
  .app-label { font-size: 11px; }
  .stage { gap: 32px; }
  .stage.is-portrait .frame { flex-basis: 280px; border-radius: 40px; }
  .stage.is-landscape .frame { flex-basis: 100%; border-width: 8px; border-radius: 24px; }
  .info { min-width: 0; flex-basis: 100% !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-tile, .frame { transition: none; }
}
