/* Custodia marketing site — Midnight Executive palette matching docs/custodia-social-card.png */

:root {
  --navy-950: #0d1230;
  --navy-900: #131a45;
  --navy-800: #1e2761;
  --navy-700: #283372;
  --ice: #cadcfc;
  --ice-dim: #9fb6e6;
  --gold: #d4a94a;
  --gold-bright: #e8c877;
  --white: #ffffff;
  --ink: #1b2340;
  --ink-soft: #4a5170;
  --paper: #f7f8fc;
  --paper-card: #ffffff;
  --line: #e3e6f2;
  --success: #2c7a55;
  --danger: #8c2f39;
  --radius: 14px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a { color: var(--navy-800); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Top nav ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 18, 48, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topnav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.01em;
}

.brand img { height: 34px; width: 34px; border-radius: 50%; border: 2px solid var(--gold); }

.navlinks {
  display: flex;
  align-items: center;
  gap: 28px;
}

.navlinks a {
  color: var(--ice);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
}

.navlinks a:hover { color: var(--white); }

.navlinks a.cta {
  background: var(--gold);
  color: var(--navy-950);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.navlinks a.cta:hover { background: var(--gold-bright); }

.navtoggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  font-size: 18px;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  background: radial-gradient(1200px 600px at 85% -10%, #223188 0%, transparent 60%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  color: var(--white);
  padding: 84px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -80px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 169, 74, 0.16) 0%, transparent 70%);
}

.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 169, 74, 0.14);
  border: 1px solid rgba(212, 169, 74, 0.4);
  color: var(--gold-bright);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  color: var(--white);
  font-size: 52px;
  margin-bottom: 18px;
}

.hero .lede {
  color: var(--ice);
  font-size: 19px;
  max-width: 54ch;
  margin-bottom: 28px;
}

.badgerow { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }

.badge {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ice);
}

.herobtns { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-gold { background: var(--gold); color: var(--navy-950); }
.btn-gold:hover { background: var(--gold-bright); }

.btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { border-color: var(--white); }

.hero-avatar-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.hero-avatar-card img {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  margin-bottom: 18px;
}

.hero-avatar-card .name { font-family: "Fraunces", serif; font-size: 22px; color: var(--white); font-weight: 700; }
.hero-avatar-card .role { color: var(--ice-dim); font-size: 14px; margin-top: 4px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-stats .stat b { display: block; font-size: 22px; color: var(--gold-bright); font-family: "Fraunces", serif; }
.hero-stats .stat span { font-size: 11.5px; color: var(--ice-dim); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Callouts ---------- */

.callouts { padding: 44px 0 0; }

.callout {
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 18px;
  border-left: 5px solid;
  font-size: 14.5px;
}

.callout p:last-child { margin-bottom: 0; }

.callout-title {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.callout.important {
  background: #eef4ff;
  border-color: var(--navy-800);
  color: var(--navy-900);
}
.callout.important .callout-title { color: var(--navy-800); }

.callout.warning {
  background: #fdf6ec;
  border-color: var(--gold);
  color: #5c4413;
}
.callout.warning .callout-title { color: #8a6a1f; }

/* ---------- Sections ---------- */

section { padding: 88px 0; }
section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head .kicker {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.section-head h2 { font-size: 34px; margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); font-size: 16.5px; }

/* ---------- Feature grid ---------- */

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 1px 2px rgba(19, 26, 69, 0.04);
}

.card .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--navy-900);
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 0; }

/* ---------- Demo / chat transcript ---------- */

.demo-shell {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.email-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(19, 26, 69, 0.08);
  position: sticky;
  top: 96px;
}

.email-card .email-head {
  background: var(--navy-900);
  color: var(--white);
  padding: 16px 20px;
  font-size: 13px;
}

.email-card .email-head .tag {
  display: inline-block;
  background: rgba(212, 169, 74, 0.2);
  color: var(--gold-bright);
  border: 1px solid rgba(212, 169, 74, 0.4);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.email-meta { padding: 16px 20px; font-size: 13px; border-bottom: 1px solid var(--line); }
.email-meta div { margin-bottom: 4px; color: var(--ink-soft); }
.email-meta div b { color: var(--ink); font-weight: 600; }

.email-body { padding: 18px 20px; font-size: 14px; color: var(--ink); }
.email-body p { margin-bottom: 0.9em; }
.email-signature { color: var(--ink-soft); font-size: 13px; margin-top: 12px; }

.chat-shell {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(19, 26, 69, 0.08);
  overflow: hidden;
}

.chat-titlebar {
  background: var(--navy-900);
  color: var(--white);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.chat-titlebar img { width: 26px; height: 26px; border-radius: 50%; }
.chat-titlebar .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; margin-left: auto; }

.chat-body { padding: 22px 22px 8px; }

.msg { display: flex; gap: 12px; margin-bottom: 20px; align-items: flex-start; }
.msg.user { flex-direction: row-reverse; }

.msg .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
}

.msg.agent .avatar { background: var(--navy-800); overflow: hidden; padding: 0; }
.msg.agent .avatar img { width: 100%; height: 100%; }
.msg.user .avatar { background: var(--ink-soft); }

.bubble {
  max-width: 78%;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 14.5px;
}

.msg.agent .bubble { background: var(--paper); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg.user .bubble { background: var(--navy-800); color: var(--white); border-top-right-radius: 4px; }

.bubble p { margin-bottom: 0.7em; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul { margin: 6px 0; padding-left: 18px; }
.bubble li { margin-bottom: 4px; }
.bubble code { background: rgba(19, 26, 69, 0.06); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.msg.user .bubble code { background: rgba(255, 255, 255, 0.16); }

.confirm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eaf6ef;
  color: var(--success);
  border: 1px solid #b9e3c9;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 4px;
}

.tool-call {
  background: #0d1230;
  color: #cfe0ff;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 12.5px;
  margin: 8px 0 0;
  overflow-x: auto;
}

.tool-call .op { color: var(--gold-bright); font-weight: 700; }
.tool-call .status { color: #7fd8a4; }
.tool-call .pending { color: #f3c26b; }

.result-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.result-card .stat b { display: block; font-size: 20px; font-family: "Fraunces", serif; color: var(--navy-800); }
.result-card .stat span { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }

.chat-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 4px 22px 20px;
  border-top: 1px dashed var(--line);
  margin-top: 6px;
}

/* ---------- Architecture ---------- */

.arch-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 4px 20px rgba(19, 26, 69, 0.05);
}

.mermaid { display: flex; justify-content: center; }

.arch-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 28px; }
.arch-notes .note { border-left: 3px solid var(--gold); padding-left: 16px; }
.arch-notes .note h4 { font-size: 15px; margin-bottom: 4px; }
.arch-notes .note p { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* ---------- Safety table ---------- */

.safety-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.safety-col h3 {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.safety-col.allow h3 { color: var(--success); }
.safety-col.deny h3 { color: var(--danger); }

.safety-list { list-style: none; margin: 0; padding: 0; }
.safety-list li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  font-size: 14px;
}
.safety-list li b { display: block; font-size: 14px; margin-bottom: 2px; }
.safety-list li span { color: var(--ink-soft); font-size: 13px; }

.safety-col.allow .safety-list li { border-left: 3px solid var(--success); }
.safety-col.deny .safety-list li { border-left: 3px solid var(--danger); }

/* ---------- Get started ---------- */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 28px; }

.step { position: relative; padding: 26px 22px 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -16px;
  left: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-bright);
  font-family: "Fraunces", serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.step h3 { font-size: 16px; margin: 8px 0 8px; }
.step p { font-size: 14px; color: var(--ink-soft); margin-bottom: 0; }

.code-panel {
  background: var(--navy-950);
  color: #d7e2ff;
  border-radius: 12px;
  padding: 20px 22px;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 14px;
  overflow-x: auto;
}
.code-panel .prompt { color: var(--gold-bright); }

.left-list { list-style: none; padding: 0; margin: 18px 0 0; }
.left-list li {
  padding: 10px 0 10px 30px;
  position: relative;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--ink-soft);
}
.left-list li:last-child { border-bottom: none; }
.left-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: var(--white);
  border-radius: 20px;
  padding: 52px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: var(--ice); margin-bottom: 0; max-width: 46ch; }

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

footer {
  background: var(--navy-950);
  color: var(--ice-dim);
  padding: 48px 0 28px;
  font-size: 13.5px;
}

footer .footer-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 22px;
}

footer .fbrand { display: flex; align-items: center; gap: 10px; color: var(--white); font-family: "Fraunces", serif; font-weight: 700; font-size: 18px; }
footer .fbrand img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--gold); }

footer .flinks { display: flex; gap: 24px; flex-wrap: wrap; }
footer .flinks a { color: var(--ice-dim); text-decoration: none; }
footer .flinks a:hover { color: var(--white); }

footer .disclaimer { max-width: 900px; }
footer .disclaimer p { margin-bottom: 10px; color: var(--ice-dim); }
footer .disclaimer b { color: var(--ice); }
footer .copyright { margin-top: 18px; color: #7c86ad; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-avatar-card { max-width: 340px; }
  .grid3, .grid2, .safety-grid, .arch-notes, .steps { grid-template-columns: 1fr; }
  .demo-shell { grid-template-columns: 1fr; }
  .email-card { position: static; }
  .navtoggle { display: inline-block; }
  .navlinks {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--navy-950);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 28px 18px;
  }
  .navlinks.open { display: flex; }
  .navlinks a { padding: 10px 0; width: 100%; }
  .navlinks a.cta { width: auto; margin-top: 6px; }
  .hero h1 { font-size: 38px; }
}
