:root {
  --story-bg: #070504;
  --story-panel: rgba(21, 14, 10, 0.92);
  --story-panel-soft: rgba(30, 19, 13, 0.76);
  --story-line: rgba(226, 169, 80, 0.24);
  --story-line-strong: rgba(243, 190, 100, 0.62);
  --story-gold: #e7b667;
  --story-gold-bright: #ffd892;
  --story-cream: #f7e8cb;
  --story-muted: rgba(247, 232, 203, 0.68);
  --story-red: #b95c48;
  --story-green: #5c9868;
  --story-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
  --story-accent: #d88b53;
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  background: var(--story-bg);
}

html[dir="rtl"] {
  direction: rtl;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 280px;
  margin: 0;
  overflow-x: hidden;
  color: var(--story-cream);
  background:
    radial-gradient(circle at 50% -18%, rgba(201, 124, 53, 0.15), transparent 34%),
    radial-gradient(circle at 7% 48%, rgba(112, 58, 35, 0.10), transparent 25%),
    linear-gradient(180deg, #080605 0%, #060504 48%, #090605 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

body[data-story="bases"] { --story-accent: #8fa4c2; }
body[data-story="trainers"] { --story-accent: #c68cba; }
body[data-story="engines"] { --story-accent: #c89449; }
body[data-story="online"] { --story-accent: #79a995; }
body[data-story="cinema"] { --story-accent: #83a6aa; }

a {
  color: inherit;
}

button,
select {
  font: inherit;
}

button {
  color: inherit;
}

.story-piece-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.story-piece-rain span {
  position: absolute;
  top: -12vh;
  left: var(--rain-x);
  color: rgba(235, 198, 137, var(--rain-opacity));
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--rain-size);
  filter: blur(var(--rain-blur, 0));
  animation: storyRain var(--rain-duration) linear infinite;
  animation-delay: var(--rain-delay);
  transform: translate3d(0, -12vh, 0) rotate(var(--rain-rotate));
}

@keyframes storyRain {
  0% { transform: translate3d(0, -14vh, 0) rotate(var(--rain-rotate)); }
  48% { transform: translate3d(var(--rain-sway), 52vh, 0) rotate(calc(var(--rain-rotate) + 74deg)); }
  100% { transform: translate3d(calc(var(--rain-sway) * -0.45), 116vh, 0) rotate(calc(var(--rain-rotate) + 148deg)); }
}

.story-header,
.story-main,
.story-footer {
  position: relative;
  z-index: 2;
}

.story-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 12px clamp(18px, 4vw, 72px);
  border-bottom: 1px solid rgba(231, 182, 103, 0.16);
  background: rgba(8, 6, 5, 0.82);
  backdrop-filter: blur(18px);
}

.story-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: var(--story-cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 1.35vw, 21px);
  font-weight: 800;
  text-decoration: none;
}

.story-brand img {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
}

.story-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.story-nav-link,
.story-language,
.story-header-download {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(231, 182, 103, 0.22);
  border-radius: 999px;
  color: rgba(247, 232, 203, 0.82);
  background: rgba(30, 19, 13, 0.58);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.story-nav-link {
  padding: 0 17px;
}

.story-language {
  position: relative;
  padding: 0 8px 0 14px;
}

.story-language select {
  min-height: 36px;
  border: 0;
  outline: 0;
  color: var(--story-cream);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}

.story-language option {
  color: #21140e;
  background: #f4e3c4;
}

.story-header-download {
  min-width: 116px;
  padding: 0 21px;
  border-color: rgba(255, 210, 134, 0.64);
  color: #211209;
  background: linear-gradient(135deg, #ffd28a, #d9903d 72%, #ba5b3e);
  box-shadow: 0 8px 28px rgba(194, 116, 45, 0.26);
}

.story-nav-link:hover,
.story-nav-link:focus-visible,
.story-language:hover {
  border-color: rgba(255, 214, 145, 0.66);
  background: rgba(61, 37, 22, 0.82);
  transform: translateY(-1px);
}

.story-header-download:hover,
.story-header-download:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(213, 136, 58, 0.35);
}

.story-main {
  width: min(100%, 1760px);
  margin: 0 auto;
  padding: 0 clamp(16px, 3.6vw, 68px) 84px;
}

.story-hero {
  min-height: min(850px, calc(100svh - 72px));
  display: grid;
  grid-template-columns: minmax(300px, 0.76fr) minmax(0, 1.34fr);
  align-items: center;
  gap: clamp(30px, 5vw, 84px);
  padding: clamp(54px, 7vw, 104px) 0 clamp(48px, 6vw, 88px);
}

.story-hero-copy {
  max-width: 660px;
}

.story-kicker,
.story-section-kicker,
.story-final-kicker {
  margin: 0 0 14px;
  color: var(--story-gold);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.story-title {
  max-width: 12ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(43px, 5.1vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.story-lead {
  max-width: 62ch;
  margin: clamp(22px, 2.4vw, 34px) 0 0;
  color: var(--story-muted);
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.65;
}

.story-points {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 28px 0 0;
}

.story-point {
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--story-accent) 48%, transparent);
  border-radius: 999px;
  padding: 6px 13px;
  color: rgba(247, 232, 203, 0.86);
  background: color-mix(in srgb, var(--story-accent) 9%, rgba(23, 15, 11, 0.8));
  font-size: 12px;
  font-weight: 800;
}

.story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}

.story-button {
  min-height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(231, 182, 103, 0.26);
  border-radius: 14px;
  padding: 0 21px;
  color: var(--story-cream);
  background: rgba(35, 22, 15, 0.68);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.story-button--primary {
  border-color: rgba(255, 211, 139, 0.62);
  color: #23140a;
  background: linear-gradient(135deg, #ffd28b, #d89141 70%, #b75b43);
  box-shadow: 0 13px 34px rgba(181, 103, 48, 0.24);
}

.story-button:hover,
.story-button:focus-visible {
  border-color: rgba(255, 216, 150, 0.76);
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.30);
  outline: none;
}

.story-hero-visual,
.story-section-visual {
  min-width: 0;
  margin: 0;
}

.story-screen-card {
  position: relative;
  padding: clamp(8px, 1vw, 13px);
  overflow: hidden;
  border: 1px solid var(--story-line);
  border-radius: clamp(18px, 2vw, 30px);
  background:
    linear-gradient(145deg, rgba(255, 213, 145, 0.06), transparent 35%),
    rgba(17, 11, 8, 0.88);
  box-shadow: var(--story-shadow);
}

.story-screen-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, color-mix(in srgb, var(--story-accent) 24%, transparent), transparent 42%);
  pointer-events: none;
}

.story-shot-shell {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 0;
  border-radius: clamp(12px, 1.45vw, 21px);
  background: #0b0806;
}

.story-shot {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.story-shot picture,
.story-shot img {
  width: 100%;
  display: block;
}

.story-shot img {
  height: auto;
  aspect-ratio: 160 / 87;
  object-fit: cover;
  transition: transform 520ms cubic-bezier(.2, .72, .26, 1), filter 260ms ease;
}

.story-shot[data-shot="speed"] img {
  aspect-ratio: 479 / 309;
}

.story-shot:hover img,
.story-shot:focus-visible img {
  transform: scale(1.012);
  filter: brightness(1.035);
}

.story-shot:focus-visible {
  outline: 2px solid var(--story-gold-bright);
  outline-offset: -3px;
}

.story-zoom-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 218, 157, 0.34);
  border-radius: 999px;
  padding: 5px 11px;
  color: rgba(255, 239, 210, 0.88);
  background: rgba(8, 6, 5, 0.78);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 850;
  pointer-events: none;
}

.story-caption {
  position: relative;
  z-index: 1;
  margin: 11px 5px 1px;
  color: rgba(247, 232, 203, 0.56);
  font-size: 12px;
  line-height: 1.45;
}

.story-divider {
  width: min(1180px, 78%);
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(231, 182, 103, 0.30), transparent);
}

.story-sections {
  display: grid;
  gap: clamp(72px, 9vw, 140px);
  padding: clamp(76px, 9vw, 136px) 0;
}

.story-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}

.story-section.is-reversed {
  grid-template-columns: minmax(0, 1.38fr) minmax(280px, 0.62fr);
}

.story-section.is-reversed .story-section-copy {
  order: 2;
}

.story-section.is-reversed .story-section-visual {
  order: 1;
}

.story-section-copy {
  max-width: 560px;
}

.story-section-number {
  width: 43px;
  height: 43px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 23px;
  border: 1px solid color-mix(in srgb, var(--story-accent) 58%, transparent);
  border-radius: 50%;
  color: var(--story-gold-bright);
  background: color-mix(in srgb, var(--story-accent) 12%, rgba(20, 13, 9, 0.9));
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 900;
}

.story-section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 3.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.story-section-copy > p:last-child {
  margin: 20px 0 0;
  color: var(--story-muted);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.72;
}

.story-feature-block {
  padding: 18px 0 clamp(82px, 10vw, 144px);
}

.story-feature-head {
  max-width: 820px;
  margin: 0 auto 35px;
  text-align: center;
}

.story-feature-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 62px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.story-feature-head p {
  margin: 18px auto 0;
  color: var(--story-muted);
  font-size: clamp(16px, 1.2vw, 19px);
}

.story-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.story-feature-card {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--story-line);
  border-radius: 22px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--story-accent) 8%, transparent), rgba(20, 13, 9, 0.90));
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.25);
}

.story-feature-card span {
  display: block;
  margin-bottom: 28px;
  color: var(--story-gold);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.15em;
}

.story-feature-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.12;
}

.story-feature-card p {
  margin: 13px 0 0;
  color: var(--story-muted);
  font-size: 14px;
  line-height: 1.62;
}

.story-final {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
  margin-top: 8px;
  padding: clamp(36px, 5vw, 70px);
  border: 1px solid rgba(231, 182, 103, 0.30);
  border-radius: clamp(24px, 3vw, 42px);
  background:
    radial-gradient(circle at 92% 10%, color-mix(in srgb, var(--story-accent) 18%, transparent), transparent 36%),
    linear-gradient(135deg, rgba(43, 27, 17, 0.94), rgba(15, 10, 8, 0.96));
  box-shadow: var(--story-shadow);
}

.story-final h2 {
  max-width: 16ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 4.1vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.story-final p:not(.story-final-kicker) {
  max-width: 68ch;
  margin: 18px 0 0;
  color: var(--story-muted);
  font-size: 17px;
}

.story-final-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.story-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100%, 1760px);
  margin: 0 auto;
  padding: 24px clamp(18px, 3.6vw, 68px) 42px;
  color: rgba(247, 232, 203, 0.44);
  font-size: 12px;
}

.story-footer a {
  color: rgba(247, 232, 203, 0.66);
  text-decoration: none;
}

.story-lightbox[hidden] {
  display: none;
}

.story-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 28px);
  background: rgba(2, 2, 2, 0.92);
  backdrop-filter: blur(14px);
}

.story-lightbox-frame {
  width: min(100%, 1900px);
  max-height: calc(100svh - 42px);
  overflow: auto;
  border: 1px solid rgba(255, 215, 148, 0.36);
  border-radius: 19px;
  background: #070504;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.72);
}

.story-lightbox-frame img {
  width: 100%;
  min-width: min(1120px, 100%);
  display: block;
}

.story-lightbox-close {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 101;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 220, 158, 0.36);
  border-radius: 50%;
  color: var(--story-cream);
  background: rgba(35, 22, 15, 0.94);
  font-size: 26px;
  cursor: pointer;
}

.story-lightbox-caption {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 101;
  max-width: min(80vw, 920px);
  transform: translateX(-50%);
  border: 1px solid rgba(255, 220, 158, 0.26);
  border-radius: 999px;
  padding: 7px 14px;
  color: rgba(255, 240, 214, 0.86);
  background: rgba(20, 13, 9, 0.88);
  font-size: 11px;
  text-align: center;
}

body.is-lightbox-open {
  overflow: hidden;
}

.story-reveal {
  opacity: 1;
  transform: none;
}

.story-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

html[dir="rtl"] .story-title,
html[dir="rtl"] .story-section-copy,
html[dir="rtl"] .story-final-copy {
  text-align: right;
}

html[dir="rtl"] .story-lightbox-close {
  right: auto;
  left: max(14px, env(safe-area-inset-left));
}

@media (max-width: 1120px) {
  .story-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 68px;
  }

  .story-hero-copy {
    max-width: 880px;
  }

  .story-title {
    max-width: 15ch;
  }

  .story-section,
  .story-section.is-reversed {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .story-section.is-reversed .story-section-copy,
  .story-section.is-reversed .story-section-visual {
    order: initial;
  }

  .story-section-copy {
    max-width: 760px;
  }

  .story-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .story-header {
    min-height: 62px;
    gap: 8px;
    padding: 8px 10px;
  }

  .story-brand {
    gap: 7px;
    font-size: 13px;
  }

  .story-brand img {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .story-nav {
    gap: 5px;
  }

  .story-nav-link {
    width: 40px;
    min-width: 40px;
    padding: 0;
    font-size: 0;
  }

  .story-nav-link::before {
    content: "←";
    font-size: 18px;
  }

  html[dir="rtl"] .story-nav-link::before {
    content: "→";
  }

  .story-language {
    padding: 0 4px;
  }

  .story-language select {
    width: 48px;
    font-size: 11px;
  }

  .story-header-download {
    min-width: 84px;
    padding: 0 12px;
    font-size: 11px;
  }

  .story-main {
    padding-right: 11px;
    padding-left: 11px;
    padding-bottom: 54px;
  }

  .story-hero {
    gap: 28px;
    padding: 44px 5px 56px;
  }

  .story-title {
    max-width: none;
    font-size: clamp(38px, 12.5vw, 58px);
  }

  .story-lead {
    font-size: 16px;
    line-height: 1.6;
  }

  .story-points {
    gap: 7px;
  }

  .story-point {
    min-height: 31px;
    padding: 5px 10px;
    font-size: 10px;
  }

  .story-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .story-button {
    width: 100%;
  }

  .story-screen-card {
    padding: 6px;
    border-radius: 17px;
  }

  .story-hero-visual .story-shot img {
    aspect-ratio: 160 / 87;
  }

  .story-section-visual .story-shot-shell {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .story-section-visual .story-shot {
    width: 820px;
    max-width: none;
  }

  .story-section-visual .story-shot img {
    width: 820px;
    max-width: none;
  }

  .story-zoom-hint {
    right: 9px;
    bottom: 9px;
    min-height: 27px;
    padding: 4px 8px;
    font-size: 8px;
  }

  .story-caption {
    margin: 9px 3px 2px;
    font-size: 10px;
  }

  .story-sections {
    gap: 72px;
    padding: 70px 4px;
  }

  .story-section {
    gap: 22px;
  }

  .story-section-number {
    width: 37px;
    height: 37px;
    margin-bottom: 17px;
    font-size: 13px;
  }

  .story-section h2 {
    font-size: clamp(31px, 9.5vw, 43px);
  }

  .story-section-copy > p:last-child {
    margin-top: 15px;
    font-size: 15px;
    line-height: 1.64;
  }

  .story-feature-block {
    padding-bottom: 72px;
  }

  .story-feature-grid {
    grid-template-columns: 1fr;
  }

  .story-feature-card {
    min-height: 0;
  }

  .story-final {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 30px 22px;
    border-radius: 23px;
  }

  .story-final h2 {
    max-width: none;
  }

  .story-final p:not(.story-final-kicker) {
    font-size: 15px;
  }

  .story-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px 34px;
  }

  .story-lightbox {
    place-items: center start;
    overflow-x: auto;
    padding: 8px;
  }

  .story-lightbox-frame {
    width: 1180px;
    max-width: none;
    max-height: calc(100svh - 16px);
  }

  .story-lightbox-frame img {
    min-width: 1180px;
  }

  .story-lightbox-caption {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .story-piece-rain span { animation: none; display: none; }
  .story-reveal { opacity: 1; transform: none; transition: none; }
  .story-shot img,
  .story-button,
  .story-nav-link,
  .story-header-download { transition: none; }
}
