/*
 * SLC V7 - Signal Cabin Glass
 * Promotes the selected V1 Hero direction into the bilingual main site.
 */

:root {
  --v7-navy: #06152b;
  --v7-cyan: #25b8ff;
  --v7-blue: #1677ff;
  --v7-amber: #ffb44a;
  --v7-text: #f3f8fc;
  --v7-muted: #b9ccda;
}

/* Dark photographic stage with local rail light, not a full-surface gradient. */

.hero {
  --v7-shift-near-x: 0px;
  --v7-shift-near-y: 0px;
  background: var(--v7-navy);
}

.hero-media img {
  object-position: 45% center;
  filter: saturate(1.12) contrast(1.08) brightness(0.75);
}

.hero-media::after,
[dir="rtl"] .hero-media::after {
  background: transparent;
}

.hero-shade,
[dir="rtl"] .hero-shade {
  background: rgb(3 14 30 / 0.42);
}

.hero::before {
  background: transparent;
  -webkit-mask-image: none;
  mask-image: none;
}

.hero::after {
  display: none;
}

/* The panel occupies the reading side while the switchyard remains exposed. */

.hero-stage {
  grid-template-columns: minmax(22rem, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 4vw, 5rem);
  padding-block: calc(var(--header-height) + 1rem) 4.5rem;
}

[dir="rtl"] .hero-stage {
  grid-template-columns: minmax(0, 7fr) minmax(22rem, 5fr);
}

[dir="ltr"] .hero-copy {
  grid-column: 1 / -1;
  justify-self: stretch;
  margin-right: auto;
  margin-left: 0;
}

[dir="rtl"] .hero-copy {
  grid-column: 1 / -1;
  justify-self: stretch;
  margin-right: 0;
  margin-left: auto;
}

.hero-copy {
  width: min(55vw, 68rem);
  max-width: 68rem;
}

.hero-copy.glass-box-shell {
  isolation: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Interactive glass surface supplied for the hero; the existing content stays intact. */

.glass-box {
  --pointer-x: 50%;
  --pointer-y: 28%;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: clamp(2rem, 4.2vw, 4.35rem);
  overflow: hidden;
  color: #fff;
  background: rgb(255 255 255 / 0.12);
  -webkit-backdrop-filter: blur(18px) saturate(94%) brightness(95%) contrast(114%);
  backdrop-filter: blur(18px) saturate(94%) brightness(95%) contrast(114%);
  border-radius: 20px;
  box-shadow:
    0 18px 42px rgb(0 0 0 / 0.28),
    inset 0 1px 0 rgb(255 255 255 / 0.13),
    inset 0 -12px 24px rgb(0 0 0 / 0.1);
  transform: perspective(900px) rotateX(var(--rotate-x)) rotateY(var(--rotate-y));
  transform-style: preserve-3d;
  transition:
    transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1),
    border-radius 420ms ease,
    backdrop-filter 420ms ease,
    -webkit-backdrop-filter 420ms ease;
}

.glass-box > span {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glass-box__content {
  position: relative;
  z-index: 10;
}

.glass-box__ambient {
  z-index: 2;
  background:
    radial-gradient(circle at 82% 12%, rgb(183 124 255 / 0.18), transparent 72%),
    linear-gradient(
      152deg,
      color-mix(in oklab, #0f52a3 10%, transparent),
      color-mix(in oklab, white 3%, transparent)
    );
}

.glass-box__noise {
  z-index: 3;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
  background-size: 150px 150px;
  mix-blend-mode: soft-light;
}

.glass-box__specular {
  z-index: 4;
  background:
    radial-gradient(44% 90% at 19.5% -8%, rgb(255 255 255 / 0.24), transparent 58%),
    radial-gradient(80% 110% at 100% 100%, rgb(183 124 255 / 0.1), transparent 60%);
}

.glass-box__glare {
  z-index: 5;
  background: radial-gradient(
    circle at var(--pointer-x) var(--pointer-y),
    rgb(255 255 255 / 0.3),
    rgb(255 255 255 / 0.06) 16%,
    transparent 44%
  );
}

.glass-box__rim {
  z-index: 8;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgb(255 255 255 / 0.58),
    rgb(255 255 255 / 0.06) 34%,
    rgb(0 0 0 / 0.18) 68%,
    rgb(255 255 255 / 0.2)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.glass-box:hover {
  border-radius: 26px;
  -webkit-backdrop-filter: blur(16px) saturate(94%) brightness(95%) contrast(114%);
  backdrop-filter: blur(16px) saturate(94%) brightness(95%) contrast(114%);
  transform:
    perspective(900px)
    translateY(-5px)
    rotateX(var(--rotate-x))
    rotateY(var(--rotate-y))
    scale(1.008);
}

.glass-box.is-pressed {
  transform: perspective(900px) rotateX(var(--rotate-x)) rotateY(var(--rotate-y)) scale(0.992);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-box {
    background: rgb(24 30 42 / 0.9);
  }
}

.hero .kicker {
  margin: 0 0 1.25rem;
  color: var(--v7-cyan);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-weight: 700;
}

.hero h1,
html[lang="fa"] .hero h1 {
  max-width: 17ch;
  margin: 0;
  color: var(--v7-text);
  font-family: "IRANYekanX", "IRANSansX", sans-serif;
  font-size: clamp(2.75rem, 4.2vw, 4.35rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.055em;
  text-shadow: 0 16px 44px rgb(0 8 22 / 0.34);
}

html[lang="en"] .hero h1 {
  max-width: 14ch;
  font-family: "IRANSansX", sans-serif;
  font-size: clamp(2.8rem, 4.15vw, 4.45rem);
  line-height: 1.03;
}

.hero-lead {
  max-width: 34rem;
  margin-top: 1.5rem;
  color: var(--v7-muted);
  font-size: clamp(1rem, 1.45vw, 1.16rem);
  line-height: 2;
}

html[lang="en"] .hero-lead {
  line-height: 1.7;
}

.operation-promise,
.journey-callout,
.material-callout {
  padding: 1rem 1.25rem;
  border-inline-start: 3px solid var(--v7-cyan);
  background: rgb(37 184 255 / 0.08);
}

.operation-promise {
  max-width: 38rem;
  color: var(--v7-text);
}

.journey-callout {
  margin-top: 2rem;
  color: #0a3152;
}

.material-callout {
  color: #0a3152;
  font-size: 0.95rem;
  line-height: 2;
}

.hero-actions {
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero .button {
  min-height: 3.4rem;
  padding-inline: 1.55rem;
  border-radius: 0.9rem;
}

.hero .button-primary {
  border-color: rgb(37 184 255 / 0.46);
  background: #0c72c9;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.26),
    0 14px 34px rgb(22 119 255 / 0.26);
  color: #f7fbff;
}

.hero .button:disabled {
  filter: saturate(0.82);
}

.hero .button-quiet {
  border-color: rgb(255 255 255 / 0.24);
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.13);
  color: var(--v7-text);
}

.hero .button-quiet:is(:hover, :focus-visible) {
  border-color: rgb(37 184 255 / 0.52);
  background: rgb(37 184 255 / 0.12);
}

/* A single railway signal remains as the only illustrative rail motif. */

.v7-rail-lighting {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.v7-signal-mast {
  position: absolute;
  bottom: 24%;
  left: 11%;
  display: grid;
  gap: 0.6rem;
  width: 2.5rem;
  padding: 0.5rem;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: 1.2rem;
  background: rgb(4 18 35 / 0.7);
  box-shadow: 0 18px 34px rgb(0 7 18 / 0.42);
  transform: translate3d(var(--v7-shift-near-x), var(--v7-shift-near-y), 0);
}

.v7-signal-lamp {
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
}

.v7-signal-lamp-cyan {
  background: var(--v7-cyan);
  box-shadow: 0 0 20px var(--v7-cyan);
}

.v7-signal-lamp-amber {
  background: var(--v7-amber);
  box-shadow: 0 0 20px var(--v7-amber);
}

[dir="ltr"] .v7-signal-mast {
  right: 11%;
  left: auto;
}

.v7-visual-caption {
  position: absolute;
  bottom: 1.7rem;
  left: 0;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  direction: rtl;
  color: rgb(243 248 252 / 0.52);
  font-size: 0.75rem;
}

[dir="ltr"] .v7-visual-caption {
  right: 0;
  left: auto;
  direction: ltr;
}

.v7-visual-caption i {
  width: 2.8rem;
  height: 1px;
  background: rgb(37 184 255 / 0.56);
}

.hero-baseline {
  background: rgb(37 184 255 / 0.09);
}

.hero-baseline-active {
  background: var(--v7-cyan);
  box-shadow: 0 0 16px rgb(37 184 255 / 0.42);
}

html[lang="fa"] .countdown-grid {
  direction: ltr;
}

@media (min-width: 64.0625rem) {
  .glass-box {
    padding: clamp(1.85rem, 3vw, 3rem);
  }
}

@media (max-width: 64rem) {
  .hero-stage,
  [dir="rtl"] .hero-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    width: min(82vw, 48rem);
  }

  .glass-box {
    padding: clamp(1.75rem, 3.5vw, 2.75rem);
  }

  [dir="ltr"] .hero-copy,
  [dir="rtl"] .hero-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 47.99rem) {
  .hero,
  .hero-stage,
  [dir="rtl"] .hero-stage {
    min-height: 100dvh;
  }

  .hero-media img {
    object-position: 42% center;
    filter: saturate(1.1) contrast(1.08) brightness(0.68);
  }

  .hero-shade,
  [dir="rtl"] .hero-shade {
    background: rgb(3 14 30 / 0.42);
  }

  .hero-stage,
  [dir="rtl"] .hero-stage {
    align-items: end;
    padding-block: calc(var(--header-height) + 1rem) 2.5rem;
  }

  .hero-copy {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding: 1.5rem;
    border-radius: 1.4rem;
    background:
      linear-gradient(135deg, rgb(255 255 255 / 0.17), rgb(255 255 255 / 0.06)),
      rgb(6 24 47 / 0.1);
    backdrop-filter: blur(16px) saturate(170%) brightness(1.08);
    -webkit-backdrop-filter: blur(16px) saturate(170%) brightness(1.08);
  }

  .glass-box {
    padding: 1.5rem;
  }

  .hero h1,
  html[lang="fa"] .hero h1,
  html[lang="en"] .hero h1 {
    font-size: clamp(2.65rem, 12.2vw, 3.75rem);
  }

  html[lang="fa"] .hero h1 {
    max-width: 18ch;
    font-size: clamp(2.2rem, 9.8vw, 3rem);
  }

  .hero-lead {
    margin-top: 1.15rem;
    font-size: 0.96rem;
    line-height: 1.9;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 1.5rem;
  }

  .hero .button {
    min-width: 0;
    padding-inline: 0.8rem;
  }

  .v7-signal-mast {
    top: 15%;
    bottom: auto;
    left: 7%;
  }

  [dir="ltr"] .v7-signal-mast {
    right: 7%;
    left: auto;
  }

  .v7-visual-caption {
    display: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass-box {
    background: rgb(24 30 42 / 0.94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glass-box {
    transform: none !important;
    transition: none !important;
  }

  .v7-signal-mast {
    transform: none !important;
  }
}
