/* ============================================================
   BrunoRecargas — recargas y gift cards de videojuegos
   palette: slate-indigo · typography: condensed-display
   motion: progress-bar-design · layout: app-landing
   signature: expandable-index · background: layered-gradient
   ============================================================ */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --ink: #131a2b;
  --ink-soft: #2b3550;
  --muted: #5a6580;
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --accent-soft: #e0e7ff;
  --line: #dbe1ee;
  --glow-a: rgba(79, 70, 229, 0.10);
  --glow-b: rgba(14, 165, 233, 0.10);
  --shadow: 0 1px 2px rgba(19, 26, 43, .06), 0 12px 32px -18px rgba(19, 26, 43, .35);
  --radius: 16px;
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b0f1a;
  --surface: #141a28;
  --surface-2: #101623;
  --ink: #eef1f8;
  --ink-soft: #d5dbea;
  --muted: #a3adc4;
  --accent: #8b8cf7;
  --accent-ink: #0b0f1a;
  --accent-soft: #232a4d;
  --line: #26304a;
  --glow-a: rgba(139, 140, 247, 0.16);
  --glow-b: rgba(56, 189, 248, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 40px -22px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0b0f1a;
    --surface: #141a28;
    --surface-2: #101623;
    --ink: #eef1f8;
    --ink-soft: #d5dbea;
    --muted: #a3adc4;
    --accent: #8b8cf7;
    --accent-ink: #0b0f1a;
    --accent-soft: #232a4d;
    --line: #26304a;
    --glow-a: rgba(139, 140, 247, 0.16);
    --glow-b: rgba(56, 189, 248, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 40px -22px rgba(0, 0, 0, .9);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 8% -5%, var(--glow-a) 0, transparent 62%),
    radial-gradient(ellipse 60% 45% at 100% 12%, var(--glow-b) 0, transparent 58%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Barlow', system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); letter-spacing: 0.02em; }
p { margin: 0 0 1rem; max-width: 68ch; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  font-family: 'Barlow', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
}

.ph {
  color: var(--muted);
  border-bottom: 1px dotted currentColor;
  font-style: normal;
}
.ph-link {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 68px;
  padding-block: 0.6rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-right: auto;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  flex: none;
}
.brand-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.brand-name em { font-style: normal; color: var(--accent); }

.site-nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  html:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
html[data-theme="light"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* progress bar as design element: a strip along the header's bottom edge */
.scroll-progress {
  height: 3px;
  background: var(--line);
  overflow: hidden;
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: 'Barlow', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { min-height: 44px; padding: 0.5rem 1.1rem; font-size: 0.95rem; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 104px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy h1 { margin-bottom: 1.1rem; }
.hero-copy .hl {
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 56ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.hero-points {
  list-style: none;
  margin: 1.9rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.hero-points li { display: flex; align-items: center; gap: 0.45rem; }
.hero-points li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.hero-media {
  position: relative;
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3.4;
  background: var(--surface-2);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-badge {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: color-mix(in srgb, #0b0f1a 78%, transparent);
  backdrop-filter: blur(6px);
  color: #f4f6fb;
  display: grid;
  gap: 0.15rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
.hero-badge strong {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
}
.hero-badge span { color: #d7dceb; }

/* ---------- sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-alt {
  background: var(--surface-2);
  border-block: 1px solid var(--line);
}
.section-head { max-width: 62ch; margin-bottom: clamp(32px, 4vw, 56px); }
.section-intro { color: var(--ink-soft); margin-top: 1rem; }

/* ---------- catálogo ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card-top { display: grid; gap: 0.5rem; }
.chip {
  align-self: start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}
.card p { font-size: 0.97rem; color: var(--ink-soft); }
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.card-list li { position: relative; padding-left: 1rem; }
.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.price-line {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  border-bottom: none;
}
.catalog-note {
  margin-top: 1.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- pasos ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  counter-reset: step;
}
.steps li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.step-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.steps p { font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- por qué ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.why-copy h2 { margin-bottom: 1rem; }
.why-copy p { color: var(--ink-soft); }
.checklist {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  font-size: 0.97rem;
}
.checklist li { display: flex; gap: 0.65rem; align-items: flex-start; }
.checklist li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 0.22em;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
}
.why-media {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 4.2;
  background: var(--surface-2);
}
.why-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- faq (signature: expandable index) ---------- */
.faq {
  display: grid;
  gap: 0.75rem;
  max-width: 900px;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 1.25rem;
  transition: border-color .18s ease;
}
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding-block: 0.9rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: 'Barlow', sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  padding-bottom: 1.15rem;
  font-size: 0.97rem;
  color: var(--ink-soft);
}

/* ---------- contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.contact-copy h2 { margin-bottom: 1rem; }
.contact-copy p { color: var(--ink-soft); }
.contact-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  font-size: 0.97rem;
}
.contact-list li { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.contact-key {
  min-width: 92px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.2em;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}
.field { display: grid; gap: 0.4rem; }
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.contact-form .btn { justify-self: start; }
.form-status {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.form-status[data-state="ok"] { color: var(--accent); }
.form-status[data-state="err"] { color: #b42318; }
html[data-theme="dark"] .form-status[data-state="err"] { color: #ff9b8f; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding-block: clamp(40px, 6vw, 64px) 1.5rem;
}
.footer-inner {
  display: grid;
  gap: 1.25rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 46ch;
}
.footer-brand p { font-size: 0.92rem; color: var(--muted); margin: 0; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-size: 0.92rem;
}
.footer-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.35rem;
}
.footer-nav a:hover { color: var(--accent); }
.footer-legal {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.attribution {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}
.attribution a { color: var(--muted); text-decoration: underline; }
.attribution a:hover { color: var(--accent); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .scroll-progress span {
      animation: progressFill linear both;
      animation-timeline: scroll(root block);
    }
    @keyframes progressFill {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
  }

  @supports (animation-timeline: view()) {
    .section-head,
    .card,
    .steps li,
    .faq details,
    .why-copy,
    .why-media,
    .contact-copy,
    .contact-form {
      animation: fadeRise 420ms cubic-bezier(.2, .7, .1, 1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
    @keyframes fadeRise {
      from { opacity: 0; translate: 0 14px; }
      to { opacity: 1; translate: 0 0; }
    }
  }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .site-nav { display: none; }
  .hero-grid,
  .why-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16 / 11; }
  .why-media { aspect-ratio: 16 / 11; order: -1; }
}

@media (max-width: 560px) {
  .header-inner { gap: 0.5rem; }
  .brand-name { font-size: 1.15rem; }
  .header-actions .btn-sm { display: none; }
  .hero-points { flex-direction: column; gap: 0.4rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .contact-key { min-width: 100%; }
}
