/* Homepage showcase: real products, interfaces and verifiable credentials. */
.rw-next {
  --rw-next-max: 1280px;
  --rw-next-blue: var(--rw-blue, #0070f8);
  --rw-next-ink: var(--rw-ink, #0b1622);
  --rw-next-muted: var(--rw-muted, #5c6b7a);
  --rw-next-line: #d8e0e7;
  overflow: hidden;
  color: var(--rw-next-ink);
  background: #fff;
  font-family: var(--rw-font, "PingFang SC", "Microsoft YaHei", sans-serif);
}
.rw-next * { box-sizing: border-box; }
.rw-next-shell { width: min(var(--rw-next-max), calc(100% - 48px)); margin-inline: auto; }
.rw-next h2, .rw-next h3, .rw-next p { margin: 0; }
.rw-next h2 { font-size: clamp(2rem, 1.2rem + 2.7vw, 3.6rem); line-height: 1.12; letter-spacing: 0; font-weight: 600; }
.rw-next h2 em { color: var(--rw-next-blue); font-style: normal; }
.rw-next-kicker { margin: 0 0 1.1rem; color: var(--rw-next-blue); font-size: .8rem; font-weight: 650; }
.rw-next-lead { max-width: 32rem; color: var(--rw-next-muted); font-size: clamp(1rem, .94rem + .2vw, 1.12rem); line-height: 1.8; }
.rw-next a { color: inherit; }
.rw-next a:focus-visible { outline: 3px solid var(--rw-cyan, #20c8f8); outline-offset: 4px; }

/* Extra specificity protects section rhythm from legacy main.css !important rules. */
body.page-home .rw-next .rw-next-product { padding: clamp(5rem, 8vw, 7.5rem) 0 !important; }
body.page-home .rw-next .rw-next-ai { padding: clamp(5rem, 8vw, 7.5rem) 0 !important; }
body.page-home .rw-next .rw-next-scenes { padding: clamp(4.5rem, 7vw, 6.5rem) 0 !important; }
body.page-home .rw-next .rw-next-credentials { padding: clamp(4.5rem, 7vw, 6.5rem) 0 0 !important; }

/* Field devices */
.rw-next-product { background: #f4f7f9; }
.rw-next-product__layout { display: grid; grid-template-columns: minmax(270px, .72fr) minmax(430px, 1.28fr); gap: clamp(2.5rem, 7vw, 8rem); align-items: center; }
.rw-next-product__copy h2 { margin-bottom: 1.5rem; }
.rw-next-product__links { display: flex; flex-wrap: wrap; gap: 1rem 1.8rem; margin-top: 2rem; }
.rw-next-product__links a { color: var(--rw-next-blue); font-size: .88rem; font-weight: 600; text-decoration: none; }
.rw-next-product__links a:hover { text-decoration: underline; }
.rw-next-product__links a span { margin-left: .2rem; font-size: 1.05rem; }
.rw-next-films { display: grid; grid-template-columns: minmax(210px, .65fr) minmax(0, 1.35fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; margin-top: 2.5rem; }
.rw-next-films__heading { max-width: 21rem; }
.rw-next-films__heading .rw-next-kicker { margin-bottom: .55rem; }
.rw-next-films__heading > p:last-child { color: var(--rw-next-muted); font-size: .9rem; line-height: 1.65; }
.rw-next-films__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.rw-next-film { display: block; min-width: 0; color: inherit; text-decoration: none; }
.rw-next-film__image { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #101923; }
.rw-next-film__image::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(4, 14, 23, .48)); pointer-events: none; }
.rw-next-film__image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 420ms cubic-bezier(.2,.8,.2,1); }
.rw-next-film:hover .rw-next-film__image img { transform: scale(1.035); }
.rw-next-film__play { position: absolute; z-index: 1; top: 50%; left: 50%; display: grid; width: 48px; aspect-ratio: 1; place-items: center; border: 1px solid rgba(255,255,255,.75); border-radius: 50%; background: rgba(8, 29, 43, .42); color: #fff; font-size: .85rem; transform: translate(-50%, -50%); transition: background 180ms ease, transform 180ms ease; }
.rw-next-film:hover .rw-next-film__play { background: var(--rw-next-blue); transform: translate(-50%, -50%) scale(1.06); }
.rw-next-film__duration { position: absolute; z-index: 1; right: .65rem; bottom: .55rem; color: #fff; font: 600 .72rem/1 var(--rw-font-num, ui-sans-serif); }
.rw-next-film__copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .75rem; align-items: center; padding-top: .8rem; }
.rw-next-film__copy small { grid-column: 1 / -1; color: var(--rw-next-blue); font-size: .7rem; }
.rw-next-film__copy strong { min-width: 0; color: #203745; font-size: .9rem; font-weight: 650; line-height: 1.4; }
.rw-next-film__copy > span { justify-self: end; color: var(--rw-next-blue); font-size: 1.1rem; transition: transform 180ms ease; }
.rw-next-film:hover .rw-next-film__copy > span { transform: translate(2px, -2px); }
.rw-next-product__visual { position: relative; min-height: clamp(420px, 43vw, 560px); isolation: isolate; }
.rw-next-product__visual::before { content: ""; position: absolute; inset: 10% 3% 4%; border: 1px solid #d7e3ea; border-radius: 50%; transform: rotate(-13deg); }
.rw-next-product__visual::after { content: ""; position: absolute; left: 5%; right: 2%; bottom: 2%; height: 1px; background: #d0dce3; }
.rw-next-device { position: absolute; z-index: 1; bottom: 2%; display: grid; justify-items: center; color: #4c6571; font-size: .72rem; font-weight: 650; }
.rw-next-device img { display: block; width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 28px 24px rgba(8,49,74,.17)); }
.rw-next-device span { margin-top: .25rem; }
.rw-next-device--ts60 { left: 7%; width: min(42%, 290px); }
.rw-next-device--collector { right: 5%; bottom: 9%; width: min(37%, 260px); }

/* RailWise AI */
.rw-next-ai { color: #fff; background: #071a2c; }
.rw-next-ai .rw-next-kicker, .rw-next-ai h2 em { color: #83def2; }
.rw-next-ai__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .64fr); gap: clamp(2rem, 6vw, 6rem); align-items: end; }
.rw-next-ai__head > p { max-width: 31rem; color: #aec0ca; line-height: 1.8; }
.rw-next-ai__screen { margin: clamp(2.5rem, 5vw, 4.5rem) 0 0; overflow: hidden; background: #eef2f4; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.rw-next-window-bar { display: flex; align-items: center; gap: .9rem; min-height: 42px; padding: 0 .95rem; border-bottom: 1px solid #d5dee5; color: #536572; background: #fff; font: .72rem/1 var(--rw-font-num, ui-sans-serif); }
.rw-next-window-bar > span { display: inline-flex; gap: .28rem; }
.rw-next-window-bar i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #aebbc3; }
.rw-next-window-bar i:first-child { background: #e4ad65; }
.rw-next-window-bar i:last-child { background: #79b6cb; }
.rw-next-window-bar b { color: #203745; font-weight: 700; }
.rw-next-window-bar small { margin-left: auto; color: #80909a; }
.rw-next-ai__screen img { display: block; width: 100%; height: auto; }
.rw-next-ai__screen figcaption { display: flex; align-items: center; gap: .85rem; padding: .8rem 1rem; color: #59707d; background: #fff; font-size: .76rem; }
.rw-next-ai__screen figcaption i { color: var(--rw-next-blue); font-style: normal; }
.rw-next-ai__actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.75rem; }
.rw-next-button { display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; padding: 0 1.2rem; border-radius: 2px; font-size: .88rem; font-weight: 650; text-decoration: none; transition: transform 180ms ease, background 180ms ease; }
.rw-next-button:hover { transform: translateY(-2px); }
.rw-next-button--blue { color: #fff !important; background: var(--rw-next-blue); }
.rw-next-button--blue:hover { background: #005ed6; }
.rw-next-text-link { color: var(--rw-next-blue); font-size: .86rem; font-weight: 650; text-decoration: none; }
.rw-next-ai .rw-next-text-link { color: #9edfeb; }
.rw-next-text-link:hover { text-decoration: underline; }

/* Application paths */
.rw-next-scenes { background: #fff; }
.rw-next-scenes__head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(270px, .65fr); gap: 3rem 5rem; align-items: end; }
.rw-next-scenes__head > p { color: var(--rw-next-muted); line-height: 1.8; }
.rw-next-scenes__list { margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--rw-next-line); }
.rw-next-scene { display: grid; grid-template-columns: minmax(240px, .82fr) minmax(270px, 1fr) 2rem; gap: 1.5rem; align-items: center; padding: 1.35rem 0; border-bottom: 1px solid var(--rw-next-line); text-decoration: none; transition: padding 220ms ease, color 220ms ease; }
.rw-next-scene:hover { padding-inline: .8rem; color: var(--rw-next-blue); }
.rw-next-scene__main { display: grid; gap: .35rem; }
.rw-next-scene__eyebrow { color: var(--rw-next-blue); font-size: .72rem; }
.rw-next-scene h3 { font-size: clamp(1.1rem, 1rem + .35vw, 1.35rem); font-weight: 600; }
.rw-next-scene__detail { display: grid; gap: .2rem; color: var(--rw-next-muted); font-size: .81rem; line-height: 1.5; }
.rw-next-scene__detail b { color: #304653; font-weight: 500; }
.rw-next-scene__arrow { justify-self: end; color: var(--rw-next-blue); font-size: 1.25rem; }

/* Verifiable credentials and closing conversion */
.rw-next-credentials { background: #eef3f6; }
.rw-next-credentials__head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.rw-next-credentials__head h2 { flex: 1; }
.rw-next-credentials__head > .rw-next-text-link { margin-bottom: .3rem; white-space: nowrap; }
.rw-next-credentials__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.rw-next-credential { display: grid; grid-template-columns: minmax(120px, 44%) 1fr; gap: 1rem; align-items: center; padding: .7rem; background: #fff; text-decoration: none; transition: transform 220ms ease, box-shadow 220ms ease; }
.rw-next-credential:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(26,57,79,.11); }
.rw-next-credential__image { display: block; aspect-ratio: 480 / 351; overflow: hidden; background: #e4ebef; }
.rw-next-credential__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rw-next-credential__label { display: grid; gap: .25rem; }
.rw-next-credential__label b { font-size: .88rem; font-weight: 600; }
.rw-next-credential__label small { color: var(--rw-next-muted); font-size: .74rem; line-height: 1.45; }
.rw-next-final { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-top: clamp(3rem, 5vw, 4.5rem); padding: 1.8rem 0 2.2rem; border-top: 1px solid #cdd9e0; }
.rw-next-final p { color: #314b5a; font-size: 1.05rem; }
.rw-next-final > div { display: flex; align-items: center; gap: 1.5rem; white-space: nowrap; }
.rw-next-button--dark { color: #fff !important; background: #0b2537; }
.rw-next-button--dark:hover { background: #123c55; }

@media (prefers-reduced-motion: reduce) {
  .rw-next *, .rw-next *::before, .rw-next *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 900px) {
  .rw-next-product__layout { grid-template-columns: minmax(230px, .75fr) minmax(360px, 1.25fr); gap: 2rem; }
  .rw-next-films { grid-template-columns: 1fr; gap: 1.1rem; }
  .rw-next-films__heading { max-width: 34rem; }
  .rw-next-credentials__cards { grid-template-columns: 1fr; }
  .rw-next-credential { grid-template-columns: 150px 1fr; }
}
@media (max-width: 720px) {
  .rw-next-shell { width: min(100% - 40px, var(--rw-next-max)); }
  body.page-home .rw-next .rw-next-product,
  body.page-home .rw-next .rw-next-ai,
  body.page-home .rw-next .rw-next-scenes { padding: 4.25rem 0 !important; }
  body.page-home .rw-next .rw-next-credentials { padding: 4.25rem 0 0 !important; }
  .rw-next-product__layout, .rw-next-ai__head, .rw-next-scenes__head { grid-template-columns: 1fr; gap: 2rem; }
  .rw-next-films { margin-top: 2rem; }
  .rw-next-films__grid { grid-template-columns: 1fr; gap: 1.35rem; }
  .rw-next-product__visual { min-height: 340px; }
  .rw-next-device--ts60 { left: 3%; width: 42%; }
  .rw-next-device--collector { right: 4%; width: 38%; }
  .rw-next-scene { grid-template-columns: 1fr 1.5rem; gap: .7rem; }
  .rw-next-scene__detail { grid-column: 1; }
  .rw-next-scene__arrow { grid-column: 2; grid-row: 1 / span 2; }
  .rw-next-credentials__head, .rw-next-final { display: block; }
  .rw-next-credentials__head > .rw-next-text-link { display: inline-block; margin-top: 1.2rem; }
  .rw-next-final > div { margin-top: 1.25rem; flex-wrap: wrap; white-space: normal; }
}
@media (max-width: 480px) {
  .rw-next h2 { font-size: clamp(2rem, 10vw, 2.75rem); }
  .rw-next-product__visual { min-height: 285px; }
  .rw-next-window-bar { gap: .55rem; padding-inline: .65rem; }
  .rw-next-window-bar b { font-size: .63rem; }
  .rw-next-window-bar small { display: none; }
  .rw-next-ai__screen figcaption { gap: .4rem; overflow-x: auto; font-size: .64rem; white-space: nowrap; }
  .rw-next-ai__actions { flex-wrap: wrap; }
  .rw-next-credential { grid-template-columns: 42% 1fr; }
  .rw-next-film__play { width: 42px; }
}
