/* Home only: the six detail pages keep their existing presentation. */
body[data-theme="home"] {
  --home-gutter: clamp(24px, 4.2vw, 80px);
  --home-footer-target: 400px;
  background: #f8f9fa;
  font-weight: 400;
}
body[data-theme="home"] .container {
  width: calc(100% - var(--home-gutter) * 2);
  max-width: 1600px;
}
body[data-theme="home"] h1,
body[data-theme="home"] h2 {
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1.15;
}
body[data-theme="home"] h2 { font-size: 36px; }
body[data-theme="home"] h3 { font-size: 18px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
body[data-theme="home"] .lead { font-size: 16px; line-height: 1.7; }
body[data-theme="home"] .eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; }
body[data-theme="home"] .button {
  justify-content: space-between;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
body[data-theme="home"] .button:hover { transform: none; }
body[data-theme="home"] #site-header { position: sticky; top: 0; z-index: 30; }
body[data-theme="home"] .topbar { display: none; }
body[data-theme="home"] .nav-wrap { background: var(--navy); border: 0; box-shadow: none; }
body[data-theme="home"].has-scrolled .nav-wrap { background: var(--navy-deep); box-shadow: 0 4px 18px #07172f1a; }
body[data-theme="home"] .nav-inner { min-height: 72px; gap: 24px; }
body[data-theme="home"] .brand { width: 164px; }
body[data-theme="home"] .main-nav { gap: 30px; color: white; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; }
body[data-theme="home"] .nav-cta { color: var(--navy-deep) !important; padding: 10px 18px; font-weight: 600; border-radius: 2px; }
body[data-theme="home"] .nav-cta span { color: inherit; margin-left: 18px; }
body[data-theme="home"] .nav-cta:hover { background: white; }
body[data-theme="home"] .solutions-menu ul { color: var(--navy); }
body[data-theme="home"] .solutions-menu li a { font-size: 13px; }
body[data-theme="home"] .menu-toggle { color: white; font-weight: 600; }

body[data-theme="home"] .hero-home,
body[data-theme="home"] .home-intro,
body[data-theme="home"] .solutions-section,
body[data-theme="home"] .cta-band {
  min-height: 100vh;
  min-height: 100svh;
  height: 100vh;
  height: 100svh;
}
body[data-theme="home"] .hero-home { align-items: end; }
body[data-theme="home"] .hero-home::before {
  background: linear-gradient(90deg, rgba(7,23,47,.74), rgba(7,23,47,.35) 44%, rgba(7,23,47,.02) 72%), url("hero-tecnico.jpg") center 42% / cover no-repeat;
}
body[data-theme="home"] .hero-home::after { display: none; }
body[data-theme="home"] .hero-home .container { padding: 100px 0 172px; }
body[data-theme="home"] .hero-home h1 { max-width: 720px; font-size: 40px; margin-bottom: 24px; }
body[data-theme="home"] .hero-home h1 span { white-space: nowrap; }
body[data-theme="home"] .hero-home h1 span + span { color: #ff9a52; }
body[data-theme="home"] .hero-home .lead { max-width: 510px; color: white; }
body[data-theme="home"] .hero-actions { margin-top: 28px; }
body[data-theme="home"] .hero-actions .button { color: var(--navy-deep); }
body[data-theme="home"] .scroll-note { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13px; color: white; }

body[data-theme="home"] .home-intro { display: grid; align-items: center; padding: 76px 0; background: var(--orange); }
body[data-theme="home"] .intro-grid { grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 130px); }
body[data-theme="home"] .intro-visual { min-height: 0; background: none; }
body[data-theme="home"] .intro-visual img { min-height: 0; height: 340px; object-fit: cover; }
body[data-theme="home"] .intro-visual::after { display: none; }
body[data-theme="home"] .intro-logo-visual {
  display: grid;
  place-items: center;
  overflow: visible;
  min-height: 510px;
  perspective: 1200px;
  background: transparent;
  box-shadow: none;
  transform-style: preserve-3d;
}
body[data-theme="home"] .intro-logo-visual img {
  display: block;
  width: min(108%, 700px);
  height: auto;
  object-fit: contain;
  transform-origin: center;
  filter: drop-shadow(0 24px 18px rgba(7, 23, 47, .22));
  animation: intro-logo-float 6s ease-in-out infinite;
  will-change: transform;
}
body[data-theme="home"] .intro-logo-visual::before {
  content: "";
  position: absolute;
  inset: 16% 18%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 80, .72), rgba(255, 127, 0, 0) 68%);
  filter: blur(24px);
  pointer-events: none;
}
body[data-theme="home"] .intro-logo-visual.is-pointer-active img {
  animation: none;
  transition: transform .12s ease-out;
}
@keyframes intro-logo-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(1deg) rotateY(-2deg) rotateZ(-.5deg); }
  50% { transform: translate3d(0, -10px, 0) rotateX(-1deg) rotateY(2deg) rotateZ(.5deg); }
}
body[data-theme="home"] .intro-copy { max-width: 530px; }
body[data-theme="home"] .intro-copy h2 { max-width: 460px; margin-bottom: 26px; }
body[data-theme="home"] .intro-copy .eyebrow { color: var(--navy); margin-bottom: 20px; }
body[data-theme="home"] .intro-copy .eyebrow::before { background: var(--navy); }
body[data-theme="home"] .intro-copy .lead { color: var(--navy-deep); }

body[data-theme="home"] .solutions-section { display: grid; align-items: center; padding: 62px 0 66px; scroll-margin-top: 72px; }
body[data-theme="home"] .solutions-section::before {
  background: linear-gradient(rgba(7,23,47,.40), rgba(7,23,47,.35)), url("7e236308e5410b46bfffbc14b1cb8c7b.jpg") center 58% / cover no-repeat;
}
body[data-theme="home"] .solutions-section > .container { width: 100%; max-width: none; }
body[data-theme="home"] .section-heading { display: block; margin: 0 auto 36px; padding-inline: 24px; text-align: center; }
body[data-theme="home"] .section-heading h2 { max-width: none; margin: 0 0 16px; text-shadow: 0 2px 14px #07172f66; }
body[data-theme="home"] .section-heading h2 span { display: block; }
body[data-theme="home"] .section-heading p { max-width: 570px; margin: 0 auto; color: white; font-size: 16px; line-height: 1.65; text-shadow: 0 1px 6px #07172f; }
body[data-theme="home"] .solutions-grid {
  width: 100%; max-width: none; margin: 0;
  grid-template-columns: repeat(6, minmax(280px, 1fr));
  grid-auto-flow: row; grid-auto-columns: auto;
  gap: 6px; padding: 6px 64px 18px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity; scroll-padding-inline: 64px;
  overscroll-behavior-x: contain;
}
body[data-theme="home"] .solution-card { height: auto; aspect-ratio: 1; min-width: 280px; scroll-snap-align: start; cursor: default; }
body[data-theme="home"] .solution-card-inner { transition: transform 800ms ease-in-out; }
body[data-theme="home"] .solution-card:hover .solution-card-inner,
body[data-theme="home"] .solution-card:focus-within .solution-card-inner { transform: none; }
body[data-theme="home"] .solution-card.is-flipped .solution-card-inner { transform: rotateY(180deg); }
body[data-theme="home"] .solution-card-face { border-radius: 8px; -webkit-backface-visibility: hidden; }
body[data-theme="home"] .solution-card-front { padding: 22px; background: white; box-shadow: 0 4px 12px #07172f12; }
body[data-theme="home"] .solution-icon { width: 32px; height: 32px; padding: 0; margin-bottom: 16px; flex-shrink: 0; background: none; }
body[data-theme="home"] .solution-card h3 { margin: 0 0 10px; }
body[data-theme="home"] .solution-card p { font-size: 14px; line-height: 1.55; margin: 0 0 12px; color: #516075; }
body[data-theme="home"] .card-hint { padding-top: 10px; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 12px; }
body[data-theme="home"] .card-hint span { font-size: 18px; }
body[data-theme="home"] .solution-card-back-content { padding: 22px; }
body[data-theme="home"] .solution-card-back .button { font-size: 12px; color: var(--navy-deep); min-height: 40px; padding: 10px 14px; }
body[data-theme="home"] .card-toggle { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; cursor: pointer; border: 0; border-radius: 8px; background: transparent; color: var(--navy); padding: 0; }
body[data-theme="home"] .card-toggle > span { display: none; }
body[data-theme="home"] .is-flipped .card-toggle { inset: 10px 10px auto auto; width: 36px; height: 36px; border-radius: 50%; background: white; }
body[data-theme="home"] .is-flipped .card-toggle > span { display: block; font-size: 22px; }
body[data-theme="home"] .solution-card:focus-within { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

body[data-theme="home"] .cta-band { display: grid; align-items: center; padding: 66px 0; color: var(--navy); }
body[data-theme="home"] .cta-band {
  min-height: 320px;
  height: calc(100svh - var(--home-footer-target));
}
body[data-theme="home"] .cta-band::after { display: none; }
body[data-theme="home"] .home-contact-layout { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 28px; }
body[data-theme="home"] .cta-band h2 { max-width: 580px; margin: 0 auto; text-align: center; color: var(--navy); }
body[data-theme="home"] .cta-band .button { min-width: 240px; color: white; background: var(--navy); border-color: var(--navy); }
body[data-theme="home"] .cta-band .button:hover { background: white; color: var(--navy); border-color: white; }
body[data-theme="home"] .footer-main { padding: 64px 0 48px; background: #f8f9fa; color: #516075; }
body[data-theme="home"] .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 60px; }
body[data-theme="home"] .footer-label,
body[data-theme="home"] .footer-link { color: var(--navy); font-weight: 600; }
body[data-theme="home"] .footer-brand img { width: 164px; }
body[data-theme="home"] .footer-brand p { max-width: 330px; font-size: 14px; }
body[data-theme="home"] .social-links a { color: var(--navy); border-color: var(--line); }
body[data-theme="home"] .footer-bottom { color: #66758b; background: #f8f9fa; border-top: 1px solid var(--line); }
body[data-theme="home"] .floating-contact { border-radius: 4px; font-weight: 600; font-size: 12px; letter-spacing: 0; text-transform: none; }
body[data-theme="home"] #contacto { scroll-margin-top: 100px; }

@media (max-width: 1000px) {
  body[data-theme="home"] .intro-grid { gap: 36px; }
  body[data-theme="home"] .intro-visual img { height: 300px; }
  body[data-theme="home"] .main-nav { gap: 18px; }
  body[data-theme="home"] .hero-home { min-height: 100svh; }
  body[data-theme="home"] .hero-home h1 { font-size: 32px; }
  body[data-theme="home"] .hero-home::before { background-position: 78% center; }
  body[data-theme="home"] .hero-home .lead { max-width: 410px; }
  body[data-theme="home"] .home-contact-layout { gap: 32px; }
  body[data-theme="home"] .cta-band h2 { max-width: 420px; }
}
@media (max-width: 700px) {
  body[data-theme="home"] { --home-gutter: 20px; --home-footer-target: 610px; }
  body[data-theme="home"] h2 { font-size: 24px; }
  body[data-theme="home"] .nav-inner { min-height: 64px; }
  body[data-theme="home"] .brand { width: 150px; }
  body[data-theme="home"] .main-nav { background: var(--navy); border-color: #ffffff24; gap: 0; }
  body[data-theme="home"] .solutions-menu ul { color: white; background: transparent; }
  body[data-theme="home"] .hero-home,
  body[data-theme="home"] .home-intro,
  body[data-theme="home"] .solutions-section,
  body[data-theme="home"] .cta-band { min-height: 100svh; height: auto; }
  body[data-theme="home"] .hero-home::before { background-image: linear-gradient(0deg, rgba(7,23,47,.96), rgba(7,23,47,.76) 32%, rgba(7,23,47,.03) 75%), url("hero-tecnico.jpg"); background-position: 80% top; }
  body[data-theme="home"] .hero-home .container { padding: 260px 0 136px; }
  body[data-theme="home"] .hero-home h1 { font-size: 24px; letter-spacing: -.065em; }
  body[data-theme="home"] .hero-home h1 span { white-space: normal; }
  body[data-theme="home"] .hero-home .lead { font-size: 15px; }
  body[data-theme="home"] .hero-actions { gap: 18px; }
  body[data-theme="home"] .home-intro { padding: 40px 0 48px; }
  body[data-theme="home"] .intro-grid { grid-template-columns: 1fr; gap: 32px; }
  body[data-theme="home"] .intro-visual img { height: auto; aspect-ratio: 1.65; }
  body[data-theme="home"] .intro-copy h2 { max-width: 300px; margin-bottom: 20px; }
  body[data-theme="home"] .intro-copy .eyebrow { margin-bottom: 14px; }
  body[data-theme="home"] .solutions-section { padding: 44px 0 42px; scroll-margin-top: 64px; }
  body[data-theme="home"] .section-heading { padding-inline: 16px; margin-bottom: 26px; }
  body[data-theme="home"] .section-heading h2 { letter-spacing: -.065em; }
  body[data-theme="home"] .section-heading p { font-size: 14px; }
  body[data-theme="home"] .solutions-section::before { background-position: 63% center; }
  body[data-theme="home"] .solutions-grid { grid-template-columns: repeat(6, 280px); padding-inline: 16px; scroll-padding-inline: 16px; }
  body[data-theme="home"] .cta-band { padding: 44px 0; }
  body[data-theme="home"] .cta-band { min-height: 270px; height: max(270px, calc(100svh - var(--home-footer-target))); padding: 34px 0; }
  body[data-theme="home"] .home-contact-layout { flex-direction: column; align-items: center; gap: 26px; }
  body[data-theme="home"] .cta-band h2 { max-width: 340px; }
  body[data-theme="home"] .footer-main { padding: 44px 0; }
  body[data-theme="home"] .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  body[data-theme="home"] .footer-brand { grid-column: 1 / -1; }
  body[data-theme="home"] .footer-label { font-size: 11px; }
  body[data-theme="home"] .footer-list { font-size: 13px; }
  body[data-theme="home"] .footer-bottom { padding-bottom: 24px; }
}
@media (max-width: 360px) {
  body[data-theme="home"] .hero-home h1,
  body[data-theme="home"] .section-heading h2 { font-size: 21px; }
  body[data-theme="home"] .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-theme="home"] .solution-card-inner { transition: none; }
  body[data-theme="home"] .intro-logo-visual img { animation: none; }
  body[data-theme="home"] .intro-logo-visual img { transform: none; }
}

/* ===== Páginas internas (industrias): coherentes con el home ===== */
body[data-solution] .inner-hero {
  min-height: 620px;
  align-items: center;
  background-color: #07172f;
  background-size: cover;
  background-position: center;
}
body[data-solution] .inner-hero::before {
  inset: 0;
  background: linear-gradient(90deg, rgba(7,23,47,.92) 0%, rgba(7,23,47,.6) 46%, rgba(7,23,47,.06) 100%);
  opacity: 1;
}
body[data-solution] .inner-hero .container { padding: 90px 0; }
body[data-solution] .inner-hero h1 { max-width: 820px; font-size: clamp(2.1rem, 4.5vw, 3.4rem); }

body[data-solution] .section-shell { padding: 96px 0; }
body[data-solution] .section-shell:has(.solution-lead) { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 80px 0; }
body[data-solution] .solution-mark { border-radius: 8px; overflow: hidden; aspect-ratio: 1; min-height: 0; background: #e9edf2; }
body[data-solution] .solution-mark::before,
body[data-solution] .solution-mark::after { display: none; }
body[data-solution] .solution-mark img { width: 100%; height: 100%; object-fit: cover; }

body[data-solution] .cta-band { height: auto; min-height: 340px; padding: 80px 0; }
body[data-solution] .cta-band .container { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
body[data-solution] .cta-band .eyebrow { justify-content: center; color: var(--navy); }
body[data-solution] .cta-band .eyebrow::before { background: var(--navy); }
body[data-solution] .cta-band h2 { max-width: 680px; }

/* Beneficios: bloque editorial naranja con cuatro tarjetas ilustradas */
body[data-solution] .benefits-section {
  min-height: 100svh;
  display: grid;
  align-items: center;
  color: var(--navy);
  background: var(--orange);
}
body[data-solution] .benefits-heading { max-width: 760px; margin-bottom: 46px; }
body[data-solution] .benefits-heading .eyebrow { color: var(--navy); margin-bottom: 16px; }
body[data-solution] .benefits-heading .eyebrow::before { background: var(--navy); }
body[data-solution] .benefits-heading h2 { margin: 0; color: var(--navy); font-weight: 500; }
body[data-solution] .benefits-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
body[data-solution] .benefit-card {
  position: relative;
  min-height: 0;
  aspect-ratio: .82;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 22px 24px 0;
  color: var(--white);
  background: #090909;
}
body[data-solution] .benefit-number {
  position: absolute;
  top: 22px;
  right: 24px;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  font-weight: 600;
  z-index: 3;
}
body[data-solution] .benefit-card p {
  position: relative;
  z-index: 3;
  max-width: 265px;
  margin: 0;
  padding-right: 28px;
  color: var(--white);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.22;
}
body[data-solution] .benefit-art {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 72%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #090909;
}
body[data-solution] .benefit-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, #090909 0%, rgba(9,9,9,.78) 10%, transparent 27%, transparent 100%);
}
body[data-solution] .benefit-art-frame {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  filter: drop-shadow(0 0 28px rgba(12,35,69,.75));
}
body[data-solution] .benefit-art img {
  position: absolute;
  top: 0;
  left: calc(var(--benefit-panel) * -100%);
  width: 400%;
  max-width: none;
  height: auto;
}

/* Otras soluciones: mismas tarjetas flip del home */
body[data-solution] .related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
body[data-solution] .related-grid .solution-card { min-width: 0; height: auto; aspect-ratio: 1; cursor: pointer; }

@media (max-width: 900px) {
  body[data-solution] .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  body[data-solution] .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  body[data-solution] .inner-hero { min-height: 460px; }
  body[data-solution] .inner-hero .container { padding: 70px 0; }
  body[data-solution] .cta-band { min-height: 300px; padding: 56px 0; }
  body[data-solution] .benefits-section { min-height: auto; }
  body[data-solution] .benefits-heading { margin-bottom: 34px; }
  body[data-solution] .benefits-grid { grid-template-columns: 1fr; }
  body[data-solution] .benefit-card { min-height: 0; aspect-ratio: .82; }
  body[data-solution] .benefit-card p { margin-top: 0; font-size: 19px; }
  body[data-solution] .benefit-art { height: 72%; }
  body[data-solution] .related-grid { grid-template-columns: 1fr; }
}
