:root {
  --v31-bg: #030711;
  --v31-panel: #061523;
  --v31-panel-strong: #081c2c;
  --v31-line: rgba(83, 229, 255, .22);
  --v31-cyan: #55e7ff;
  --v31-mint: #55efbd;
  --v31-text: #f3f8ff;
  --v31-muted: #9bb2c1;
}

/* The home page uses one continuous background so sections no longer look pasted together. */
body.v31-home {
  background: var(--v31-bg) !important;
  background-image: none !important;
}

body.v31-home #how,
body.v31-home #technology,
body.v31-home #ultimate,
body.v31-home #digital-twin,
body.v31-home #laboratories,
body.v31-home #ultimate-lab,
body.v31-home #modes,
body.v31-home #opiniones,
body.v31-home #impact {
  background-color: var(--v31-bg) !important;
  background-image: none !important;
}

body.v31-home #technology::before,
body.v31-home #technology::after {
  display: none !important;
}

/* Video opinions */
.v31-opinions {
  position: relative;
  overflow: hidden;
  padding-block: clamp(78px, 9vw, 132px);
  border-block: 1px solid rgba(83, 229, 255, .12);
}

.v31-opinions::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 82% 16%, rgba(83, 229, 255, .07), transparent 31rem);
}

.v31-opinions-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .6fr);
  align-items: end;
  gap: clamp(28px, 6vw, 88px);
  margin-bottom: 38px;
}

.v31-opinions-head h2 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 6.5rem);
  line-height: .93;
  letter-spacing: -.06em;
}

.v31-opinions-head .lead { margin: 0; }

.v31-video-carousel {
  position: relative;
  margin-inline: calc(clamp(0px, 2vw, 24px) * -1);
}

.v31-carousel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(0px, 2vw, 24px) 18px;
}

.v31-carousel-count {
  color: var(--v31-muted);
  font: 800 .72rem/1 var(--font-mono, monospace);
  letter-spacing: .16em;
}

.v31-carousel-actions { display: flex; gap: 9px; }

.v31-carousel-actions button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(83, 229, 255, .3);
  border-radius: 999px;
  background: rgba(5, 22, 35, .82);
  color: var(--v31-text);
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.v31-carousel-actions button:hover,
.v31-carousel-actions button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--v31-cyan);
  background: rgba(12, 47, 66, .96);
  outline: none;
}

.v31-video-viewport {
  position: relative;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: clamp(0px, 2vw, 24px);
  scrollbar-width: none;
  cursor: grab;
}

.v31-video-viewport::-webkit-scrollbar { display: none; }
.v31-video-viewport:active { cursor: grabbing; }
.v31-video-viewport:focus-visible { outline: 1px solid var(--v31-cyan); outline-offset: 6px; }

.v31-video-track {
  display: flex;
  gap: clamp(14px, 1.4vw, 20px);
  width: max-content;
  padding: 8px clamp(0px, 2vw, 24px) 28px;
}

.v31-video-card {
  flex: 0 0 clamp(310px, 34vw, 445px);
  scroll-snap-align: start;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--v31-line);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(8, 29, 44, .96), rgba(3, 12, 22, .98));
  box-shadow: 0 24px 58px rgba(0, 0, 0, .25);
  opacity: .72;
  transform: scale(.975);
  transform-origin: center;
  transition: opacity .35s ease, transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.v31-video-card[data-active] {
  opacity: 1;
  transform: translateY(-5px) scale(1);
  border-color: rgba(83, 229, 255, .44);
  box-shadow: 0 30px 72px rgba(0, 0, 0, .38), 0 0 0 1px rgba(83, 229, 255, .06) inset;
}

.v31-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #12394f, #020914 70%);
}

.v31-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020914;
}

.v31-video-card figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 16px 18px;
}

.v31-video-card figcaption span {
  color: var(--v31-cyan);
  font: 800 .68rem/1.4 var(--font-mono, monospace);
  letter-spacing: .12em;
}

.v31-video-card figcaption strong {
  color: var(--v31-text);
  font-size: .94rem;
}

.v31-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.v31-carousel-dots button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.v31-carousel-dots span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: rgba(183, 211, 224, .38);
  transition: width .25s ease, background .25s ease;
}

.v31-carousel-dots button[aria-current="true"] span {
  width: 25px;
  background: linear-gradient(90deg, var(--v31-cyan), #6bf0bb);
}

/* Account type selector */
.v31-account-types {
  min-width: 0;
  margin: 18px 0;
  padding: 0;
  border: 0;
}

.v31-account-types legend {
  margin-bottom: 9px;
  color: #d9e8f1;
  font-size: .82rem;
  font-weight: 800;
}

.v31-account-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.v31-account-type {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.v31-account-type input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.v31-account-type span {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 13px;
  border: 1px solid rgba(83, 229, 255, .16);
  border-radius: 15px;
  background: rgba(2, 13, 23, .78);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.v31-account-type b { color: #fff; font-size: .88rem; }
.v31-account-type small { color: var(--v31-muted); font-size: .68rem; line-height: 1.35; }

.v31-account-type input:checked + span {
  border-color: rgba(85, 239, 189, .68);
  background: linear-gradient(145deg, rgba(83, 229, 255, .14), rgba(85, 239, 189, .08));
  box-shadow: inset 0 0 0 1px rgba(85, 239, 189, .12);
}

.v31-account-type input:focus-visible + span { outline: 2px solid var(--v31-cyan); outline-offset: 3px; }
.v31-account-type:hover span { transform: translateY(-2px); border-color: rgba(83, 229, 255, .38); }
.v31-optional-note { display: block; margin-top: 5px; color: var(--v31-muted); font-size: .68rem; }

/* Chemical Land keeps six real laboratory choices visible and evenly spaced. */
#chemical-3d .v27-realm-assets { gap: 6px; }
#chemical-3d .v27-realm-assets button { min-height: 64px; }

/* V31.6: Chemical Land becomes the visual focus of the home technology section. */
.v8-home-tech-grid {
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(22px, 2.4vw, 36px);
  align-items: stretch;
}

.v8-home-tech-grid > .v8-cinema,
.v8-home-tech-grid > .v24-equipment-portal {
  min-width: 0;
  min-height: clamp(610px, 49vw, 700px);
}

.v24-equipment-portal {
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  border-color: rgba(83, 229, 255, .34);
  background:
    radial-gradient(circle at 53% 38%, rgba(31, 174, 216, .2), transparent 42%),
    linear-gradient(145deg, #071c2d, #030c17 74%);
  box-shadow: 0 28px 72px rgba(0, 0, 0, .28), inset 0 0 80px rgba(48, 200, 238, .05);
}

.v24-equipment-portal::after {
  opacity: .48;
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

.v24-equipment-portal model-viewer {
  width: 100%;
  height: clamp(510px, 41vw, 600px);
  min-height: 0;
  transform: none;
  transform-origin: 50% 48%;
  background: radial-gradient(circle at 54% 44%, rgba(34, 179, 216, .12), transparent 46%);
}

.v24-equipment-portal .v14-twin-hud {
  position: relative;
  z-index: 3;
  padding: 1.65rem 1.8rem 1.75rem;
  background: linear-gradient(180deg, rgba(3, 14, 25, .78), rgba(3, 12, 22, .98));
}

.v24-equipment-portal .v14-twin-hud strong {
  max-width: 34rem;
  font-size: clamp(1.18rem, 1.65vw, 1.55rem);
}

@media (max-width: 820px) {
  .v8-home-tech-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .v8-home-tech-grid > .v8-cinema,
  .v8-home-tech-grid > .v24-equipment-portal { min-height: 500px; }
  .v24-equipment-portal model-viewer {
    height: 440px;
    transform: none;
  }
  .v24-equipment-portal .v14-twin-hud { padding: 1.35rem 1.3rem 1.5rem; }
  .v31-opinions-head { grid-template-columns: 1fr; }
  .v31-video-card { flex-basis: min(82vw, 390px); }
  .v31-carousel-toolbar { padding-bottom: 12px; }
  .v31-carousel-actions button { width: 43px; height: 43px; }
  .v31-video-card figcaption { min-height: 68px; align-items: flex-start; flex-direction: column; gap: 5px; }
  .v31-account-type-grid { grid-template-columns: 1fr; }
  .v31-account-type span { min-height: 66px; }
}

@media (prefers-reduced-motion: reduce) {
  .v31-account-type span { transition: none; }
  .v31-video-card,
  .v31-carousel-actions button,
  .v31-carousel-dots span { transition: none; }
  .v31-video-viewport { scroll-behavior: auto; }
}
