/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px max(40px, 5vw) 80px;
  position: relative;
  overflow: hidden;
  background: transparent;
}

.h-glow {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 600px;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  display: none;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  display: none;
}

/* INNER WRAPPER — two-column side-by-side */
.h-inner {
  max-width: 1800px;
  width: 100%;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 60px;
  align-items: stretch;
}

.h-left {
  display: flex;
  flex-direction: column;
}

/* h-right: stretch to full column height + solid bg to block neural canvas bleed */
.h-right {
  display: flex;
  flex-direction: column;
  background: #000;
}

/* Terminal wrapper — explicit pitch black bg to block any canvas bleed */
.ai-term-wrap {
  width: 100%;
  margin-bottom: 36px;
  background: #000;
}

/* EYEBROW — hidden */
.h-ey {
  display: none;
}

/* RULE DIVIDER — hidden */
.h-rule {
  display: none;
}

/* QUOTE BLOCK — orange impact statement, Bebas */
.h-quote {
  font-family: 'Bebas Neue', monospace;
  font-size: clamp(15px, 2vw, 26px);
  letter-spacing: 3px;
  color: var(--orange);
  line-height: 1.6;
  margin-bottom: 48px;
  opacity: 0;
  animation: fr .7s ease .15s both;
}

/* Second line — white glitch, offset from title glitch — pushed down for breathing room */
.hq-glitch {
  display: block;
  margin-top: 14px;
  animation: glitch-white 9s ease-in-out 4s infinite;
}

/* HEADLINE */
.h-title {
  font-family: 'Bebas Neue', monospace;
  text-align: left;
  line-height: .9;
  letter-spacing: 2px;
  margin-bottom: 48px;
  opacity: 0;
  animation: fr .8s ease .3s both;
}

.h-title .t-main {
  display: block;
  font-size: clamp(44px, 9vw, 90px);
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: 900;
  line-height: 1.0;
  animation: glitch-orange 7s ease-in-out infinite;
}

.h-title .t-sub {
  display: block;
  font-size: clamp(18px, 4vw, 32px);
  line-height: 1.4;
  opacity: 0.9;
  font-weight: 300;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.h-title .t-grant {
  display: block;
  font-size: clamp(15px, 2.8vw, 24px);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 1.4rem;
}

.dot-orange {
  color: var(--orange);
  font-size: 1.5em;
  vertical-align: baseline;
  line-height: 0;
}

/* SUBTEXT */
.h-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.90);
  text-align: left;
  line-height: 2;
  font-weight: 300;
  margin-bottom: 36px;
  opacity: 0;
  animation: fr .8s ease .45s both;
}

.h-desc strong {
  color: var(--acid);
  font-weight: 600;
}

/* AI TERMINAL — larger on right column */
.ai-term-wrap {
  width: 100%;
  margin-bottom: 36px;
}

.ai-term {
  border: 1px solid rgba(200, 255, 0, 0.4);
  box-shadow: 0 0 20px rgba(200, 255, 0, 0.15), inset 0 0 10px rgba(200, 255, 0, 0.05);
  background: #000;
  border-radius: 4px;
}

.t-bar {
  background: #000;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.td {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.td.r {
  background: #ff5f57;
}

.td.y {
  background: #febc2e;
}

.td.g {
  background: var(--acid);
}

.t-lbl {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
  margin-left: 8px;
  letter-spacing: 2px;
  flex: 1;
}

.t-st {
  font-size: 9px;
  letter-spacing: 2px;
}

.t-st.on {
  color: var(--acid);
}

.t-st.th {
  color: #ff6b00;
  animation: bl .8s infinite;
}

.t-out {
  padding: 16px 20px;
  height: 440px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #000;
}

.t-out::-webkit-scrollbar {
  width: 2px;
}

.t-out::-webkit-scrollbar-thumb {
  background: rgba(200, 255, 0, 0.2);
}

.t-row {
  display: flex;
  gap: 10px;
  font-size: 12px;
  line-height: 1.9;
}

.t-pr {
  flex-shrink: 0;
}

.t-row.u .t-pr {
  color: var(--acid);
}

.t-row.a .t-pr {
  color: var(--orange);
}

.t-row.s .t-pr {
  color: rgba(255, 255, 255, 0.55);
}

.t-row.u .t-txt {
  color: var(--text);
}

.t-row.a .t-txt {
  color: rgba(255, 120, 60, 0.9);
  font-weight: 300;
}

.t-row.s .t-txt {
  color: rgba(255, 255, 255, 0.70);
  font-size: 11px;
}

.t-row.a .t-txt.str::after {
  content: '▊';
  color: var(--acid);
  animation: bl .6s infinite;
}

/* Braille spinner — shared across all terminals */
.braille-spin {
  color: var(--acid);
  font-size: 11px;
  margin-right: 4px;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

.t-in-row {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.t-in-pr {
  color: var(--acid);
  font-size: 13px;
  flex-shrink: 0;
}

#tInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  caret-color: var(--acid);
  cursor: none;
}

#tInput::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.t-send {
  font-size: 9px;
  letter-spacing: 2px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: rgba(255, 255, 255, 0.80);
  cursor: none;
  transition: all .2s;
}

.t-send:hover {
  border-color: var(--acid);
  color: var(--acid);
}

.t-hint {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
  padding: 7px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  letter-spacing: 1px;
}

/* DEPLOY BUTTON ACTIVATED STATE */
.hbtn.p.armed {
  background: var(--orange) !important;
  box-shadow: 0 0 28px rgba(255, 107, 0, 0.55), 0 0 56px rgba(255, 107, 0, 0.2) !important;
}

/* CTA BUTTONS */
.h-ctas {
  display: flex;
  align-items: center;
  opacity: 0;
  animation: fr .8s ease .75s both;
  margin-bottom: 8px;
}

.hbtn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 4px;
  padding: 16px 36px;
  cursor: none;
  display: block;
  transition: all .3s;
  position: relative;
}

.hbtn.p {
  background: var(--acid);
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.07) 2px, rgba(0, 0, 0, 0.07) 4px);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 28px rgba(200, 255, 0, 0.5), 0 0 56px rgba(200, 255, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.hbtn.p:hover {
  background: #c8ff00;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.07) 2px, rgba(0, 0, 0, 0.07) 4px);
  box-shadow: 0 0 48px rgba(200, 255, 0, 0.7), 0 0 90px rgba(200, 255, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.hbtn.s {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hbtn.s:hover {
  border-color: rgba(200, 255, 0, 0.4);
  color: var(--acid);
  box-shadow: 0 0 20px rgba(200, 255, 0, 0.08);
}

/* COMET BUTTON SEPARATOR */
.btn-sep {
  width: 60px;
  height: 1px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}

.btn-sep::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, transparent 25%, rgba(200, 255, 0, 0.04) 40%, rgba(200, 255, 0, 0.9) 50%, rgba(255, 255, 255, 1) 51%, rgba(200, 255, 0, 0.5) 53%, transparent 65%);
  background-size: 250% 100%;
  animation: comet-fly 3.2s linear infinite;
}

/* SCROLL FIRE INDICATOR */
.sc {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fr .8s ease 1.1s both;
}

.sc-fire {
  width: 2px;
  height: 52px;
  background: linear-gradient(to bottom, var(--acid), rgba(200, 255, 0, 0.5), rgba(255, 107, 0, 0.2), transparent);
  position: relative;
  animation: sfpulse 2.4s ease-in-out infinite;
}

.sc-fire::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  background: var(--acid);
  box-shadow: 0 0 14px var(--acid), 0 0 28px rgba(200, 255, 0, 0.4);
}

.sc-txt {
  font-size: 8px;
  letter-spacing: 5px;
  color: rgba(255, 255, 255, 0.65);
}

/* TICKER */
.ticker {
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 13px 0;
  background: transparent;
  position: relative;
  z-index: 3;
}

.tk-in {
  display: flex;
  width: max-content;
  animation: tk 30s linear infinite;
  white-space: nowrap;
}

.tk-in:hover {
  animation-play-state: paused;
}

.ti {
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.85);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  cursor: none;
  transition: color .2s;
}

.ti:hover {
  color: var(--acid);
}

.ti-d {
  color: var(--acid);
  font-size: 8px;
}

/* ── LIGHT MODE ── */
body.light-mode #hero {
  background: #ebebeb;
}

body.light-mode .h-glow {
  display: none;
}

body.light-mode .h-grid {
  display: none;
}

body.light-mode #nc {
  display: none;
}

body.light-mode .h-desc {
  color: rgba(0, 0, 0, 0.75);
}

body.light-mode .h-quote {
  color: var(--acid);
}

/* DIAGNOSE button — orange glow (not green) in light mode */
body.light-mode .hbtn.p {
  box-shadow: 0 0 28px rgba(255, 107, 0, 0.5), 0 0 56px rgba(255, 107, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

body.light-mode .hbtn.p:hover {
  background: #ff7c1a;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.07) 2px, rgba(0, 0, 0, 0.07) 4px);
  box-shadow: 0 0 48px rgba(255, 107, 0, 0.7), 0 0 90px rgba(255, 107, 0, 0.35);
}

body.light-mode .hbtn.s:hover {
  color: var(--acid);
  border-color: var(--acid);
  box-shadow: 0 0 20px rgba(255, 107, 0, 0.1);
}

body.light-mode .hbtn.p.armed {
  background: var(--acid) !important;
  box-shadow: 0 0 28px rgba(255, 107, 0, 0.55), 0 0 56px rgba(255, 107, 0, 0.2) !important;
}

body.light-mode .hbtn.s {
  color: rgba(0, 0, 0, 0.75);
  border-color: rgba(0, 0, 0, 0.25);
}

body.light-mode .hbtn.s:hover {
  color: var(--acid);
  border-color: var(--acid);
}

body.light-mode .btn-sep {
  background: rgba(0, 0, 0, 0.12);
}

/* Dot after VISION — acid green in light mode */
body.light-mode .dot-orange {
  color: #c8ff00;
}

/* Hero terminal — force dark bg so white text stays readable in light mode */
body.light-mode .ai-term {
  background: #111118;
  border-color: rgba(200, 255, 0, 0.15);
}

body.light-mode .t-bar {
  background: rgba(0, 0, 0, 0.65);
}

/* Terminal text — orange prompts + white text (dark terminal bg) */
body.light-mode .t-row.u .t-txt {
  color: rgba(255, 255, 255, 0.9);
}

body.light-mode .t-row.a .t-pr {
  color: var(--acid);
}

body.light-mode .t-row.a .t-txt {
  color: rgba(255, 255, 255, 0.85);
}

body.light-mode .t-row.s .t-pr {
  color: rgba(255, 255, 255, 0.35);
}

body.light-mode .t-out::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 0, 0.25);
}

body.light-mode #tInput {
  color: rgba(255, 255, 255, 0.85);
}

body.light-mode #tInput::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Ticker in light mode */
body.light-mode .ticker {
  background: rgba(255, 107, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .ti {
  color: rgba(0, 0, 0, 0.7);
}

body.light-mode .ti:hover {
  color: var(--acid);
}

body.light-mode .ti-d {
  color: var(--acid);
}

/* ── BLUE MODE ── */
body.blue-mode .td.r,
body.blue-mode .td.y,
body.blue-mode .td.g {
  background: var(--pink);
}

body.blue-mode .t-row.a .t-txt,
body.blue-mode .t-row.a .t-pr {
  color: #ffffff;
  font-weight: 400;
}

body.blue-mode .t-row.u .t-txt,
body.blue-mode .t-row.u .t-pr {
  color: #ffffff;
}

body.blue-mode .t-st.th,
body.blue-mode .hq-glitch,
body.blue-mode .dot-orange {
  color: #ff00ff;
}

body.blue-mode .hbtn.p {
  background: var(--acid);
  box-shadow: 0 0 28px rgba(255, 0, 255, 0.5), 0 0 56px rgba(255, 0, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

body.blue-mode .hbtn.p:hover {
  background: var(--acid);
  box-shadow: 0 0 48px rgba(255, 0, 255, 0.7), 0 0 90px rgba(255, 0, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

body.blue-mode .hbtn.s:hover {
  border-color: rgba(255, 0, 255, 0.4);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.08);
}

body.blue-mode .btn-sep::after {
  background: linear-gradient(90deg, transparent 0%, transparent 25%, rgba(255, 0, 255, 0.04) 40%, rgba(255, 0, 255, 0.9) 50%, rgba(255, 255, 255, 1) 51%, rgba(255, 0, 255, 0.5) 53%, transparent 65%);
}

body.blue-mode .sc-fire {
  background: linear-gradient(to bottom, var(--acid), rgba(255, 0, 255, 0.5), rgba(255, 0, 255, 0.2), transparent);
}

body.blue-mode .sc-fire::before {
  box-shadow: 0 0 14px var(--acid), 0 0 28px rgba(255, 0, 255, 0.4);
}

body.blue-mode .ai-term {
  border-color: rgba(255, 0, 255, 0.4);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.15), inset 0 0 10px rgba(255, 0, 255, 0.05);
}

body.blue-mode .t-out::-webkit-scrollbar-thumb {
  background: rgba(255, 0, 255, 0.2);
}

@media(max-width:960px) {

  /* Hero: content fills screen — big fonts, no padding tricks */
  #hero {
    padding: 0;
    display: block;
    overflow: hidden;
    min-height: auto;
  }

  .h-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .h-glow {
    display: none;
  }

  .h-left {
    min-height: 100svh;
    padding: 110px 24px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    overflow-x: hidden;
  }

  /* h-title grows to fill available space, distributing 3 text blocks evenly */
  .h-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 32px;
  }

  .h-right {
    min-height: 100svh;
    padding: 32px 24px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .h-title .t-main {
    font-size: clamp(90px, 24vw, 150px);
    line-height: 0.88;
    margin-bottom: 0;
    word-break: break-word;
  }
  .h-title .t-sub {
    font-size: clamp(28px, 14vw, 32px);
    line-height: 1.4;
    margin-bottom: 0;
  }
  .h-title .t-grant {
    font-size: clamp(13px, 2vw, 12px);
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    margin-bottom: 0;
    margin-top: 1.2rem;
  }

  /* QUOTE */
  .h-quote {
    font-size: clamp(18px, 4.5vw, 26px);
    margin-bottom: 0;
  }

  /* BODY TEXT */
  .h-desc {
    font-size: 16px;
    line-height: 2.1;
    margin-bottom: 0;
  }

  /* TERMINAL — tall on mobile, cancel desktop fixed height */
  .ai-term-wrap {
    width: 100%;
    margin-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .ai-term {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .t-out {
    height: auto;
    flex: 1;
    min-height: 52svh;
    max-height: 62svh;
  }

  /* BUTTONS */
  .h-ctas {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
  }

  .hbtn {
    padding: 18px 32px;
    font-size: 12px;
    letter-spacing: 3px;
  }

  .btn-sep {
    display: none;
  }
}

@media(max-width:640px) {
  .h-left {
    padding: 108px 24px 32px;
  }

  .h-right {
    padding: 32px 24px 32px;
  }

  .h-title .t-main {
    font-size: clamp(90px, 24vw, 150px);
    line-height: 0.88;
    margin-bottom: 0;
    word-break: break-word;
  }
  .h-title .t-sub {
    font-size: clamp(28px, 14vw, 32px);
    line-height: 1.4;
    margin-bottom: 0;
  }
  .h-title .t-grant {
    font-size: clamp(13px, 2vw, 12px);
    line-height: 1.4;
    letter-spacing: 1px;
    white-space: normal;
    word-break: break-word;
    margin-bottom: 0;
    margin-top: 1.2rem;
  }

  .h-quote {
    font-size: clamp(17px, 4.5vw, 26px);
    line-height: 1.4;
  }

  .h-desc {
    font-size: 16px;
    line-height: 1.6;
  }

  .hbtn {
    padding: 18px 32px;
    font-size: 12px;
    letter-spacing: 2.5px;
    min-height: 52px;
  }

  .t-out {
    height: auto;
    min-height: 50svh;
    max-height: 60svh;
  }
}

@media(max-width:480px) {
  .h-left {
    padding: 104px 16px 24px;
  }

  .h-right {
    padding: 24px 16px 24px;
  }

  .h-title .t-main {
    font-size: clamp(90px, 24vw, 150px);
    line-height: 0.88;
    margin-bottom: 0;
    word-break: break-word;
  }

  .h-title .t-sub {
    font-size: clamp(28px, 14vw, 32px);
    line-height: 1.4;
    margin-bottom: 0;
  }

  .h-title .t-grant {
    font-size: clamp(13px, 2vw, 12px);
    line-height: 1.4;
    letter-spacing: 1px;
    white-space: normal;
    word-break: break-word;
    margin-bottom: 0;
  }

  .h-quote {
    font-size: clamp(14px, 4vw, 22px);
  }

  .h-desc {
    font-size: 14px;
  }

  .h-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hbtn {
    text-align: center;
    padding: 18px 20px;
    font-size: 12px;
  }

  .btn-sep {
    display: none;
  }

  .t-out {
    height: auto;
    min-height: 48svh;
    max-height: 58svh;
  }
}

/* Landscape phone — revert to side-by-side */
@media(max-height:500px) and (orientation:landscape) {
  #hero {
    padding: 0;
  }

  .h-inner {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .h-left {
    min-height: 100svh;
    padding: 60px 20px 24px;
    justify-content: center;
  }

  .h-right {
    min-height: 100svh;
    padding: 60px 20px 24px;
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    justify-content: center;
  }

  .ai-term-wrap {
    flex: none;
    margin-bottom: 12px;
  }

  .t-out {
    min-height: 100px;
    max-height: 180px;
    flex: none;
  }

  .h-title .t-main {
    font-size: clamp(52px, 10vw, 80px);
  }

  .hbtn {
    padding: 12px 20px;
    font-size: 10px;
  }
}

/* Light mode mobile border */
@media(max-width:960px) {
  body.light-mode .h-right {
    border-top-color: rgba(0, 0, 0, 0.06);
  }
}

@media(max-height:500px) and (orientation:landscape) {
  body.light-mode .h-right {
    border-left-color: rgba(0, 0, 0, 0.06);
    border-top: none;
  }
}