/* ==========================================================================
   TECHNOCORE / THE SHARED CORE — IDENTITY SYSTEM STYLESHEET
   FLOP-Aligned Editorial Brand Presentation
   Foundry-Precise Responsive System (Desktop & Mobile Zero-Overflow)
   ========================================================================== */

/* 1. Self-Hosted Typography */
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Variable.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Mono';
  src: url('assets/fonts/SpaceMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Mono';
  src: url('assets/fonts/SpaceMono-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 2. Canonical FLOP Tokens */
:root {
  /* Approved FLOP Palette */
  --base: #0A1128;
  --grey: #5C6670;
  --blue: #0466C8;
  --accent: #00B4D8;
  --primary-hover: #3DC5E0;
  --green: #32D74B;
  --ice: #F5F7FA;
  --white: #FFFFFF;
  --mist: #D9DDE1;

  /* Typography */
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing Grid (Multiples of 4) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --space-10: 96px;

  /* Geometry & Layout */
  --radius: 4px;
  --page-max: 1180px;
  --border: 1px solid var(--mist);
}

/* 3. Base Reset & Defaults */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--ice);
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  color: var(--base);
  background-color: var(--ice);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 4. Layout Containers */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  background-color: var(--ice);
  border-bottom: var(--border);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

.brand img {
  width: 220px;
  max-width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--blue);
}

.main-content,
.site-footer {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--space-5);
}

/* 5. Typography Components */
.eyebrow {
  margin: 0 0 var(--space-2) 0;
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}

h1 {
  font-size: clamp(24px, 6vw, 76px);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(18px, 4vw, 44px);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  width: 100%;
  min-width: 0;
}

.section-head-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: flex-end;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
  width: 100%;
  min-width: 0;
}

.subhead-lede {
  margin: 0;
  color: var(--grey);
  font-size: clamp(14px, 2vw, 20px);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.running-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-block: var(--space-3);
  border-bottom: var(--border);
  margin-bottom: var(--space-5);
  width: 100%;
  min-width: 0;
}

.running-meta span {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card-lift {
  background-color: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  width: 100%;
  min-width: 0;
}

.spec-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background-color: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  width: 100%;
  min-width: 0;
}

.spec-bar span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.spec-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  flex-shrink: 0;
}

.spec-indicator.cyan { background-color: var(--accent); }
.spec-indicator.blue { background-color: var(--blue); }
.spec-indicator.green { background-color: var(--green); }

/* 6. Section Specifics */
section {
  padding-block: clamp(36px, 6vw, 88px);
  border-bottom: var(--border);
  width: 100%;
  min-width: 0;
}

/* Hero Section */
.hero {
  padding-top: clamp(24px, 4vw, 72px);
}

.hero-lede {
  margin: var(--space-4) 0 var(--space-6);
  font-size: clamp(15px, 2.5vw, 28px);
  line-height: 1.35;
  max-width: 840px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-media {
  width: 100%;
  max-width: 100%;
  background-color: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  width: 100%;
}

/* Buttons */
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-5);
  border: 1px solid var(--base);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
}

.button.primary {
  background-color: var(--accent);
  color: var(--base);
}

.button.primary:hover,
.button.primary:focus-visible {
  background-color: var(--primary-hover);
}

.button.secondary {
  background-color: transparent;
  color: var(--base);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background-color: var(--white);
  border-color: var(--blue);
  color: var(--blue);
}

.button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Three Actions Section (Page 02) */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  width: 100%;
}

.action-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  min-width: 0;
}

.action-card-number {
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.action-card-icon {
  display: grid;
  place-items: center;
  min-height: 76px;
  margin: 0 auto var(--space-4);
  color: var(--base);
}

.action-card-icon svg {
  display: block;
  overflow: visible;
}

.action-card-icon--communicate svg {
  width: 88px;
  height: auto;
}

.action-card-icon--communicate circle {
  fill: currentColor;
}

.action-card-icon--communicate path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.action-card-icon--commerce svg {
  width: 72px;
  height: 72px;
}

.action-card-icon--commerce path {
  fill: currentColor;
}

.action-card-icon--memory svg {
  width: 90px;
  height: auto;
}

.action-card-icon--memory rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
}

.action-card-body h3 {
  margin: 0 0 var(--space-2) 0;
  font-size: 16px;
}

.action-card-body p {
  margin: 0;
  color: var(--grey);
  font-size: 14px;
  line-height: 1.4;
}

/* Visual Figures & Presentation Panels */
.figure-panel {
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.figure-panel img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border: var(--border);
  border-radius: var(--radius);
  display: block;
}

/* Downloads & Verification Hub (Page 14) */
.closing-banner {
  padding: var(--space-5);
  background-color: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  text-align: center;
  margin-top: var(--space-6);
  width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.closing-banner p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(14px, 2.2vw, 22px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--base);
  line-height: 1.35;
}

.downloads-section {
  padding-block: var(--space-8);
  width: 100%;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  width: 100%;
}

.download-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-5);
  background-color: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  min-height: 130px;
  min-width: 0;
}

.download-card:hover,
.download-card:focus-visible {
  border-color: var(--blue);
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.download-card-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-2);
  overflow-wrap: anywhere;
}

.download-card-desc {
  display: block;
  color: var(--grey);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Site Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-6);
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 7. Responsive Breakpoints */
@media (max-width: 820px) {
  .site-header {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-2);
  }

  .brand img {
    width: 160px;
  }

  .site-nav {
    display: none;
  }

  .main-content,
  .site-footer {
    padding-inline: var(--space-4);
  }

  .running-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .section-head-split {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  .actions-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .download-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .button {
    width: 100%;
    box-sizing: border-box;
    padding: 0 12px;
    font-size: 12px;
    white-space: normal;
    text-align: center;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
}

@media (max-width: 360px) {
  .site-header {
    padding: var(--space-2) var(--space-3);
  }

  .main-content,
  .site-footer {
    padding-inline: var(--space-3);
  }

  .card-lift,
  .download-card {
    padding: var(--space-4);
  }

  .brand img {
    width: 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
