/* ==========================================================================
   STRATOFOUNDRY VERSION 2.0 — DESIGN SYSTEM & GRAPHIC CHARTER
   Source Charter: S3Guardian 2.0.0 - Commercial.pptx
   Identity: "Architectural Strata — The Memory & Evidence Layer on Agnostic S3"
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Montserrat:wght@600;700;800&display=swap');

:root {
  /* 1. Primary Palette (Extracted from S3Guardian 2.0.0 PPTX) */
  --sf-navy-950: #0F172A;
  --sf-navy-900: #18212B; /* Primary PPTX Dark Slate (266 occurrences) */
  --sf-navy-800: #22303F;
  --sf-navy-700: #2E4053;

  --sf-steel-700: #35536E;
  --sf-steel-600: #476A8A; /* Primary PPTX Strato Steel Blue (119 occurrences) */
  --sf-steel-500: #5E83A4;
  --sf-steel-400: #7FA1BE;

  --sf-cobalt-700: #00357A;
  --sf-cobalt-600: #00459C; /* PPTX Conduit & Highlight Blue */
  --sf-cobalt-500: #1D63B8;

  /* 2. Mineral & Surface Palette (Signature Warm Stone & Architectural Glass) */
  --sf-alabaster-50: #FAF8F5;
  --sf-alabaster-100: #F6F2EC; /* Signature PPTX Warm Mineral Background */
  --sf-alabaster-200: #ECE6DC;
  --sf-alabaster-300: #DFD7C9;

  --sf-mist-100: #EEF2F6;
  --sf-mist-200: #DCE4EC;
  --sf-mist-300: #B8C5D1; /* PPTX Structural Border & Secondary Accent */
  --sf-mist-400: #94A7B8;

  --sf-white: #FFFFFF;
  --sf-glass-light: rgba(255, 255, 255, 0.86);
  --sf-glass-mineral: rgba(246, 242, 236, 0.88);
  --sf-glass-dark: rgba(24, 33, 43, 0.92);

  /* 3. Semantic Governance & Evidence Colors (From PPTX Alert/PITR Diagrams) */
  --sf-terracotta-700: #963E37;
  --sf-terracotta-600: #B6534B; /* PPTX Quarantine / Destructive Change Alert */
  --sf-terracotta-500: #CC6B63;
  --sf-terracotta-100: #FBECEB;
  --sf-terracotta-border: rgba(182, 83, 75, 0.32);

  --sf-verified-700: #1B5E20;
  --sf-verified-600: #2E7D32; /* PPTX Verified PITR & Cryptographic Proof */
  --sf-verified-500: #4CAF50;
  --sf-verified-100: #E8F7EC;
  --sf-verified-border: rgba(46, 125, 50, 0.28);

  --sf-amber-700: #B45309;
  --sf-amber-600: #D97706;
  --sf-amber-500: #F9A825; /* PPTX Pending Validation / Entropy Gate */
  --sf-amber-100: #FFF8E1;
  --sf-amber-border: rgba(217, 119, 6, 0.32);

  /* 4. Text Hierarchy */
  --sf-text-primary: #18212B;
  --sf-text-secondary: #334155;
  --sf-text-muted: #5A6B7C;
  --sf-text-light: #F6F2EC;
  --sf-text-light-muted: #B8C5D1;

  /* 5. Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* 6. Layout & Spacing */
  --container-max: 1280px;
  --container-narrow: 980px;
  --header-height: 76px;
  --announcement-height: 40px;

  /* 7. Architectural Borders, Radius & Shadows */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --border-subtle: 1px solid rgba(184, 197, 209, 0.55);
  --border-strong: 1px solid #B8C5D1;
  --border-steel: 1px solid rgba(71, 106, 138, 0.45);
  --border-dark: 1px solid rgba(184, 197, 209, 0.16);

  --shadow-xs: 0 2px 6px rgba(24, 33, 43, 0.04);
  --shadow-sm: 0 6px 18px rgba(24, 33, 43, 0.06), 0 1px 3px rgba(24, 33, 43, 0.04);
  --shadow-md: 0 14px 34px rgba(24, 33, 43, 0.09), 0 3px 10px rgba(24, 33, 43, 0.05);
  --shadow-lg: 0 24px 56px rgba(24, 33, 43, 0.14), 0 6px 18px rgba(24, 33, 43, 0.07);
  --shadow-strata: 0 18px 40px -10px rgba(24, 33, 43, 0.18), 0 0 0 1px rgba(184, 197, 209, 0.45);

  --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 260ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   BASE RESET & TYPOGRAPHY
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--sf-text-primary);
  background-color: var(--sf-alabaster-100);
  line-height: 1.6;
  overflow-x: hidden;
  /* Subtle architectural blueprint grid over warm mineral background */
  background-image:
    linear-gradient(to right, rgba(71, 106, 138, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(71, 106, 138, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   ARCHITECTURAL TYPOGRAPHY SCALE
   ========================================================================== */
h1, h2, h3, h4, .display-heading {
  font-family: var(--font-display);
  color: var(--sf-navy-900);
  line-height: 1.14;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.h-hero {
  font-size: clamp(2.35rem, 4.3vw, 3.85rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.h-section {
  font-size: clamp(1.85rem, 3.1vw, 2.75rem);
  font-weight: 800;
  line-height: 1.14;
}

.h-subsection {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.24;
}

.h-card {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.lead-text {
  font-size: clamp(1.06rem, 1.35vw, 1.24rem);
  color: var(--sf-text-secondary);
  line-height: 1.65;
  font-weight: 400;
}

.body-text {
  font-size: 1rem;
  color: var(--sf-text-secondary);
  line-height: 1.65;
}

.caption-text {
  font-size: 0.85rem;
  color: var(--sf-text-muted);
  line-height: 1.5;
}

/* Text Accent Highlights */
.text-steel {
  color: var(--sf-steel-600);
}

.text-terracotta {
  color: var(--sf-terracotta-600);
}

.text-verified {
  color: var(--sf-verified-600);
}

.text-gradient-strata {
  background: linear-gradient(125deg, var(--sf-navy-900) 0%, var(--sf-steel-600) 55%, var(--sf-cobalt-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.surface-dark .text-gradient-strata {
  background: linear-gradient(125deg, #FFFFFF 0%, #B8C5D1 50%, #7FA1BE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   LAYOUT CONTAINERS & SECTION SURFACES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section-sm {
  padding: 64px 0;
  position: relative;
}

/* Surface Variations (Strata Layers) */
.surface-alabaster {
  background-color: var(--sf-alabaster-100);
}

.surface-white {
  background-color: var(--sf-white);
  border-top: var(--border-subtle);
  border-bottom: var(--border-subtle);
}

.surface-mineral {
  background: linear-gradient(180deg, var(--sf-alabaster-50) 0%, var(--sf-alabaster-200) 100%);
  border-top: var(--border-subtle);
  border-bottom: var(--border-subtle);
}

.surface-dark {
  background-color: var(--sf-navy-900);
  color: var(--sf-text-light);
  background-image:
    radial-gradient(circle at 85% 15%, rgba(71, 106, 138, 0.28) 0%, transparent 50%),
    radial-gradient(circle at 12% 85%, rgba(0, 69, 156, 0.18) 0%, transparent 45%),
    linear-gradient(to right, rgba(184, 197, 209, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(184, 197, 209, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
}

.surface-dark h1,
.surface-dark h2,
.surface-dark h3,
.surface-dark h4 {
  color: var(--sf-white);
}

.surface-dark .lead-text,
.surface-dark .body-text {
  color: var(--sf-mist-200);
}

.surface-dark .caption-text {
  color: var(--sf-mist-300);
}

/* Section Headers */
.section-header {
  max-width: 780px;
  margin-bottom: 56px;
}

.section-header.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sf-steel-600);
  background: rgba(71, 106, 138, 0.1);
  border: 1px solid rgba(71, 106, 138, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--sf-steel-600);
  transform: rotate(45deg);
}

.surface-dark .kicker {
  color: var(--sf-mist-200);
  background: rgba(184, 197, 209, 0.1);
  border-color: rgba(184, 197, 209, 0.24);
}

.surface-dark .kicker::before {
  background: var(--sf-mist-300);
}

.kicker-alert {
  color: var(--sf-terracotta-600);
  background: var(--sf-terracotta-100);
  border-color: var(--sf-terracotta-border);
}

.kicker-alert::before {
  background: var(--sf-terracotta-600);
}

/* ==========================================================================
   GRID UTILITIES
   ========================================================================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 32px; }

/* Architectural Horizontal Stratum Divider */
.strata-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0;
}

.strata-divider::before,
.strata-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sf-mist-300), transparent);
}

.strata-diamond {
  width: 10px;
  height: 10px;
  background: var(--sf-steel-600);
  transform: rotate(45deg);
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}
