/* ============================================================
   StrongKeep Sales Enablement Portal — shared stylesheet
   Brand source: shared/knowledge/brand/visual-identity.md
   Theme A "Brand Light". Yeseva One display + Inter body.
   ============================================================ */

:root {
  --brand_blue-100: #283584;
  --brand_blue-90:  color-mix(in srgb, #283584 90%, white);
  --brand_blue-60:  color-mix(in srgb, #283584 60%, white);
  --brand_blue-30:  color-mix(in srgb, #283584 30%, white);
  --brand_blue-10:  color-mix(in srgb, #283584 10%, white);
  --brand_blue-05:  color-mix(in srgb, #283584 5%, white);

  --brand_red-100:  #EA493A;
  --brand_red-60:   color-mix(in srgb, #EA493A 60%, white);
  --brand_red-10:   color-mix(in srgb, #EA493A 10%, white);

  --brand_green-100: #6BA895;
  --brand_green-60:  color-mix(in srgb, #6BA895 60%, white);
  --brand_green-10:  color-mix(in srgb, #6BA895 10%, white);

  --bg:        #EDEEF1;
  --white:     #FFFFFF;
  --gray-100:  #F5F5F7;
  --gray-200:  #E6E8EC;
  --gray-300:  #C5C9D0;
  --gray-400:  #9AA1AB;
  --gray-500:  #5A5F6B;
  --gray-600:  #222222;

  --yellow: #F5D23B;
  --cyan:   #38BDF8;

  --font-display: "Yeseva One", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Consolas, monospace;

  --space-xs:  clamp(0.25rem, 0.5vw, 0.4rem);
  --space-sm:  clamp(0.5rem,  1vw,   0.8rem);
  --space-md:  clamp(0.8rem,  1.5vw, 1.2rem);
  --space-lg:  clamp(1.2rem,  2vw,   2rem);
  --space-xl:  clamp(2rem,    4vw,   4rem);

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 1px 2px rgba(40, 53, 132, 0.06), 0 8px 24px -12px rgba(40, 53, 132, 0.14);
  --shadow-pop:  0 2px 4px rgba(40, 53, 132, 0.08), 0 16px 40px -16px rgba(40, 53, 132, 0.25);

  --maxw: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--gray-600);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Subtle atmospheric backdrop: faint blue wash top-left, grain-free */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 8% -10%, color-mix(in srgb, #283584 7%, transparent), transparent 70%),
    radial-gradient(700px 400px at 105% 15%, color-mix(in srgb, #6BA895 6%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

main { position: relative; z-index: 1; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; color: var(--brand_blue-100); line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); margin: 0 0 var(--space-md); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: var(--space-xl) 0 var(--space-md); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin: var(--space-lg) 0 var(--space-sm); }
h4 { font-family: var(--font-body); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-500); margin: var(--space-md) 0 var(--space-xs); }

p { margin: 0 0 var(--space-md); max-width: 72ch; }
a { color: var(--brand_blue-100); text-decoration-color: var(--brand_blue-30); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
a:hover { text-decoration-color: var(--brand_red-100); }

strong { font-weight: 650; }

/* ---------- Top navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, #FFFFFF 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-sm);
  height: 64px;
  min-width: 0;
}
.nav-logo { flex-shrink: 0; }
.nav-logo img { height: 28px; display: block; }
.nav-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--brand_blue-100);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-partner-chip {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}
.nav-links {
  display: flex;
  gap: 2px;
  margin-left: auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  font-size: 0.84rem;
  font-weight: 550;
  color: var(--gray-500);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 1180px) {
  .nav-links a { font-size: 0.78rem; padding: 6px 7px; }
  .nav-tag { display: none; }
}
.nav-links a:hover { color: var(--brand_blue-100); background: var(--brand_blue-05); }
.nav-links a.active { color: var(--brand_blue-100); background: var(--brand_blue-10); }

/* ---------- Page scaffold ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: var(--space-xl) var(--space-lg) calc(var(--space-xl) * 2); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand_red-100);
  margin-bottom: var(--space-sm);
}

.lede { font-size: 1.15rem; color: var(--gray-500); max-width: 64ch; }

/* ---------- Hero (index) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  padding: var(--space-xl) 0;
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

/* ---------- Five-layer motif ---------- */
.layers { display: grid; gap: 8px; }
.layer {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--brand_blue-100);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateX(16px);
  animation: layer-in 0.7s var(--ease) forwards;
}
.layer:nth-child(1) { animation-delay: 0.05s; }
.layer:nth-child(2) { animation-delay: 0.15s; border-left-color: var(--brand_blue-60); }
.layer:nth-child(3) { animation-delay: 0.25s; border-left-color: var(--brand_red-100); }
.layer:nth-child(4) { animation-delay: 0.35s; border-left-color: var(--brand_green-100); }
.layer:nth-child(5) { animation-delay: 0.45s; border-left-color: var(--yellow); }
.layer small { font-weight: 450; color: var(--gray-500); margin-left: auto; text-align: right; }
@keyframes layer-in { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .layer { animation: none; opacity: 1; transform: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: var(--space-md); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.card h3 { margin-top: 0; }
.card .card-kicker {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand_red-100); margin-bottom: 6px;
}
.card p:last-child { margin-bottom: 0; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  vertical-align: middle;
}
.badge-draft   { background: var(--brand_red-10); color: var(--brand_red-100); border: 1px solid var(--brand_red-60); }
.badge-ready   { background: var(--brand_green-10); color: color-mix(in srgb, #6BA895 70%, black); border: 1px solid var(--brand_green-60); }
.badge-soon    { background: var(--gray-100); color: var(--gray-500); border: 1px solid var(--gray-300); }
.badge-sector  { background: var(--brand_blue-10); color: var(--brand_blue-100); border: 1px solid var(--brand_blue-30); }

/* ---------- Tables ---------- */
table { border-collapse: collapse; width: 100%; margin: var(--space-md) 0; font-size: 0.92rem; background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
th { background: var(--brand_blue-100); color: var(--white); text-align: left; font-weight: 600; padding: 10px 14px; font-size: 0.85rem; }
td { padding: 10px 14px; border-bottom: 1px solid var(--gray-200); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: var(--brand_blue-05); }
td.yes { color: color-mix(in srgb, #6BA895 70%, black); font-weight: 650; }
td.no  { color: var(--brand_red-100); font-weight: 650; }

/* ---------- Tabs (battlecards) ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: var(--space-lg) 0 var(--space-md); }
.tab-btn {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.tab-btn:hover { border-color: var(--brand_blue-60); color: var(--brand_blue-100); }
.tab-btn.active { background: var(--brand_blue-100); border-color: var(--brand_blue-100); color: var(--white); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: panel-in 0.4s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Rep line (pull quote) ---------- */
.repline {
  position: relative;
  background: var(--brand_blue-100);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-lg) 0;
  font-size: 1.1rem;
  line-height: 1.55;
  box-shadow: var(--shadow-pop);
}
.repline::before {
  content: "\201C";
  font-family: var(--font-display);
  font-size: 4rem;
  position: absolute;
  top: -2px;
  left: 18px;
  color: var(--brand_red-100);
  line-height: 1;
}
.repline .repline-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand_red-60);
  margin-bottom: 8px;
}
.repline p { max-width: none; margin: 0; }

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-md) 0;
  border: 1px solid;
  font-size: 0.95rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout-info { background: var(--brand_blue-05); border-color: var(--brand_blue-30); }
.callout-warn { background: var(--brand_red-10); border-color: var(--brand_red-60); }
.callout-good { background: var(--brand_green-10); border-color: var(--brand_green-60); }

/* ---------- Stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-md); margin: var(--space-lg) 0; }
.stat {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-card);
}
.stat .stat-num { font-family: var(--font-display); font-size: 2.2rem; color: var(--brand_blue-100); line-height: 1.1; }
.stat .stat-num em { font-style: normal; color: var(--brand_red-100); }
.stat .stat-label { font-size: 0.8rem; color: var(--gray-500); margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: 11px 22px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}
.btn-primary { background: var(--brand_red-100); color: var(--white); box-shadow: 0 4px 14px -4px rgba(234, 73, 58, 0.5); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(234, 73, 58, 0.55); }
.btn-secondary { background: var(--white); color: var(--brand_blue-100); border: 1px solid var(--brand_blue-30); }
.btn-secondary:hover { border-color: var(--brand_blue-100); }

/* ---------- Section divider ---------- */
.rule {
  border: none;
  height: 3px;
  width: 64px;
  background: var(--brand_red-100);
  margin: var(--space-xl) 0 var(--space-lg);
  border-radius: 2px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  margin-top: var(--space-xl);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--gray-500);
}
.footer-inner img { height: 22px; }
.footer-inner .spacer { margin-left: auto; }

/* ---------- Access gate ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--brand_blue-100);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}
.gate-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-pop);
  text-align: center;
}
.gate-card img { height: 34px; margin-bottom: var(--space-lg); }
.gate-card h2 { margin: 0 0 var(--space-sm); }
.gate-card p { font-size: 0.9rem; color: var(--gray-500); margin: 0 auto var(--space-md); }
.gate-card input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  text-align: center;
  letter-spacing: 0.08em;
}
.gate-card input:focus { outline: 2px solid var(--brand_blue-60); border-color: transparent; }
.gate-card .gate-error { color: var(--brand_red-100); font-size: 0.82rem; min-height: 1.2em; margin-bottom: var(--space-sm); }
.gate-hidden { display: none; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--brand_blue-100);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-md) 0;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- Meeting-mode quick bar (home) ---------- */
.meeting-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  background: var(--brand_blue-100);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-card);
}
.meeting-bar .meeting-bar-text { flex: 1; min-width: 220px; }
.meeting-bar .meeting-bar-text strong { display: block; font-size: 1.02rem; }
.meeting-bar .meeting-bar-text span { font-size: 0.85rem; opacity: 0.85; }
.meeting-bar .btn { white-space: nowrap; }

/* ---------- Phone widths: nav wraps to two rows, tables scroll ---------- */
@media (max-width: 760px) {
  .nav-inner {
    flex-wrap: wrap;
    height: auto;
    min-height: 56px;
    padding-top: 8px;
    padding-bottom: 8px;
    row-gap: 4px;
  }
  .nav-links {
    flex-wrap: wrap;
    overflow-x: visible;
    width: 100%;
    margin-left: 0;
    row-gap: 2px;
  }
  /* 44px touch targets */
  .nav-links a { padding: 11px 10px; font-size: 0.82rem; }

  /* Wide tables scroll sideways instead of crushing prose */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table th, table td { min-width: 130px; }
  table th:first-child, table td:first-child { min-width: 110px; }

  html { scroll-padding-top: 130px; } /* taller wrapped nav */
}

/* ---------- Print (battlecards as leave-behind) ---------- */
@media print {
  .nav, .footer, .gate, .tabs, .btn, .skip-link, .meeting-bar { display: none !important; }
  body::before { display: none; }
  body { background: white; }
  .tab-panel { display: block !important; page-break-after: always; }
  .card, table, .repline { box-shadow: none; }
  .repline { background: var(--brand_blue-100) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
