/*
 * The dark instrument panel (dark in both themes) and the pieces that live on it: the home hero, the console plate
 * that overlaps the fold, panel sections and the closing band. The demo heroes reuse the panel too.
 */
.hero,
.panel-section,
.closing,
.demo-hero,
.scenario-hero,
.gains {
  position: relative;
  background: var(--panel);
  color: var(--panel-text);
  --text: var(--panel-text);
  --muted: var(--panel-muted);
  --faint: var(--panel-faint);
  --line: var(--panel-line);
  --line-strong: #2c3749;
  --accent: var(--panel-accent);
  --focus: var(--panel-accent);
  --surface: #0d141f;
  --surface-2: #111a27;
  --warn: #f0c35a;
  --warn-bg: #2e2410;
  --pass: #5ccf8a;
  --pass-bg: #0f2a1b;
  --fail: #ff8a80;
  --fail-bg: #351414;
  --btn-bg: #f1f0ea;
  --btn-text: #0b1320;
  --btn-hover: #ffffff;
  color-scheme: dark;
  isolation: isolate;
}

.panel-section .eyebrow,
.hero .eyebrow,
.closing .eyebrow,
.demo-hero .eyebrow,
.scenario-hero .eyebrow,
.gains .eyebrow {
  color: var(--panel-accent);
}

/* measured grid, fading out from the showpiece */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgb(142 176 255 / 7%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(142 176 255 / 7%) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 75% 70% at 70% 30%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 70% 30%, #000 25%, transparent 78%);
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-bg .hero-grid-bg {
  z-index: 0;
}

.glow-hero {
  top: -18%;
  right: -10%;
  width: min(1100px, 90vw);
  height: 760px;
  --glow-accent: rgb(70 110 255 / 30%);
}

.glow-closing {
  left: 50%;
  bottom: -340px;
  width: 1200px;
  height: 640px;
  transform: translateX(-50%);
  z-index: -1;
  --glow-accent: rgb(70 110 255 / 26%);
}

/* ---------- home hero ---------- */
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 5vw, 88px);
  align-items: center;
  padding-block: clamp(56px, 7vw, 104px) clamp(48px, 6vw, 88px);
}

.hero-inner > * {
  min-width: 0;
}

.hero h1 {
  font-size: var(--step-5);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 14.5ch;
  background: linear-gradient(180deg, #ffffff 30%, #b9c6dc 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Georgian: no case, long words, wider glyphs. Heavier, looser, and allowed a wider measure. */
:root:lang(ka) .hero h1 {
  font-size: clamp(2rem, 1rem + 3.1vw, 3.65rem);
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: -0.005em;
  max-width: 21ch;
}

:root:lang(ru) .hero h1 {
  font-size: clamp(2.4rem, 1.2rem + 3.9vw, 4.75rem);
  max-width: 17ch;
}

.hero-lead {
  margin-top: 28px;
  color: #b4bdcb;
  font-size: var(--step-1);
  line-height: 1.6;
  max-width: 54ch;
}

:root:lang(ka) .hero-lead {
  font-size: 1.125rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

@media (max-width: 480px) {
  .hero-ctas .btn {
    flex: 1 1 100%;
  }
}

.btn-lg {
  min-height: 54px;
  padding-inline: 26px;
  font-size: 1.0625rem;
}

.btn-light {
  background: #f3f2ec;
  color: #0b1320;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 20%), 0 10px 30px -10px rgb(142 176 255 / 55%);
}

.btn-light:hover {
  background: #ffffff;
}

.btn-outline-light {
  border-color: #3a475b;
  color: var(--panel-text);
  background: rgb(255 255 255 / 2%);
}

.btn-outline-light:hover {
  border-color: var(--panel-text);
  background: rgb(255 255 255 / 5%);
}

.hero-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid #243046;
  border-radius: 999px;
  background: rgb(13 20 31 / 70%);
  color: #c4ccd8;
  font-size: 0.875rem;
}

.hero-facts li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ccf8a;
  box-shadow: 0 0 0 3px rgb(92 207 138 / 18%);
}

@media (max-width: 1020px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 16ch;
  }
}

@media (min-width: 1680px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  }
}

/* ---------- the console plate: half on the panel, half on the page ---------- */
.plate-stage {
  position: relative;
  padding-bottom: clamp(24px, 4vw, 48px);
  background: linear-gradient(to bottom, var(--panel) 0 46%, var(--bg) 46% 100%);
}

.plate-stage::before {
  content: '';
  position: absolute;
  inset: 0 0 54%;
  background-image:
    linear-gradient(to right, rgb(142 176 255 / 7%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(142 176 255 / 7%) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
  pointer-events: none;
}

.plate {
  position: relative;
  perspective: 1800px;
}

.plate::before {
  content: '';
  position: absolute;
  inset: 6% 8% -4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(70 110 255 / 35%), transparent);
  filter: blur(30px);
}

.window-hero {
  transform-origin: 50% 0;
}

@media (prefers-reduced-motion: no-preference) {
  .js .window-hero {
    transform: rotateX(calc(var(--tilt, 1) * 14deg)) scale(calc(1 - var(--tilt, 1) * 0.04));
    transition: transform 120ms linear;
    will-change: transform;
  }
}

/* On a phone the whole console is too small to read: show its upper-left part larger. */
@media (max-width: 640px) {
  .window-hero .screen-media {
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }

  .window-hero .shot {
    width: 230%;
    max-width: none;
  }
}

/* ---------- panel sections and the closing band ---------- */
.panel-section {
  overflow: hidden;
}

.panel-section .lead,
.closing p {
  color: var(--panel-muted);
}

.closing {
  padding-block: clamp(96px, 12vw, 168px);
  overflow: hidden;
}

.closing .hero-grid-bg {
  mask-image: radial-gradient(ellipse 60% 80% at 50% 60%, #000 15%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 60%, #000 15%, transparent 75%);
}

.closing-inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 22px;
  text-align: center;
}

.closing h2 {
  font-size: var(--step-5);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  max-width: 17ch;
}

:root:lang(ka) .closing h2 {
  font-size: var(--step-4);
  line-height: 1.18;
  letter-spacing: 0;
  max-width: 22ch;
}

.closing p {
  font-size: var(--step-1);
  max-width: 58ch;
}

.closing .hero-ctas {
  justify-content: center;
  margin-top: 14px;
}

.text-link.on-panel {
  color: var(--panel-accent);
}
