/* ==========================================================================
   Sixachips — hoja de estilos principal
   Mobile-first, custom properties, sin frameworks.
   Tokens según el Brand Book (paleta PANTONE, HEX) y el motivo de la hoja.
   ========================================================================== */

/* 1. Custom properties (tema y tokens de diseño) */
:root {
  /* Paleta oficial (Brand Book, sección 4) */
  --color-green: #009e49;          /* PANTONE 355 C · Verde Hoja */
  --color-lime: #bad80a;           /* PANTONE 382 C · Verde Limón */
  --color-orange: #ff6a13;         /* PANTONE 1585 C · Naranja Cálido */
  --color-black: #2d2926;          /* PANTONE Black C · Negro Neutro */
  --color-white: #ffffff;          /* PANTONE Bright White · Blanco Base */

  /* Tokens derivados */
  --color-bg: var(--color-white);
  --color-surface: var(--color-white);
  --color-text: var(--color-black);
  --color-muted: rgb(45 41 38 / 0.72);
  --color-line: rgb(45 41 38 / 0.12);
  --color-tint: #f7fae2;           /* Verde Limón al 12 % sobre blanco */
  --radius: 14px;
  --shadow: 0 8px 24px rgb(45 41 38 / 0.08);
  --font-body: "Century Gothic", "Avenir Next", Futura, "Trebuchet MS", system-ui, sans-serif;
  --font-script: "Brush Script MT", "Segoe Script", "Lucida Handwriting", cursive;
  --wrap: 68rem;
}

/* 2. Reset ligero */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

ul { padding: 0; list-style: none; }

a { color: inherit; }

/* 3. Utilidades */
.container {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.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-link {
  position: absolute;
  top: -100%;
  left: 0.75rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--color-black);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* 3b. Motivo gráfico: la hoja de plátano (Brand Book, sección 3).
   Se dibuja con una máscara sobre assets/hoja-platano.svg para poder
   pintarla en cada color de variedad. */
.leaf {
  --leaf: var(--color-green);
  position: absolute;
  display: block;
  width: clamp(7rem, 18vw, 13rem);
  aspect-ratio: 300 / 120;
  background-color: var(--leaf);
  -webkit-mask: url("../assets/hoja-platano.svg") center / contain no-repeat;
  mask: url("../assets/hoja-platano.svg") center / contain no-repeat;
  pointer-events: none;
}
.leaf--green { --leaf: var(--color-green); }
.leaf--lime { --leaf: var(--color-lime); }
.leaf--orange { --leaf: var(--color-orange); }

/* 4. Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

/* Logotipo: SIXACHIPS en naranja con "Chips de" en script centrado debajo */
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.brand-main {
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-orange);
}

.brand-script {
  margin-top: 0.15rem;
  font-family: var(--font-script);
  font-size: 1.1rem;
  color: var(--color-green);
}

/* Navegación (menu hamburguesa en móvil) */
.site-nav ul {
  display: flex;
  gap: 1.75rem;
}

.site-nav a {
  text-decoration: none;
  font-weight: 700;
  padding: 0.5rem 0;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  border-bottom-color: var(--color-orange);
}

.nav-toggle {
  display: grid;
  place-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  grid-area: 1 / 1;
  width: 1.3rem;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
}
.nav-toggle-bar::before { transform: translateY(-6px); }
.nav-toggle-bar::after  { transform: translateY(6px); }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(90deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { opacity: 0; }

@media (max-width: 44rem) {
  .nav-toggle { display: grid; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
  }
  .site-nav a { display: block; padding: 0.75rem 0; }
}

@media (min-width: 44.01rem) {
  .nav-toggle { display: none; }
}

/* 5. Hero: fondo blanco, márgenes amplios y hoja en las esquinas superiores */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 5rem;
  text-align: center;
}

.leaf--hero-tl { top: 1.5rem; left: -2.5rem; transform: rotate(-24deg); }
.leaf--hero-tr { top: 1.5rem; right: -2.5rem; transform: rotate(204deg); }

.hero-kicker {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--color-lime);
  color: var(--color-black);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin-inline: auto;
}

.hero h1 em {
  font-style: normal;
  color: var(--color-orange);
}

.hero-lead {
  max-width: 42ch;
  margin: 1.25rem auto 2.25rem;
  color: var(--color-muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.seals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 3rem;
}
.seals li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}
.seals li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-green);
}

/* 6. Botones: naranja para compras, verde para exploración (Brand Book, sección 7) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.85rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s, color 0.15s;
}
.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn:focus-visible {
  outline: 3px solid var(--color-black);
  outline-offset: 3px;
}

/* Compra: Naranja Cálido con texto Negro Neutro (contraste ≈ 6.5:1) */
.btn-primary {
  background: var(--color-orange);
  color: var(--color-black);
}

/* Exploración: Verde Hoja con texto blanco en tamaño grande (≥ 3:1) */
.btn-explore {
  background: var(--color-green);
  color: var(--color-white);
}

/* Secundario neutro */
.btn-outline {
  border-color: var(--color-black);
  color: var(--color-black);
  background: transparent;
}
.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--color-black);
  color: var(--color-white);
}

/* 7. Secciones genéricas */
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.section-lead {
  color: var(--color-muted);
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

/* 8. Products: tarjetas tipo empaque (franja blanca central flanqueada por hojas) */
#productos h2 { margin-top: 0; }

.products-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s;
}
.card:hover { transform: translateY(-4px); }

.pack {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.2rem;
  min-height: 10.5rem;
  padding: 2rem 4rem;
  overflow: hidden;
  text-align: center;
  border-bottom: 1px solid var(--color-line);
}

.pack-brand {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--color-orange);
}

.pack-script {
  font-family: var(--font-script);
  font-size: 1rem;
  line-height: 1.2;
  color: var(--color-green);
}

.pack-variety {
  font-weight: 900;
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-black);
}

.pack .leaf {
  width: 6rem;
  top: 50%;
}
.pack .leaf--side-l { left: -0.9rem; transform: translateY(-50%) rotate(-30deg); }
.pack .leaf--side-r { right: -0.9rem; transform: translateY(-50%) rotate(150deg); }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.4rem 1.5rem 1.6rem;
  flex: 1;
}

.card h3 { font-size: 1.25rem; font-weight: 800; }

.card p { color: var(--color-muted); font-size: 0.95rem; }

.card .card-tag {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--color-lime);
  color: var(--color-black);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* 8b. Banner de dominó (plataforma gratuita) */
.domino-banner {
  background: var(--color-white);
  border-top: 1px solid var(--color-line);
  padding: clamp(3.5rem, 8vw, 5rem) 0;
}

.domino-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
  justify-content: center;
}

.domino-tiles {
  display: flex;
  gap: 0.9rem;
}

.tile {
  display: inline-block;
  width: clamp(2.2rem, 5vw, 2.9rem);
  aspect-ratio: 5 / 10;
  border: 1px solid var(--color-line);
  border-radius: 0.6rem;
  background:
    radial-gradient(circle, var(--color-black) 21%, transparent 22%) 25% 22% / 34% 17% no-repeat border-box,
    radial-gradient(circle, var(--color-black) 21%, transparent 22%) 75% 38% / 34% 17% no-repeat,
    radial-gradient(circle, var(--color-black) 21%, transparent 22%) 45% 78% / 34% 17% no-repeat,
    linear-gradient(to bottom, var(--color-white) 0 47.5%, var(--color-black) 47.5% 52.5%, var(--color-white) 52.5% 100%);
  box-shadow: var(--shadow);
  transform: rotate(-6deg);
}
.tile--b { transform: rotate(5deg); }

.domino-text {
  max-width: 46ch;
}

.domino-text h2 {
  margin-bottom: 0.6rem;
}

.domino-text p {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

/* 9. Nosotros: fondo tinte verde limón y hoja en la esquina */
.section-about {
  position: relative;
  overflow: hidden;
  background: var(--color-tint);
}

.leaf--about { bottom: -1.5rem; right: -3rem; transform: rotate(-20deg); }

.section-about h2 { color: var(--color-green); }

.section-about p {
  position: relative;
  max-width: 60ch;
  margin-top: 1rem;
  color: var(--color-muted);
}

.about-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.about-list li {
  position: relative;
  padding-left: 1.6rem;
  font-weight: 700;
}
.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--color-green);
}

/* 10. Contacto */
.section-contact {
  background: var(--color-tint);
  text-align: center;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 2rem;
}

.contact-note {
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* 11. Footer */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-line);
  text-align: center;
}

.footer-legal,
.footer-note { color: var(--color-muted); font-size: 0.9rem; margin-top: 0.4rem; }

/* 12. Página de reglas (domino.html) */
.rules {
  position: relative;
  max-width: 46rem;
  padding-top: 4rem;
  padding-bottom: 4.5rem;
}

.rules-header {
  position: relative;
  margin-bottom: 2.5rem;
}

.rules-header .leaf--rules { top: -3rem; right: -4rem; transform: rotate(18deg); width: clamp(6rem, 16vw, 9rem); }

.rules-header h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.rules-lead {
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: 1.1rem;
}

.rules-section {
  margin-top: 2.5rem;
  padding: 0;
}

.rules-section h2 {
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
  color: var(--color-green);
}

.rules-list {
  display: grid;
  gap: 0.55rem;
  padding-left: 1.4rem;
  list-style: disc;
}

ol.rules-list { list-style: decimal; }

.rules-list li::marker { color: var(--color-orange); font-weight: 800; }

.rules-list li { padding-left: 0.25rem; }

.rules-cta {
  margin-top: 3.5rem;
  padding: 2.5rem 1.75rem;
  background: var(--color-tint);
  border-radius: var(--radius);
  text-align: center;
}

.rules-cta p {
  max-width: 40ch;
  margin: 0.75rem auto 1.75rem;
  color: var(--color-muted);
}

/* La página de reglas no usa menú hamburguesa: mostrar el enlace siempre */
@media (max-width: 44rem) {
  .site-nav--single {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .site-nav--single ul { padding: 0; }
}

/* 13. Breakpoints para layouts mayores */
@media (min-width: 50rem) {
  .about-list { grid-template-columns: repeat(3, auto); justify-content: start; gap: 0.7rem 2rem; }
  .footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }
  .footer-legal,
  .footer-note { margin-top: 0; }
}
