/*
 * RailWise experience corrections.
 * Keep these rules page-scoped so older showcase styles cannot leak into
 * light product lists or responsive scene heroes.
 */

.reveal,
.reveal-left,
.reveal-right,
.reveal-scale,
[data-reveal] {
  opacity: 1;
  transform: none;
}

.site-page-hero,
.svc-hero.rw-scene-hero,
.help-hero.rw-scene-hero,
.case-list-hero.rw-scene-hero {
  min-height: 460px;
  padding: 4.75rem 0 3.5rem;
}

.site-page-hero__scrim,
.rw-scene-hero::after,
.case-list-hero.rw-scene-hero::after {
  background:
    linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.9) 31%, rgba(255,255,255,.58) 51%, rgba(255,255,255,.08) 76%, rgba(255,255,255,0) 100%),
    linear-gradient(180deg, rgba(239,247,255,.08), rgba(255,255,255,.05) 72%, rgba(255,255,255,.18));
}

.site-page-hero__content {
  max-width: 38rem;
}

.site-page-hero h1 {
  max-width: 13ch;
  font-size: clamp(2.7rem, 4.6vw, 4.2rem);
  line-height: 1.08;
}

.site-page-hero p {
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.page-news .site-page-hero {
  min-height: 420px;
}

.page-news .site-page-hero__scrim {
  background: linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.88) 32%, rgba(255,255,255,.34) 58%, rgba(255,255,255,0) 78%);
}

.page-news .site-page-hero + section {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.page-products .products-matrix-section {
  padding-top: 3rem;
  background: #f7f9fc;
}

.page-products .products-matrix-section > .container > .section-heading {
  display: none;
}

.page-products .products-matrix-grid {
  align-items: stretch;
}

.page-products .product-card.compact {
  display: flex;
  min-height: 0;
  height: auto;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dbe3ec !important;
  border-radius: 8px !important;
  padding: 1.75rem !important;
  background: #fff !important;
  color: #334155 !important;
  box-shadow: 0 18px 50px -42px rgba(15, 23, 42, .55);
  backdrop-filter: none;
}

.page-products .product-card.compact:hover {
  border-color: #9bc1ff !important;
  background: #fff !important;
  box-shadow: 0 22px 54px -38px rgba(15, 98, 254, .34);
  transform: translateY(-2px);
}

.page-products .product-card.compact h3 {
  margin: 1rem 0 .55rem !important;
  color: #0f172a !important;
  font-size: 1.45rem !important;
  font-weight: 780 !important;
}

.page-products .product-card.compact .product-desc {
  margin-bottom: 1rem !important;
  color: #52627a !important;
  font-size: .94rem !important;
}

.page-products .product-card.compact .feature-tag {
  border: 1px solid #dbe5f0 !important;
  background: #f5f8fc !important;
  color: #40516b !important;
}

.page-products .product-card.compact .product-highlights {
  margin: .25rem 0 1rem;
}

.page-products .product-card.compact .product-highlights li {
  border-color: #edf1f5;
  color: #334155;
}

.page-products .product-card.compact .product-card-github a,
.page-products .product-card.compact .product-lock {
  border-color: #dbe3ec;
  background: #f7f9fc;
  color: #64748b;
}

.page-products .product-card.compact .product-footer {
  border-top-color: #e8edf3;
}

.page-products .product-card.compact .tech-stack {
  color: #64748b;
}

.page-products .product-card.compact .product-link {
  color: #0f62fe !important;
}

.page-products .product-hardware-feature {
  display: grid;
  grid-template-columns: minmax(320px, .82fr) minmax(0, 1.18fr);
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px -42px rgba(15, 23, 42, .55);
}

.page-products .product-hardware-feature__visual {
  min-height: 360px;
  padding: 2rem;
  background:
    linear-gradient(135deg, #edf7ff 0%, #f7fbff 62%, #fff 100%);
}

.page-products .product-hardware-feature__visual img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: contain;
}

.page-products .product-hardware-feature__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem;
}

.page-products .product-badge.monitoring-system {
  width: max-content;
  border: 1px solid #bfe6e9;
  background: #eefcfc;
  color: #0f7780;
}

.page-products .product-hardware-feature h2 {
  margin: 1rem 0 .75rem;
  color: #0f172a;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.14;
}

.page-products .product-hardware-feature p {
  max-width: 48rem;
  margin: 0 0 1.25rem;
  color: #52627a;
  line-height: 1.75;
}

.page-products .product-hardware-feature .product-features {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.page-products .product-hardware-feature .feature-tag {
  border: 1px solid #dbe5f0 !important;
  border-radius: 6px;
  padding: .38rem .62rem;
  background: #f5f8fc !important;
  color: #40516b !important;
  font-size: .78rem;
  font-weight: 600 !important;
}

.page-products .product-hardware-feature__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.page-products .product-hardware-feature__actions .product-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #0f62fe !important;
  font-weight: 700 !important;
  text-decoration: none;
}

.page-products .product-hardware-feature__actions .product-link.secondary {
  color: #516176 !important;
}

.nav-product-card.monitoring-system {
  grid-column: 1 / -1;
}

.nav-product-card.monitoring-system .badge {
  background: rgba(6, 182, 212, .12);
  color: #0f7780;
}

.page-home .home-hardware-category {
  margin-top: 5rem;
}

.page-home .home-hardware-product {
  display: grid;
  grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
}

.page-home .home-hardware-product__image {
  min-height: 340px;
  padding: 2rem;
  background: linear-gradient(135deg, #eef8ff, #fff);
}

.page-home .home-hardware-product__image img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: contain;
}

.page-home .home-hardware-product__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem;
}

.page-home .home-hardware-product .product-badge.monitoring-system {
  width: max-content;
  border: 1px solid rgba(34, 199, 216, .26);
  background: rgba(34, 199, 216, .12);
  color: #67e8f9;
}

.page-home .home-hardware-product h3 {
  margin: 1rem 0 .75rem;
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.16;
}

.page-home .home-hardware-product p {
  margin: 0 0 1.25rem;
  color: #aebbd0;
  line-height: 1.75;
}

.page-home .home-hardware-product .product-features {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.page-home .home-hardware-product__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.page-home .home-hardware-product__links .product-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #67e8f9;
  font-weight: 700;
  text-decoration: none;
}

.page-home .home-hardware-product__links .product-link.muted {
  color: #b8c5d8;
}

.rw-conversion-dock {
  position: static;
  padding: 1.5rem 1rem;
  background: #f7f9fc;
  pointer-events: auto;
}

body:has(.rw-conversion-dock) {
  padding-bottom: 0;
}

.rw-conversion-dock__inner {
  border-radius: 8px;
}

@media (max-width: 1023px) {
  .site-page-hero,
  .svc-hero.rw-scene-hero,
  .help-hero.rw-scene-hero,
  .case-list-hero.rw-scene-hero {
    min-height: 430px;
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
  }

  .page-home {
    padding-bottom: 0 !important;
  }

  .page-home .rw-home-hero {
    height: 640px;
    min-height: 640px;
  }

  .page-home .rw-home-hero .hero-content {
    min-height: 0;
    padding-top: 2.2rem;
    padding-bottom: 4.5rem;
  }

  .page-home .rw-home-hero .carousel-slide::before {
    background:
      linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.9) 41%, rgba(255,255,255,.52) 61%, rgba(255,255,255,.04) 83%, rgba(255,255,255,0) 100%) !important;
  }

  .page-home .rw-home-hero .hero-title {
    max-width: 12ch;
    font-size: 2.35rem !important;
    line-height: 1.1 !important;
  }

  .page-home .rw-home-hero .hero-subtitle {
    max-width: 100%;
    font-size: .94rem !important;
    line-height: 1.62 !important;
  }

  .page-home .rw-home-hero .hero-main-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .55rem;
    align-items: center;
  }

  .page-home .rw-home-hero .hero-cta {
    width: auto;
    min-height: 44px;
    padding: .65rem .9rem;
  }

  .page-home .rw-home-hero .hero-cta.ghost {
    border-color: transparent;
    background: rgba(255,255,255,.58);
    box-shadow: none;
  }

  .page-home .rw-home-hero__process a:nth-child(n+4) {
    display: none;
  }

  .page-home .rw-home-hero__process {
    gap: .4rem;
    margin-top: 1rem;
  }

  .site-page-hero,
  .svc-hero.rw-scene-hero,
  .help-hero.rw-scene-hero,
  .case-list-hero.rw-scene-hero {
    min-height: 570px;
    padding: 2.8rem 0 3.25rem;
  }

  .site-page-hero__scrim,
  .rw-scene-hero::after,
  .case-list-hero.rw-scene-hero::after {
    background:
      linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.88) 45%, rgba(255,255,255,.47) 64%, rgba(255,255,255,.03) 86%, rgba(255,255,255,0) 100%) !important;
  }

  .site-page-hero h1,
  .svc-hero.rw-scene-hero .svc-hero__title,
  .help-hero.rw-scene-hero .help-hero__title,
  .case-list-hero.rw-scene-hero h1 {
    max-width: 13ch;
    font-size: 2.25rem !important;
    line-height: 1.12 !important;
  }

  .site-page-hero p,
  .svc-hero.rw-scene-hero .svc-hero__sub {
    max-width: 100%;
    font-size: .95rem !important;
    line-height: 1.65 !important;
  }

  .page-products .products-matrix-section {
    padding-top: 2rem;
    padding-bottom: 3.25rem;
  }

  .page-products .products-matrix-section > .container > .section-heading {
    display: none;
  }

  .page-products .products-matrix-grid {
    gap: .9rem;
    margin-bottom: 2.5rem;
  }

  .page-products .product-card.compact {
    min-height: 0 !important;
    padding: 1.2rem !important;
  }

  .page-products .product-card.compact h3 {
    margin-top: .75rem !important;
    font-size: 1.25rem !important;
  }

  .page-products .product-card.compact .product-highlights li {
    padding: .7rem 0;
  }

  .page-products .product-card.compact .product-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-products .product-card.compact .product-actions {
    justify-content: flex-start;
  }

  .page-products .product-hardware-feature {
    grid-template-columns: 1fr;
    margin-bottom: 2.5rem;
  }

  .page-products .product-hardware-feature__visual {
    min-height: 250px;
    padding: 1.25rem;
  }

  .page-products .product-hardware-feature__visual img {
    max-height: 250px;
  }

  .page-products .product-hardware-feature__body {
    padding: 1.35rem;
  }

  .page-products .product-hardware-feature h2 {
    font-size: 1.65rem;
  }

  .page-home .home-hardware-category {
    margin-top: 3.5rem;
  }

  .page-home .home-hardware-product {
    grid-template-columns: 1fr;
  }

  .page-home .home-hardware-product__image {
    min-height: 250px;
    padding: 1.25rem;
  }

  .page-home .home-hardware-product__image img {
    max-height: 250px;
  }

  .page-home .home-hardware-product__content {
    padding: 1.35rem;
  }

  .page-home .home-hardware-product h3 {
    font-size: 1.65rem;
  }

  .page-services .svc-hero.rw-scene-hero {
    min-height: 570px;
  }

  .page-services .svc-hero.rw-scene-hero .svc-hero__title br {
    display: none;
  }

  .page-services .svc-hero.rw-scene-hero .svc-hero__title {
    max-width: 100%;
    font-size: 2rem !important;
    line-height: 1.13 !important;
  }

  .page-services .svc-pillars {
    padding: 3.25rem 0;
  }

  .page-services .svc-pillar-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: .9rem;
  }

  .page-services .svc-pillar {
    min-height: 0;
    padding: 1.25rem;
    border-radius: 8px;
  }

  .page-services .svc-pillar__head {
    margin-bottom: .75rem;
  }

  .page-services .svc-pillar__num {
    font-size: 2.5rem;
    line-height: 1;
  }

  .page-services .svc-pillar__icon {
    position: absolute;
    top: 1.15rem;
    right: 1.15rem;
    width: 46px;
    height: 46px;
    margin: 0;
    border-radius: 8px;
  }

  .page-services .svc-pillar__head {
    min-height: 46px;
    padding-right: 3.5rem;
  }

  .page-services .svc-pillar__tag {
    position: absolute;
    top: 4.2rem;
    right: 1.15rem;
  }

  .page-services .svc-pillar__title {
    font-size: 1.35rem;
  }

  .page-services .svc-pillar__summary {
    margin-bottom: .75rem;
  }

  .page-services .svc-pillar__en,
  .page-services .svc-pillar__items span,
  .page-services .svc-pillar__linked-label {
    display: none;
  }

  .page-services .svc-pillar__items {
    margin-bottom: .65rem;
  }

  .page-services .svc-pillar__items li {
    padding: .5rem 0;
  }

  .page-services .svc-pillar__items b {
    margin-bottom: 0;
    font-size: .84rem;
  }

  .page-services .svc-pillar__linked {
    padding-top: .75rem;
  }

  .page-services .svc-pillar__linked-row {
    margin-top: 0;
  }

  .page-news .site-page-hero {
    min-height: 520px;
  }

  .page-news .site-page-hero + section + section {
    padding-top: 2rem;
  }

  .rw-conversion-dock {
    position: fixed;
    z-index: 45;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 0;
    background: transparent;
  }

  .rw-conversion-dock__inner {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 64px;
    justify-content: center;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    padding: .55rem .7rem calc(.55rem + env(safe-area-inset-bottom));
  }

  .rw-conversion-dock__copy {
    display: none;
  }

  .rw-conversion-dock__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    width: min(420px, 100%);
    gap: .5rem;
  }

  .rw-conversion-dock__btn,
  .rw-conversion-dock__icon {
    min-height: 44px;
    border-radius: 8px;
  }

  .rw-conversion-dock__btn--ghost {
    width: 44px;
    padding: 0;
  }

  .rw-conversion-dock__btn--ghost span {
    display: none;
  }
}

@media (max-width: 380px) {
  .page-home .rw-home-hero {
    height: 620px;
    min-height: 620px;
  }

  .page-home .rw-home-hero .hero-title,
  .site-page-hero h1,
  .svc-hero.rw-scene-hero .svc-hero__title {
    font-size: 2.05rem !important;
  }
}
