:root {
  --blue: #2e3192;
  --blue-dark: #161a55;
  --violet: #7b2ff7;
  --thermal: #1982c4;
  --white: #ffffff;
  --muted: #d7dcff;
  --glass: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.22);
  --shadow: 0 24px 70px rgba(6, 10, 45, 0.42);

  /* Espacios principales. Desktop, tablet y teléfono separados. */
  --contact-space-desktop: 54px;
  --footer-space-desktop: 8px;
  --contact-space-tablet: 34px;
  --footer-space-tablet: 24px;
  --contact-space-phone: 50px;
  --footer-space-phone: 36px;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--white);
  overflow: hidden;
  background: radial-gradient(circle at top left, #5862ff 0%, #20246d 42%, #090b22 100%);
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(120deg, rgba(9, 11, 34, 0.88), rgba(46, 49, 146, 0.72)),
    radial-gradient(circle at 82% 18%, rgba(123, 47, 247, 0.5), transparent 34%);
}

.bg-overlay::after {
  content: '';
  position: absolute;
  inset: -15%;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.055) 0 1px, transparent 1px 22px);
  animation: moveLines 18s linear infinite;
}

@keyframes moveLines {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(80px,80px,0); }
}

.page-shell {
  width: 100%;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow: hidden;
}

.hero-card {
  width: min(1180px, 100%);
  height: min(760px, calc(100svh - 44px));
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(14px, 2vh, 26px);
  padding: clamp(18px, 2.5vw, 36px);
  border: 1px solid var(--border);
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  width: min(300px, 48vw);
  height: auto;
  background: rgba(255,255,255,0.92);
  border-radius: 18px;
  padding: 10px 14px;
}

.tagline {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  white-space: nowrap;
}

.hero-content {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(8px, 1.8vh, 24px) 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: #cbd0ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.15rem, 5.3vw, 5rem);
  line-height: .95;
  letter-spacing: -0.06em;
}

.intro {
  max-width: 600px;
  margin: 22px 0 0;
  color: #eef0ff;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.55;
}

.product-actions {
  display: grid;
  gap: 16px;
}

.product-card {
  width: 100%;
  min-height: clamp(140px, 20vh, 172px);
  display: grid;
  grid-template-columns: 88px 1fr;
  grid-template-areas: 'icon title' 'icon subtitle';
  align-items: center;
  text-align: left;
  gap: 4px 18px;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--border);
  border-radius: 28px;
  color: #fff;
  cursor: pointer;
  background: var(--glass);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

.product-card:hover,
.product-card:focus-visible {
  transform: translateY(-5px);
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.45);
  outline: none;
}

.violet { border-left: 5px solid var(--violet); }
.thermal { border-left: 5px solid var(--thermal); }

.plate-icon {
  grid-area: icon;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(255,255,255,.16);
}

.plate-icon svg {
  width: 60px;
  height: 60px;
  fill: none;
  stroke: #fff;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-title {
  grid-area: title;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 800;
}

.product-subtitle {
  grid-area: subtitle;
  color: #dce0ff;
  font-weight: 500;
  line-height: 1.35;
}

.contact-box {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  max-width: 670px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255,255,255,.1);
}

.contact-box span {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .08em;
}

.contact-box strong { font-size: 1rem; }
.contact-box a { color: #fff; font-weight: 700; text-decoration: none; }
.contact-box a:hover { text-decoration: underline; }

.contact-box.contact-bottom {
  margin: var(--contact-space-desktop) auto 0 !important;
  justify-content: center;
}

.site-footer {
  flex: 0 0 auto;
  color: #cfd3ff;
  font-size: .86rem;
  text-align: center;
  margin-top: var(--footer-space-desktop) !important;
  padding-bottom: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  padding: 24px;
}

.modal.is-open { display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 7, 26, .72); backdrop-filter: blur(8px); }

.modal-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(86vh, 820px);
  overflow-y: auto;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 30px;
  background: #fff;
  color: #151733;
  box-shadow: 0 30px 90px rgba(0,0,0,.45);
}

.close-btn {
  position: sticky;
  float: right;
  top: 0;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #eef0ff;
  color: var(--blue-dark);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal h2 { margin: 0 56px 8px 0; font-size: clamp(1.8rem, 3vw, 2.65rem); color: var(--blue); letter-spacing: -0.04em; }
.modal h3 { margin: 28px 0 10px; color: var(--blue-dark); }
.modal p { line-height: 1.7; color: #414667; }
.modal-lead { font-weight: 600; }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.spec-grid div {
  padding: 15px;
  border-radius: 18px;
  background: #f3f5ff;
  border: 1px solid #e1e5ff;
}

.spec-grid strong {
  display: block;
  color: var(--blue);
  font-size: .8rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.spec-grid span { color: #20233f; line-height: 1.45; }

@media (max-width: 840px) {
  body {
    overflow-y: auto;
  }

  .page-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    align-items: start;
    padding: 16px;
    overflow: visible;
  }

  .hero-card {
    height: auto;
    min-height: auto;
    border-radius: 26px;
    gap: 26px;
    overflow: visible;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .logo {
    width: min(330px, 58vw);
  }

  .tagline {
    font-size: .68rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 24px;
    padding: 28px 0 22px;
  }

  .eyebrow {
    font-size: .78rem;
    margin-bottom: 12px;
  }

  h1 {
    font-size: clamp(2.25rem, 7vw, 4rem);
    line-height: .98;
  }

  .intro {
    margin-top: 24px;
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.55;
  }

  .product-actions {
    gap: 18px;
  }

  .product-card {
    min-height: 148px;
    padding: 20px;
    border-radius: 28px;
  }

  .plate-icon {
    width: 78px;
    height: 78px;
    border-radius: 22px;
  }

  .plate-icon svg {
    width: 60px;
    height: 60px;
  }

  .product-title {
    font-size: clamp(1.1rem, 2vw, 1.55rem);
  }

  .product-subtitle {
    font-size: 1rem;
    line-height: 1.4;
  }

  .contact-box.contact-bottom {
    margin-top: var(--contact-space-tablet) !important;
    margin-bottom: 0 !important;
    width: 100%;
  }

  .site-footer {
    margin-top: var(--footer-space-tablet) !important;
    padding-bottom: 32px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 12px;
  }

  .hero-card {
    padding: 18px;
    border-radius: 22px;
    gap: 24px;
  }

  .logo {
    width: min(300px, 72vw);
    border-radius: 18px;
    padding: 10px 14px;
  }

  .tagline {
    font-size: .68rem;
    padding: 10px 16px;
  }

  .hero-content {
    gap: 24px;
    padding: 28px 0 22px;
  }

  .eyebrow {
    font-size: .74rem;
    margin-bottom: 10px;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    letter-spacing: -0.05em;
  }

  .intro {
    margin-top: 18px;
    font-size: 1rem;
    line-height: 1.45;
  }

  .contact-box {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
    gap: 10px 14px;
    border-radius: 22px;
  }

  .contact-box.contact-bottom {
    margin-top: var(--contact-space-phone) !important;
    margin-bottom: 0 !important;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .contact-box span {
    width: auto;
    font-size: .75rem;
  }

  .contact-box strong,
  .contact-box a {
    font-size: 1rem;
  }

  .site-footer {
    margin-top: var(--footer-space-phone) !important;
    padding-bottom: 38px;
    font-size: .86rem;
    line-height: 1.35;
  }

  .product-card {
    grid-template-columns: 1fr;
    grid-template-areas: 'icon' 'title' 'subtitle';
    min-height: unset;
    padding: 20px;
    gap: 8px;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 12px;
  }
}
