/* ==========================================================================
   Mi Casino Chile — encuentroaci.cl
   Paleta: grafito #1A1917 / oro #FFC52E / blanco / gris claro / rojo #E5392F
   ========================================================================== */

:root {
  --ink: #1a1917;
  --ink-2: #242321;
  --ink-3: #33322e;
  --gold: #ffc52e;
  --gold-dark: #e8ac10;
  --paper: #ffffff;
  --paper-2: #f4f4f2;
  --line: #e2e1dd;
  --text: #222222;
  --text-soft: #5c5b56;
  --red: #e5392f;
  --r-btn: 10px;
  --r-card: 16px;
  --wrap: 1180px;
  --nav-h: 60px;
  --fs-body: 1.0625rem;
}

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

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
}

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

a {
  color: #8a6200;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--ink);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.85rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3.6vw, 2.125rem);
  margin-top: 0;
}

h3 {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
}

h4 {
  font-size: 1.0625rem;
}

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.4rem;
}

strong {
  font-weight: 700;
  color: var(--ink);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1rem;
}

.narrow {
  max-width: 880px;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--gold);
  color: var(--ink);
  padding: 0.6rem 1rem;
  font-weight: 700;
  border-radius: 0 0 var(--r-btn) 0;
}

.skip:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: 2px;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--r-btn);
  font: inherit;
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.btn--primary {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--gold-dark);
}

.btn--primary:hover {
  background: var(--gold-dark);
  color: var(--ink);
}

.btn--primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--gold-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn--ghost:hover {
  background: var(--gold);
  color: var(--ink);
}

.btn--onlight {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn--onlight:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--lg {
  min-height: 56px;
  padding: 1rem 2.4rem;
  font-size: 1.1875rem;
}

.btn--sm {
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
}

.btn--block {
  width: 100%;
}

/* ---------- Navegación ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--ink-3);
}

.nav__in {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--nav-h);
}

.nav__logo {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
}

.nav__logo img {
  width: 158px;
  height: 27px;
  object-fit: contain;
}

.nav__links {
  display: flex;
  gap: 1.35rem;
  margin: 0 auto 0 1rem;
  padding: 0;
  list-style: none;
}

.nav__links a {
  color: #efeee9;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav__links a:hover {
  color: var(--gold);
}

.nav__cta {
  display: flex;
  gap: 0.6rem;
  flex: 0 0 auto;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--ink) url("../assets/img/mi-casino-portada.webp") center / cover no-repeat;
  color: var(--paper);
  text-align: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 19, 17, 0.82) 0%, rgba(20, 19, 17, 0.7) 55%, rgba(20, 19, 17, 0.92) 100%);
}

.hero__in {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  max-width: 820px;
}

.hero h1 {
  color: var(--paper);
  margin-bottom: 0.4rem;
}

.hero h1 span {
  color: var(--gold);
}

.hero__lead {
  font-size: clamp(1rem, 2.2vw, 1.1875rem);
  color: #e8e7e2;
  margin-bottom: 1.1rem;
  max-width: 60ch;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.hero__facts li {
  margin: 0;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 197, 46, 0.4);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fdfcf8;
}

.hero__note {
  margin: 0.85rem 0 0;
  font-size: 0.8125rem;
  color: #b9b7b0;
}

/* ---------- Secciones ---------- */

.sec {
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
}

.sec--alt {
  background: var(--paper-2);
}

.sec--dark {
  background: var(--ink);
  color: #ececE7;
}

.sec--dark h2,
.sec--dark h3 {
  color: var(--paper);
}

.sec--dark p {
  color: #d6d5cf;
}

.sec__lead {
  max-width: 70ch;
  margin-bottom: 1.5rem;
}

/* ---------- Tabla de contenidos ---------- */

.toc {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: var(--r-card);
  padding: 1.25rem 1.4rem;
}

.toc h2 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: 2rem;
}

.toc li {
  break-inside: avoid;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.toc a {
  color: var(--text);
  text-decoration: none;
}

.toc a:hover {
  color: #8a6200;
  text-decoration: underline;
}

/* ---------- Tarjetas ---------- */

.grid {
  display: grid;
  gap: 1rem;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 1.25rem;
}

.card h3 {
  margin-bottom: 0.4rem;
  font-size: 1.0625rem;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card__big {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.card__unit {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

.card--gold {
  border-color: var(--gold);
  border-width: 2px;
  background: #fffdf5;
}

/* Карточки/шаги/FAQ внутри тёмных секций — тёмная тема */
.sec--dark .card,
.sec--dark .steps li,
.sec--dark .review,
.sec--dark .faq details,
.sec--dark .tablewrap {
  background: var(--ink-2);
  border-color: var(--ink-3);
}

.sec--dark .card h3,
.sec--dark .card h4,
.sec--dark .steps li,
.sec--dark .review blockquote,
.sec--dark .faq summary {
  color: var(--paper);
}

.sec--dark .card p,
.sec--dark .card li,
.sec--dark .card .card__unit {
  color: #c8c7c1;
}

.sec--dark .card .card__big {
  color: var(--gold);
}

.sec--dark .steps li::before {
  background: var(--gold);
  color: var(--ink);
}

.sec--dark .review figcaption {
  color: #a9a8a2;
}

.sec--dark .review figcaption b {
  color: var(--paper);
}

.sec--dark .faq details {
  border-color: var(--ink-3);
}

.sec--dark .faq summary {
  color: var(--paper);
}

.sec--dark .faq summary::after {
  color: var(--gold);
}

.sec--dark .faq details > div {
  color: #c8c7c1;
}

.sec--dark .faq details > div p {
  color: #c8c7c1;
}

.sec--alt .faq details,
.sec--alt .card,
.sec--alt .steps li,
.sec--alt .review {
  background: var(--paper);
}

/* ---------- Banners de bono ---------- */

.bonus {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--ink);
  border-radius: 20px;
  padding: 1.25rem;
  color: var(--paper);
}

.bonus img {
  border-radius: 12px;
  width: 100%;
}

.bonus h3 {
  color: var(--paper);
  margin-bottom: 0.5rem;
}

.bonus p {
  color: #d6d5cf;
  margin-bottom: 0.85rem;
}

.bonus__data {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.bonus__data li {
  margin: 0;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 197, 46, 0.16);
  border: 1px solid rgba(255, 197, 46, 0.45);
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffe6a1;
}

.bonus--strip {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
}

/* ---------- Juegos ---------- */

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.game {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  aspect-ratio: 304 / 444;
}

.game > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.game__body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem;
  background: linear-gradient(180deg, rgba(16, 16, 16, 0) 35%, rgba(16, 16, 16, 0.94) 100%);
}

.game__name {
  color: var(--paper);
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.game__meta {
  color: #cfcec8;
  font-size: 0.8125rem;
  margin: 0;
  text-align: center;
}

.game__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  max-width: 200px;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.25s ease;
}

.game:hover > img,
.game:focus-within > img {
  transform: scale(1.05);
}

.game:hover .game__body,
.game:focus-within .game__body {
  background: linear-gradient(180deg, rgba(16, 16, 16, 0.1) 8%, rgba(16, 16, 16, 0.86) 46%, rgba(16, 16, 16, 0.97) 100%);
}

.game:hover .game__actions,
.game:focus-within .game__actions {
  max-height: 120px;
  opacity: 1;
  margin-top: 0.35rem;
}

.game__actions .btn {
  min-height: 42px;
  padding: 0.5rem 0.9rem;
  font-size: 0.9375rem;
  width: 100%;
}

.game__actions .btn--ghost {
  background: rgba(0, 0, 0, 0.45);
}

/* ---------- Tablas ---------- */

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--paper);
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 1rem;
}

caption {
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th,
td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 0;
}

tbody tr:nth-child(even) {
  background: var(--paper-2);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td b {
  color: var(--ink);
}

.yes {
  color: #1a7a3c;
  font-weight: 700;
}

.no {
  color: var(--red);
  font-weight: 700;
}

/* ---------- Pasos ---------- */

.steps {
  counter-reset: s;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.steps li {
  counter-increment: s;
  position: relative;
  margin: 0;
  padding: 0.9rem 1rem 0.9rem 3.3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0.9rem;
  top: 0.9rem;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.9375rem;
}

/* ---------- Reseñas ---------- */

.review {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 1.25rem;
}

.review__stars {
  color: var(--gold-dark);
  font-size: 1rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.review blockquote {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.review figcaption {
  font-size: 0.875rem;
  color: var(--text-soft);
}

.review figcaption b {
  display: block;
  color: var(--ink);
  font-size: 0.9375rem;
}

.rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.9rem 1.1rem;
  background: var(--ink);
  border-radius: var(--r-card);
  color: var(--paper);
}

.rating__num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.rating p {
  margin: 0;
  font-size: 0.9375rem;
  color: #d6d5cf;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 0.6rem;
}

.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.4rem 1rem;
}

.faq summary {
  cursor: pointer;
  padding: 0.7rem 1.6rem 0.7rem 0;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ink);
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0.55rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-dark);
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details > div {
  padding-bottom: 0.6rem;
}

.faq details > div > p:last-child {
  margin-bottom: 0;
}

/* ---------- Figura ---------- */

figure {
  margin: 0 0 1.25rem;
}

figure img {
  border-radius: var(--r-card);
  border: 1px solid var(--line);
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-soft);
}

.sec--dark figcaption {
  color: #a9a8a2;
}

.sec--dark figure img {
  border-color: var(--ink-3);
}

/* ---------- CTA fija por pantalla ---------- */

.ctabar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  padding: 1.1rem 1.4rem;
  background: var(--gold);
  border-radius: var(--r-card);
}

.ctabar p {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.0625rem;
}

.ctabar span.small {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: #5a4400;
}

.ctabar .btn--primary {
  background: var(--ink);
  color: var(--gold);
  box-shadow: 0 3px 0 #000;
}

.ctabar .btn--primary:hover {
  background: #000;
  color: var(--gold);
}

/* ---------- Pie ---------- */

.foot {
  background: var(--ink);
  color: #b9b7b0;
  padding-block: 2rem 1.25rem;
  font-size: 0.875rem;
}

.foot__top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ink-3);
}

.foot h2 {
  color: var(--paper);
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.foot ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.foot a {
  color: #d6d5cf;
  text-decoration: none;
}

.foot a:hover {
  color: var(--gold);
}

.foot__legal {
  padding-top: 1.25rem;
}

.foot__legal p {
  margin-bottom: 0.6rem;
  max-width: 90ch;
}

.age {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--red);
  color: var(--red);
  font-weight: 800;
  font-size: 0.8125rem;
  flex: 0 0 auto;
}

.foot__age {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .bonus {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .bonus__data {
    justify-content: center;
  }
}

@media (max-width: 860px) {
  .nav__links {
    display: none;
  }

  .nav__cta {
    margin-left: auto;
  }

  .toc ol {
    columns: 1;
  }
}

@media (max-width: 560px) {
  :root {
    --fs-body: 1rem;
  }

  .nav__logo img {
    width: 124px;
    height: 21px;
  }

  .btn--lg {
    width: 100%;
  }

  .ctabar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .ctabar .btn {
    width: 100%;
  }

  .games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game {
    aspect-ratio: 304 / 500;
  }

  .game__body {
    background: linear-gradient(180deg, rgba(16, 16, 16, 0) 12%, rgba(16, 16, 16, 0.9) 42%, rgba(16, 16, 16, 0.97) 100%);
  }

  .game__actions {
    max-height: 120px;
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .nav__cta .btn--ghost {
    display: none;
  }

  .nav__logo img {
    width: 116px;
    height: 20px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
