/* Palette taken from the Aegis logo: navy outline and wordmark,
   periwinkle and mint fills, near-white ground. Accents are darkened where used as
   text so they stay readable on white. */
:root {
  --bg: #fdfdfd;
  --bg-2: #f3f5ff;
  --panel: #ffffff;
  --panel-2: #eef1ff;
  --line: #dde2f4;
  --text: #192a58;       /* logo navy */
  --body: #34416b;
  --muted: #59658c;
  --accent: #4658d6;     /* deepened logo periwinkle */
  --accent-soft: #e8ecff;
  --peri: #90a3ff;       /* logo periwinkle (decorative) */
  --mint: #138a73;       /* deepened logo mint */
  --mint-soft: #dff3ec;
  --mint-fill: #b4e2d7;  /* logo mint */
  --gold: #9a6410;
  --gold-soft: #fbefd0;
  --gold-line: #e3c47a;
  --rose: #bd3d49;
  --rose-soft: #fde9eb;
  --rose-line: #efb4ba;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --top: 68px;
  --foot: 40px;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(25, 42, 88, 0.05), 0 6px 18px rgba(25, 42, 88, 0.06);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background:
    radial-gradient(1000px 480px at 90% -8%, rgba(144, 163, 255, 0.16), transparent 62%),
    radial-gradient(900px 460px at -8% 108%, rgba(180, 226, 215, 0.30), transparent 62%),
    var(--bg);
  color: var(--body);
  font-family: var(--sans);
  line-height: 1.55;
  min-height: 100vh;
  overflow: hidden;
}
a { color: inherit; }
code { background: var(--panel-2); padding: 0.1em 0.4em; border-radius: 6px; font-size: 0.9em; color: var(--text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 20;
  display: flex; align-items: center; gap: 20px; padding: 0 clamp(14px, 3vw, 36px);
  background: rgba(253, 253, 253, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
/* Logo lockup, all centred on one horizontal axis: the logo (whole image, rays included) is the
   reference; "Aegis" is centred on it, and the tagline is centred on "Aegis". The name and tagline are
   trimmed to their cap-height (text-box), so "centred" means the middle of the capital letters rather
   than the middle of the line box, which would sit a little off for every font. The text is tucked
   close to the logo because the logo's right side is mostly empty below the rays. */
.brand { --mark: 44px; display: flex; align-items: center; gap: 4px; text-decoration: none; flex-shrink: 0; color: var(--text); }
.mark { width: var(--mark); height: var(--mark); display: block; }
.brand-text { display: flex; align-items: center; gap: 14px; }
.brand-name, .brand-tag { line-height: 1; text-box: trim-both cap alphabetic; }
.brand-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.brand-tag { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.tabs { display: flex; gap: 4px; margin-left: auto; align-items: center; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs button {
  appearance: none; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 0.9rem; font-weight: 600; padding: 9px 13px; border-radius: 999px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; transition: background .15s, color .15s;
}
.tabs button:hover { color: var(--text); background: var(--bg-2); }
.tabs button .n {
  display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 50%;
  font-size: 0.72rem; border: 1px solid var(--line); color: var(--muted); background: #fff;
}
.tabs button[aria-selected="true"] { color: var(--text); background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.tabs button[aria-selected="true"] .n { background: var(--text); border-color: var(--text); color: #fff; }
.tabs button.cta { background: var(--text); color: #fff; font-weight: 700; margin-left: 8px; }
.tabs button.cta:hover { background: var(--accent); color: #fff; }
.tabs button.cta[aria-selected="true"] { background: var(--text); color: #fff; box-shadow: 0 0 0 3px rgba(70, 88, 214, 0.28); }

/* ---------- Stage / slides ---------- */
#stage { position: fixed; inset: var(--top) 0 var(--foot) 0; overflow: hidden; }
.slide { position: absolute; inset: 0; overflow-y: auto; padding: clamp(22px, 4.5vh, 52px) clamp(16px, 4vw, 56px) 64px; scroll-behavior: smooth; }
.slide[hidden] { display: none; }
.slide.enter { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.wrap { max-width: 1120px; margin: 0 auto; }

.eyebrow { margin: 0 0 10px; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4.1vw, 3.2rem); line-height: 1.12; margin: 0 0 16px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--body); margin: 0 0 18px; max-width: 62ch; text-wrap: pretty; }
.body { color: var(--muted); max-width: 70ch; margin: 0 0 8px; }
.section-label { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin: 34px 0 14px; }
.section-label .muted { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 6px; }
.closing { font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 1.8vw, 1.35rem); color: var(--text); margin: 38px 0 0; padding-left: 16px; border-left: 3px solid var(--peri); max-width: 70ch; }
.gold { color: var(--gold); }
.rose { color: var(--rose); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 14px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.3; color: var(--text); }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card.q { position: relative; padding-top: 46px; }
.card.q .num { position: absolute; top: 14px; left: 20px; font-size: 1.5rem; color: var(--accent); font-weight: 800; }
.caps { margin-top: 22px; }
.benefits .b { display: flex; flex-direction: column; }
.benefits .icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 1.2rem; color: var(--text); background: var(--mint-fill); line-height: 1; margin-bottom: 12px; }
.roles .card h3 { color: var(--accent); }

/* ---------- Stat ---------- */
.stat { margin-top: 26px; border: 1px solid var(--gold-line); background: linear-gradient(135deg, var(--gold-soft), var(--rose-soft)); border-radius: var(--radius); padding: 20px 24px; }
.stat-label { margin: 0 0 10px; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
.stat-row { display: flex; gap: clamp(20px, 5vw, 64px); flex-wrap: wrap; }
.stat-row p { margin: 0; color: var(--body); max-width: 26ch; }
.stat-row strong { display: block; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; color: var(--text); font-weight: 800; }
.stat-row strong span { font-size: 0.55em; color: var(--rose); font-weight: 700; }
.fine { margin: 12px 0 0; font-size: 0.8rem; color: var(--muted); }

/* ---------- Slide 2 ---------- */
.story-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(18px, 3vw, 34px); align-items: center; margin: 6px 0 8px; }
.story-art { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #1a1626; }
.story-art img { display: block; width: 100%; height: auto; }
.story { display: flex; align-items: center; padding: 4px 6px; color: var(--body); font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.65; }
.story p { margin: 0; }
.story strong.gold, .story strong.rose { font-weight: 800; }

.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin-top: 28px; }
.path { border-radius: var(--radius); padding: 20px 22px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.path h3 { margin: 0 0 12px; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text); }
.path .tag { font-size: 1.3rem; font-weight: 800; }
.path ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.path li { padding-left: 24px; position: relative; color: var(--body); font-size: 0.95rem; }
.path li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.preyas { border-color: var(--rose-line); background: linear-gradient(180deg, var(--rose-soft), #fff 70%); }
.preyas .tag { color: var(--rose); }
.preyas li::before { content: "✕"; color: var(--rose); }
.shreyas { border-color: var(--gold-line); background: linear-gradient(180deg, var(--gold-soft), #fff 70%); }
.shreyas .tag { color: var(--gold); }
.shreyas li::before { content: "✓"; color: var(--mint); }
.vs { align-self: center; font-family: var(--serif); font-style: italic; color: var(--muted); }

.solution { margin-top: 34px; padding: 24px 26px; border-radius: var(--radius); border: 1px solid #b9d9d0; background: linear-gradient(135deg, var(--mint-soft), var(--accent-soft)); }
.solution h2 { font-size: clamp(1.3rem, 2.6vw, 1.9rem); margin: 0 0 10px; line-height: 1.2; color: var(--text); font-weight: 800; letter-spacing: -0.01em; }
.solution p { margin: 0 0 16px; color: var(--body); max-width: 78ch; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: step; }
.flow li { counter-increment: step; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 0.92rem; color: var(--text); }
.flow li::before { content: counter(step); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--text); color: #fff; font-size: 0.75rem; font-weight: 800; }
.flow li:not(:last-child)::after { content: "→"; color: var(--accent); margin-left: 6px; }

/* ---------- Slide 4 ---------- */
.legend { display: flex; gap: 10px; margin: 4px 0 14px; }
.chip { display: inline-block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.chip.live { background: var(--mint-soft); color: var(--mint); border: 1px solid #a7d8c9; }
.chip.road { background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold-line); }

.risk-board { display: grid; grid-template-columns: minmax(250px, 340px) 1fr; gap: 16px; align-items: start; }
.risk-list { display: grid; gap: 6px; }
.risk-tab {
  appearance: none; text-align: left; cursor: pointer; font: inherit; font-size: 0.95rem; font-weight: 600; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px;
  display: flex; gap: 12px; align-items: baseline; transition: border-color .15s, background .15s, color .15s;
}
.risk-tab span { font-weight: 800; color: var(--accent); min-width: 1.6em; }
.risk-tab:hover { color: var(--text); border-color: var(--peri); }
.risk-tab[aria-selected="true"] { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }
.risk-tab.own span { color: var(--gold); }
.risk-detail { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; min-height: 100%; box-shadow: var(--shadow); }
/* All panels share one grid cell so the box keeps the height of the longest one
   and the layout below it does not jump when the selected risk changes. */
.risk-detail { display: grid; }
.risk-panel { grid-area: 1 / 1; }
.risk-panel[hidden] { display: block; visibility: hidden; }
.risk-panel .wrong { margin: 0 0 16px; padding: 12px 14px; border-left: 3px solid var(--rose); background: var(--rose-soft); border-radius: 0 10px 10px 0; color: var(--text); }
.risk-panel .wrong b { display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rose); margin-bottom: 2px; }
.risk-panel h3 { margin: 18px 0 8px; }
.risk-panel ul { margin: 0; padding-left: 20px; display: grid; gap: 7px; color: var(--body); }
.risk-panel li::marker { color: var(--accent); }
.principle { margin-top: 26px; padding: 20px 24px; border-radius: var(--radius); border: 1px solid var(--text); background: var(--text); }
.principle p { margin: 0; font-size: clamp(0.85rem, 1.1vw, 0.95rem); color: #fff; line-height: 1.45; }
.principle strong { color: var(--mint-fill); }

/* ---------- Chatbot tab: the chat fills the stage under the same header and footer ---------- */
.slide-chat { padding: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--bg); }
.chat-note { margin: 0; padding: 7px clamp(14px, 3vw, 36px); text-align: center; font-size: 0.8rem; color: var(--body); background: var(--bg-2); border-bottom: 1px solid var(--line); }
.chat-note strong { color: var(--text); }
.chat-frame { display: block; flex: 1; min-height: 0; width: 100%; border: 0; background: var(--bg); }

/* ---------- Footer ---------- */

.site-footer { position: fixed; inset: auto 0 0 0; height: var(--foot); z-index: 20; display: flex; align-items: center; gap: 16px; padding: 0 clamp(14px, 3vw, 36px); border-top: 1px solid var(--line); background: rgba(253, 253, 253, 0.95); font-size: 0.74rem; color: var(--muted); }
.site-footer strong { color: var(--text); }
.site-footer span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.counter { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 700; }


/* ---------- Responsive ---------- */
@media (max-width: 1360px) {
  .brand-tag { display: none; }
}
@media (max-width: 900px) {
  :root { --top: 108px; }
  .topbar { flex-wrap: wrap; align-content: center; gap: 4px 12px; padding-top: 6px; padding-bottom: 6px; }
  .brand { --mark: 36px; }
  .tabs { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .cols-3, .cols-4 { grid-template-columns: 1fr 1fr; }
  .story-row, .risk-board { grid-template-columns: 1fr; }
  .versus { grid-template-columns: 1fr; }
  .vs { display: none; }
  .site-footer span:nth-child(2) { display: none; }
  .site-footer { justify-content: space-between; }
}
@media (max-width: 600px) {
  .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .tabs button .n { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .slide.enter { animation: none; }
  .slide { scroll-behavior: auto; }
}
@media print {
  body { overflow: visible; background: #fff; }
  .topbar, .site-footer { display: none; }
  #stage { position: static; }
  .slide, .slide[hidden] { position: static; display: block; page-break-after: always; overflow: visible; }
}
