/* MiratechSpA — Landing page styles (Inicio.html)
   Built on design-system tokens + store/store.css chrome. */

/* ===== Dark header variant (sits on the hero gradient) ===== */
.site-header.hd-dark {
  background: rgba(17, 42, 61, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: saturate(160%) blur(16px);
}
.site-header.hd-dark.scrolled { box-shadow: 0 6px 24px rgba(7, 18, 28, 0.35); }
.site-header.hd-dark .brand img { filter: brightness(0) invert(1); }
.site-header.hd-dark nav.links a { color: var(--slate-300); }
.site-header.hd-dark nav.links a:hover,
.site-header.hd-dark nav.links a.active { color: #fff; }
.site-header.hd-dark nav.links a::after { background: var(--steel-300); }
.site-header.hd-dark .cart-btn { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18); }
.site-header.hd-dark .cart-btn:hover { background: rgba(255, 255, 255, 0.2); }
.site-header.hd-dark .acct-btn { border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.site-header.hd-dark .acct-btn:hover { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.08); color: #fff; }

/* ===== Hero ===== */
/* Landing con hero oscuro: pinta la raíz y el body oscuros para que ni el overscroll
   ni el área bajo el header transparente muestren la franja clara del body. */
html:has(.site-header.hd-dark),
html:has(.site-header.hd-dark) body { background: #0A1B29; }

.hero {
  position: relative;
  background:
    radial-gradient(1000px 560px at 92% -18%, rgba(175, 210, 220, 0.42), transparent 58%),
    radial-gradient(820px 560px at -10% 115%, rgba(79, 137, 174, 0.65), transparent 64%),
    linear-gradient(118deg, #0A1B29 0%, var(--marine-800) 26%, var(--marine-600) 52%, var(--marine-500) 74%, var(--steel-400) 100%);
  color: #fff;
  overflow: hidden;
  margin-top: -74px; /* tuck under the fixed-height sticky header */
  padding-top: 74px;
}
.hero::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(115deg, transparent 38%, rgba(0,0,0,.55) 78%);
  -webkit-mask-image: linear-gradient(115deg, transparent 38%, rgba(0,0,0,.55) 78%);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 60px; align-items: center;
  padding-top: 86px; padding-bottom: 96px;
}
.hero-grid--sin-visual {
  grid-template-columns: 1fr;
}
.hero .eyebrow { color: var(--steel-200); }
.hero .eyebrow::before { background: var(--steel-300); }
.hero h1 {
  color: #fff;
  font-size: clamp(38px, 4.8vw, 58px);
  font-weight: var(--fw-extra);
  letter-spacing: var(--ls-tight);
  line-height: 1.06;
  margin-top: 20px;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--steel-200), var(--steel-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { font-size: var(--fs-md); color: var(--slate-300); max-width: 470px; margin: 22px 0 34px; line-height: var(--lh-relaxed); }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero .btn-light { background: #fff; color: var(--brand-navy); box-shadow: 0 8px 28px rgba(7, 18, 28, 0.4); }
.hero .btn-light:hover { background: var(--slate-100); transform: translateY(-1px); }

.hero-stats { display: flex; gap: 38px; margin-top: 46px; }
.hero-stats .num { font-family: var(--font-mono); font-weight: var(--fw-semibold); font-size: var(--fs-xl); color: #fff; }
.hero-stats .lbl { font-size: var(--fs-xs); color: var(--slate-400); margin-top: 3px; letter-spacing: var(--ls-wide); text-transform: uppercase; }

/* Hero visual — glass tiles */
.hero-visual { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
/* Grilla flexible: 2 columnas por defecto; con 3 destacados, el primero ocupa
   el ancho completo para no dejar hueco; con 1, una sola card ancha. */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; }
.showcase-1 { grid-template-columns: 1fr; }
.showcase-3 .sc-tile:first-child { grid-column: 1 / -1; }

/* Card con imagen a sangre: la foto llena el tile y el texto va integrado abajo
   sobre un degradado que garantiza legibilidad sin importar la imagen. */
.sc-tile {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 1 / 1; border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 14px 34px rgba(7, 18, 28, 0.28);
  transition: transform .4s cubic-bezier(.22,.61,.36,1), box-shadow .4s;
}
.showcase-3 .sc-tile:first-child { aspect-ratio: 16 / 7; }
.sc-tile:hover { transform: translateY(-4px); box-shadow: 0 22px 46px rgba(7, 18, 28, 0.4); }
.sc-tile .sc-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
}
.sc-tile:hover .sc-thumb { transform: scale(1.05); }
/* Placeholder (sin imagen): icono centrado sobre fondo tenue. */
.sc-tile .sc-ph { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.04); }
.sc-tile .sc-ph i { width: 44px; height: 44px; color: var(--steel-300); }
/* Degradado inferior para que el texto blanco siempre se lea. */
.sc-tile::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(7, 18, 28, 0.88) 0%, rgba(7, 18, 28, 0.4) 34%, transparent 62%);
}
.sc-tile .sc-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 16px 18px; }
.sc-tile .t-cat { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--steel-200); text-transform: uppercase; letter-spacing: var(--ls-wide); margin-bottom: 4px; }
.sc-tile .t-name { font-size: var(--fs-md); font-weight: var(--fw-bold); color: #fff; line-height: var(--lh-tight); }
/* Badge de confianza: en flujo normal debajo de los productos, no flotando encima
   (tapaba una card). Píldora sobre vidrio oscuro, integrada al hero. */
.float-badge {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 16px;
  background: rgba(10, 27, 41, 0.55); backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px; padding: 11px 16px;
}
.float-badge .fb-ico { width: 34px; height: 34px; border-radius: 9px; background: rgba(132, 183, 198, 0.18); display: grid; place-items: center; color: var(--steel-200); flex: none; }
.float-badge .fb-ico .lucide, .float-badge .fb-ico i { width: 18px; height: 18px; }
.float-badge .fb-t { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: #fff; }
.float-badge .fb-s { font-size: var(--fs-2xs); color: var(--slate-300); }

/* ===== Section shells ===== */
section.land { padding: 92px 0; }
/* El header es sticky: al saltar a un ancla (#faq, #contacto, #cotizacion) el
   título no debe quedar tapado por él. */
section[id] { scroll-margin-top: 88px; }
.sec-head { max-width: 640px; margin: 0 auto 54px; text-align: center; }
.sec-head.left { margin: 0 0 44px; text-align: left; }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: var(--fw-bold); margin: 14px 0 12px; }
.sec-head p { color: var(--text-muted); font-size: var(--fs-md); }

/* ===== Categories (soft blue gradient bg) ===== */
.cats {
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--marine-50) 60%, var(--steel-50) 100%);
  border-bottom: 1px solid var(--border-subtle);
}
/* Grid flexible: llena en columnas de ~240px y centra la fila cuando hay pocas
   categorías (con 2 no quedan pegadas a la izquierda con un hueco a la derecha). */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 260px)); gap: 20px; justify-content: center; }
.cat-card {
  position: relative; display: block;
  background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: 16px;
  padding: 28px 26px;
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s, border-color .3s;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: 0 16px 38px rgba(17,42,61,.12); border-color: var(--steel-200); }
.cat-card .c-ico {
  width: 52px; height: 52px; border-radius: 13px;
  background: var(--surface-accent-soft); color: var(--steel-600);
  display: grid; place-items: center; margin-bottom: 20px;
  transition: background .3s, color .3s;
}
.cat-card:hover .c-ico { background: var(--brand-navy); color: #fff; }
.cat-card .c-ico .lucide, .cat-card .c-ico i { width: 25px; height: 25px; }
.cat-card h3 { font-size: var(--fs-md); font-weight: var(--fw-bold); margin-bottom: 6px; }
.cat-card p { color: var(--text-muted); font-size: var(--fs-sm); }
.cat-card .c-count { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--steel-600); }
.cat-card .c-count .lucide, .cat-card .c-count i { width: 14px; height: 14px; transition: transform .25s; }
.cat-card:hover .c-count i, .cat-card:hover .c-count .lucide { transform: translateX(4px); }
.cats-cta { display: flex; justify-content: center; margin-top: 40px; }

/* ===== Proveedores del Estado ===== */
.estado {
  position: relative; overflow: hidden;
  background:
    radial-gradient(760px 420px at 110% 10%, rgba(76,139,162,.4), transparent 62%),
    linear-gradient(150deg, var(--marine-900), var(--marine-700));
  color: #fff;
}
.estado-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; position: relative; z-index: 1; }
.estado .eyebrow { color: var(--steel-200); }
.estado .eyebrow::before { background: var(--steel-300); }
.estado h2 { color: #fff; font-size: clamp(28px, 3.4vw, 40px); font-weight: var(--fw-bold); margin: 14px 0 14px; }
.estado p.lead { color: var(--slate-300); font-size: var(--fs-md); line-height: var(--lh-relaxed); max-width: 480px; }
.estado-points { list-style: none; margin: 28px 0 34px; display: grid; gap: 14px; }
.estado-points li { display: flex; gap: 13px; align-items: flex-start; font-size: var(--fs-base); color: var(--slate-200); }
.estado-points li .pt-ico {
  flex: none; width: 26px; height: 26px; border-radius: 8px; margin-top: 1px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  display: grid; place-items: center; color: var(--steel-300);
}
.estado-points li .pt-ico .lucide, .estado-points li .pt-ico i { width: 14px; height: 14px; }
.estado-points li strong { color: #fff; font-weight: var(--fw-semibold); }

/* Credential card — white "certificate" panel on the dark section */
.cred-card {
  background: #fff; border: 1px solid var(--border-subtle);
  border-radius: 20px; padding: 30px;
  box-shadow: 0 30px 70px rgba(7,18,28,.42);
}
.cred-brand { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--border-subtle); }
.cred-brand .mp-hero { height: 52px; width: auto; display: block; flex: none; }
.cred-org { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.cred-org .ch-emblem { width: 40px; height: 40px; border-radius: 10px; flex: none; background: var(--surface-accent-soft); display: grid; place-items: center; }
.cred-org .ch-emblem img { width: 26px; height: 26px; object-fit: contain; }
.cred-org .ch-t { font-size: var(--fs-base); font-weight: var(--fw-bold); color: var(--text-strong); }
.cred-org .ch-s { display: block; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-muted); letter-spacing: var(--ls-wide); text-transform: uppercase; margin-top: 3px; }
.cred-state {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  background: rgba(31,138,90,.1); border: 1px solid rgba(31,138,90,.32); color: #1F8A5B;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap; flex: none;
}
.cred-state .dot { width: 7px; height: 7px; border-radius: 50%; background: #2E9E6B; box-shadow: 0 0 0 3px rgba(46,158,107,.22); }
.cred-rows { display: grid; gap: 0; margin-top: 18px; }
.cred-row { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--border-subtle); }
.cred-row:last-child { border-bottom: none; }
.cred-row .cr-k { font-size: var(--fs-sm); color: var(--text-muted); }
.cred-row .cr-v { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-strong); text-align: right; }
.cred-row .cr-v.mono { font-family: var(--font-mono); font-weight: var(--fw-medium); color: var(--steel-600); }
.cred-foot { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding: 13px 16px; border-radius: 12px; background: var(--surface-accent-soft); border: 1px dashed var(--border-default); font-size: var(--fs-xs); color: var(--text-muted); }
.cred-foot .lucide, .cred-foot i { width: 15px; height: 15px; color: var(--steel-600); flex: none; }

/* ===== Cotización + Contacto ===== */
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.quote-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: 16px;
  padding: 30px; display: flex; flex-direction: column; gap: 4px;
}
/* Sobre la sección oscura de contacto, la card se eleva como la cred-card sobre estado. */
.contact .quote-card { border-color: transparent; box-shadow: 0 24px 60px rgba(5, 15, 24, .5); }
.quote-card h3 {
  display: flex; align-items: center; gap: 12px;
  font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--text-strong);
  margin: 0 0 22px;
}
.quote-card .qc-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: var(--surface-accent-soft); color: var(--steel-600);
  display: grid; place-items: center;
}
.quote-card .qc-ico .lucide, .quote-card .qc-ico i { width: 18px; height: 18px; }
/* align-items:start → si un label ocupa 2 líneas y el vecino 1, cada input arranca
   a su propia altura y no se estira a la celda vecina (misma trampa que en pago.css). */
.quote-card .f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.quote-card .f-field { display: grid; gap: 6px; margin-bottom: 14px; align-content: start; }
.quote-card .f-field:last-of-type { margin-bottom: 18px; }
.quote-card .f-field label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-body); }
.quote-card .f-field label .req { color: var(--danger); }
.quote-card .f-field input, .quote-card .f-field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; font: inherit;
  border: 1.5px solid var(--border-default); background: var(--surface-card); color: var(--text-strong);
  transition: border-color 120ms, box-shadow 120ms;
}
.quote-card .f-field input:focus, .quote-card .f-field textarea:focus {
  outline: none; border-color: var(--focus-ring); box-shadow: 0 0 0 3px rgba(99,157,174,.18);
}
.quote-card .f-field textarea { resize: vertical; min-height: 72px; font-family: inherit; }

/* ===== Why us ===== */
.why { background: linear-gradient(180deg, #fff 0%, var(--marine-50) 100%); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-card {
  padding: 28px 24px; border-radius: 16px;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s;
}
.why-card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(17,42,61,.1); }
.why-card .w-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--surface-accent-soft); color: var(--steel-600); display: grid; place-items: center; margin-bottom: 18px; }
.why-card .w-ico .lucide, .why-card .w-ico i { width: 23px; height: 23px; }
.why-card h3 { font-size: var(--fs-base); font-weight: var(--fw-bold); margin-bottom: 7px; }
.why-card p { color: var(--text-muted); font-size: var(--fs-sm); }

/* ===== Cotización (form único, centrado) ===== */
/* La landing usa header hd-dark → el <body> es navy oscuro. Las secciones claras
   pintan su propio fondo; sin él, se ve el navy y el título oscuro no se lee. */
.quote {
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--marine-50) 100%);
  border-bottom: 1px solid var(--border-subtle);
}
.quote-card--solo { max-width: 720px; margin: 0 auto; }

/* ===== FAQ (sección oscura, alterna con "por qué nosotros" claro de arriba) ===== */
.faq {
  position: relative; overflow: hidden;
  background:
    radial-gradient(680px 400px at -8% 0%, rgba(76,139,162,.34), transparent 60%),
    linear-gradient(160deg, var(--marine-900), var(--marine-700));
}
.faq .sec-head h2 { color: #fff; }
.faq .sec-head p { color: var(--slate-300); }
.faq .eyebrow { color: var(--steel-200); }
.faq .eyebrow::before { background: var(--steel-300); }
.faq-wrap { max-width: 800px; position: relative; z-index: 1; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  background: rgba(255,255,255,.04); overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease;
}
.faq-item[open] { border-color: rgba(132,183,198,.4); background: rgba(255,255,255,.07); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; cursor: pointer; list-style: none;
  font-weight: var(--fw-semibold); font-size: var(--fs-base); color: #fff;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: var(--steel-200); }
.faq-chevron { width: 20px; height: 20px; flex: none; color: var(--slate-400); transition: transform 240ms cubic-bezier(0.23,1,0.32,1); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); color: var(--steel-200); }
.faq-a { padding: 0 22px 20px; color: var(--slate-300); font-size: var(--fs-sm); line-height: var(--lh-relaxed); }
.faq-a p { margin: 0; }
.faq-a a { color: var(--steel-200); text-decoration: underline; }
/* Entrada suave del contenido al abrir (details no anima solo el height). */
.faq-item[open] .faq-a { animation: faqReveal 240ms cubic-bezier(0.23,1,0.32,1); }
@keyframes faqReveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Contacto (sección oscura, encadena con el footer oscuro) ===== */
.contact {
  position: relative; overflow: hidden;
  background:
    radial-gradient(720px 420px at 108% 100%, rgba(76,139,162,.32), transparent 60%),
    linear-gradient(150deg, var(--marine-900), var(--marine-800));
}
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.contact-aside .eyebrow { color: var(--steel-200); }
.contact-aside .eyebrow::before { background: var(--steel-300); }
.contact-aside h2 { color: #fff; font-size: var(--fs-2xl); font-weight: var(--fw-extra); margin: 10px 0 14px; }
.contact-aside .lead { color: var(--slate-300); font-size: var(--fs-md); line-height: var(--lh-relaxed); margin-bottom: 26px; }
.contact-points { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.contact-points li { display: flex; align-items: center; gap: 12px; color: var(--slate-200); font-size: var(--fs-sm); }
.contact-points a { color: var(--slate-200); text-decoration: none; }
.contact-points a:hover { color: #fff; text-decoration: underline; }
.cp-ico { width: 38px; height: 38px; flex: none; border-radius: 10px; background: rgba(132,183,198,.16); color: var(--steel-200); display: grid; place-items: center; }
.cp-ico .lucide, .cp-ico i { width: 18px; height: 18px; }

/* ===== Contenido legal (editor rico) ===== */
.legal-body { color: var(--text-strong); font-size: var(--fs-md); line-height: var(--lh-relaxed); }
.legal-body h2, .legal-body h3 { font-weight: var(--fw-bold); color: var(--text-strong); margin: 28px 0 10px; }
.legal-body h2 { font-size: var(--fs-xl); }
.legal-body h3 { font-size: var(--fs-lg); }
.legal-body p { margin: 0 0 14px; }
.legal-body ul, .legal-body ol { margin: 0 0 14px; padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--marine-700); text-decoration: underline; }
.legal-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
.legal-body th, .legal-body td { border: 1px solid var(--border-subtle); padding: 8px 12px; text-align: left; }

/* ===== Responsive ===== */
@media (max-width: 1040px) {
  /* .cat-grid ya se adapta sola (auto-fill + center), no se fuerza aquí. */
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .estado-grid { grid-template-columns: 1fr; gap: 44px; }
  .quote-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .quote-card .f-row { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 52px; padding-top: 64px; padding-bottom: 76px; }
  .hero-visual { max-width: 460px; }
  section.land { padding: 68px 0; }
}
@media (max-width: 560px) {
  .cat-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .float-badge { left: 0; }
  .showcase { gap: 12px; }
}
