/* ============================================================
   Piezas — Landing Page Styles
   Completamente independiente del juego. No reutiliza ningún
   recurso ni clase del proyecto React/Vite.
   ============================================================ */

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Paleta Piezas — mismos valores que el juego, definidos aquí de forma autónoma */
  --bg:       #FAF7F2;
  --surface:  #F0E8D8;
  --ink:      #2C2416;
  --wood:     #6B5C3E;
  --amber:    #C17B3A;
  --amber-l:  #D4894A;
  --stone:    #9C8E7A;
  --border:   #DDD4C0;
  --shadow:   rgba(44, 36, 22, 0.12);
  --white:    #FFFFFF;

  /* Tipografía */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Escala */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;
  --text-5xl:  3.75rem;

  /* Espaciado */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* Radios */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full: 9999px;

  /* Ancho contenedor */
  --max-w: 1100px;
  --max-w-text: 620px;
}

html {
  scroll-behavior: smooth;
  /* Compensa la altura de la cabecera sticky en los saltos de ancla */
  scroll-padding-top: 72px;
}

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

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---- Utilidades ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--ink);
}

.nav-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
}

/* ---- Botones ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 14px 28px;
  background: var(--amber);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  border-radius: var(--r-full);
  border: none;
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease, box-shadow 150ms ease;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background: var(--amber-l);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(193, 123, 58, 0.3);
}
.btn-primary:active { transform: translateY(0); }

.btn-sm { padding: 10px 22px; font-size: var(--text-sm); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 12px 24px;
  background: transparent;
  color: var(--wood);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  border-radius: var(--r-full);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, transform 100ms ease;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); transform: translateY(-1px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: var(--sp-20) 0 var(--sp-16);
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
}

.hero-content { max-width: 520px; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-5);
}

.hero-kicker::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: var(--sp-6);
}

.hero-title em {
  font-style: normal;
  color: var(--amber);
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--wood);
  line-height: 1.7;
  margin-bottom: var(--sp-8);
  max-width: 460px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

/* ---- Badge Google Play ---- */
.badge-google,
.badge-apple {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  transition: transform 120ms ease, box-shadow 150ms ease;
  cursor: pointer;
  border: none;
  min-width: 210px;
}

.badge-google {
  background: #1a1a1a;
  color: var(--white);
  text-decoration: none;
}
.badge-google:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.badge-coming-soon {
  opacity: 0.45;
  cursor: default;
  position: relative;
}
.badge-coming-soon:hover {
  transform: none;
  box-shadow: none;
}

.badge-icon {
  flex-shrink: 0;
}

.badge-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}
.badge-text-top {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  opacity: 0.85;
  line-height: 1;
}
.badge-text-main {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ---- Badge App Store (próximamente) ---- */
.badge-apple {
  background: #1a1a1a;
  color: var(--white);
  opacity: 0.45;
  cursor: default;
  position: relative;
}

.badge-soon-chip {
  position: absolute;
  top: -8px;
  right: -6px;
  background: var(--amber);
  color: var(--white);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.hero-footnote {
  font-size: var(--text-sm);
  color: var(--stone);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.hero-footnote span::before {
  content: '·';
  margin-right: var(--sp-3);
}
.beta-banner {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(193, 123, 58, 0.1);
  border: 1px solid rgba(193, 123, 58, 0.3);
  color: var(--amber);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--r-full);
  transition: background 0.2s;
}
.beta-banner:hover {
  background: rgba(193, 123, 58, 0.18);
}
.beta-dot {
  width: 7px;
  height: 7px;
  background: var(--amber);
  border-radius: 50%;
  animation: pulse-amber 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 0 0 rgba(193, 123, 58, 0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(193, 123, 58, 0); }
}

/* ---- Phone mockup ---- */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse at center, rgba(193, 123, 58, 0.12) 0%, transparent 65%);
  pointer-events: none;
}

.phone-wrap {
  position: relative;
  width: 280px;
  filter: drop-shadow(0 24px 48px rgba(44, 36, 22, 0.22)) drop-shadow(0 6px 12px rgba(44, 36, 22, 0.10));
  animation: floatPhone 4s ease-in-out infinite;
}

@keyframes floatPhone {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section {
  padding: var(--sp-24) 0;
}

.section-alt {
  background: var(--surface);
}

.section-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  line-height: 1.15;
  margin-bottom: var(--sp-4);
}

.section-sub {
  font-size: var(--text-lg);
  color: var(--wood);
  text-align: center;
  line-height: 1.7;
  max-width: var(--max-w-text);
  margin: 0 auto var(--sp-12);
}

/* ============================================================
   FEATURES
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(193, 123, 58, 0.15), rgba(193, 123, 58, 0.06));
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-5);
  color: var(--amber);
}

.feature-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--sp-3);
}

.feature-text {
  font-size: var(--text-base);
  color: var(--wood);
  line-height: 1.65;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(33.33% - 20px);
  right: calc(33.33% - 20px);
  height: 2px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--amber-l) 100%);
  opacity: 0.3;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--sp-6);
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  background: var(--amber);
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-5);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(193, 123, 58, 0.35);
}

.step-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--sp-3);
}

.step-text {
  font-size: var(--text-base);
  color: var(--wood);
  line-height: 1.65;
  max-width: 220px;
}

/* ============================================================
   DIFICULTADES
   ============================================================ */
.diffs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}

.diff-card {
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-5);
  border: 1px solid var(--border);
  background: var(--bg);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 150ms ease;
}

.diff-card:hover { transform: translateY(-3px); }

.diff-card.is-premium {
  background: linear-gradient(135deg, rgba(193, 123, 58, 0.08), rgba(193, 123, 58, 0.02));
  border-color: rgba(193, 123, 58, 0.3);
}

.diff-card.is-premium::before {
  content: 'Premium';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 9px;
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(193, 123, 58, 0.12);
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.diff-pieces {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.diff-name {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--sp-1);
}

.diff-label {
  font-size: var(--text-sm);
  color: var(--stone);
}

/* ============================================================
   CTA FINAL
   ============================================================ */
.cta {
  background: linear-gradient(160deg, var(--ink) 0%, #1e1a14 100%);
  padding: var(--sp-24) 0;
  text-align: center;
}

.cta .section-title {
  color: var(--white);
}

.cta .section-sub {
  color: rgba(255, 255, 255, 0.6);
}

.cta .store-badges {
  justify-content: center;
}

.cta .hero-footnote {
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #1a1611;
  padding: var(--sp-8) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--text-sm);
}

.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  gap: var(--sp-6);
}

.footer-links a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.35);
  transition: color 150ms ease;
}
.footer-links a:hover { color: rgba(255, 255, 255, 0.7); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root {
    --text-4xl: 2.25rem;
    --text-5xl: 2.75rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--sp-10);
  }

  .hero-content { max-width: 100%; }
  .hero-sub { max-width: 100%; }
  .hero-kicker { justify-content: center; }

  .store-badges { justify-content: center; }
  .hero-footnote { justify-content: center; }

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

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

  .steps::before { display: none; }
}

@media (max-width: 640px) {
  :root {
    --text-4xl: 2rem;
    --text-5xl: 2.25rem;
  }

  .nav-inner { height: 56px; }
  .phone-wrap { width: 240px; }

  .hero { padding: var(--sp-12) 0; }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

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

  .section { padding: var(--sp-16) 0; }
  .cta { padding: var(--sp-16) 0; }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
