/* === KEY AI — brand layer ===
   Loaded after style.css. Carries the look of the Kai site across every page:
   near-black ink on crisp paper, Key gold used sparingly, one typeface (Public Sans).
   Headlines are heavy with tight tracking; their second line is the same face in a light,
   muted weight (no gradient text). Prestige through restraint: flat fills, hairline rings,
   soft shadows. To go back to the previous look, remove the theme.css <link> in BaseLayout. */

:root {
  /* ground */
  --bg:         #FAFAFA;
  --bg-white:   #FFFFFF;
  --bg-gray:    #FFFFFF;
  --bg-gray-2:  #F2F2F4;
  --bg-dark:    #0B0B0D;
  --bg-dark-2:  #18181B;

  /* type */
  --text:       #0B0B0D;
  --text-2:     #5F5F66;
  --text-3:     #6B6B73;
  --text-inv:   #F5F5F7;
  --text-inv-2: #A1A1AA;

  /* lines */
  --border:      #E7E7EA;
  --border-2:    #D7D7DC;
  --border-dark: #26262B;

  /* gold: one accent, used for dots, ticks and small highlights */
  --brand:      #E4B508;
  --brand-rgb:  228, 181, 8;
  --brand-deep: #8A6A1F;
  --brand-dim:  rgba(228, 181, 8, 0.14);
  --brand-soft: rgba(228, 181, 8, 0.34);
  --key-gold-200: #F4DC8A;
  --champagne:  #C8A557;

  /* flat grounds instead of the gold atmosphere wash */
  --grad-hero: #FAFAFA;
  --grad-dark-card: #0B0B0D;

  --radius-lg: 26px;
  --radius-xl: 30px;
  --kai-ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

body {
  font-family: 'Public Sans Variable', 'Public Sans', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
  background: var(--bg);
  background-attachment: scroll;
  letter-spacing: -0.011em;
}
body::before { content: none; }
p { text-wrap: pretty; }

/* ---------- headlines ---------- */
.page-hero-h,
.section-h2,
.hero-h1,
.hero-h,
.bcard-h3,
.bcard-h,
.stat-num,
.comm-stat-num,
.article-prose h2,
.blog-title {
  font-weight: 650;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.page-hero-h { line-height: 1; letter-spacing: -0.05em; }
.section-h2 { line-height: 1.04; }
.bcard-h3, .bcard-h { letter-spacing: -0.035em; line-height: 1.08; }
.article-prose h2 { letter-spacing: -0.03em; }
.article-prose h3, .article-prose h4 { font-weight: 650; letter-spacing: -0.02em; }

/* The accent line of a headline: light and muted, not gold gradient text. */
.gradient-text--brand,
.hero-h1-muted {
  background: none;
  -webkit-background-clip: border-box;
          background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  color: var(--text-3);
  font-weight: 350;
}
.section-dark .gradient-text--brand,
.bcard-dark .gradient-text--brand,
.bcard-dark-2 .gradient-text--brand {
  background: none;
  -webkit-background-clip: border-box;
          background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  color: var(--champagne);
}

/* ---------- eyebrows and small labels ---------- */
.section-label {
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.14em;
  color: var(--text-3);
  margin-bottom: 18px;
}
.section-dark .section-label,
.bcard-dark .section-label,
.bcard-dark-2 .section-label,
.section-dark .dark-label { color: var(--champagne) !important; }
.bcard-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; }

.hero-badge,
.product-hero-badge,
.soon-badge {
  background: #fff;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--border-2);
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section-sub,
.page-hero-sub { color: var(--text-2); text-wrap: balance; }
.page-hero-sub { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; }

/* ---------- sections ---------- */
.page-hero:not(.section-dark) { background: var(--bg); }
.page-hero,
.product-hero { border-bottom-color: var(--border); }
/* one quiet glow where the old corner washes were */
.page-hero::before,
.product-hero::before {
  background: radial-gradient(46% 60% at 50% 10%, rgba(244, 220, 138, 0.26), transparent 70%);
}
.section-dark { background: var(--bg-dark); color: var(--text-inv); }
.ticker,
.stats-strip { background: transparent; }
.ticker-item { color: var(--text-3); font-weight: 550; letter-spacing: 0.1em; }

/* ---------- buttons ---------- */
.btn-primary {
  background: var(--bg-dark);
  color: #FAFAFA;
  font-weight: 600;
  padding: 13px 22px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.3s var(--kai-ease), box-shadow 0.3s;
}
.btn-primary:hover {
  background: var(--bg-dark);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 24px -12px rgba(0, 0, 0, 0.45);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-weight: 600;
  padding: 13px 22px;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--border-2);
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  transition: box-shadow 0.2s, transform 0.3s var(--kai-ease);
}
.btn-ghost:hover {
  border: 0;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--text);
  transform: translateY(-1px);
}
.btn-primary:focus-visible,
.btn-ghost:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ---------- cards ---------- */
.bcard { transition: transform 0.4s var(--kai-ease), box-shadow 0.4s var(--kai-ease); }
.bcard::before { content: none; }
.bcard-white,
.bcard-gray {
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 1px var(--border), 0 24px 48px -36px rgba(15, 15, 25, 0.28);
}
.bcard-gray { background: var(--bg-gray-2); box-shadow: none; }
.bcard-outline { background: transparent; border: 0; box-shadow: inset 0 0 0 1px var(--border-2); }
.bcard-dark,
.bcard-dark-2 {
  background: var(--bg-dark);
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  color: var(--text-inv);
}
.bcard-dark-2 { background: var(--bg-dark-2); }
.bcard:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--border-2), 0 30px 60px -34px rgba(15, 15, 25, 0.4); }
.bcard-gray:hover,
.bcard-outline:hover { box-shadow: inset 0 0 0 1px var(--text); }
.bcard-dark:hover,
.bcard-dark-2:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 30px 60px -34px rgba(0, 0, 0, 0.7); }
.bcard-link { font-weight: 600; }

.stat-label,
.comm-stat-label { color: var(--text-2); }
/* the homepage's community stats sit on a dark card */
.bcard-dark-2 .comm-stat-label { color: var(--text-inv-2); }

/* ---------- prose and help ---------- */
.article-prose a:not([class]) { text-decoration-color: var(--brand-soft); text-underline-offset: 3px; }
.article-prose a:not([class]):hover { text-decoration-color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  .btn-primary, .btn-ghost, .bcard { transition: none; }
}
