/* ==========================================================================
   Metal Live · sitio institucional
   ========================================================================== */

/* Tipografía del sitio: Plus Jakarta Sans (variable, alojada en el proyecto; licencia OFL). */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans.woff2") format("woff2");
}
body.site { --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; background: #fff; font-size: 16px; word-spacing: .06em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgb(11 27 54 / 96%); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(255 255 255 / 6%);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgb(0 0 0 / 25%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { width: 150px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) { color: #c9d6ea; font-weight: 500; font-size: .96rem; position: relative; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current] { color: #fff; text-decoration: none; }
.site-nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--brand); border-radius: 2px; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: .5rem; cursor: pointer; }
.nav-toggle .icon { width: 26px; height: 26px; }

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); padding: .5rem 1rem 1.25rem; border-top: 1px solid rgb(255 255 255 / 8%);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: .85rem .25rem; border-bottom: 1px solid rgb(255 255 255 / 6%); }
  .site-nav a[aria-current]::after { display: none; }
  .site-nav .btn { margin-top: 1rem; }
}

.flash-wrap { padding-top: 1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 80% 30%, rgb(7 148 251 / 28%), transparent 45%),
    linear-gradient(160deg, var(--navy) 0%, #0d2348 60%, #0b1b36 100%);
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(4rem, 8vw, 6.5rem);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7cc4ff;
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.08; letter-spacing: -.025em; margin-bottom: 1.25rem; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { color: #c3d2e8; font-size: clamp(1.02rem, 1.6vw, 1.18rem); max-width: 560px; margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-border: rgb(255 255 255 / 35%); }
.btn-outline-light:hover { background: rgb(255 255 255 / 8%); }

/* Composición de círculos inspirada en el logo */
.hero-art { position: relative; aspect-ratio: 1; max-width: 460px; justify-self: center; width: 100%; }
.hero-art span { position: absolute; border-radius: 50%; background: var(--brand); }
.hero-art .c0 { inset: 22% 22%; box-shadow: 0 30px 80px rgb(7 148 251 / 45%); background: radial-gradient(circle at 35% 30%, #3db0ff, var(--brand) 55%, #0670c4); }
.hero-art .c1 { width: 19%; height: 19%; left: 2%; top: 14%; }
.hero-art .c2 { width: 15%; height: 15%; left: 0; top: 44%; }
.hero-art .c3 { width: 8%; height: 8%; left: 12%; top: 66%; }
.hero-art .c4 { width: 14%; height: 14%; left: 24%; top: 78%; }
.hero-art .c5 { width: 11%; height: 11%; left: 46%; top: 82%; }
.hero-art .c6 { width: 17%; height: 17%; right: 4%; top: 68%; }
.hero-art .c7 { width: 12%; height: 12%; right: 2%; top: 46%; }
.hero-art .c8 { width: 14%; height: 14%; right: 6%; top: 22%; }
.hero-art .c9 { width: 11%; height: 11%; right: 20%; top: 6%; }
.hero-art span:not(.c0) { animation: float 7s ease-in-out infinite; opacity: .95; }
.hero-art span:nth-child(odd):not(.c0) { animation-duration: 9s; animation-delay: -2s; }
@keyframes float { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .hero-art span { animation: none !important; } }

.hero-badges { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 2.75rem; padding-top: 1.75rem; border-top: 1px solid rgb(255 255 255 / 10%); }
.hero-badges div { display: grid; }
.hero-badges strong { font-size: 1.6rem; font-weight: 800; }
.hero-badges span { color: #9fb3d1; font-size: .88rem; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 300px; order: -1; }
}

/* ---------- Secciones ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--bg); }
.section-head { max-width: 680px; margin-bottom: 2.75rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.02em; }
.section-head p { color: var(--ink-2); font-size: 1.06rem; }
.section-head .eyebrow { color: var(--brand-600); }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.feature {
  position: relative; padding: 1.75rem; border-radius: var(--radius-lg); background: #fff;
  border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.feature-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin-bottom: 1.1rem;
  background: var(--brand-50); color: var(--brand-600);
}
.feature-icon .icon { width: 26px; height: 26px; }
.feature h3 { font-size: 1.12rem; margin-bottom: .4rem; }
.feature p { color: var(--ink-2); font-size: .96rem; margin: 0; }
.feature ul { margin: .85rem 0 0; padding-left: 1.1rem; color: var(--ink-2); font-size: .93rem; }
.feature ul li { margin-bottom: .2rem; }

/* Proceso */
.process { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); counter-reset: step; list-style: none; padding: 0; margin: 0; }
.process li {
  counter-increment: step; position: relative; padding: 1.5rem 1.25rem 1.25rem; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line);
}
.process li::before {
  content: counter(step, decimal-leading-zero); display: block; font-weight: 800; font-size: 1.6rem;
  color: var(--brand); margin-bottom: .5rem; letter-spacing: -.02em;
}
.process h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.process p { margin: 0; color: var(--ink-2); font-size: .93rem; }

/* Bloque destacado */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .85rem; }
.check-list li { display: flex; gap: .75rem; align-items: flex-start; color: var(--ink-2); }
.check-list .icon { color: #fff; background: var(--success); border-radius: 50%; padding: 3px; width: 22px; height: 22px; margin-top: 2px; }
.panel-mock {
  border-radius: 20px; background: var(--navy); padding: 1.25rem; box-shadow: var(--shadow-lg); color: #c9d6ea;
}
.panel-mock .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-radius: 12px; background: rgb(255 255 255 / 5%); margin-bottom: .55rem; font-size: .92rem; }
.panel-mock .row:last-child { margin-bottom: 0; }
.panel-mock strong { color: #fff; }
.panel-mock .pill { padding: .2rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.pill-blue { background: rgb(7 148 251 / 20%); color: #7cc4ff; }
.pill-green { background: rgb(29 158 117 / 22%); color: #6ee7b7; }
.pill-amber { background: rgb(245 158 11 / 20%); color: #fcd34d; }

/* CTA */
.cta-band {
  border-radius: 24px; padding: clamp(2rem, 5vw, 3.5rem); color: #fff;
  background: radial-gradient(circle at 90% 10%, rgb(255 255 255 / 18%), transparent 40%), linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.cta-band h2 { margin: 0 0 .35rem; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.cta-band p { margin: 0; color: #e0f0ff; }

/* Páginas internas */
.page-hero { background: linear-gradient(160deg, var(--navy), #0d2348); color: #fff; padding: clamp(3rem, 6vw, 4.5rem) 0; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: .5rem; }
.page-hero p { color: #c3d2e8; max-width: 640px; font-size: 1.08rem; margin: 0; }
.page-hero { overflow: hidden; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.page-hero-art { width: clamp(140px, 17vw, 210px); max-width: none; margin: -1rem 0; order: 0; }
.page-hero-art .c0 { box-shadow: 0 18px 50px rgb(7 148 251 / 45%); }
@media (max-width: 640px) {
  .page-hero-grid { grid-template-columns: minmax(0, 1fr) 96px; gap: 1rem; align-items: start; }
  .page-hero-art { width: 96px; margin: 0; }
}

.product-line { display: grid; grid-template-columns: 72px 1fr; gap: 1.5rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.product-line:last-child { border-bottom: 0; }
.product-line .feature-icon { width: 72px; height: 72px; border-radius: 18px; }
.product-line .feature-icon .icon { width: 34px; height: 34px; }
.product-line h2 { font-size: 1.4rem; }
.product-line p { color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag { padding: .3rem .75rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
@media (max-width: 600px) { .product-line { grid-template-columns: 1fr; gap: 1rem; } }

/* Grilla de 3 columnas para áreas y valores */
@media (min-width: 900px) { .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Líneas de producto */
.product-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.product-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; padding: 1.4rem; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s;
}
a.product-chip:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.product-chip .feature-icon { margin: 0; }
.product-chip strong { font-size: 1.05rem; }
.product-grid-lg .product-chip { padding: 2rem 1.6rem; }
.product-grid-lg .product-chip .feature-icon { width: 64px; height: 64px; border-radius: 18px; }
.product-grid-lg .product-chip .feature-icon .icon { width: 32px; height: 32px; }
.product-grid-lg .product-chip strong { font-size: 1.2rem; }

.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Preguntas frecuentes */
.faq { display: grid; gap: .85rem; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 1.4rem;
  font-weight: 700; font-size: 1.05rem; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.4rem 1.2rem; color: var(--ink-2); }
.faq details > div p:last-child { margin-bottom: 0; }

/* Redes sociales */
.social-links { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.social-links a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgb(255 255 255 / 8%); color: #fff; transition: background .2s;
}
.social-links a:hover { background: var(--brand); text-decoration: none; }
.social-links .icon { width: 20px; height: 20px; }
.footer-grid .social-links, .contact-card .social-links { display: flex; }
.contact-card .social-links .icon { color: #fff; margin: 0; }
.contact-card-sub { margin-top: 2rem; }

/* ---------- Implantes de fondo (ilustraciones en partials/implants.php) ---------- */
.has-implants { position: relative; overflow: hidden; isolation: isolate; }
.implant-layer { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.implant { position: absolute; display: block; height: auto; color: var(--brand); opacity: .08; overflow: visible;
  transform: rotate(var(--r, 0deg)); animation: implant-drift var(--t, 24s) ease-in-out infinite alternate; }
.implant-screw { aspect-ratio: 40 / 160; }
.implant-plate { aspect-ratio: 200 / 44; }
.implant-hip { aspect-ratio: 120 / 200; }
.implant-knee { aspect-ratio: 140 / 160; }
.implant-pedicle { aspect-ratio: 70 / 170; }
.implant-nail { aspect-ratio: 40 / 240; }
.implant-anchor { aspect-ratio: 60 / 130; }
@keyframes implant-drift {
  from { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); }
  to { transform: translate3d(var(--dx, 10px), var(--dy, -16px), 0) rotate(calc(var(--r, 0deg) + var(--dr, 5deg))); }
}

/* Hero (fondo oscuro) */
.hero .implant { color: #7cc4ff; opacity: .13; }
.imp-hero-screw { width: 44px; left: 46%; top: 9%; --r: 18deg; --t: 20s; }
.imp-hero-plate { width: 250px; left: 30%; bottom: 5%; --r: -7deg; --t: 28s; --dx: -14px; --dy: 8px; }
.imp-hero-nail { width: 30px; right: 3%; top: 6%; --r: -24deg; --t: 32s; --dr: -4deg; }

/* Guiados por la excelencia */
.imp-team-hip { width: 150px; right: -10px; top: 50px; --r: 14deg; --t: 26s; }
.imp-team-pedicle { width: 68px; left: 1%; bottom: 40px; --r: -16deg; --t: 22s; --dx: 8px; }

/* La confianza que necesitás */
.imp-trust-knee { width: 170px; left: 2%; top: 40px; --r: -10deg; --t: 30s; }
.imp-trust-screw { width: 42px; right: 8%; top: 56px; --r: 26deg; --t: 21s; --dx: -8px; }
.imp-trust-plate { width: 220px; right: 3%; bottom: 36px; --r: 9deg; --t: 27s; --dy: 10px; }

/* Cierre (fondo azul) */
.cta-band .implant { color: #fff; opacity: .16; }
.imp-cta-nail { width: 26px; right: 36%; top: -60px; --r: 62deg; --t: 30s; }
.imp-cta-anchor { width: 48px; right: 3%; bottom: -26px; --r: -22deg; --t: 24s; }

/* Detalle en las tarjetas de producto */
.product-chip { position: relative; overflow: hidden; isolation: isolate; }
.chip-implant { z-index: -1; right: -6px; bottom: -18px; width: auto; height: 118%; opacity: .1; --r: 16deg;
  animation: none; transition: transform .5s ease, opacity .3s ease; }
.chip-implant-plate { height: auto; width: 88%; right: -34px; bottom: 6px; --r: -24deg; }
.chip-implant-hip, .chip-implant-knee { height: 125%; right: -18px; }
a.product-chip:hover .chip-implant { opacity: .2; transform: translateY(-6px) rotate(calc(var(--r) - 8deg)); }

@media (max-width: 760px) {
  .imp-wide { display: none; }
  .imp-hero-screw { left: auto; right: 8%; top: auto; bottom: 6%; }
  .imp-hero-plate { width: 170px; left: -40px; }
  .imp-team-hip { width: 110px; top: 20px; }
  .imp-trust-knee { width: 120px; }
}
@media (prefers-reduced-motion: reduce) { .implant { animation: none; } }

/* Mapa de Contacto */
.map-embed { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--bg); aspect-ratio: 16 / 7; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) { .map-embed { aspect-ratio: 4 / 5; } }

/* Texto largo (Nosotros) */
.values.values-stack { grid-template-columns: 1fr; }
.prose p { color: var(--ink-2); }
.prose blockquote {
  margin: 2rem 0 0; padding: 1.25rem 1.5rem; border-left: 4px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--brand-50); color: var(--navy); font-size: 1.15rem; font-weight: 700;
}

.values { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.value { padding: 1.5rem; border-left: 3px solid var(--brand); background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; }
.value h3 { font-size: 1.05rem; }
.value p { margin: 0; color: var(--ink-2); font-size: .95rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { padding: 2rem; border-radius: var(--radius-lg); background: var(--navy); color: #c9d6ea; }
.contact-card h2 { color: #fff; font-size: 1.3rem; }
.contact-card ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.1rem; }
.contact-card li { display: flex; gap: .8rem; align-items: flex-start; }
.contact-card .icon { color: var(--brand); width: 22px; height: 22px; margin-top: 2px; }
.contact-card a { color: #fff; }
.form-card { padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.delivery-box { margin: 3rem auto; }
.delivery-box .form-card h1 { font-size: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #9fb3d1; padding: 3.5rem 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-grid img { width: 150px; margin-bottom: 1rem; }
.footer-grid h2 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-grid a { color: #c9d6ea; }
.contact-list li { display: flex; gap: .6rem; align-items: flex-start; }
.contact-list .icon { color: var(--brand); margin-top: 3px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 1.25rem 0; border-top: 1px solid rgb(255 255 255 / 8%); font-size: .85rem; }
.footer-bottom a { color: #fff; font-weight: 600; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 10px 25px rgb(0 0 0 / 22%);
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float .icon { width: 28px; height: 28px; }

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem 1.5rem; margin: 1rem 0 0; }
.dl dt { font-size: .76rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dl dd { margin: 0; font-weight: 500; }
