/* index.html — page-only styles (responsive rules the shared style.css lost, carousel fixes) */

/* ==========================================================================
   HERO SLIDER (index.js drives it)
   - all slides share one grid cell, so the hero is always as tall as the tallest slide (no jump)
   - direction-aware: --hero-dir is 1 (next) or -1 (previous), set on .hero-wrapper by index.js
   - copy fades/slides/de-blurs in a stagger, the visual column crossfades with a scale
   - only opacity / translate / scale / filter are animated (GPU friendly). Intentionally NOT
     switched off by prefers-reduced-motion (client preference, see common.js)
   ========================================================================== */
.hero-wrapper { --hero-dir: 1; --hero-ease: cubic-bezier(.22, 1, .36, 1); }
.hero-stage { display: grid; touch-action: pan-y; }
.hero-wrapper .hero-slide {
  display: block; animation: none; grid-area: 1 / 1; align-self: center;
  padding: 64px 0 34px;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity .45s ease .1s, visibility 0s linear .75s;
}
.hero-wrapper .hero-slide.active {
  visibility: visible; opacity: 1; pointer-events: auto; z-index: 1;
  transition: opacity .3s ease, visibility 0s;
}

/* copy column: each line enters on its own beat */
.hero-copy > * {
  transition: opacity .55s ease, translate .8s var(--hero-ease), filter .6s ease;
}
.hero-slide:not(.active) .hero-copy > * {
  opacity: 0; translate: calc(var(--hero-dir) * 42px) 0; filter: blur(7px);
}
.hero-slide.is-leaving .hero-copy > * {
  translate: calc(var(--hero-dir) * -42px) 0; filter: blur(5px);
  transition-duration: .35s, .5s, .35s; transition-delay: 0s;
}
.hero-slide.active .hero-copy > :nth-child(1) { transition-delay: .05s; }
.hero-slide.active .hero-copy > :nth-child(2) { transition-delay: .12s; }
.hero-slide.active .hero-copy > :nth-child(3) { transition-delay: .2s; }
.hero-slide.active .hero-copy > :nth-child(4) { transition-delay: .28s; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* hero.css plays the first-load entrance (hxRise) on the copy. From the first slide change on
   (index.js adds .has-slid) the direction-aware transitions above take over, so the two don't stack.
   The underline draw + glow from hero.css keep replaying on every slide. */
.hero-wrapper.has-slid .hero-stage .hero-slide .hero-grid > .hero-copy > * { animation: none; }

/* visual column: crossfade + scale (the card itself is styled/tilted by hero-card.css) */
.hero-visual-col {
  transition: opacity .6s ease, translate .9s var(--hero-ease), scale .9s var(--hero-ease);
}
.hero-slide:not(.active) .hero-visual-col { opacity: 0; scale: .93; translate: calc(var(--hero-dir) * 60px) 0; }
.hero-slide.is-leaving .hero-visual-col {
  scale: 1.04; translate: calc(var(--hero-dir) * -40px) 0;
  transition-duration: .45s, .6s, .6s;
}
.hero-slide.active .hero-visual-col { transition-delay: .08s; }

/* incoming slide is placed at its start position without animating (index.js adds it for one frame) */
.hero-slide.is-enter, .hero-slide.is-enter * { transition: none !important; }

/* ---------------------------------------------------------- trust strip */
.hero-trust {
  list-style: none; margin: 0; padding: 18px 0 30px;
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center;
  border-top: 1px dashed var(--border);
  position: relative; z-index: 2;
}
.hero-trust li {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--text-muted);
}
.hero-trust li + li::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--border-strong); margin-right: 19px;
}
.hero-trust svg {
  width: 26px; height: 26px; padding: 5px; flex-shrink: 0;
  border-radius: 8px; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
}

/* ---------------------------------------------------------- slide tabs: minimal timeline (one colour)
   A thin line on top of each item fills while its slide is shown; no boxes, no per-tab colours. */
.hero-slider-nav { display: block; padding: 0 0 6px; position: relative; z-index: 2; border-top: 1px solid var(--border); }
.hero-nav-inner { display: flex; align-items: stretch; gap: 28px; }
.hero-slider-nav .slider-btn-group {
  flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px;
}
.hero-slider-nav .slider-tab-btn {
  position: relative; display: flex; align-items: baseline; gap: 12px; min-width: 0;
  padding: 18px 0 16px; text-align: left; cursor: pointer;
  background: none; border: 0; border-radius: 0; box-shadow: none;
  color: var(--text-dim);
  transition: color .3s ease;
}
.hero-slider-nav .slider-tab-btn:hover { color: var(--text-muted); }
.hero-slider-nav .slider-tab-btn.active { color: var(--text); }
.hero-slider-nav .slider-tab-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
.tab-num {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 0; border: 0; background: none; color: inherit; opacity: .7; flex-shrink: 0;
}
.slider-tab-btn.active .tab-num { color: var(--primary); opacity: 1; }
.tab-label { font-size: 14.5px; font-weight: 700; line-height: 1.3; min-width: 0; }
.tab-progress {
  position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: transparent;
}
.tab-fill {
  display: block; height: 100%; width: 100%;
  background: var(--primary);
  transform: scaleX(0); transform-origin: left center;
}
/* index.js restarts this animation for every slide and moves on when it ends */
.slider-tab-btn.active .tab-fill { animation: heroTabFill var(--hero-interval, 7s) linear forwards; }
.hero-wrapper.is-paused .slider-tab-btn.active .tab-fill { animation-play-state: paused; }
@keyframes heroTabFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* play / pause: icon only */
.hero-play-btn {
  flex-shrink: 0; width: 34px; display: grid; place-items: center; cursor: pointer;
  background: none; border: 0; color: var(--text-dim); transition: color .25s ease;
}
.hero-play-btn:hover { color: var(--text); }
.hero-play-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.hero-play-btn svg { width: 16px; height: 16px; }
.hero-play-btn .ic-play, .hero-wrapper.is-stopped .hero-play-btn .ic-pause { display: none; }
.hero-wrapper.is-stopped .hero-play-btn .ic-play { display: block; }
@media (max-width: 1080px) {
  .hero-wrapper .hero-slide { align-self: start; padding-top: 48px; }
}
@media (max-width: 640px) {
  .hero-wrapper .hero-slide { padding: 36px 0 26px; }
  .hero-trust { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 16px 0 22px; }
  .hero-trust li { font-size: 12.5px; gap: 8px; }
  .hero-trust li + li::before { display: none; }
  .hero-nav-inner { gap: 8px; }
  .hero-slider-nav .slider-btn-group { gap: 8px; }
  .hero-slider-nav .slider-btn-group { gap: 14px; }
  .hero-slider-nav .slider-tab-btn { flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 0 12px; }
  .tab-label { font-size: 12px; }
  .tab-num { font-size: 11px; }
  .hero-play-btn { width: 28px; }
}

/* reliability progress: one segment per slide group, filled ones stay visible */
.fiab-segments { display: flex; align-items: center; gap: 10px; }
.fiab-segment .fiab-segment-fill { height: 100%; background: var(--primary); }
.fiab-segment.active .fiab-segment-fill { box-shadow: 0 0 10px var(--primary-glow); }

/* latency diagnostics is a real button now */
button.net-test-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }

/* long panel URL must not push the ONLINE pill out of the mockup on phones */
.mockup-top { gap: 10px; }
.mockup-top > div { min-width: 0; }
#mockupUrl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#serverStateBadge { flex-shrink: 0; }

/* order button became a link */
#btnDeployGame { display: inline-flex; align-items: center; gap: 8px; }

@media (max-width: 1080px) {
  .catalog-tech-grid { grid-template-columns: 1fr 1fr; }
  .game-layout { grid-template-columns: 1fr; }
  .fiab-slide { flex: 0 0 100%; }
}

@media (max-width: 640px) {
  .hero-title { font-size: 32px; }
  .catalog-tech-grid { grid-template-columns: 1fr; }
  .floating-telemetry { grid-template-columns: 1fr; }
  .game-metrics-row { grid-template-columns: 1fr; gap: 10px; }
  .terminal-action-row { flex-wrap: wrap; gap: 12px; }
  .fiab-industrial-panel { flex-direction: column; gap: 14px; align-items: flex-start; }
  .fiab-indicators { flex-wrap: wrap; gap: 12px; }
  .fiab-segment { width: 44px; }
  .fiab-specs-bar { flex-wrap: wrap; gap: 8px 16px; }
}

/* locations list: soft blue sheen that sweeps left -> right across the card on hover */
.net-rail-card::after {
  width: 60%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 16%, transparent), transparent);
  transition: left .75s cubic-bezier(.22, 1, .36, 1);
}
html[data-theme="light"] .net-rail-card::after {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 12%, transparent), transparent);
}

/* client: no visible slide tabs / pause button. The nav stays in the DOM (visually hidden, inert) because its
   progress animation drives the 7s autoplay; display:none would stop the slider. */
.hero-slider-nav {
  position: absolute !important; width: 1px; height: 1px; padding: 0 !important; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0 !important; white-space: nowrap;
}
.hero-trust { padding-bottom: 40px; }

/* ==========================================================================
   REVIEWS (#testimoniale): real Trustpilot reviews, verbatim. Self-made star mark, no third-party requests.
   #00b67a is Trustpilot's own star colour (their mark); everything else uses the site tokens.
   ========================================================================== */
.rv-section { --tp-green: #00b67a; --tp-empty: rgba(255, 255, 255, .16); }
html[data-theme="light"] .rv-section { --tp-empty: #dcdce6; }

.rv-summary {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 32px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 22px 26px; margin-bottom: 20px;
}
.rv-score { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; min-width: 0; }
.tp-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.tp-brand svg { width: 22px; height: 22px; color: var(--tp-green); }
.rv-score-meta { margin: 0; font-size: 14px; color: var(--text-muted); }
.rv-score-meta strong { color: var(--text); }
.rv-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rv-actions .btn { display: inline-flex; align-items: center; gap: 8px; }

.tp-stars { display: inline-flex; gap: 2px; flex-shrink: 0; }
.tp-s { width: 20px; height: 20px; display: grid; place-items: center; background: var(--tp-green); color: #fff; }
.tp-s svg { width: 78%; height: 78%; }
.tp-stars--lg .tp-s { width: 28px; height: 28px; }
.tp-s--part { background: linear-gradient(90deg, var(--tp-green) var(--p), var(--tp-empty) var(--p)); }

/* carousel (index.js): scroll-snap track, 3 / 2 / 1 cards per view, equal heights, arrows + dots + pause */
.rv-carousel { position: relative; }
.rv-track {
  --rv-gap: 16px; --rv-per: 3;
  display: flex; gap: var(--rv-gap); align-items: stretch;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rv-track::-webkit-scrollbar { display: none; }
.rv-card {
  flex: 0 0 calc((100% - (var(--rv-per) - 1) * var(--rv-gap)) / var(--rv-per));
  scroll-snap-align: start;
  min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 20px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: border-color .2s ease;
}
.rv-card:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.rv-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.rv-top time { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.rv-title, .rv-text {
  margin: 0; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}
.rv-title { font-size: 15.5px; font-weight: 700; line-height: 1.35; color: var(--text); -webkit-line-clamp: 2; line-clamp: 2; }
.rv-text { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); -webkit-line-clamp: 4; line-clamp: 4; }
.rv-card.is-open .rv-text { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.rv-more {
  align-self: flex-start; margin-top: -4px; padding: 0; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--primary);
}
.rv-more:hover { text-decoration: underline; }
.rv-author {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.rv-avatar {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 26%, transparent);
}
.rv-who { min-width: 0; }
.rv-who strong { display: block; font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
.rv-who span { font-size: 12px; color: var(--text-dim); }

.rv-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; }
.rv-btn {
  width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text-muted);
  transition: color .2s ease, border-color .2s ease;
}
.rv-btn:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.rv-btn svg { width: 16px; height: 16px; }
.rv-btn:focus-visible, .rv-dot:focus-visible, .rv-more:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.rv-play { margin-left: 4px; }
.rv-play .ic-play, .rv-carousel.is-stopped .rv-play .ic-pause { display: none; }
.rv-carousel.is-stopped .rv-play .ic-play { display: block; }
.rv-dots { display: flex; align-items: center; gap: 2px; }
.rv-dot { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; }
.rv-dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--border-strong);
  transition: width .35s ease, background-color .35s ease;
}
.rv-dot:hover::before { background: var(--text-dim); }
.rv-dot[aria-current="true"]::before { width: 22px; background: var(--primary); }

.rv-note { margin: 16px 0 0; text-align: center; font-size: 12.5px; color: var(--text-dim); }
html[lang="en"] .rv-note { display: none; }   /* only useful on /ro/ and /de/ */

@media (max-width: 1080px) {
  .rv-track { --rv-per: 2; }
}
@media (max-width: 640px) {
  .rv-summary { padding: 18px; }
  .rv-actions, .rv-actions .btn { width: 100%; }
  .rv-actions .btn { justify-content: center; }
  .rv-track { --rv-per: 1; --rv-gap: 12px; }
  .tp-stars--lg .tp-s { width: 24px; height: 24px; }
}
