/* ==========================================================================
   KeyPersonAI — Site Styles
   Premium, calm, executive-friendly. Two-screen pages, tab depth.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --navy:        #0B1F3A;
  --navy-deep:   #061426;
  --navy-soft:   #143257;
  --white-warm:  #FAF8F4;
  --white:       #FFFFFF;
  --gray-soft:   #E8E6E1;
  --gray-mid:    #BFBCB4;
  --gray-line:   #D8D5CD;
  --charcoal:    #1E252B;
  --charcoal-2:  #4A525B;
  --brass:       #C9A45C;
  --brass-deep:  #A88340;
  --teal:        #18B6A4;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --max:        1180px;
  --max-narrow: 880px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;

  --t-fast: 160ms ease;
  --t-mid:  260ms cubic-bezier(.2,.7,.2,1);

  --shadow-sm: 0 1px 2px rgba(11, 31, 58, .06), 0 2px 8px rgba(11, 31, 58, .04);
  --shadow-md: 0 4px 12px rgba(11, 31, 58, .08), 0 12px 32px rgba(11, 31, 58, .06);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--charcoal);
  background: var(--white-warm);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brass-deep); }
button { font-family: inherit; cursor: pointer; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: clamp(1.85rem, 3.1vw, 2.5rem); }
h3 { font-size: 1.35rem; font-family: var(--sans); font-weight: 600; color: var(--navy); letter-spacing: -.005em; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; color: var(--navy); letter-spacing: 0; }

p  { margin: 0 0 1em; max-width: 70ch; color: var(--charcoal); }
p.lede { font-size: 1.2rem; line-height: 1.55; color: var(--charcoal-2); max-width: 56ch; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--brass-deep);
  margin: 0 0 .9rem;
}
.serif { font-family: var(--serif); }
.muted { color: var(--charcoal-2); }
.small { font-size: .92rem; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 28px; }
section { padding: 76px 0; }
section.tight { padding: 56px 0; }
section.dark { background: var(--navy); color: rgba(255,255,255,.86); }
section.dark h1, section.dark h2, section.dark h3, section.dark h4 { color: #fff; }
section.dark .eyebrow { color: var(--brass); }
section.dark .muted { color: rgba(255,255,255,.7); }
section.warm { background: var(--white-warm); }
section.white { background: var(--white); }

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

@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  body { font-size: 16px; }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 244, .92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--gray-line);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.brand .mark {
  display: inline-block;
  width: 22px; height: 22px;
  border: 1.5px solid var(--brass);
  border-radius: 2px;
  position: relative;
  flex: none;
}
.brand .mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--navy);
  border-radius: 1px;
}
.brand sup { color: var(--brass-deep); font-size: .55em; margin-left: 2px; font-family: var(--sans); font-weight: 500; letter-spacing: .04em; vertical-align: super; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: .96rem;
  color: var(--charcoal);
  font-weight: 500;
  position: relative;
}
.nav a:hover { color: var(--navy); }
.nav a.active { color: var(--navy); }
/* Nav CTA: brass background gives unmissable contrast on the warm-white header */
.nav a.btn-primary {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--navy);
  font-weight: 700;
  letter-spacing: .015em;
  padding: 9px 18px;
  font-size: .92rem;
}
.nav a.btn-primary:hover {
  background: var(--brass-deep);
  border-color: var(--brass-deep);
  color: #fff;
  transform: none;
}
.nav a.btn-primary.active::after { display: none; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--brass);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gray-line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  color: var(--navy);
}

@media (max-width: 880px) {
  .nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--white-warm);
    border-bottom: 1px solid var(--gray-line);
    flex-direction: column;
    align-items: stretch;
    padding: 18px 28px;
    gap: 16px;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .nav.open { display: flex; }
  .nav a.active::after { display: none; }
  .nav .btn { text-align: center; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-md);
  font-family: var(--sans);
  font-weight: 600;
  font-size: .96rem;
  letter-spacing: .005em;
  border: 1px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  cursor: pointer;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover { background: var(--navy-soft); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--gray-line);
}
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-brass {
  background: var(--brass);
  color: var(--navy);
  border-color: var(--brass);
}
.btn-brass:hover { background: var(--brass-deep); color: #fff; border-color: var(--brass-deep); }
.btn-link {
  background: transparent;
  color: var(--navy);
  padding: 6px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--brass);
}
.btn-link:hover { color: var(--brass-deep); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-sm { padding: 8px 14px; font-size: .88rem; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---------- Hero (page heroes are calm, not splashy) ---------- */
.hero {
  padding: 78px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero h1 { max-width: 18ch; }
.hero p.lede { margin-top: .7em; }
.hero .cta-row { margin-top: 28px; }
.hero .credibility {
  margin-top: 22px;
  font-size: .92rem;
  color: var(--charcoal-2);
  max-width: 60ch;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 48px 0 40px; }
}

/* Subtle decorative element behind hero — no robots, no gradients */
.hero-decor {
  position: relative;
  border: 1px solid var(--gray-line);
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow-md);
}
.hero-decor .label {
  font-family: var(--sans);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--brass-deep);
  margin: 0 0 10px;
}
.hero-decor .qb {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--gray-line);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: .96rem;
  color: var(--charcoal-2);
  background: var(--white-warm);
  margin-bottom: 14px;
}
.hero-decor .qb svg { flex: none; color: var(--charcoal-2); }
.hero-decor .ans {
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.45;
  color: var(--navy);
  padding: 4px 4px 8px;
  border-left: 2px solid var(--brass);
  padding-left: 14px;
  margin: 8px 0 14px;
}
.hero-decor .src {
  font-size: .82rem;
  color: var(--charcoal-2);
  border-top: 1px solid var(--gray-line);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.hero-decor .src .tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--brass-deep);
  border: 1px solid var(--brass);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.card:hover {
  border-color: var(--brass);
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .55em; }
.card p:last-child { margin-bottom: 0; }
.card .num {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--brass-deep);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 8px;
}
.card-quiet {
  background: transparent;
  border: 1px solid var(--gray-line);
}
.card-flag {
  border-left: 3px solid var(--brass);
}

/* ---------- Tabs ---------- */
.tabs {
  border-top: 1px solid var(--gray-line);
  border-bottom: 1px solid var(--gray-line);
  display: flex;
  gap: 0;
  margin: 0 0 36px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  background: transparent;
  border: none;
  padding: 18px 22px;
  font-family: var(--sans);
  font-size: .98rem;
  font-weight: 500;
  color: var(--charcoal-2);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.tab:hover { color: var(--navy); }
.tab[aria-selected="true"] {
  color: var(--navy);
  border-bottom-color: var(--brass);
  font-weight: 600;
}
.tab-panel { display: none; }
.tab-panel[data-active="true"] { display: block; animation: fadeIn .25s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Tables (Before / After) ---------- */
.table-clean {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}
.table-clean th, .table-clean td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-line);
  vertical-align: top;
  font-size: .98rem;
}
.table-clean th {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.table-clean tr:last-child td { border-bottom: none; }
.table-clean .x { color: var(--charcoal-2); }
.table-clean .check { color: var(--navy); font-weight: 500; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }
label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: .01em;
}
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 1rem;
  font-family: var(--sans);
  color: var(--charcoal);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(201, 164, 92, .18);
}
textarea { min-height: 130px; resize: vertical; }

.form-status {
  padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: .95rem;
  display: none;
}
.form-status.ok { display: block; background: rgba(24, 182, 164, .1); border: 1px solid var(--teal); color: #0e6a60; }
.form-status.err { display: block; background: rgba(168, 60, 50, .08); border: 1px solid #a83c32; color: #872f26; }

/* ---------- Demo (knowledge base) ---------- */
.demo-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  border: 1px solid var(--gray-line);
  border-radius: var(--r-lg);
  background: var(--white);
  overflow: hidden;
  min-height: 520px;
  box-shadow: var(--shadow-md);
}
.demo-side {
  background: var(--white-warm);
  border-right: 1px solid var(--gray-line);
  padding: 22px 22px;
  font-size: .92rem;
}
.demo-side h4 {
  margin: 0 0 14px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--charcoal-2);
  font-weight: 600;
  font-family: var(--sans);
}
.demo-side .person {
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--gray-line);
  padding: 14px;
  margin-bottom: 18px;
}
.demo-side .person .name { font-family: var(--serif); font-size: 1.2rem; color: var(--navy); margin: 0 0 2px; }
.demo-side .person .role { font-size: .82rem; color: var(--charcoal-2); }
.demo-suggested { display: grid; gap: 8px; }
.demo-suggested button {
  text-align: left;
  background: transparent;
  border: 1px solid var(--gray-line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: .88rem;
  color: var(--charcoal);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.demo-suggested button:hover { border-color: var(--brass); background: var(--white); }

.demo-main {
  display: flex;
  flex-direction: column;
  background: var(--white);
}
.demo-thread {
  flex: 1;
  padding: 26px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.bubble-q {
  align-self: flex-end;
  max-width: 78%;
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px 14px 4px 14px;
  font-size: .95rem;
}
.bubble-a {
  align-self: flex-start;
  max-width: 92%;
  background: var(--white-warm);
  border: 1px solid var(--gray-line);
  padding: 16px 18px;
  border-radius: 14px 14px 14px 4px;
  font-size: .98rem;
  line-height: 1.6;
}
.bubble-a .cite {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-line);
  font-size: .82rem;
  color: var(--charcoal-2);
}
.bubble-a .cite strong { color: var(--navy); font-weight: 600; }
.demo-input {
  border-top: 1px solid var(--gray-line);
  padding: 16px 22px;
  background: var(--white-warm);
  display: flex;
  gap: 10px;
  align-items: center;
}
.demo-input input {
  flex: 1;
  background: var(--white);
}
.demo-banner {
  background: rgba(201, 164, 92, .12);
  border: 1px solid var(--brass);
  border-left-width: 3px;
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: .9rem;
  color: var(--charcoal);
  margin-bottom: 18px;
}
.demo-banner strong { color: var(--brass-deep); font-weight: 600; }

@media (max-width: 880px) {
  .demo-shell { grid-template-columns: 1fr; min-height: 0; }
  .demo-side { border-right: none; border-bottom: 1px solid var(--gray-line); }
}

/* ---------- FAQ accordions ---------- */
.faq-list { border-top: 1px solid var(--gray-line); }
.faq-item { border-bottom: 1px solid var(--gray-line); }
.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: 22px 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q .pm {
  flex: none;
  width: 22px; height: 22px;
  border: 1px solid var(--gray-line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brass-deep);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform var(--t-fast);
}
.faq-item[data-open="true"] .pm { transform: rotate(45deg); border-color: var(--brass); }
.faq-a {
  display: none;
  padding: 0 0 22px;
  color: var(--charcoal-2);
  max-width: 76ch;
}
.faq-item[data-open="true"] .faq-a { display: block; }

/* ---------- Pricing ---------- */
.price-line {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 4px 0 18px;
  flex-wrap: wrap;
}
.price-num {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--brass-deep);
  letter-spacing: -.01em;
  line-height: 1;
}
.price-unit {
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 500;
  color: var(--charcoal-2);
  text-transform: uppercase;
  letter-spacing: .12em;
}
@media (max-width: 540px) {
  .price-num { font-size: 2rem; }
}

.price-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 36px 32px;
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: var(--r-lg);
}
.price-card h3 { font-family: var(--serif); font-size: 1.65rem; }
.price-card .for { font-size: .94rem; color: var(--charcoal-2); margin-top: -8px; }
.price-card ul { padding: 0; margin: 0; list-style: none; }
.price-card li {
  padding: 10px 0 10px 26px;
  border-bottom: 1px solid var(--gray-line);
  position: relative;
  font-size: .96rem;
}
.price-card li:last-child { border-bottom: none; }
.price-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 16px;
  width: 14px; height: 8px;
  border-left: 2px solid var(--brass);
  border-bottom: 2px solid var(--brass);
  transform: rotate(-45deg);
}

/* ---------- Iceberg / problem visual ---------- */
.iceberg {
  border: 1px solid var(--gray-line);
  border-radius: var(--r-lg);
  background: var(--white);
  padding: 24px;
  display: grid;
  gap: 14px;
}
.iceberg .layer {
  border-radius: var(--r-md);
  padding: 14px 18px;
}
.iceberg .above {
  background: var(--white-warm);
  border: 1px solid var(--gray-line);
}
.iceberg .below {
  background: var(--navy);
  color: rgba(255,255,255,.86);
  min-height: 130px;
}
.iceberg .above strong, .iceberg .below strong { font-family: var(--sans); font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; color: var(--brass-deep); display: block; margin-bottom: 6px; }
.iceberg .below strong { color: var(--brass); }
.iceberg .above ul, .iceberg .below ul { margin: 0; padding-left: 18px; font-size: .94rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.7);
  padding: 56px 0 36px;
  margin-top: 64px;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--sans);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin: 0 0 14px;
}
.site-footer a { color: rgba(255,255,255,.7); display: block; padding: 4px 0; font-size: .94rem; }
.site-footer a:hover { color: var(--brass); }
.site-footer .grid { gap: 36px; }
.site-footer .brand { color: #fff; }
.site-footer .brand .mark { border-color: var(--brass); }
.site-footer .brand .mark::after { background: #fff; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .85rem;
  color: rgba(255,255,255,.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mt-lg { margin-top: 32px; }
.mt-xl { margin-top: 56px; }
.divider { border: 0; border-top: 1px solid var(--gray-line); margin: 40px 0; }
.tag-illustrative {
  display: inline-block;
  font-family: var(--sans);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  color: var(--brass-deep);
  border: 1px solid var(--brass);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(201, 164, 92, .08);
}

/* Inline list for "what gets captured" grid */
.capture-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.capture-grid .item {
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: var(--r-md);
  padding: 18px 18px;
  font-size: .95rem;
}
.capture-grid .item strong {
  display: block;
  font-family: var(--sans);
  color: var(--navy);
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 600;
}
@media (max-width: 880px) { .capture-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .capture-grid { grid-template-columns: 1fr; } }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0ms !important; transition-duration: 0ms !important; }
  html { scroll-behavior: auto; }
}
