:root {
  --bg: #04070d;
  --bg-soft: rgba(8, 15, 26, 0.78);
  --line: rgba(162, 192, 223, 0.28);
  --line-strong: rgba(208, 230, 255, 0.58);
  --text: #f4f7fb;
  --muted: rgba(230, 240, 255, 0.7);
  --accent: #7fc3ff;
  --accent-deep: #204d88;
  --accent-glow: rgba(127, 195, 255, 0.24);
  --panel: rgba(8, 18, 30, 0.56);
  --panel-strong: rgba(10, 24, 40, 0.82);
  --success: #98ffd3;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(20, 47, 78, 0.42), transparent 35%),
    radial-gradient(circle at bottom left, rgba(71, 124, 179, 0.16), transparent 28%),
    linear-gradient(180deg, #02050b 0%, #07111d 52%, #04070d 100%);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.16;
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, rgba(127, 195, 255, 0.08) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 70%, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px);
  background-size: 14px 14px, 20px 20px, 24px 24px;
  mix-blend-mode: screen;
  opacity: 0.28;
  pointer-events: none;
}

.frame {
  position: fixed;
  background: rgba(255, 255, 255, 0.3);
  z-index: 5;
}

.frame-top,
.frame-bottom {
  left: 3.2vw;
  right: 3.2vw;
  height: 1px;
}

.frame-top { top: 4.6vh; }
.frame-bottom { bottom: 4.6vh; }

.frame-left,
.frame-right {
  top: 4.6vh;
  bottom: 4.6vh;
  width: 1px;
}

.frame-left { left: 3.2vw; }
.frame-right { right: 3.2vw; }

.shell {
  position: relative;
  width: min(1500px, calc(100vw - 96px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.hero {
  position: relative;
  min-height: 62vh;
  padding: 54px 52px 220px;
  overflow: hidden;
}

.hero-tags,
.hero-meta {
  position: absolute;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 2;
}

.hero-tags {
  top: 0;
  left: 0;
}

.hero-meta-left {
  top: 78px;
  left: 54px;
  max-width: 320px;
}

.hero-meta-right {
  top: 78px;
  right: 54px;
  max-width: 320px;
  justify-content: flex-end;
}

.hero-tags span,
.hero-meta span,
.panel-kicker,
.translation-head span:last-child,
.source-card-head span:last-child {
  border: 1px solid rgba(103, 157, 219, 0.34);
  background: rgba(21, 53, 93, 0.78);
  color: #e6f2ff;
  padding: 7px 11px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-top: 140px;
}

.eyebrow,
.hero-subcopy,
.hint,
.field span,
.status-line,
.translation-card p,
.source-transcript {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 8px 14px;
  background: rgba(248, 250, 255, 0.92);
  color: #10233b;
  font-size: 1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(5rem, 14vw, 12rem);
  line-height: 0.9;
  font-weight: 400;
  letter-spacing: -0.06em;
}

.hero-subcopy {
  width: min(560px, 100%);
  margin: 22px 0 0;
  font-size: 1.15rem;
  line-height: 1.7;
}

.mountain,
.data-cluster {
  position: absolute;
  pointer-events: none;
}

.mountain {
  inset: auto 0 -10% auto;
  width: 100%;
  height: 92%;
  opacity: 0.88;
}

.mountain-back {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(113, 171, 225, 0.08)),
    radial-gradient(circle at 52% 32%, rgba(255, 255, 255, 0.34), transparent 28%);
  clip-path: polygon(28% 63%, 40% 38%, 51% 12%, 60% 28%, 70% 49%, 82% 42%, 100% 71%, 100% 100%, 0 100%, 0 80%, 15% 72%);
  filter: blur(0.5px);
}

.mountain-front {
  background:
    linear-gradient(180deg, rgba(188, 223, 255, 0.78), rgba(39, 81, 125, 0.38) 48%, rgba(7, 19, 36, 0.88));
  clip-path: polygon(0 88%, 12% 73%, 20% 80%, 30% 59%, 40% 76%, 52% 33%, 59% 20%, 71% 60%, 79% 47%, 89% 68%, 100% 54%, 100% 100%, 0 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.84) 28%, rgba(0, 0, 0, 1) 100%);
}

.mountain-front::before,
.mountain-back::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(160deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(20deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 6px);
  mix-blend-mode: screen;
  opacity: 0.55;
}

.data-cluster {
  width: 340px;
  height: 340px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.88) 0 2px, transparent 2px);
  background-size: 16px 16px;
  opacity: 0.6;
}

.data-cluster-left {
  top: 140px;
  left: 0;
  clip-path: polygon(0 100%, 0 42%, 55% 12%, 100% 0, 100% 68%, 66% 78%, 48% 100%);
}

.data-cluster-right {
  top: 30px;
  right: 24%;
  transform: scale(0.56);
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%, 0 46%);
}

.panel-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  margin-top: -40px;
  position: relative;
  z-index: 3;
}

.glass {
  background: linear-gradient(180deg, rgba(12, 26, 42, 0.68), rgba(7, 14, 24, 0.88));
  border: 1px solid rgba(169, 205, 244, 0.16);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.control-panel,
.transcript-stage {
  padding: 28px;
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
}

.control-stack {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.88rem;
}

select,
button {
  width: 100%;
  border: none;
  font: inherit;
}

select {
  padding: 14px 16px;
  background: var(--panel-strong);
  color: var(--text);
  border: 1px solid rgba(178, 210, 241, 0.18);
  outline: none;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  margin-top: 10px;
}

.primary-button,
.ghost-button {
  padding: 15px 18px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, #ebf6ff 0%, #9fd0ff 18%, #4f8fd8 100%);
  color: #03101d;
  box-shadow: 0 20px 40px rgba(91, 149, 214, 0.26);
}

.ghost-button {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(178, 210, 241, 0.24);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.status-wrap {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(178, 210, 241, 0.14);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 0 rgba(152, 255, 211, 0.4);
}

.status-dot.live {
  background: var(--success);
  box-shadow: 0 0 0 10px rgba(152, 255, 211, 0.08);
}

.source-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(243, 248, 255, 0.08), rgba(113, 171, 225, 0.06));
  border: 1px solid rgba(178, 210, 241, 0.18);
  margin-bottom: 18px;
}

.source-card-head,
.translation-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.source-card-head span:first-child,
.translation-head span:first-child {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
}

.source-transcript {
  margin: 0;
  min-height: 64px;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.6;
}

.translation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.translation-card {
  min-height: 230px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top left, rgba(127, 195, 255, 0.14), transparent 42%);
  border: 1px solid rgba(178, 210, 241, 0.12);
}

.translation-card p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.75;
  white-space: pre-wrap;
}

@media (max-width: 1100px) {
  .shell {
    width: min(100vw - 36px, 1400px);
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .translation-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 42px 28px 180px;
  }

  .hero-meta-left,
  .hero-meta-right {
    position: static;
    margin-top: 16px;
  }

  .hero-copy {
    padding-top: 120px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: calc(100vw - 24px);
    padding-top: 24px;
  }

  .frame-top,
  .frame-bottom,
  .frame-left,
  .frame-right {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 24px 18px 140px;
  }

  .hero-tags {
    position: static;
    margin-bottom: 18px;
  }

  .hero-copy {
    padding-top: 24px;
  }

  .hero h1 {
    font-size: clamp(4.2rem, 22vw, 6.8rem);
  }

  .button-row {
    grid-template-columns: 1fr;
  }

  .control-panel,
  .transcript-stage {
    padding: 20px;
  }

  .mountain {
    width: 130%;
    right: -14%;
    height: 80%;
  }
}
