/* ═══════════════════════════════════════════════════════
   TuChapa.uy — UI/UX refined stylesheet
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  --bg:       #09090f;
  --surface:  #12121f;
  --card:     #1a1a2e;
  --accent:   #4361ee;
  --accent2:  #8b9cf4;
  --green:    #22c55e;
  --chrome:   #c8d0e0;
  --muted:    #6b7280;
  --white:    #f1f5f9;
  --border:   rgba(255,255,255,.08);
  --radius:   14px;
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Keyframes ───────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes shimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(67,97,238,.4); }
  70%  { box-shadow: 0 0 0 10px rgba(67,97,238,0); }
  100% { box-shadow: 0 0 0 0 rgba(67,97,238,0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes checkPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Scroll animations ───────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* Stagger delays for grid children */
.features .f-card:nth-child(1) { transition-delay: .0s; }
.features .f-card:nth-child(2) { transition-delay: .1s; }
.features .f-card:nth-child(3) { transition-delay: .2s; }
.features .f-card:nth-child(4) { transition-delay: .3s; }
.steps .step:nth-child(1) { transition-delay: .0s; }
.steps .step:nth-child(2) { transition-delay: .15s; }
.steps .step:nth-child(3) { transition-delay: .3s; }

/* ── Nav ─────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(9,9,15,.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: .9rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
}
.logo      { font-size: 1.15rem; font-weight: 800; letter-spacing: 2px; color: var(--chrome); }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 1.8rem; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-size: .88rem; font-weight: 500;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s var(--ease);
  border-radius: 2px;
}
.nav-links a:hover       { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

/* ── Hamburger ───────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 6px;
  border-radius: 8px;
  transition: background .2s;
}
.hamburger:hover { background: rgba(255,255,255,.06); }
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--chrome);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu ─────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 57px; left: 0; right: 0;
  background: rgba(9,9,15,.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: .8rem 1.5rem 1.2rem;
  gap: 0;
  z-index: 99;
  animation: slideDown .25s var(--ease) forwards;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--chrome);
  text-decoration: none;
  font-size: 1rem; font-weight: 600;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s, padding-left .2s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--white); padding-left: .5rem; }

/* ── Trust bar ───────────────────────────────────────── */
.trust-bar {
  background: rgba(67,97,238,.05);
  border-bottom: 1px solid rgba(67,97,238,.12);
  padding: .75rem 2rem;
  display: flex; justify-content: center;
  align-items: center; gap: 2rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 500;
  color: var(--chrome); white-space: nowrap;
}
.trust-icon { font-size: .9rem; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 7rem 2rem 4rem;
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgba(67,97,238,.2) 0%, transparent 65%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(67,97,238,.06) 0%, transparent 60%),
    linear-gradient(160deg, #09090f 0%, #12121f 100%);
}
.hero-content { max-width: 660px; animation: fadeUp .8s var(--ease) both; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(67,97,238,.12);
  border: 1px solid rgba(67,97,238,.35);
  color: var(--accent2);
  padding: .3rem 1rem; border-radius: 50px;
  font-size: .73rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-badge::before { content: '●'; font-size: .5rem; animation: pulse-ring 2s infinite; }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 900; line-height: 1.05; margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #4361ee 0%, #8b9cf4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem; color: var(--muted);
  line-height: 1.7; margin-bottom: 2.5rem;
  font-weight: 400; letter-spacing: -0.01em;
}
.hero p strong {
  color: var(--chrome);
  font-weight: 600;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent); color: #fff;
  padding: .95rem 2.4rem; border-radius: 10px;
  text-decoration: none; font-weight: 700; font-size: 1rem;
  box-shadow: 0 4px 24px rgba(67,97,238,.45), 0 1px 0 rgba(255,255,255,.15) inset;
  transition: all .25s var(--ease);
  position: relative; overflow: hidden;
}
.hero-cta::after {
  content: '';
  position: absolute; top: -50%; left: -100%;
  width: 60%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: skewX(-20deg);
  animation: shimmer 3.5s ease-in-out infinite;
}
.hero-cta:hover {
  background: #3451d1;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(67,97,238,.55);
}
.hero-cta .cta-arrow { transition: transform .25s var(--ease); }
.hero-cta:hover .cta-arrow { transform: translateX(4px); }

.hero-plate {
  margin: 2.5rem auto;
  max-width: 480px;
  filter: drop-shadow(0 16px 48px rgba(50,100,240,.35));
  animation: float 6s ease-in-out infinite;
}

/* ── Sections ────────────────────────────────────────── */
section      { padding: 5rem 2rem; }
.container   { max-width: 980px; margin: 0 auto; }
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800; text-align: center; margin-bottom: .7rem;
  letter-spacing: -.02em;
}
.section-sub {
  text-align: center; color: var(--muted);
  font-size: .95rem; line-height: 1.75; margin-bottom: 3rem;
  max-width: 460px; margin-left: auto; margin-right: auto;
  font-weight: 400;
}

/* ── Features ────────────────────────────────────────── */
#producto  { background: var(--surface); }
.features  { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.2rem; }
.f-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
  cursor: default;
}
.f-card:hover {
  border-color: rgba(67,97,238,.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.f-icon { font-size: 1.8rem; margin-bottom: .9rem; }
.f-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .4rem; }
.f-card p  { color: var(--muted); font-size: .85rem; line-height: 1.65; }

/* ── Steps ───────────────────────────────────────────── */
#como-funciona { background: var(--bg); }
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 27px; left: calc(16.66% + 16px); right: calc(16.66% + 16px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(67,97,238,.2) 100%);
  border-radius: 2px;
}
.step  { text-align: center; padding: 1.5rem 1rem; }
.step-n {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(67,97,238,.1); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; color: var(--accent);
  margin: 0 auto 1rem;
  transition: background .3s, transform .3s var(--ease);
  position: relative; z-index: 1;
}
.step:hover .step-n {
  background: rgba(67,97,238,.2);
  transform: scale(1.1);
}
.step h3 { font-size: .95rem; font-weight: 700; margin-bottom: .4rem; }
.step p  { color: var(--muted); font-size: .85rem; line-height: 1.6; }

/* ── Customizer ──────────────────────────────────────── */
#personalizar { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.customizer-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2.5rem; align-items: start;
}

/* ── Form panel ──────────────────────────────────────── */
.form-panel {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 2rem;
  backdrop-filter: blur(10px);
}

/* Form progress */
.form-progress {
  display: flex; align-items: center;
  margin-bottom: 2rem;
}
.fp-step {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  flex: 0 0 auto;
}
.fp-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 2px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: var(--muted);
  transition: all .4s var(--ease);
}
.fp-label {
  font-size: .65rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .8px;
  transition: color .3s;
}
.fp-step.active .fp-dot  { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 16px rgba(67,97,238,.5); }
.fp-step.active .fp-label { color: var(--accent2); }
.fp-step.done   .fp-dot  { background: var(--green); border-color: var(--green); color: #fff; }
.fp-step.done   .fp-label { color: var(--green); }
.fp-step.done   .fp-dot::after { content: '✓'; font-size: .7rem; animation: checkPop .3s var(--ease); }
.fp-step.done   .fp-dot-num { display: none; }

.fp-track {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  margin: 0 .4rem;
  margin-bottom: 1.2rem;
  overflow: hidden;
  position: relative;
}
.fp-track::after {
  content: '';
  position: absolute; top: 0; left: 0;
  height: 100%; width: 0;
  background: var(--green);
  transition: width .5s var(--ease);
  border-radius: 2px;
}
.fp-track.done::after { width: 100%; }

.form-lbl {
  display: block; font-size: .72rem; font-weight: 700; color: var(--chrome);
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: .5rem;
}
.form-input {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: .85rem 1rem;
  color: var(--white); font-size: 1rem; font-family: 'Inter', inherit;
  font-weight: 500;
  outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.form-input::placeholder { color: rgba(255,255,255,.25); font-weight: 400; }
.form-input:focus {
  border-color: var(--accent);
  background: rgba(67,97,238,.06);
  box-shadow: 0 0 0 3px rgba(67,97,238,.15);
}
.form-input.filled {
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.04);
}
.form-input.filled:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}

.char-row   { display: flex; justify-content: space-between; margin-top: .4rem; font-size: .75rem; }
.char-hint  { color: var(--muted); }
#charCount  { color: var(--accent); font-weight: 700; }
#charCount.warn  { color: #f59e0b; }
#charCount.limit { color: #ef4444; }

/* ── Shipping section (progressive reveal) ───────────── */
.shipping-section {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height .55s var(--ease),
    opacity    .4s  ease,
    margin-top .4s  ease,
    padding-top .4s ease;
  margin-top: 0;
  padding-top: 0;
}
.shipping-section.open {
  max-height: 900px;
  opacity: 1;
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.shipping-title {
  font-size: .72rem; font-weight: 700; color: var(--chrome);
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: .9rem;
}
/* ── Shipping form fields ────────────────────────────────── */
.ship-fields     { display: grid; gap: .55rem; }
.ship-row        { display: grid; grid-template-columns: 2fr 1fr; gap: .55rem; }
.ship-row--half  { grid-template-columns: 1fr 1fr; }

/* Styled <select> — matches form-input visually */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 7px;
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-select option       { background: #1a1a2e; color: var(--white); }
.form-select optgroup     { color: var(--accent2); font-weight: 700; font-size: .8rem; }

/* Localidad progressive reveal */
.localidad-wrap {
  overflow: hidden;
  max-height: 0; opacity: 0;
  transition: max-height .4s var(--ease), opacity .3s ease, margin-top .3s ease;
  margin-top: 0;
}
.localidad-wrap.open {
  max-height: 70px; opacity: 1; margin-top: 0;
}


/* ── Price box ───────────────────────────────────────── */
.price-box {
  margin-top: 1.6rem; padding: 1.3rem 1.5rem;
  background: rgba(67,97,238,.08);
  border: 1px solid rgba(67,97,238,.25);
  border-radius: 14px;
  transition: border-color .3s, background .3s;
}
.price-box.updated {
  border-color: rgba(67,97,238,.5);
  background: rgba(67,97,238,.14);
}
.price-row-item  { display: flex; justify-content: space-between; align-items: center; padding: .22rem 0; }
.price-lbl       { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; font-weight: 500; }
.price-val-sm    { font-size: .95rem; font-weight: 600; color: var(--white); }
.price-divider   { border-top: 1px solid rgba(255,255,255,.1); margin: .6rem 0; }
.price-total-lbl { font-size: .75rem; font-weight: 700; color: var(--chrome); text-transform: uppercase; letter-spacing: .8px; }
.price-val       { font-size: 2rem; font-weight: 900; color: var(--white); letter-spacing: -.02em; transition: all .3s var(--ease); }
.price-note      { font-size: .73rem; color: var(--muted); margin-top: .45rem; }

/* ── Checkout / MP ───────────────────────────────────── */
#mp-container  { margin-top: 1.3rem; min-height: 56px; }
#checkout-hint {
  text-align: center; color: var(--muted);
  font-size: .83rem; margin-top: 1.1rem;
  line-height: 1.6; font-weight: 400;
}
.loading-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: .65rem; padding: .9rem; color: var(--muted); font-size: .83rem;
}
.spinner {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .65s linear infinite;
}
.error-msg {
  text-align: center; color: #ef4444;
  font-size: .83rem; padding: .8rem 0;
}

/* ── Preview panel ───────────────────────────────────── */
.preview-panel { position: sticky; top: 90px; }
.preview-lbl   {
  text-align: center; font-size: .7rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1rem;
  font-weight: 600;
}
.preview-note {
  text-align: center; color: var(--muted);
  font-size: .78rem; margin-top: 1.1rem; line-height: 1.6;
}
.plate-stage { display: flex; justify-content: center; }
.plate-svg   {
  width: 100%; max-width: 620px; height: auto;
  filter: drop-shadow(0 8px 32px rgba(30,80,200,.25));
  transition: filter .4s;
}
.plate-svg:hover { filter: drop-shadow(0 12px 40px rgba(30,80,200,.4)); }

/* ── Footer ──────────────────────────────────────────── */
footer {
  background: #060609;
  border-top: 1px solid var(--border);
  padding: 2rem; text-align: center;
  color: var(--muted); font-size: .8rem;
}
footer p + p { margin-top: .35rem; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .customizer-grid { grid-template-columns: 1fr; }
  .nav-links       { display: none; }
  .hamburger       { display: flex; }
  .steps           { grid-template-columns: 1fr; gap: 1rem; }
  .steps::before   { display: none; }
  .trust-bar       { gap: 1rem; padding: .7rem 1rem; }
  .form-panel      { padding: 1.5rem; }
  .hero h1         { font-size: 2.6rem; }
  .preview-panel   { position: static; margin-top: 2rem; }
}

@media (max-width: 480px) {
  nav  { padding: .75rem 1.25rem; }
  .hero { padding: 6rem 1.25rem 3rem; }
  section { padding: 3.5rem 1.25rem; }
  .trust-bar { gap: .75rem; }
  .trust-item span:last-child { display: none; }
}

/* ── Gallery ─────────────────────────────────────────── */
#galeria { background: var(--bg); padding-top: 4rem; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.g-item {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); aspect-ratio: 4 / 5;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.g-item:hover img { transform: scale(1.04); }
@media (max-width: 768px) {
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: .8rem; padding-bottom: .5rem; -webkit-overflow-scrolling: touch; }
  .g-item { flex: 0 0 78%; scroll-snap-align: center; }
}

/* ── Specs ───────────────────────────────────────────── */
#especificaciones { background: var(--surface); }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.spec {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: .35rem;
}
.spec-k { font-size: .7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent2); }
.spec-v { font-size: 1rem; font-weight: 600; line-height: 1.5; }

/* ── Example chips ───────────────────────────────────── */
.examples { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; margin: -1.5rem auto 2.5rem; }
.examples-lbl { color: var(--muted); font-size: .85rem; }
.chip {
  background: var(--card); color: var(--chrome); border: 1px solid var(--border);
  border-radius: 999px; padding: .45rem 1rem; font: 700 .78rem/1 inherit; letter-spacing: 1px; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.chip:hover { border-color: var(--accent); background: rgba(67,97,238,.12); transform: translateY(-1px); }
