:root {
  --ink: #1b2430;
  --ink-soft: #4a5564;
  --paper: #f6f3ee;
  --glass: rgba(255, 255, 255, 0.58);
  --line: rgba(27, 36, 48, 0.08);
  --navy: #1e3a5f;
  --polo: #1f4e8c;
  --aqua: #7ec8c3;
  --champagne: #e8d5b5;
  --shadow: 0 24px 80px rgba(30, 58, 95, 0.12);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Outfit, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

#flow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(126, 200, 195, 0.28), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(232, 213, 181, 0.35), transparent 55%),
    linear-gradient(180deg, rgba(246, 243, 238, 0.35), rgba(246, 243, 238, 0.82));
}

.top, main, .foot { position: relative; z-index: 2; }

.top {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 14px 7vw;
  font-size: 13px;
  letter-spacing: 0.04em;
  background: rgba(246, 243, 238, 0.78);
  backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.brand .sep {
  font-weight: 400;
  color: var(--ink-soft);
}
.mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--polo), var(--aqua));
  box-shadow: 0 0 16px rgba(31, 78, 140, 0.45);
}
.meta { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); }

.copy-brief {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
}
.copy-brief:hover:not(:disabled) { background: #fff; }
.copy-brief:disabled {
  opacity: 0.55;
  cursor: wait;
}

.copy-toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(10px);
  max-width: min(540px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.15);
  font-family: Outfit, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--navy);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.copy-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.dot { width: 4px; height: 4px; border-radius: 50%; background: var(--aqua); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tabs a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid transparent;
}
.tabs a:hover { color: var(--navy); background: rgba(255,255,255,0.45); }
.tabs a.is-on {
  color: var(--navy);
  background: rgba(255,255,255,0.78);
  border-color: var(--line);
}

#intro, #walkthrough, #deck, #problem, #projections, #ask { scroll-margin-top: 84px; }

main { padding: 48px 7vw 80px; max-width: 1280px; margin: 0 auto; }

.intro {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
  padding-top: 12px;
  min-height: 64vh;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--polo);
  margin: 0 0 16px;
}
h1, h2 { font-family: Fraunces, Georgia, serif; font-weight: 560; letter-spacing: -0.03em; }
.wordmark {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(52px, 7.4vw, 92px);
  font-weight: 640;
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin: 0 0 10px;
  color: var(--navy);
}
h1 { font-size: clamp(28px, 3.8vw, 42px); line-height: 1.12; margin: 0 0 18px; font-weight: 560; }
h2 { font-size: 32px; margin: 0 0 8px; }
.lede { font-size: 18px; line-height: 1.55; color: var(--ink-soft); max-width: 46ch; }
.raise-line {
  font-size: 16px;
  line-height: 1.5;
  color: var(--navy);
  max-width: 54ch;
  margin: 18px 0 0;
}
.greeting {
  font-family: Fraunces, Georgia, serif;
  font-size: 17px;
  line-height: 1.55;
  margin: 24px 0 0;
  max-width: 54ch;
  color: var(--navy);
}
.greeting + .greeting {
  margin-top: 1.15em;
}
.intro-aside {
  display: block;
  font-style: italic;
  font-size: 0.92em;
  line-height: 1.45;
  margin-top: 0.4em;
  color: var(--ink-soft);
}
.intro-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 20px 0 0;
  max-width: 54ch;
  font-size: 14px;
}
.intro-links a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(30, 58, 95, 0.22);
}
.intro-links a:hover { border-bottom-color: var(--polo); }

.connect {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 28px 0 0;
  max-width: 54ch;
  font-size: 15px;
}
.connect[hidden] { display: none !important; }
.connect-label {
  width: 100%;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--polo);
}
.connect a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(30, 58, 95, 0.22);
}
.connect a:hover { border-bottom-color: var(--polo); }

.portrait {
  position: relative;
  margin: 0;
  display: grid;
  place-items: center;
}
.portrait-frame {
  position: relative;
  z-index: 2;
  width: min(420px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.7);
}
.portrait-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.portrait figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}
.orb {
  position: absolute;
  width: 120%;
  height: 120%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(126, 200, 195, 0.55), transparent 42%),
    radial-gradient(circle at 70% 70%, rgba(31, 78, 140, 0.28), transparent 48%);
  filter: blur(18px);
  z-index: 1;
  animation: drift 12s ease-in-out infinite;
}
.idle .portrait-frame { animation: none; }

@keyframes drift {
  0%, 100% { transform: translate3d(-2%, -1%, 0) scale(1); }
  50% { transform: translate3d(3%, 2%, 0) scale(1.06); }
}
@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.section-head { margin: 96px 0 24px; max-width: 62ch; }
.note { color: var(--ink-soft); margin: 0; line-height: 1.5; }

.portfolio { margin-top: 96px; }
.portfolio-card {
  border-radius: var(--radius);
  padding: 32px 36px 28px;
}
.portfolio-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--polo);
}
.portfolio-card h2 { margin: 0 0 10px; }
.portfolio-lede {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 52ch;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px 48px;
}
.portfolio-label {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--polo);
}
.portfolio-sub {
  margin: 0 0 14px;
  font-family: Fraunces, Georgia, serif;
  font-size: 18px;
  line-height: 1.35;
  color: var(--navy);
}
.portfolio-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.portfolio-facts li {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}
.portfolio-facts span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.portfolio-qs {
  margin: 8px 0 0;
  padding: 0 0 0 1.15em;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.portfolio-qs li {
  font-size: 15px;
  line-height: 1.45;
  color: var(--navy);
}
.portfolio-close {
  font-family: Fraunces, Georgia, serif;
  font-size: 18px;
  line-height: 1.4;
  color: var(--navy);
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 62ch;
}

.glass {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.15);
}

.player { border-radius: var(--radius); overflow: hidden; }
.player video { display: block; width: 100%; background: #0e1620; max-height: 72vh; }
.player-fallback { margin: 0; padding: 28px; color: var(--ink-soft); }
.deck-stage {
  border-radius: var(--radius);
  overflow: hidden;
  background: #0e1620;
}
.deck-page {
  margin: 0;
  background: #0e1620;
}
.deck-page img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  vertical-align: middle;
}
.deck-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(246, 243, 238, 0.94);
  border-top: 1px solid var(--line);
}
.deck-nav button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.deck-nav button:hover:not(:disabled) { background: #fff; }
.deck-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.deck-count {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.deck .note a { color: var(--navy); }

.proj-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.kpi { border-radius: 22px; padding: 16px 18px; }
.kpi-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--polo);
}
.kpi-value {
  font-family: Fraunces, Georgia, serif;
  font-size: 28px;
  margin: 8px 0 4px;
  letter-spacing: -0.03em;
}
.kpi-sub { margin: 0; font-size: 12px; color: var(--ink-soft); }
.proj-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.chart-card {
  border-radius: var(--radius);
  padding: 18px 18px 12px;
  margin: 0;
}
.chart-card figcaption {
  font-family: Fraunces, Georgia, serif;
  font-size: 18px;
  margin: 0 0 8px;
}
.chart-card figcaption span {
  font-family: Outfit, system-ui, sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 400;
  margin-left: 8px;
}
.chart-card canvas { display: block; width: 100%; }

.ask .chat {
  max-width: 760px;
}
.ask-name {
  font-family: Fraunces, serif;
  font-size: 22px;
  margin: 0 0 14px;
}

.chat { border-radius: var(--radius); padding: 20px; min-height: 520px; display: flex; flex-direction: column; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chips button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.55);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--navy);
}
.chips button:hover { background: #fff; }
.chips button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding-right: 4px; max-height: 420px; }
.bubble { max-width: 92%; padding: 12px 14px; border-radius: 18px; line-height: 1.5; font-size: 15px; white-space: pre-wrap; }
.bubble.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 6px; }
.bubble.ankur { align-self: flex-start; background: rgba(255,255,255,0.78); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.is-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  min-height: 44px;
  white-space: normal;
}
.thinking-copy { font-size: 14px; }
.typing-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--polo);
  animation: typing-bounce 1.1s ease-in-out infinite;
}
.typing-dots i:nth-child(2) { animation-delay: 0.16s; }
.typing-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes typing-bounce {
  0%, 80%, 100% { opacity: 0.28; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.composer { display: flex; gap: 8px; margin-top: 16px; }
.composer input, .gate-card input {
  flex: 1;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
}
.composer button, .gate-card button[type="submit"] {
  border: 0;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
}

.foot {
  padding: 0 7vw 48px;
  color: var(--ink-soft);
  font-size: 13px;
  max-width: 1280px;
  margin: 0 auto;
}
.todo { opacity: 0.85; }
code { font-size: 12px; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  background: rgba(246, 243, 238, 0.72);
  backdrop-filter: blur(10px);
  pointer-events: none;
}
.gate.is-open {
  display: grid;
  pointer-events: auto;
}
.gate[hidden] {
  display: none !important;
  pointer-events: none !important;
}
#gate-email-step[hidden],
#gate-otp-step[hidden],
#gate-decline[hidden] {
  display: none !important;
}
.gate-card { width: min(420px, 92vw); padding: 32px; border-radius: var(--radius); }
.gate-card h2 { margin-top: 0; }
.gate-card form { display: flex; gap: 8px; margin: 16px 0; }
.gate-card form.otp-form {
  flex-direction: column;
  gap: 14px;
  margin: 18px 0 10px;
}
.otp-boxes {
  display: flex;
  gap: clamp(6px, 1.8vw, 10px);
  justify-content: space-between;
}
.gate-card input.otp-digit {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: 56px;
  height: 54px;
  padding: 0;
  border-radius: 16px;
  text-align: center;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(18px, 5.2vw, 24px);
  font-weight: 560;
  letter-spacing: 0;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  caret-color: var(--polo);
}
.gate-card input.otp-digit:focus {
  outline: none;
  border-color: rgba(31, 78, 140, 0.42);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 4px rgba(126, 200, 195, 0.32);
}
.otp-form button[type="submit"] { width: 100%; }
.gate-err { min-height: 1.2em; margin: 0; color: #8a3b32; font-size: 13px; }
.gate-legal {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
body.is-gated { overflow: hidden; }
#host-tools[hidden] { display: none !important; }
.host-tools {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.host-tools-label { margin: 0 0 8px; }
.invite-form { display: flex; gap: 8px; max-width: 520px; }
.invite-form input {
  flex: 1;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
}
.invite-form button {
  border: 0;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
}
.invite-out { word-break: break-all; color: var(--navy); }
.textish {
  background: none;
  border: 0;
  color: var(--polo);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

@media (max-width: 900px) {
  .intro, .proj-charts, .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-card { padding: 24px 20px 22px; }
  .proj-kpis { grid-template-columns: 1fr 1fr; }
  .top { padding-inline: 20px; }
  .tabs { width: 100%; order: 3; }
  .copy-brief { order: 4; }
  main { padding-inline: 20px; }
}
@media (max-width: 420px) {
  .gate-card { padding: 24px 16px; }
  .gate-card input.otp-digit { height: 48px; border-radius: 14px; }
}
