/* ==========================================================================
   Trututum — hoja de estilos principal
   Paleta: carnaval/show — no casino clásico
   ========================================================================== */

:root {
  --primary: #C81E3A;
  --primary-dark: #a4172f;
  --gold: #E8A93B;
  --gold-dark: #c98f28;
  --purple: #3B1F44;
  --purple-light: #542a61;
  --cream: #FBF3E7;
  --text: #2A1A1D;
  --text-soft: #5b4650;
  --white: #ffffff;
  --border: #ecdfcf;
  --shadow: 0 10px 30px rgba(59, 31, 68, 0.12);
  --radius: 16px;
  --font-display: "Bungee", system-ui, sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--primary); text-decoration-thickness: 2px; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, .logo {
  font-family: var(--font-display);
  line-height: 1.25;
  font-weight: 400;
  color: var(--purple);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 2.5rem; }
h3 { font-size: 1.1rem; color: var(--primary); }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--purple);
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--purple);
  border-bottom: 3px solid var(--gold);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
}

.logo {
  color: var(--white);
  font-size: 1.4rem;
  text-decoration: none;
  letter-spacing: 0.5px;
}
.logo span { color: var(--gold); }

.main-nav {
  display: flex;
  gap: 1.75rem;
}
.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 3px;
  width: 24px;
  background: var(--white);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 15% 20%, var(--purple-light), var(--purple) 55%),
              var(--purple);
  color: var(--white);
  text-align: center;
  padding: 4.5rem 1.25rem 5rem;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
}
.hero::before {
  width: 14px; height: 14px;
  background: var(--gold);
  top: 18%; left: 12%;
  box-shadow:
    120px 40px 0 -2px var(--primary),
    240px -10px 0 -4px var(--gold),
    340px 60px 0 -3px var(--white),
    60px 140px 0 -5px var(--gold),
    480px 20px 0 -3px var(--primary),
    600px 90px 0 -4px var(--gold),
    760px -10px 0 -2px var(--white),
    880px 70px 0 -5px var(--primary);
}
.hero::after {
  width: 10px; height: 10px;
  background: var(--primary);
  bottom: 12%; right: 15%;
  box-shadow:
    -100px -30px 0 -2px var(--gold),
    -220px 20px 0 -3px var(--white),
    -340px -20px 0 -4px var(--primary),
    -60px 60px 0 -3px var(--gold);
}

.hero-inner { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; }

.hero .eyebrow {
  display: inline-block;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.hero h1 { color: var(--white); margin: 0 0 1rem; }
.hero p.lead { font-size: 1.15rem; color: #eee0e8; margin-bottom: 2rem; }

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  text-decoration: none;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--gold);
  color: var(--purple);
  box-shadow: 0 8px 20px rgba(232, 169, 59, 0.35);
}
.btn-primary:hover { background: #f2ba52; color: var(--purple); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); color: var(--white); }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: 3.5rem 0; }
.section-narrow { max-width: 780px; margin: 0 auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head p { color: var(--text-soft); }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

/* Category cards */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
}
.cat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.15s ease;
  border: 1px solid var(--border);
}
.cat-card:hover { transform: translateY(-4px); }
.cat-icon {
  width: 48px; height: 48px;
  color: var(--primary);
}
.cat-card h3 { margin: 0; color: var(--purple); }
.cat-card p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }
.cat-card .see-more { color: var(--primary); font-weight: 800; font-size: 0.9rem; margin-top: auto; }

/* Category page full sections */
.cat-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1.75rem;
  border-left: 5px solid var(--primary);
  scroll-margin-top: 90px;
}
.cat-section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.cat-section-head .cat-icon { flex-shrink: 0; }
.cat-section-head h2 { margin: 0; }
.cat-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
}
.cat-toc a {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--purple);
}
.cat-toc a:hover { background: var(--gold); color: var(--purple); border-color: var(--gold); }

/* FAQ */
.faq-list { max-width: 780px; margin: 0 auto; }
details.faq-item {
  background: var(--white);
  border-radius: 12px;
  margin-bottom: 0.9rem;
  padding: 1rem 1.4rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
details.faq-item summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--purple);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 1.3rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
}
details.faq-item[open] summary::after { transform: rotate(45deg); }
details.faq-item .faq-content { margin-top: 0.75rem; }
details.faq-item .faq-content p { margin: 0; color: var(--text-soft); }

@media (prefers-reduced-motion: reduce) {
  details.faq-item summary::after { transition: none; }
}

/* Banners / notices */
.banner {
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 2rem 0;
}
.banner-badge {
  flex-shrink: 0;
  font-family: var(--font-display);
  background: var(--purple);
  color: var(--gold);
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.banner p { margin: 0; }
.banner-age {
  background: var(--purple);
  color: var(--white);
}
.banner-age p { color: #f1e3ea; }
.banner-warning {
  background: #fbeadb;
  border: 1px solid var(--gold);
}
.banner-legal {
  background: #fbeadb;
  border: 1px solid var(--gold);
}

/* Generic content boxes */
.box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 2rem;
  margin: 1.5rem 0;
}
ul.plain, ol.plain { padding-left: 1.25rem; }
ul.plain li, ol.plain li { margin-bottom: 0.5rem; }

.help-lines { list-style: none; padding: 0; margin: 0; }
.help-lines li {
  background: var(--cream);
  border: 1px dashed var(--gold);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: var(--purple);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--purple);
  color: #e9dee3;
  padding: 3rem 0 2rem;
}
.footer-inner { display: grid; gap: 1.5rem; }
.footer-brand p { margin: 0.4rem 0 0; color: #cdb9c6; max-width: 360px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-nav a { color: #f1e3ea; text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--gold); }
.footer-disclaimer { font-size: 0.85rem; color: #cdb9c6; max-width: 780px; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.25rem; }
.footer-copy { font-size: 0.8rem; color: #9c8494; margin: 0; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
  z-index: 90;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--primary-dark); }
.back-to-top svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}

/* ---------- 404 ---------- */
.error-page {
  text-align: center;
  padding: 5rem 1.25rem;
}
.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 7rem);
  color: var(--primary);
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--purple);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    border-bottom: 3px solid var(--gold);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.9rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .nav-toggle { display: flex; }
}
