:root {
  --bg-panel: rgba(8, 10, 14, 0.14);
  --bg-panel-strong: rgba(7, 9, 12, 0.24);
  --brand-blue: #6dacc8;
  --brand-blue-soft: #a4cfd9;
  --brand-orange: #fb9126;
  --brand-warm: #e5deb3;
  --text-main: #f8fafc;
  --text-muted: #9aa9bd;
  --panel-top: rgba(10, 16, 24, 0.08);
  --panel-bottom: rgba(6, 10, 16, 0.02);
  --border: rgba(109, 172, 200, 0.1);
  --border-strong: rgba(109, 172, 200, 0.18);
  --panel-border: rgba(164, 207, 217, 0.12);
  --panel-border-strong: rgba(164, 207, 217, 0.2);
  --shadow: 0 14px 48px rgba(0, 0, 0, 0.42);
  --focus-ring: 0 0 0 3px rgba(109, 172, 200, 0.16);
  --text: var(--text-main);
  --muted: var(--text-muted);
  --line: var(--border);
  --line-strong: var(--border-strong);
  --orange: var(--brand-orange);
  --max-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(at 0% 48%, rgba(251,145,38,0.12) 0px, transparent 48%),
    radial-gradient(at 100% 52%, rgba(109,172,200,0.14) 0px, transparent 52%),
    #000;
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

body.auth-modal-open {
  overflow: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255,255,255,0.012) 0%, rgba(0,0,0,0.16) 100%);
  z-index: 0;
}

#lattice-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.page-glow {
  display: none;
}

.page-shell {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 18px 0 40px;
}

.glass-panel {
  background:
    linear-gradient(180deg, var(--panel-top), var(--panel-bottom)),
    radial-gradient(circle at top left, rgba(109, 172, 200, 0.05), transparent 48%),
    radial-gradient(circle at bottom right, rgba(251, 145, 38, 0.04), transparent 42%);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.shell-panel,
.shell-panel-inset {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.shell-panel::before,
.shell-panel-inset::before {
  display: none;
}

.shell-panel-strong {
  background: var(--bg-panel-strong);
}

.shell-panel-soft {
  background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.004));
  border-color: rgba(255,255,255,0.045);
}

.shell-panel-accent {
  background: var(--bg-panel-strong);
  border-color: var(--border-strong);
}

.shell-panel-inset {
  background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.004));
  border-color: rgba(255,255,255,0.045);
}

.metrics-band,
.story-panel,
.capstone-grid {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 50;
  width: min(calc(100vw - 32px), var(--max-width));
  padding: 0;
  transform: translateX(-50%);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 22px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 58px;
  height: 58px;
  display: block;
  object-fit: contain;
  flex: 0 0 58px;
  filter: drop-shadow(0 0 30px rgba(109, 172, 200, 0.18));
}

.brand-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.brand-mobile-title {
  display: none;
}

.brand-kicker,
.eyebrow,
.signal-label,
.metric-label,
.detail-label,
.visual-kicker {
  color: var(--brand-blue-soft);
  font: 11px/1.2 "JetBrains Mono", monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-wordmark {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: 0.3em;
  line-height: 1;
  color: var(--text-main);
}

.brand-product {
  color: var(--brand-blue-soft);
  font: 700 clamp(1.08rem, 1.65vw, 1.32rem)/1.1 "JetBrains Mono", monospace;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 34px 8px 13px;
  border: 1px solid rgba(164, 207, 217, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(164, 207, 217, 0.08), rgba(255, 255, 255, 0.012)),
    rgba(8, 12, 18, 0.68);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 12px 28px rgba(0,0,0,0.28);
}

.language-picker::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(164, 207, 217, 0.9);
  border-bottom: 2px solid rgba(164, 207, 217, 0.9);
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.language-picker:focus-within {
  border-color: rgba(164, 207, 217, 0.46);
  box-shadow: var(--focus-ring), inset 0 0 0 1px rgba(255,255,255,0.035), 0 12px 28px rgba(0,0,0,0.28);
}

.language-picker span {
  color: var(--brand-blue-soft);
  font: 700 10px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.language-picker select {
  min-width: 104px;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  outline: none;
  cursor: pointer;
}

.language-picker select option {
  background: #081018;
  color: var(--text-main);
}

.cta-link,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 0;
  padding: 12px 14px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-main);
  font: inherit;
  font-weight: 600;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.cta-link,
.btn-secondary {
  border: 1px solid var(--border-strong);
  background: rgba(109,172,200,0.08);
}

.btn-primary {
  border: 1px solid rgba(164,207,217,0.42);
  color: var(--text-main);
  background: linear-gradient(180deg, rgba(164,207,217,0.18), rgba(109,172,200,0.14));
}

.cta-link:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--focus-ring);
}

.cta-link:hover,
.btn-secondary:hover {
  background: rgba(109,172,200,0.16);
  border-color: rgba(164,207,217,0.38);
}

.btn-primary:hover {
  background: linear-gradient(180deg, rgba(164,207,217,0.26), rgba(109,172,200,0.2));
  border-color: rgba(164,207,217,0.5);
}

.aleph-auth-modal[hidden] {
  display: none;
}

.aleph-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.aleph-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.aleph-auth-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(100%, 520px);
  max-height: min(92vh, 720px);
  padding: 18px;
  border: 1px solid rgba(164, 207, 217, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(15, 23, 32, 0.96), rgba(8, 12, 18, 0.96)),
    radial-gradient(circle at top left, rgba(251, 145, 38, 0.12), transparent 42%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62);
}

.aleph-auth-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.aleph-auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.aleph-auth-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
}

.aleph-auth-kicker {
  margin: 0 0 6px;
  color: var(--brand-blue-soft);
  font: 700 11px/1.2 "JetBrains Mono", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.aleph-auth-card h2 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.aleph-auth-close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid rgba(164, 207, 217, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-main);
  font: 400 1.35rem/1 "Inter", sans-serif;
  cursor: pointer;
}

.aleph-auth-close:hover,
.aleph-auth-close:focus-visible {
  border-color: rgba(164, 207, 217, 0.42);
  box-shadow: var(--focus-ring);
  outline: none;
}

.aleph-auth-copy,
.aleph-auth-status {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.aleph-auth-frame-shell {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border: 1px solid rgba(164, 207, 217, 0.18);
  border-radius: 18px;
  background: rgba(5, 9, 14, 0.78);
}

.aleph-auth-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--text-muted);
  text-align: center;
}

.aleph-auth-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: min(52vh, 430px);
  min-height: 360px;
  border: 0;
  background: transparent;
}

.aleph-auth-frame:not([src]) {
  visibility: hidden;
}

.aleph-auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.aleph-auth-card.is-busy .aleph-auth-actions {
  opacity: 0.82;
}

.landing-main {
  display: grid;
  gap: 24px;
  margin-top: 92px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-visual,
.metrics-band,
.story-panel,
.capstone-panel {
  padding: 26px;
}

.hero-copy h1 {
  margin: 10px 0 0;
  max-width: 12.8ch;
  font-size: clamp(1.5rem, 3.5vw, 3rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-lede,
.bundle-note,
.story-copy p,
.metric span:last-child,
.visual-copy,
.capstone-panel p,
.site-footer {
  color: var(--muted);
  line-height: 1.6;
}

.hero-lede {
  margin: 18px 0 0;
  max-width: 58ch;
  font-size: 1.08rem;
}

.bundle-note {
  margin: 14px 0 0;
  max-width: 60ch;
  font-size: 0.96rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.hero-signals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
  margin-top: 24px;
}

.signal-card,
.metric {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.045);
  background: linear-gradient(180deg, rgba(255,255,255,0.014), rgba(255,255,255,0.004));
}

.signal-card strong,
.metric strong,
.story-copy h2,
.capstone-panel h2,
.visual-title {
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  min-width: 0;
  max-width: 100%;
}

.signal-card strong {
  font-size: clamp(1.05rem, 1.34vw, 1.28rem);
  line-height: 1.12;
  text-wrap: wrap;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

.signal-card span:last-child {
  color: var(--text-muted);
  line-height: 1.55;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

html[lang="ru"] .signal-card {
  gap: 12px;
}

html[lang="ru"] .signal-card strong {
  font-size: clamp(0.95rem, 1.14vw, 1.12rem);
  line-height: 1.14;
}

html[lang="es"] .signal-card strong {
  font-size: clamp(0.95rem, 1.14vw, 1.12rem);
  line-height: 1.14;
}

html[lang="ru"] .signal-card span:last-child {
  font-size: 0.92rem;
  line-height: 1.5;
}

html[lang="es"] .signal-card span:last-child {
  font-size: 0.92rem;
  line-height: 1.5;
}

html[lang="ru"] .metric strong {
  font-size: clamp(1.22rem, 1.45vw, 1.52rem);
  line-height: 1.08;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
}

.hero-visual img,
.story-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
}

.visual-meta {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.visual-title {
  font-size: clamp(1.6rem, 2vw, 2.1rem);
}

.metrics-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.metric {
  display: grid;
  gap: 10px;
  padding: 8px;
}

.metric strong {
  font-size: 1.7rem;
}

.story-stack {
  display: grid;
  gap: 24px;
}

.story-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.98fr);
  gap: 20px;
  align-items: center;
}

.story-panel.is-reversed .story-copy {
  order: 2;
}

.story-panel.is-reversed .story-media {
  order: 1;
}

.story-copy {
  position: relative;
  z-index: 1;
}

.story-copy h2,
.capstone-panel h2 {
  margin: 10px 0 0;
  text-wrap: balance;
}

.story-copy p {
  margin: 16px 0 0;
}

.story-points {
  margin: 18px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: rgba(232, 240, 247, 0.92);
}

.story-points li::marker {
  color: var(--orange);
}

.story-media {
  padding: 18px;
}

.capstone-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.84fr);
  gap: 24px;
}

.capstone-panel {
  display: flex;
  flex-direction: column;
}

.panel-action {
  align-self: flex-end;
  margin-top: auto;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 4px 0;
  font-size: 0.95rem;
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

@media (max-width: 1180px) {
  .hero-grid,
  .story-panel,
  .capstone-grid,
  .metrics-band,
  .hero-signals {
    grid-template-columns: 1fr;
  }

  .story-panel.is-reversed .story-copy,
  .story-panel.is-reversed .story-media {
    order: initial;
  }

  .hero-copy h1 {
    max-width: 12ch;
  }
}

@media (max-width: 860px) {
  .site-header {
    top: 8px;
    width: min(calc(100vw - 20px), var(--max-width));
  }

  .site-nav {
    padding: 10px 12px;
    border-radius: 18px;
  }

  .brand-lockup {
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .brand-copy {
    display: none;
  }

  .brand-mobile-title {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    max-width: calc(100vw - 92px);
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
  }

  .brand-mobile-wordmark {
    flex: 0 0 auto;
    font-size: clamp(1rem, 4.8vw, 1.22rem);
    letter-spacing: 0.26em;
    color: var(--text-main);
  }

  .brand-mobile-kicker {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(0.69rem, 3vw, 0.86rem);
    letter-spacing: 0.12em;
    color: var(--brand-blue-soft);
  }

  .site-nav .header-actions {
    display: flex;
    flex: 0 0 auto;
  }

  .site-nav .header-actions .cta-link {
    display: none;
  }

  .language-picker {
    min-height: 38px;
    padding: 7px 30px 7px 10px;
  }

  .language-picker span {
    display: none;
  }

  .language-picker select {
    min-width: 82px;
    font-size: 13px;
  }

  .landing-main {
    margin-top: 58px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 10px;
  }

  .hero-copy,
  .hero-visual,
  .metrics-band,
  .story-panel,
  .capstone-panel {
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: clamp(1.3rem, 7vw, 2.1rem);
    max-width: none;
  }

  .hero-actions {
    width: 100%;
  }

  .cta-link,
  .btn {
    width: 100%;
  }

  .site-footer {
    padding-bottom: 12px;
  }
}
