/*
  The Bocc Games — sitio del estudio.
  Lenguaje «Café Porteño» (docs/design/art-direction.md, docs/design-direction/identity.md):
  la mesa de pool (riel de madera, diamantes de nácar, cojín y paño), cuero con pespunte,
  bronce solo para la acción principal, marfil para el texto. Colores de game/theme/tokens.json.
*/

@font-face {
  font-family: "Lora";
  src: url("fonts/Lora-Variable.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* tokens.json › color */
  --felt-center: #1B4432;
  --felt-edge: #061410;
  --pool-rail: #7A4826;
  --pool-rail-dark: #3E2210;
  --cushion: #0F2E22;
  --cushion-lip: #3A7A57;
  --diamond: #EFE3C8;
  --room: #120D0A;
  --accent: #C08A3E;
  --accent-bright: #E0B267;
  --text: #EFE7D2;
  --text-muted: #D5CEBB;        /* text_muted (#EFE7D2 al 78 %) compuesto sobre el paño */
  --text-dark: #22150E;
  --focus-ring: #E0B267;
  /* tokens.json › leather */
  --tan-top: #D7A65E;
  --tan-mid: #C48F48;
  --tan-bottom: #B07A35;
  --tan-border: #5A3A14;
  --tan-edge: #4E3110;
  --tan-stitch: rgba(58, 34, 10, 0.55);
  --brown-top: #4A2E1F;
  --brown-mid: #3C2518;
  --brown-bottom: #2E1C12;
  --brown-border: #1A0F09;
  --brown-edge: #140B06;
  --brown-stitch: rgba(244, 234, 213, 0.30);
  --channel-top: #120A06;
  --channel-mid: #1C110B;
  --channel-bottom: #22140D;
  --channel-border: #0B0604;

  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --touch-min: 44px;
  --radius-m: 12px;
  --radius-l: 18px;
  --gutter: 16px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--room);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 0%, #2A1C14 0%, rgba(18, 13, 10, 0) 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-bright); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  min-height: var(--touch-min);
  background: var(--tan-mid);
  color: var(--text-dark);
  font-weight: 600;
  border-radius: var(--radius-m);
}
.skip:focus-visible { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Encabezado del estudio ───────────────────────────────── */

.studio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text);
  text-decoration: none;
  min-height: var(--touch-min);
  justify-content: center;
}
.wordmark:hover { color: var(--text); }
.wordmark__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.2;
}
.wordmark__name::after {
  content: "";
  display: block;
  width: 2.25em;
  height: 1px;
  margin-top: 6px;
  background: var(--accent);
}
.wordmark__sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-m);
  background: linear-gradient(var(--channel-top), var(--channel-mid) 50%, var(--channel-bottom));
  border: 1px solid var(--channel-border);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}
.lang a, .lang span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0 10px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text-muted);
}
.lang a:hover { color: var(--text); }
/* El idioma activo: bordó con borde marfil, como la opción elegida del juego (nunca bronce). */
.lang [aria-current="page"] {
  color: var(--text);
  background: linear-gradient(#7A2C2F, #622124 50%, #4A1719);
  box-shadow: inset 0 0 0 1px var(--text);
}

/* ── La mesa de pool ──────────────────────────────────────── */

.table {
  position: relative;
  padding: 14px;
  border-radius: 28px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0 2px, rgba(255, 255, 255, 0.025) 2px 5px, rgba(0, 0, 0, 0) 5px 11px),
    linear-gradient(180deg, #8C5630 0%, var(--pool-rail) 35%, #5E3519 75%, var(--pool-rail-dark) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35),
    0 24px 40px -18px rgba(0, 0, 0, 0.9),
    0 50px 80px -40px rgba(0, 0, 0, 0.8);
}

/* Diamantes de nácar sobre el riel, arriba y abajo: 6 por lado largo, sin el del medio. */
.table::before,
.table::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background-image:
    radial-gradient(circle at 12.5% 50%, var(--diamond) 0 2px, rgba(239, 227, 200, 0) 2.6px),
    radial-gradient(circle at 25% 50%, var(--diamond) 0 2px, rgba(239, 227, 200, 0) 2.6px),
    radial-gradient(circle at 37.5% 50%, var(--diamond) 0 2px, rgba(239, 227, 200, 0) 2.6px),
    radial-gradient(circle at 62.5% 50%, var(--diamond) 0 2px, rgba(239, 227, 200, 0) 2.6px),
    radial-gradient(circle at 75% 50%, var(--diamond) 0 2px, rgba(239, 227, 200, 0) 2.6px),
    radial-gradient(circle at 87.5% 50%, var(--diamond) 0 2px, rgba(239, 227, 200, 0) 2.6px);
  background-repeat: no-repeat;
  pointer-events: none;
}
.table::before { top: 0; }
.table::after { bottom: 0; }

.felt {
  position: relative;
  border-radius: 16px;
  padding: 28px 20px 32px;
  background:
    radial-gradient(ellipse 75% 60% at 50% 38%, var(--felt-center) 0%, #133526 55%, #0B2219 85%, var(--felt-edge) 100%);
  box-shadow:
    inset 0 0 0 7px var(--cushion),
    inset 0 0 0 8px rgba(58, 122, 87, 0.55),
    inset 0 14px 22px -6px rgba(0, 0, 0, 0.55),
    inset 0 -6px 18px -8px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* ── Destacado de Manuzzio ────────────────────────────────── */

.hero {
  display: grid;
  gap: 32px;
  align-items: center;
}

.game-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}
.game-head__icon {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  flex: none;
  box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.game-head__kicker {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.game-head__kicker strong { color: var(--text); font-weight: 600; }

.lockup {
  margin: 8px 0 0;
  max-width: 420px;
}
.lockup img { width: 100%; }

.tagline {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.625rem);
  line-height: 1.35;
  color: var(--text);
  max-width: 28ch;
}

.lead {
  margin: 14px 0 0;
  color: var(--text-muted);
  max-width: 52ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* Botones de cuero. El principal es suela (el único tono bronce de la página). */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin: 0;
  padding: 12px 22px;
  border-radius: var(--radius-m);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 8px;
  border: 1px dashed transparent;
  pointer-events: none;
}

.btn--primary {
  color: var(--text-dark);
  background: linear-gradient(180deg, var(--tan-top) 0%, var(--tan-mid) 50%, var(--tan-bottom) 100%);
  border: 1px solid var(--tan-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 210, 0.45),
    0 3px 0 var(--tan-edge),
    0 8px 16px -6px rgba(0, 0, 0, 0.7);
}
.btn--primary::after { border-color: var(--tan-stitch); }
.btn--primary:hover { color: var(--text-dark); filter: brightness(1.06); }
.btn--primary:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.45), 0 1px 0 var(--tan-edge); }

.btn__arrow { font-family: var(--font-display); font-weight: 700; }

/* «Google Play — próximamente»: no es un enlace; se lee deshabilitado por el texto, no solo por el color. */
.btn--soon {
  flex-direction: column;
  gap: 0;
  color: var(--text-muted);
  background: linear-gradient(180deg, var(--channel-top) 0%, var(--channel-mid) 50%, var(--channel-bottom) 100%);
  border: 1px solid var(--channel-border);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65);
  cursor: not-allowed;
}
.btn--soon::after { border-color: rgba(239, 231, 210, 0.16); }
.btn__soon-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.platforms {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.platforms li { display: flex; gap: 6px; }
.platforms strong { color: var(--text); font-weight: 600; }

/* Las cuatro cartas más fuertes del Truco, en abanico sobre el paño. */
.fan {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fan__cards {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 400 / 260;
  margin-bottom: 10%;
}
.fan__cards img {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 36%;
  border-radius: 8px;
  transform-origin: 50% 130%;
  box-shadow: 0 10px 18px -8px rgba(0, 0, 0, 0.75), 0 2px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease;
}
.fan__cards img:nth-child(1) { transform: translateX(-50%) rotate(-24deg); }
.fan__cards img:nth-child(2) { transform: translateX(-50%) rotate(-8deg); }
.fan__cards img:nth-child(3) { transform: translateX(-50%) rotate(8deg); }
.fan__cards img:nth-child(4) { transform: translateX(-50%) rotate(24deg); }
.fan__cards img:nth-child(1):hover { transform: translateX(-50%) rotate(-24deg) translateY(-10px); }
.fan__cards img:nth-child(2):hover { transform: translateX(-50%) rotate(-8deg) translateY(-10px); }
.fan__cards img:nth-child(3):hover { transform: translateX(-50%) rotate(8deg) translateY(-10px); }
.fan__cards img:nth-child(4):hover { transform: translateX(-50%) rotate(24deg) translateY(-10px); }

.fan figcaption {
  margin-top: 18px;
  max-width: 34ch;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Rasgos, en placas de cuero ───────────────────────────── */

.features {
  margin-top: 40px;
}
.features__title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  color: var(--text);
}
.features__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.plate {
  position: relative;
  padding: 20px 20px 22px;
  border-radius: var(--radius-m);
  background: linear-gradient(180deg, var(--brown-top) 0%, var(--brown-mid) 50%, var(--brown-bottom) 100%);
  border: 1px solid var(--brown-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 190, 0.12),
    0 3px 0 var(--brown-edge),
    0 10px 18px -10px rgba(0, 0, 0, 0.8);
}
.plate::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 1px dashed var(--brown-stitch);
  pointer-events: none;
}
.plate h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--text);
}
.plate p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ── Pie de página ────────────────────────────────────────── */

.foot {
  padding-top: 40px;
  padding-bottom: 40px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.foot__grid {
  display: grid;
  gap: 24px;
}
.foot h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.foot p { margin: 0 0 6px; }
.foot__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
}
.foot__links a, .foot__mail {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: 0 8px;
  margin-left: -8px;
  margin-right: 4px;
}
.foot__copy {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(192, 138, 62, 0.3);
  font-size: 0.875rem;
}

/* ── Página 404 ───────────────────────────────────────────── */

.lost {
  text-align: center;
  padding: 24px 4px 12px;
}
.lost__card {
  width: 120px;
  margin: 0 auto 20px;
  border-radius: 8px;
  transform: rotate(-6deg);
  box-shadow: 0 10px 18px -8px rgba(0, 0, 0, 0.75);
}
.lost h1 {
  margin: 0 0 8px;
  line-height: 1.2;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
}
.lost p { margin: 0 auto 20px; max-width: 40ch; color: var(--text-muted); }
.lost .actions { justify-content: center; }

/* ── Tamaños ──────────────────────────────────────────────── */

@media (min-width: 560px) {
  .features__list { grid-template-columns: repeat(2, 1fr); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 880px) {
  .studio { padding-top: 28px; padding-bottom: 28px; }
  .table { padding: 20px; border-radius: 34px; }
  .table::before, .table::after { height: 20px; }
  .felt { padding: 56px 56px 52px; border-radius: 18px; }
  .hero { grid-template-columns: 1.15fr 1fr; gap: 40px; }
  .fan__cards { width: min(100%, 440px); }
  .game-head__icon { width: 72px; height: 72px; border-radius: 17px; }
  .features { margin-top: 56px; }
  .features__list { grid-template-columns: repeat(4, 1fr); }
  .foot__grid { grid-template-columns: 1.3fr 1fr 1fr; }
}

@media (max-width: 400px) {
  .felt { padding: 22px 14px 26px; }
  .actions .btn { width: 100%; }
  .wordmark__name { font-size: 1rem; letter-spacing: 0.18em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .fan__cards img:nth-child(1):hover { transform: translateX(-50%) rotate(-24deg); }
  .fan__cards img:nth-child(2):hover { transform: translateX(-50%) rotate(-8deg); }
  .fan__cards img:nth-child(3):hover { transform: translateX(-50%) rotate(8deg); }
  .fan__cards img:nth-child(4):hover { transform: translateX(-50%) rotate(24deg); }
  .btn--primary:active { transform: none; }
}

@media (forced-colors: active) {
  .btn, .plate, .lang { border: 1px solid CanvasText; }
  .btn--soon { color: GrayText; }
}

@media (max-width: 879px) {
  .fan__cards { aspect-ratio: 400 / 210; }
  .wordmark__sub { white-space: nowrap; font-size: 0.75rem; }
}
