/* ============================================================================
   Bahar landing page — public marketing site at /
   Shares the brand language of the OS (styles.css) but is self-contained:
   the landing must not depend on app styles, and vice versa.
   ========================================================================== */

:root {
  --bg:         #04110b;
  --bg-deep:    #020805;
  --panel:      rgba(255, 255, 255, 0.025);
  --line:       rgba(46, 229, 157, 0.14);
  --line-soft:  rgba(255, 255, 255, 0.07);

  --ink:        #e6f4ec;
  --ink-soft:   #8fb0a0;
  --ink-faint:  #5d7869;

  --accent:        #2ee59d;
  --accent-deep:   #14a874;
  --accent-soft:   rgba(46, 229, 157, 0.16);
  --accent-glow:   rgba(46, 229, 157, 0.45);
  --accent-mute:   rgba(46, 229, 157, 0.08);

  --font-body:    "Inter", -apple-system, system-ui, sans-serif;
  --font-display: "Sora", "Inter", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #03120a; }
a { color: inherit; text-decoration: none; }
img { display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ============================ ambient background ========================= */

.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55;
  will-change: transform;
}
.orb-a {
  width: 560px; height: 560px; top: -180px; left: -120px;
  background: radial-gradient(circle, rgba(46,229,157,0.20), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.orb-b {
  width: 640px; height: 640px; top: 30vh; right: -240px;
  background: radial-gradient(circle, rgba(20,168,116,0.16), transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
.orb-c {
  width: 480px; height: 480px; bottom: -200px; left: 30vw;
  background: radial-gradient(circle, rgba(46,229,157,0.10), transparent 65%);
  animation: drift-a 38s ease-in-out infinite alternate-reverse;
}
@keyframes drift-a { from { transform: translate3d(0,0,0); } to { transform: translate3d(70px, 50px, 0); } }
@keyframes drift-b { from { transform: translate3d(0,0,0); } to { transform: translate3d(-60px, -70px, 0); } }

.grid-fx {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.16;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ================================ nav ==================================== */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(2, 8, 5, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
}
.nav-brand img { filter: drop-shadow(0 0 8px var(--accent-glow)); }
.nav-links { display: flex; gap: 26px; margin-left: 14px; flex: 1; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  transition: color .18s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 10px; }

/* ================================ buttons ================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600; font-family: var(--font-body);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn.lg { padding: 13px 26px; font-size: 15.5px; border-radius: 12px; }
.btn.primary {
  background: var(--accent); color: #03120a;
  box-shadow: 0 0 0 rgba(46,229,157,0);
}
.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--accent-glow);
}
.btn.ghost {
  border-color: var(--line); color: var(--ink);
  background: var(--accent-mute);
}
.btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ================================ hero =================================== */

.hero { padding: 158px 0 70px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--accent-mute);
  color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 5.2vw, 68px); line-height: 1.06; letter-spacing: -0.03em;
  margin: 22px 0 20px;
}
.hl {
  background: linear-gradient(100deg, var(--accent), #9ff5cf);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: 18px; color: var(--ink-soft); max-width: 56ch; margin: 0 0 30px;
}
.rotator-wrap {
  display: inline-block; position: relative; vertical-align: bottom;
}
.rotator {
  display: inline-block; color: var(--accent); font-weight: 600;
  border-bottom: 1px dashed rgba(46,229,157,.45);
  transition: opacity .22s ease, transform .22s ease;
}
.rotator.swap { opacity: 0; transform: translateY(8px); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 26px; font-size: 13.5px; color: var(--ink-faint); }

.hero-globe { position: relative; }
.globe-cap { margin-top: 10px; font-size: 12.5px; color: var(--ink-faint); text-align: center; }

/* globe.js renders into a .panel and uses these app classes — restyle locally */
#landing-globe .panel {
  background: transparent !important;
  border: 0 !important;
  padding: 0;
}
#landing-globe svg { filter: drop-shadow(0 0 40px rgba(46,229,157,0.10)); }
#landing-globe .btn-link {
  background: none; border: 0; color: var(--ink-soft); cursor: pointer;
  font-family: var(--font-body); padding: 2px 4px;
}
#landing-globe .btn-link:hover { color: var(--accent); }
.muted { color: var(--ink-soft); }
.callout-bad { color: #ff7a7a; font-size: 13px; }

/* ================================ stats ================================== */

.stats { padding: 34px 0 10px; }
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  padding: 34px 0;
}
.stat { text-align: center; padding: 0 10px; }
.stat-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 3.2vw, 42px); letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 0 24px rgba(46,229,157,0.25);
}
.stat-cap { margin-top: 6px; font-size: 13px; color: var(--ink-faint); }

/* ================================ sections =============================== */

.sec { padding: 112px 0; }
.sec-alt {
  background: linear-gradient(180deg, transparent, rgba(46,229,157,0.025) 18%, rgba(46,229,157,0.025) 82%, transparent);
}
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.sec h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 3.8vw, 46px); letter-spacing: -0.025em; line-height: 1.12;
  margin: 0 0 14px;
}
.sec-sub { color: var(--ink-soft); font-size: 17px; max-width: 62ch; margin: 0 0 44px; }

/* ============================== glow cards =============================== */

.glow-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.glow-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(46,229,157,0.10), transparent 55%);
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.glow-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: 0 14px 44px rgba(0,0,0,0.4); }
.glow-card:hover::before { opacity: 1; }

/* ================================ pillars ================================ */

.pillar-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 42px;
}
.pillar { padding: 30px 28px 26px; }
.pillar-num {
  font-family: var(--font-display); font-weight: 800; font-size: 42px;
  color: transparent; -webkit-text-stroke: 1px rgba(46,229,157,0.4);
  letter-spacing: -0.02em; margin-bottom: 14px;
}
.pillar h3 {
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  letter-spacing: -0.01em; margin: 0 0 10px;
}
.pillar p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ================================ pipeline =============================== */

.pipeline {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 30px 14px;
  margin-top: 50px; position: relative;
}
.pipe-node { position: relative; text-align: center; }
.pipe-node::after {
  /* connector to the next node */
  content: ""; position: absolute; top: 8px; left: calc(50% + 16px); width: calc(100% - 18px); height: 1px;
  background: linear-gradient(90deg, rgba(46,229,157,0.35), rgba(46,229,157,0.08));
}
.pipe-node:nth-child(6n)::after, .pipe-node:last-child::after { display: none; }
.pipe-dot {
  display: block; width: 16px; height: 16px; margin: 0 auto 12px;
  border-radius: 50%; border: 2px solid rgba(46,229,157,0.4);
  background: var(--bg-deep);
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.pipe-label { font-size: 13.5px; color: var(--ink-soft); transition: color .3s ease; }
.pipe-node.lit .pipe-dot {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
}
.pipe-node.lit .pipe-label { color: var(--ink); }
.pipe-node.trail .pipe-dot { background: var(--accent-deep); border-color: var(--accent-deep); }

/* ================================ organs ================================= */

.organ-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 42px;
}
.organ { padding: 24px 22px 20px; }
.organ-ico {
  color: var(--accent); margin-bottom: 12px;
  filter: drop-shadow(0 0 12px var(--accent-glow));
}
.badge .icon { margin-right: 2px; }
.organ h4 {
  font-family: var(--font-display); font-size: 16.5px; font-weight: 700;
  margin: 0 0 7px; letter-spacing: -0.01em;
}
.organ p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }

/* ============================== brain / terminal ========================= */

.brain-grid {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center;
}
.brain-points { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 18px; }
.brain-points li {
  padding-left: 28px; position: relative; color: var(--ink-soft); font-size: 15.5px;
}
.brain-points li b { color: var(--ink); }
.brain-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}

.term {
  background: #010604;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55), 0 0 60px rgba(46,229,157,0.07);
  overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; border-bottom: 1px solid var(--line-soft);
}
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.term-bar span:first-child { background: rgba(255,99,99,0.55); }
.term-bar span:nth-child(2) { background: rgba(255,197,100,0.55); }
.term-bar span:nth-child(3) { background: rgba(46,229,157,0.55); }
.term-bar em {
  margin-left: 8px; font-style: normal; font-size: 12px; color: var(--ink-faint);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.term-body {
  margin: 0; padding: 18px 18px 22px; min-height: 218px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px; line-height: 1.85; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.term-body .t-dim  { color: var(--ink-faint); }
.term-body .t-ok   { color: var(--accent); }
.term-body .t-warn { color: #ffc564; }
.term-cursor {
  display: inline-block; width: 8px; height: 15px; vertical-align: -2px;
  background: var(--accent); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ================================ vision ================================= */

.vision-wrap { text-align: center; max-width: 880px; }
.vision-quote {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(24px, 3.2vw, 36px); line-height: 1.35; letter-spacing: -0.02em;
  margin: 10px 0 26px; padding: 0;
}
.vision-quote::before { content: "“"; color: var(--accent); }
.vision-quote::after  { content: "”"; color: var(--accent); }
.vision-sub { color: var(--ink-faint); font-size: 15px; margin: 0; }

/* ================================ CTA ==================================== */

.cta-card {
  position: relative; text-align: center;
  padding: 64px 36px 56px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(640px 280px at 50% -10%, rgba(46,229,157,0.13), transparent 70%),
    var(--panel);
  overflow: hidden;
}
.cta-glow {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 56%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 28px 2px var(--accent-glow);
}
.cta-card h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.025em; margin: 0 0 12px;
}
.cta-sub { color: var(--ink-soft); font-size: 16.5px; max-width: 52ch; margin: 0 auto 34px; }
.cta-person {
  display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 28px;
}
.cta-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border: 1px solid var(--line);
  color: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 17px;
}
.cta-name { font-weight: 700; font-size: 16px; text-align: left; }
.cta-role { font-size: 13px; color: var(--ink-faint); text-align: left; }
.cta-mail { margin-top: 18px; font-size: 13.5px; }
.cta-mail a { color: var(--ink-faint); transition: color .18s ease; }
.cta-mail a:hover { color: var(--accent); }

/* ================================ footer ================================= */

.footer { border-top: 1px solid var(--line-soft); padding: 38px 0 46px; margin-top: 30px; }
.footer-inner { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 13.5px; color: var(--ink-faint); transition: color .18s ease; }
.footer-links a:hover { color: var(--accent); }
.footer-meta { font-size: 12.5px; color: var(--ink-faint); }

/* ============================== reveal anim ============================== */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================== responsive =============================== */

@media (max-width: 980px) {
  .hero { padding-top: 130px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-sub { max-width: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .pillar-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .pipe-node:nth-child(6n)::after { display: block; }
  .pipe-node:nth-child(3n)::after, .pipe-node:last-child::after { display: none; }
  .organ-grid { grid-template-columns: repeat(2, 1fr); }
  .brain-grid { grid-template-columns: 1fr; gap: 40px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .sec { padding: 80px 0; }
  .organ-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipe-node:nth-child(3n)::after { display: block; }
  .pipe-node:nth-child(2n)::after, .pipe-node:last-child::after { display: none; }
  .hero-cta .btn { width: 100%; }
  .nav-cta .btn.primary { display: none; }
}

/* =========================== reduced motion ============================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb, .rotator, .term-cursor { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
