/* ==========================================================================
   INFERISE BESPOKE STYLESHEET
   Anti-AI Web Aesthetics • Editorial UX • Dynamic Theming
   ========================================================================== */

/* --------------------------------------------------------------------------
   THEME TOKENS & SYSTEM PREFERENCES
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  /* Typography */
  --font-serif: "Newsreader", Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", Menlo, Consolas, "Courier New", monospace;

  /* Default / Dark Theme (Approachable Dark, never pure black #000000) */
  --bg-base: #131619;
  --bg-surface: #181C20;
  --bg-surface-elevated: #21262C;
  --bg-surface-hover: #282E36;
  --bg-highlight: #2A3038;

  --text-primary: #F2F0EB;
  --text-secondary: #A0A7AE;
  --text-muted: #6B727A;
  --text-inverse: #131619;

  --border-subtle: #262B32;
  --border-medium: #363D47;
  --border-strong: #4B5462;

  --accent-primary: #E85D26;
  --accent-hover: #F26F3A;
  --accent-active: #D04E18;
  --accent-soft: rgba(232, 93, 38, 0.12);
  --accent-border: rgba(232, 93, 38, 0.35);

  --status-success: #35B276;
  --status-warning: #E09A32;
  --status-error: #D64545;

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;

  --max-width: 1280px;
  --header-height: 72px;

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-elevated: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* Explicit or System Light Mode */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-base: #FAF9F6;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #F4F2EB;
    --bg-surface-hover: #EBE7DC;
    --bg-highlight: #E4DFD2;

    --text-primary: #14171A;
    --text-secondary: #545C66;
    --text-muted: #7E8792;
    --text-inverse: #FFFFFF;

    --border-subtle: #E4E0D6;
    --border-medium: #CECABF;
    --border-strong: #B3ADA0;

    --accent-primary: #1D75BC;
    --accent-hover: #165F99;
    --accent-active: #104A78;
    --accent-soft: rgba(29, 117, 188, 0.08);
    --accent-border: rgba(29, 117, 188, 0.28);

    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-elevated: 0 12px 32px rgba(20, 23, 26, 0.08);
  }
}

html[data-theme="light"] {
  --bg-base: #FAF9F6;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F4F2EB;
  --bg-surface-hover: #EBE7DC;
  --bg-highlight: #E4DFD2;

  --text-primary: #14171A;
  --text-secondary: #545C66;
  --text-muted: #7E8792;
  --text-inverse: #FFFFFF;

  --border-subtle: #E4E0D6;
  --border-medium: #CECABF;
  --border-strong: #B3ADA0;

  --accent-primary: #1D75BC;
  --accent-hover: #165F99;
  --accent-active: #104A78;
  --accent-soft: rgba(29, 117, 188, 0.08);
  --accent-border: rgba(29, 117, 188, 0.28);

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-elevated: 0 12px 32px rgba(20, 23, 26, 0.08);
}

html[data-theme="dark"] {
  --bg-base: #131619;
  --bg-surface: #181C20;
  --bg-surface-elevated: #21262C;
  --bg-surface-hover: #282E36;
  --bg-highlight: #2A3038;

  --text-primary: #F2F0EB;
  --text-secondary: #A0A7AE;
  --text-muted: #6B727A;
  --text-inverse: #131619;

  --border-subtle: #262B32;
  --border-medium: #363D47;
  --border-strong: #4B5462;

  --accent-primary: #E85D26;
  --accent-hover: #F26F3A;
  --accent-active: #D04E18;
  --accent-soft: rgba(232, 93, 38, 0.12);
  --accent-border: rgba(232, 93, 38, 0.35);

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-elevated: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* --------------------------------------------------------------------------
   BASE RESET & ELEMENTS
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-base);
  color: var(--text-primary);
}

::selection {
  background-color: var(--accent-primary);
  color: #FFFFFF;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.18;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

h4 {
  font-size: 1.15rem;
}

p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  display: inline-block;
}

.lead-text {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  color: var(--text-secondary);
}

.font-mono {
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   LAYOUT CONTAINERS & ARCHITECTURAL GRID
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-top: clamp(4rem, 8vw, 7.5rem);
  padding-bottom: clamp(4rem, 8vw, 7.5rem);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.section-alt {
  background-color: var(--bg-surface);
}

/* --------------------------------------------------------------------------
   HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background-color: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 2.5vw, 2.5rem);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-logo {
  height: 32px;
  width: auto;
}

/* Light / Dark Logo Switching */
.logo-dark { display: block; }
.logo-light { display: none; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-dark { display: none; }
  :root:not([data-theme="dark"]) .logo-light { display: block; }
}

html[data-theme="light"] .logo-dark { display: none; }
html[data-theme="light"] .logo-light { display: block; }
html[data-theme="dark"] .logo-dark { display: block; }
html[data-theme="dark"] .logo-light { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-dark { display: block; }
  :root:not([data-theme="light"]) .logo-light { display: none; }
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 3.2vw, 3.5rem);
  flex-shrink: 1;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
  position: relative;
  padding: 0.25rem 0;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-primary);
}

/* Navigation Dropdown Menus */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0;
  transition: color 0.15s ease;
}

.nav-dropdown-trigger:hover,
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown[data-open="true"] .nav-dropdown-trigger,
.nav-dropdown:focus-within .nav-dropdown-trigger {
  color: var(--text-primary);
}

.dropdown-chevron {
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-chevron,
.nav-dropdown[data-open="true"] .dropdown-chevron,
.nav-dropdown:focus-within .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.5rem;
  box-shadow: var(--shadow-elevated);
  z-index: 100;
  margin-top: 0.75rem;
}

/* Invisible hover bridge to keep dropdown open when cursor moves to menu */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -0.75rem;
  left: 0;
  right: 0;
  height: 0.75rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown[data-open="true"] .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--bg-surface-elevated);
}

.dropdown-item-title {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.15s ease;
}

.dropdown-item:hover .dropdown-item-title,
.dropdown-item:focus .dropdown-item-title {
  color: var(--accent-primary);
}

.dropdown-item-desc {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Mobile Dropdown & Accordion Layout */
.mobile-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
}

.mobile-group-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.25rem 0;
}

.mobile-sublink {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.35rem 0 0.35rem 0.75rem;
  border-left: 2px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.mobile-sublink:hover,
.mobile-sublink.active {
  color: var(--accent-primary);
  border-left-color: var(--accent-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.theme-toggle svg {
  display: block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.theme-toggle:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.mobile-toggle svg {
  display: block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.mobile-toggle:hover {
  border-color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   BUTTONS & ACTIONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #FFFFFF;
  border-color: var(--accent-primary);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--text-primary);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   HERO SECTION (DATAIKU ASYMMETRIC FORMAT)
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-base);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: calc(88vh - var(--header-height));
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 4vw, 4rem) clamp(3rem, 6vw, 6rem) 0;
  border-right: 1px solid var(--border-subtle);
  z-index: 2;
}

.hero-title {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-lead {
  margin-bottom: 2.25rem;
  max-width: 54ch;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

.hero-right {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0c0e11;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(19, 22, 25, 0.4) 0%,
    rgba(19, 22, 25, 0.1) 40%,
    rgba(19, 22, 25, 0.3) 100%
  );
  pointer-events: none;
}

/* Trailing Logo Icon cropped by boundary */
.hero-trailing-icon-wrap {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 440px;
  height: 440px;
  pointer-events: none;
  opacity: 0.92;
  filter: drop-shadow(0 0 45px rgba(232, 93, 38, 0.35));
}

.hero-trailing-icon {
  width: 100%;
  height: 100%;
}

/* Hero Bottom Card (Dataiku style) */
.hero-feature-card {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  z-index: 10;
  background-color: rgba(24, 28, 32, 0.92);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
  padding: 1.5rem;
  box-shadow: var(--shadow-elevated);
}

.hero-feature-card .card-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.hero-feature-card h4 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: #F2F0EB;
  margin-bottom: 0.35rem;
}

.hero-feature-card p {
  font-size: 0.875rem;
  color: #A0A7AE;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   EDITORIAL THESIS / WHY WE EXIST SECTION
   -------------------------------------------------------------------------- */
.thesis-section {
  background-color: var(--bg-surface);
}

.thesis-grid {
  display: grid;
  grid-template-columns: 0.38fr 0.62fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.thesis-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  line-height: 1.38;
  color: var(--text-primary);
  border-left: 3px solid var(--accent-primary);
  padding-left: clamp(1.25rem, 2.5vw, 2rem);
  margin-bottom: 1.5rem;
}

.thesis-body p {
  margin-bottom: 1.25rem;
  font-size: 1.125rem;
}

.thesis-body p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   THE THREE PILLARS (FORMULA CARDS)
   -------------------------------------------------------------------------- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border-subtle);
  background-color: var(--border-subtle);
  gap: 1px; /* Creates clean architectural hairline dividers */
  margin-top: 3rem;
}

.pillar-col {
  background-color: var(--bg-surface);
  padding: clamp(2rem, 3.5vw, 3rem);
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease;
}

.pillar-col:hover {
  background-color: var(--bg-surface-elevated);
}

.pillar-index {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.pillar-title {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.pillar-text {
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.pillar-metric {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.pillar-metric strong {
  color: var(--text-primary);
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 0.2rem;
}

/* --------------------------------------------------------------------------
   CONTRAST MATRIX (PROBLEM VS SOLUTION)
   -------------------------------------------------------------------------- */
.matrix-container {
  margin-top: 3rem;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.matrix-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border-subtle);
}

.matrix-row:last-child {
  border-bottom: none;
}

.matrix-cell {
  padding: 1.75rem 2rem;
}

.matrix-cell.negative {
  background-color: rgba(214, 69, 69, 0.03);
  border-right: 1px solid var(--border-subtle);
}

.matrix-cell.positive {
  background-color: rgba(53, 178, 118, 0.03);
}

.matrix-header {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.matrix-cell.negative .matrix-header { color: var(--status-error); }
.matrix-cell.positive .matrix-header { color: var(--status-success); }

.matrix-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.matrix-desc {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   ARTICLES & NEWS ARCHIVE / PAGINATION
   -------------------------------------------------------------------------- */
.articles-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.articles-page {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.articles-page[hidden] {
  display: none !important;
}

.article-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding: 2.25rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease;
}

.article-item:last-child {
  border-bottom: none;
}

.article-item:hover {
  background-color: var(--bg-surface-elevated);
}

.article-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-xs);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.article-tag {
  color: var(--accent-primary);
  font-weight: 500;
}

.article-title {
  font-size: 1.5rem;
  margin-bottom: 0.65rem;
}

.article-title a:hover {
  color: var(--accent-primary);
}

.article-summary {
  font-size: 0.96rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.article-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.article-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Pagination Controls */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.pagination-pages {
  display: flex;
  gap: 0.5rem;
}

.page-num {
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  background: transparent;
  transition: all 0.15s ease;
}

.page-num:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.page-num.active {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   ARTICLE DETAIL PAGE STYLES
   -------------------------------------------------------------------------- */
.article-header {
  padding-top: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
}

.article-hero-img-wrap {
  margin-top: 2.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  overflow: hidden;
  max-height: 480px;
}

.article-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  max-width: 760px;
  margin: 3.5rem auto;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1.75rem;
  font-size: 1.125rem;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  font-size: 1.95rem;
}

.article-content h3 {
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  font-size: 1.45rem;
}

.article-content blockquote {
  border-left: 3px solid var(--accent-primary);
  padding-left: 1.75rem;
  margin: 2.25rem 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--text-primary);
  font-style: italic;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.75rem;
  padding-left: 1.75rem;
}

.article-content li {
  margin-bottom: 0.6rem;
  color: var(--text-secondary);
}

.article-content a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: var(--accent-hover);
}

.article-takeaways {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-xs);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 2.5rem 0;
}

.article-takeaways-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.article-takeaways ul {
  margin: 0;
  padding-left: 1.25rem;
}

.article-takeaways li {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.article-takeaways li:last-child {
  margin-bottom: 0;
}

.article-content pre {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.75rem 0;
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

.article-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

.article-content th,
.article-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}

.article-content th {
  background-color: var(--bg-surface);
  font-weight: 600;
  color: var(--text-primary);
}

.article-content tr:nth-child(even) td {
  background-color: rgba(0, 0, 0, 0.015);
}

[data-theme="dark"] .article-content tr:nth-child(even) td {
  background-color: rgba(255, 255, 255, 0.02);
}

.article-cta {
  margin-top: 3.5rem;
  padding: 2rem;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  border-radius: var(--radius-xs);
}

.article-cta h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.article-cta p {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}


/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  margin-bottom: 3.5rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9375rem;
  max-width: 32ch;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav-list a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.footer-nav-list a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a:hover {
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   DEMO / CONTACT MODAL DIALOG
   -------------------------------------------------------------------------- */
.modal-dialog {
  border: 1px solid var(--border-medium);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-radius: var(--radius-xs);
  padding: 0;
  max-width: 540px;
  width: 90vw;
  box-shadow: var(--shadow-elevated);
  margin: auto;
}

.modal-dialog::backdrop {
  background-color: rgba(10, 12, 14, 0.75);
  backdrop-filter: blur(4px);
}

.modal-content {
  padding: 2.25rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  display: flex;
}

.modal-close:hover {
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  transition: border-color 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   RESPONSIVE QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .site-header {
    height: 56px;
  }
  .brand-logo {
    height: 24px;
    width: auto;
  }
  .brand-link {
    gap: 0.5rem;
    flex-shrink: 0;
  }
  .nav-desktop {
    display: none !important;
  }
  .mobile-toggle {
    display: inline-flex !important;
  }
  .header-actions {
    gap: 0.5rem;
    flex-shrink: 0;
  }
  .mobile-nav-panel {
    top: 56px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-left {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 3.5rem 0;
  }
  .hero-right {
    min-height: 480px;
  }
  .pillars-grid {
    grid-template-columns: 1fr;
  }
  .thesis-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-actions .btn,
  .header-actions [data-open-demo],
  .header-cta {
    display: none !important;
  }
  .hero-stats-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .article-item {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .matrix-row {
    grid-template-columns: 1fr;
  }
  .matrix-cell.negative {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Menu Dropdown */
.mobile-nav-panel {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem;
  box-shadow: var(--shadow-elevated);
}

.mobile-nav-panel.open {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   PRODUCT PROMOTION & INFERISE CODE SHOWCASE STYLES
   -------------------------------------------------------------------------- */
.nav-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--accent-soft);
  color: var(--accent-primary);
  border: 1px solid var(--accent-border);
  margin-left: 0.35rem;
  vertical-align: middle;
}

.footer-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background-color: var(--accent-soft);
  color: var(--accent-primary);
  border: 1px solid var(--accent-border);
  margin-left: 0.35rem;
}

.hero-announcement {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.95rem;
  border-radius: 9999px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  font-size: 0.84rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  width: fit-content;
}

.hero-announcement:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

.announcement-pill {
  background-color: var(--accent-primary);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 7px;
  border-radius: 9999px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.showcase-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.showcase-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: #FFFFFF;
}

.showcase-chip.sev-waiting     { background-color: #9E171C; }
.showcase-chip.sev-needs-input { background-color: #BF3821; }
.showcase-chip.sev-permission  { background-color: #CC7A1A; }
.showcase-chip.sev-working     { background-color: #2E5C9E; }
.showcase-chip.sev-idle        { background-color: #296B2E; }
.showcase-chip.sev-neglected   { background-color: #576157; }

.showcase-window {
  border: none;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
}

html[data-theme="light"] .showcase-window {
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.14));
}

.showcase-window img {
  width: 100%;
  height: auto;
  display: block;
}

/* Showcase Window Light / Dark Screenshot Switching */
.code-shot-dark { display: block; }
.code-shot-light { display: none; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .code-shot-dark { display: none; }
  :root:not([data-theme="dark"]) .code-shot-light { display: block; }
}

html[data-theme="light"] .code-shot-dark { display: none; }
html[data-theme="light"] .code-shot-light { display: block; }
html[data-theme="dark"] .code-shot-dark { display: block; }
html[data-theme="dark"] .code-shot-light { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .code-shot-dark { display: block; }
  :root:not([data-theme="light"]) .code-shot-light { display: none; }
}

.showcase-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.25rem;
  margin-bottom: 2rem;
}

.showcase-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.96rem;
  color: var(--text-secondary);
}

.showcase-feature-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.showcase-check-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

@media (max-width: 960px) {
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

