/* Midnight graphite frame. Sidebar, mast, and section surfaces. */
.app-shell { display: flex; min-height: 100vh; background: #080E17; color: #F5F8FC; }
.home-topnav { display: block; }
.home-topnav .app-column { width: 100%; }
.home-topnav .mast-panel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  box-sizing: border-box;
  width: min(1840px, calc(100% - 5rem));
  height: 54px;
  min-height: 54px;
  margin-inline: auto;
  padding: 0 1.15rem;
  top: 0.45rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(0,213,218,.16);
  background: rgba(8,14,23,.62);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}
.home-topnav .brand-lockup { grid-column: 1; justify-self: start; }
.home-topnav .brand-mark { height: 1.15rem; }
.home-topnav .mast-nav {
  grid-column: 2;
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  gap: 0.2rem; margin: 0;
}
.home-topnav .mast-tools { grid-column: 3; justify-self: end; margin: 0; gap: 0.45rem; }
.home-topnav .mast-nav .rail-link {
  min-height: 0; height: 32px; padding: 0 0.72rem; font-size: 0.86rem; white-space: nowrap;
  border-radius: 0.4rem; background: transparent;
}
.home-topnav .rail-link:hover { background: rgba(0,213,218,.08); border-color: transparent; }
.home-topnav .rail-link[aria-current="page"] {
  color: #F5F8FC; background: transparent; border-color: transparent; box-shadow: none;
}
.home-topnav .rail-link[aria-current="page"]::after {
  content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 3px;
  height: 1.5px; border-radius: 2px; background: #00D5DA;
}
.home-topnav .rail-link { position: relative; }
.home-topnav .locale-toggle {
  min-height: 0; height: 30px; padding: 0 0.65rem; font-size: 0.75rem;
  border-radius: 999px; border-color: rgba(154,173,193,.32);
}
.home-topnav .mast-panel .act-fill {
  min-height: 0; height: 30px; padding: 0 0.85rem; font-size: 0.8rem;
  box-shadow: none; border-radius: 999px;
}
.home-topnav .mast-panel .act-fill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,213,218,.22);
}
html[lang="ru"] .home-topnav .mast-panel .act-fill,
html[lang="ru"] .home-topnav .locale-toggle { padding: 0 0.8rem; }
.home-stage .media-fig,
.home-stage .media-wide,
.home-stage .media-tile,
.home-stage .drive-cell,
.home-stage .media-pair figure,
.home-stage .os-grid { background: transparent; }
.home-stage .media-fig img,
.home-stage .media-wide img,
.home-stage .media-tile img,
.home-stage .drive-cell img,
.home-stage .os-grid img { background: #080E17; }
.home-stage > .media-wide:first-of-type img {
  -webkit-mask-image: linear-gradient(#000 0 86%, transparent 100%);
  mask-image: linear-gradient(#000 0 86%, transparent 100%);
}
.side-rail {
  position: sticky; top: 0; z-index: 45; flex: none; width: 228px; height: 100vh;
  padding: 1.35rem 0.9rem; overflow: auto;
  background: linear-gradient(180deg, rgba(16,27,41,.96), rgba(8,14,23,.98));
  border-inline-end: 1px solid rgba(0,213,218,.16);
  box-shadow: inset -20px 0 40px rgba(0,213,218,.03);
}
.rail-kicker { margin: 0 0.7rem 0.85rem; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: #00D5DA; }
.rail-nav { display: flex; flex-direction: column; gap: 0.2rem; }
.rail-link {
  display: flex; align-items: center; min-height: 42px; padding: 0.35rem 0.8rem; border-radius: 0.75rem;
  color: #9AADC1; text-decoration: none; border: 1px solid transparent;
}
.rail-link:hover { color: #F5F8FC; background: rgba(76,131,255,.1); border-color: rgba(76,131,255,.25); }
.rail-link[aria-current="page"] { color: #F5F8FC; background: rgba(0,213,218,.1); border-color: rgba(0,213,218,.35); box-shadow: inset 2px 0 0 #00D5DA; }
.app-column { flex: 1; min-width: 0; }
.mast-panel {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 0.85rem;
  padding: 0.75rem 1.15rem; background: rgba(16,27,41,.72); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(154,173,193,.16);
}
.brand-lockup { display: flex; align-items: center; gap: 0.75rem; min-width: 0; color: inherit; text-decoration: none; }
.brand-mark { display: block; height: 1.45rem; width: auto; }
.brand-name { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; white-space: nowrap; }
.mast-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 0.55rem; }
.rail-toggle {
  display: none; width: 42px; height: 42px; border-radius: 0.7rem; border: 1px solid rgba(154,173,193,.3);
  background: #172536; color: #F5F8FC; align-items: center; justify-content: center;
}
.locale-pick { position: relative; }
.locale-toggle {
  min-height: 42px; padding: 0.4rem 0.75rem; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(0,213,218,.45); background: transparent; color: #F5F8FC;
  font-family: "Space Grotesk", sans-serif; font-weight: 600;
}
.locale-list {
  position: absolute; top: calc(100% + 0.4rem); inset-inline-end: 0; z-index: 50; min-width: 11.5rem;
  margin: 0; padding: 0.35rem; list-style: none; border-radius: 0.9rem;
  background: #172536; border: 1px solid rgba(0,213,218,.28); box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.locale-list a { display: block; padding: 0.5rem 0.75rem; border-radius: 0.6rem; color: #F5F8FC; text-decoration: none; }
.locale-list a:hover, .locale-list a[aria-current="page"] { background: rgba(0,213,218,.12); }
.act-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0.5rem 1rem;
  border-radius: 999px; border: 1px solid rgba(245,248,252,.3); color: #F5F8FC; text-decoration: none;
  font-family: "Space Grotesk", sans-serif; font-weight: 600;
}
.act-fill { background: linear-gradient(180deg, #1ae7ec, #00D5DA); border-color: transparent; color: #062126; box-shadow: 0 8px 24px rgba(0,213,218,.25); }
.act-ink { background: #F5F8FC; color: #062126; border-color: transparent; }
.act-ink:hover { background: #00D5DA; color: #062126; border-color: transparent; }
.act-fill:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(76,131,255,.28); }
.dock-cta {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 35; min-height: 44px; display: inline-flex; align-items: center;
  padding: 0.65rem 1rem; border-radius: 999px; background: #00D5DA; color: #062126; text-decoration: none;
  font-family: "Space Grotesk", sans-serif; font-weight: 600; box-shadow: 0 10px 30px rgba(0,213,218,.3);
}
.dock-cta[data-dock-pin] { left: auto; right: 1rem; bottom: 1rem; width: max-content; }
html[lang="ru"] .act-btn, html[lang="ru"] .dock-cta, html[lang="ru"] .locale-toggle, html[lang="ru"] .jump-pills a { padding: 0.7rem 1.2rem; }
.locale-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.15rem; width: min(1100px, calc(100% - 2rem)); margin: 0 auto; padding: 0 0 1.3rem; }
.locale-row a { color: inherit; text-decoration: none; }
.locale-row a[aria-current="page"], .locale-row a:hover { color: #00D5DA; }
footer.bg-ink, footer { background: #070C14 !important; color: #F5F8FC !important; border-color: rgba(154,173,193,.16) !important; }
.home-stage { background: #080E17 !important; color: #F5F8FC !important; }
.hero-stage { background:
  radial-gradient(820px 420px at 18% 30%, rgba(0,213,218,.2), transparent 62%),
  radial-gradient(640px 380px at 80% 70%, rgba(76,131,255,.2), transparent 60%),
  #080E17 !important; }
.hero-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(245,248,252,.7) 0.7px, transparent 1.2px);
  background-size: 42px 42px; opacity: .18;
  mask-image: linear-gradient(90deg, #000 0%, transparent 48%);
  animation: drift 22s linear infinite;
}
.hero-copy p, .hero-copy h1 { color: #F5F8FC !important; text-shadow: 0 10px 30px rgba(0,0,0,.35); }
.stage-lead, .fine-note, .copy-flow, .banner-text { color: #9AADC1; }
.media-tile, .info-tile, .step-stack li, .fact-grid div, .source-list a {
  background: #172536 !important; color: #F5F8FC !important;
  border: 1px solid rgba(154,173,193,.16); box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.media-tile:hover, .info-tile:hover { border-color: rgba(0,213,218,.4); transform: translateY(-2px); }
.sheet { background: transparent !important; color: #F5F8FC !important; }
.tone-base { background: #080E17 !important; }
.tone-raise { background: #101B29 !important; }
.tone-deep { background: #0C1826 !important; color: #F5F8FC !important; }
.sheet-banner {
  background:
    radial-gradient(700px 280px at 50% 0%, rgba(0,213,218,.16), transparent 70%),
    #0B1624 !important;
}
.sheet h2, .sheet h3, .home-stage h2, .tone-deep h2, .cta-band h2 { color: #F5F8FC; }
.banner-tag { color: #00D5DA !important; }
.jump-pills a { border-color: rgba(245,248,252,.28); color: #F5F8FC; }
.jump-pills a:hover { background: #00D5DA; color: #062126; }
.mono-chip, .page-code { background: #070C14 !important; color: #D7FFF8 !important; border: 1px solid rgba(0,213,218,.25); }
.sheet table, .home-stage table { color: #F5F8FC; }
.table-frame, .sheet .table-frame { background: #101B29 !important; border-color: rgba(154,173,193,.2) !important; }
.rev-list li { border-left-color: rgba(0,213,218,.4); }
.cta-band { background: linear-gradient(120deg, #0E6B5C, #123056) !important; }
.step-index { background: #00D5DA !important; color: #062126 !important; }
html[dir="rtl"] .rail-link[aria-current="page"] { box-shadow: inset -2px 0 0 #00D5DA; }
@media (max-width: 1100px) {
  .home-topnav .mast-panel { display: flex; flex-wrap: wrap; height: auto; min-height: 52px; padding-block: 0.35rem; width: min(1420px, calc(100% - 1.25rem)); }
  .home-topnav .brand-lockup, .home-topnav .mast-nav, .home-topnav .mast-tools { grid-column: auto; justify-self: auto; }
  .home-topnav .mast-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; margin: 0.35rem 0 0; }
  .home-topnav .mast-nav.is-open { display: flex; }
  .home-topnav .rail-toggle { display: inline-flex; width: 36px; height: 36px; }
  .home-topnav .mast-tools { margin-inline-start: auto; }
}
@media (max-width: 960px) {
  .side-rail { position: fixed; inset-inline-start: 0; transform: translateX(-108%); transition: transform .25s ease; width: min(78vw, 280px); }
  html[dir="rtl"] .side-rail { transform: translateX(108%); }
  .side-rail.is-open { transform: none; box-shadow: 20px 0 50px rgba(0,0,0,.4); }
  .rail-toggle { display: inline-flex; }
}
.home-stage h1,
.home-stage h2,
.home-stage h3,
.home-stage ~ section h2,
.home-stage ~ section h3 {
  animation: title-glow 4.8s ease-in-out infinite;
}
.media-tile,
.drive-cell,
.instrument,
.story-faq details {
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.drive-cell,
.instrument,
.story-faq details { border: 1px solid rgba(154,173,193,.18); }
.media-tile:hover,
.drive-cell:hover,
.instrument:hover,
.fx-rise.is-in.media-tile:hover,
.fx-rise.is-in.drive-cell:hover,
.fx-rise.is-in.instrument:hover {
  transform: translateY(-6px);
  border-color: rgba(0,213,218,.55) !important;
  box-shadow: 0 18px 42px rgba(0,213,218,.16), inset 0 0 0 1px rgba(0,213,218,.22);
}
.story-faq details:hover { background: rgba(0,213,218,.06); box-shadow: inset 3px 0 0 #00D5DA; }
html[dir="rtl"] .story-faq details:hover { box-shadow: inset -3px 0 0 #00D5DA; }
.fx-rise { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.fx-rise.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-stage::after, .act-fill, .media-tile, .info-tile, .side-rail,
  .home-stage h1, .home-stage h2, .home-stage h3, .home-stage ~ section h2, .home-stage ~ section h3 { animation: none; transition: none; }
  .fx-rise { opacity: 1; transform: none; }
}
@keyframes drift { from { background-position: 0 0; } to { background-position: 0 84px; } }
@keyframes title-glow {
  0%, 100% { text-shadow: 0 10px 24px rgba(0,0,0,.28), 0 0 10px rgba(0,213,218,.16); }
  50% { text-shadow: 0 10px 24px rgba(0,0,0,.28), 0 0 26px rgba(0,213,218,.55); }
}
html[lang="zh-CN"] .rail-link { letter-spacing: 0.12em; }
html[lang="zh-CN"] body, html[lang="zh-CN"] .brand-name { font-family: "Noto Sans SC", "Inter", sans-serif; }
html[lang="ar"] body, html[lang="ar"] .brand-name { font-family: "Noto Sans Arabic", "Inter", sans-serif; }
