/* ==========================================================================
   Intelligence Cloud — Base Design System
   Target: Product buyers & evaluators (intelligence.cloud)
   Brand: Navy-forward enterprise color strategy
   Note: Layout-specific styles (header, footer, nav) go in layout.css
   ========================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Nunito:wght@400;600;700&family=Courier+Prime&display=swap');

/* ==========================================================================
   CSS Custom Properties (Brand Tokens)
   ========================================================================== */
:root {
  /* Primary */
  --tresic-gold: #F5A623;
  --deep-navy: #1A2332;
  --intelligence-blue: #4A90E2;

  /* Secondary */
  --signal-orange: #E94F37;
  --success-green: #2ECC71;
  --insights-purple: #9B59B6;

  /* Neutrals */
  --cloud-white: #FFFFFF;
  --light-gray: #F5F7FA;
  --medium-gray: #8B95A5;
  --charcoal: #2C3E50;

  /* intelligence.cloud Surface Tokens (navy-forward) */
  --surface-primary: #1A2332;
  --surface-secondary: #F5F7FA;
  --surface-elevated: #FFFFFF;
  --text-on-dark: rgba(255, 255, 255, 0.85);
  --text-on-dark-muted: rgba(255, 255, 255, 0.6);

  /* Functional */
  --border-color: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(26, 35, 50, 0.08);
  --shadow-md: 0 4px 12px rgba(26, 35, 50, 0.10);
  --shadow-lg: 0 8px 24px rgba(26, 35, 50, 0.12);
  --shadow-xl: 0 16px 48px rgba(26, 35, 50, 0.16);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --header-height: 72px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--charcoal);
  background: var(--light-gray);
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: var(--intelligence-blue); text-decoration: none; transition: color 0.15s; }
a:hover { text-decoration: underline; }

/* ==========================================================================
   Typography — Montserrat Medium (500) per brand visual specs
   ========================================================================== */
h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', sans-serif;
  color: var(--deep-navy);
  line-height: 1.2;
  font-weight: 500;
}

h1 { font-size: 3.25rem; margin-bottom: var(--space-md); letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; margin-bottom: var(--space-sm); letter-spacing: -0.01em; }
h3 { font-size: 1.35rem; margin-bottom: var(--space-xs); font-weight: 600; }
h4 { font-size: 1.1rem; margin-bottom: var(--space-xs); font-weight: 600; }

p { margin-bottom: var(--space-sm); }
strong { font-weight: 700; }

/* ==========================================================================
   Section Labels, Lead Text, Taglines
   ========================================================================== */
.section-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tresic-gold);
  margin-bottom: var(--space-sm);
}

.lead {
  font-size: 1.25rem;
  color: var(--medium-gray);
  max-width: 680px;
  line-height: 1.6;
}

.tagline {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--tresic-gold);
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   Sections — Elevated content wells on gray body
   ========================================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  background: var(--surface-elevated);
  padding: var(--space-2xl) 0;
}

.section-alt {
  background: var(--surface-secondary);
  padding: var(--space-2xl) 0;
}

.section-dark {
  background: var(--surface-primary);
  color: var(--text-on-dark);
  padding: var(--space-2xl) 0;
}

.section-dark h2,
.section-dark h3 {
  color: var(--cloud-white);
}

.section-dark .section-label {
  color: var(--tresic-gold);
}

.section-dark .lead {
  color: var(--text-on-dark-muted);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75em 1.8em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--tresic-gold);
  color: var(--deep-navy);
}

.btn-primary:hover {
  background: #e69a1e;
}

.btn-secondary {
  background: transparent;
  color: var(--cloud-white);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  border-color: var(--cloud-white);
  background: rgba(255, 255, 255, 0.08);
  color: var(--cloud-white);
}

.btn-outline {
  background: transparent;
  color: var(--intelligence-blue);
  border: 2px solid var(--intelligence-blue);
}

.btn-outline:hover {
  background: var(--intelligence-blue);
  color: var(--cloud-white);
}

.btn-large {
  font-size: 1.05rem;
  padding: 0.9em 2.2em;
}

/* ==========================================================================
   Cards — White backgrounds on gray body for enterprise depth
   ========================================================================== */
.card-grid {
  display: grid;
  gap: var(--space-md);
}

.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--cloud-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-accent-gold { border-top: 3px solid var(--tresic-gold); }
.card-accent-orange { border-top: 3px solid var(--signal-orange); }
.card-accent-green { border-top: 3px solid var(--success-green); }
.card-accent-purple { border-top: 3px solid var(--insights-purple); }
.card-accent-blue { border-top: 3px solid var(--intelligence-blue); }
.card-accent-navy { border-top: 3px solid var(--deep-navy); }

/* Cards inside dark sections: reset text to dark colors (card bg is white) */
.section-dark .card h3 {
  color: var(--deep-navy);
}

.section-dark .card p,
.section-dark .card .text-muted {
  color: var(--medium-gray);
}

/* Product cards */
.product-card {
  display: flex;
  flex-direction: column;
}

.product-card .product-hook {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--charcoal);
  margin-bottom: var(--space-xs);
  font-style: italic;
}

.product-card p {
  font-size: 0.95rem;
  color: var(--medium-gray);
  flex: 1;
}

/* Product icons — inline SVG containers */
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card-icon-gold { background: rgba(245, 166, 35, 0.12); }
.card-icon-orange { background: rgba(233, 79, 55, 0.12); }
.card-icon-green { background: rgba(46, 204, 113, 0.12); }
.card-icon-purple { background: rgba(155, 89, 182, 0.12); }
.card-icon-blue { background: rgba(74, 144, 226, 0.12); }
.card-icon-navy { background: rgba(26, 35, 50, 0.08); }

/* ==========================================================================
   Stats Row
   ========================================================================== */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.stat-block {
  text-align: center;
  padding: var(--space-lg) var(--space-sm);
}

.stat-block .stat-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 3rem;
  font-weight: 600;
  color: var(--tresic-gold);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-block .stat-label {
  font-size: 0.9rem;
  color: var(--medium-gray);
  font-weight: 600;
}

.section-dark .stat-block .stat-label {
  color: var(--text-on-dark-muted);
}

/* Word-based stat rows (categories, not numbers) */
.stat-row-words {
  gap: 0;
  align-items: stretch;
}

.stat-row-words .stat-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-color);
}

.stat-row-words .stat-block:last-child {
  border-right: none;
}

.stat-row-words .stat-number {
  font-size: 1.75rem;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-dark .stat-row-words .stat-block {
  border-right-color: rgba(255, 255, 255, 0.1);
}

.section-dark .stat-row-words .stat-block:last-child {
  border-right: none;
}

/* ==========================================================================
   Quote Block
   ========================================================================== */
.quote-block {
  border-left: 4px solid var(--tresic-gold);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  background: rgba(245, 166, 35, 0.04);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.quote-block p {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--charcoal);
  margin-bottom: var(--space-xs);
  line-height: 1.7;
}

.quote-block .attribution {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--medium-gray);
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
}

.section-dark .quote-block {
  background: rgba(245, 166, 35, 0.08);
}

.section-dark .quote-block p {
  color: rgba(255, 255, 255, 0.9);
}

.section-dark .quote-block .attribution {
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Story Cards
   ========================================================================== */
.story-card {
  background: var(--cloud-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.story-card .story-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3em 0.8em;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: var(--space-sm);
  width: fit-content;
}

.story-label-orange { background: rgba(233, 79, 55, 0.1); color: var(--signal-orange); }
.story-label-green { background: rgba(46, 204, 113, 0.1); color: #1fa855; }
.story-label-purple { background: rgba(155, 89, 182, 0.1); color: var(--insights-purple); }

.story-card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

.story-card p {
  font-size: 0.95rem;
  color: var(--medium-gray);
  line-height: 1.65;
  flex: 1;
}

.story-card .story-result {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--deep-navy);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Check List
   ========================================================================== */
.check-list {
  list-style: none;
  padding: 0;
}

.check-list li {
  position: relative;
  padding-left: 1.8em;
  margin-bottom: 0.7em;
  font-size: 1rem;
}

.check-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--success-green);
  font-weight: 800;
  font-size: 1.1em;
}

.section-dark .check-list li::before {
  color: var(--tresic-gold);
}

/* ==========================================================================
   Moat Cards — Competitive Advantages
   ========================================================================== */
.moat-card {
  position: relative;
  padding-left: calc(var(--space-lg) + 4px);
}

.moat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
}

.moat-card:nth-child(1)::before { background: var(--tresic-gold); }
.moat-card:nth-child(2)::before { background: var(--intelligence-blue); }
.moat-card:nth-child(3)::before { background: var(--success-green); }
.moat-card:nth-child(4)::before { background: var(--insights-purple); }
.moat-card:nth-child(5)::before { background: var(--signal-orange); }

.moat-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.moat-card p {
  font-size: 0.95rem;
  color: var(--medium-gray);
  margin-bottom: 0;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-gold { color: var(--tresic-gold); }
.text-navy { color: var(--deep-navy); }
.text-blue { color: var(--intelligence-blue); }
.text-muted { color: var(--medium-gray); }
.text-small { font-size: 0.85rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }

/* ==========================================================================
   Animations
   ========================================================================== */
/* Fade-in requires JS to add .js-ready on <body>.
   Without JS, all content is visible by default. */
.js-ready .fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-ready .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.js-ready .stagger > .fade-in:nth-child(1) { transition-delay: 0s; }
.js-ready .stagger > .fade-in:nth-child(2) { transition-delay: 0.1s; }
.js-ready .stagger > .fade-in:nth-child(3) { transition-delay: 0.2s; }
.js-ready .stagger > .fade-in:nth-child(4) { transition-delay: 0.3s; }
.js-ready .stagger > .fade-in:nth-child(5) { transition-delay: 0.4s; }
.js-ready .stagger > .fade-in:nth-child(6) { transition-delay: 0.5s; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }

  .section, .section-alt, .section-dark { padding: var(--space-xl) 0; }

  .card-grid-2,
  .card-grid-3,
  .card-grid-4 { grid-template-columns: 1fr; }

  .stat-row { grid-template-columns: repeat(2, 1fr); }

  /* Word stat rows at 2-col: remove right border on even items (right column) */
  .stat-row-words .stat-block:nth-child(2n) {
    border-right: none;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-sm); }
  .stat-row { grid-template-columns: 1fr; }

  /* Word stat rows at 1-col: remove all right borders */
  .stat-row-words .stat-block {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .stat-row-words .stat-block:last-child {
    border-bottom: none;
  }
  .section-dark .stat-row-words .stat-block {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  .section-dark .stat-row-words .stat-block:last-child {
    border-bottom: none;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .section, .section-alt, .section-dark { padding: 1.5rem 0; }
  .section-dark { background: var(--light-gray); color: var(--charcoal); }
  .section-dark h2, .section-dark h3 { color: var(--deep-navy); }
  body { font-size: 11pt; background: var(--cloud-white); }
  .btn { display: none; }
  .fade-in { opacity: 1; transform: none; }
}

/* ==========================================================================
   Story card accents

   The .story-label-* rules above style a pill *inside* a story card. When the
   same class is put on the card itself it becomes a top-border accent instead -
   these rules win on specificity and undo the pill's background and text colour
   so body copy doesn't inherit an accent colour.
   ========================================================================== */
.story-card[class*="story-label-"] {
  background: var(--cloud-white);
  color: var(--charcoal);
  border-top: 3px solid var(--border-color);
}

.story-card.story-label-orange { border-top-color: var(--signal-orange); }
.story-card.story-label-green  { border-top-color: var(--success-green); }
.story-card.story-label-purple { border-top-color: var(--insights-purple); }
.story-card.story-label-blue   { border-top-color: var(--intelligence-blue); }
.story-card.story-label-gold   { border-top-color: var(--tresic-gold); }
.story-card.story-label-navy   { border-top-color: var(--deep-navy); }
