/* ==========================================================================
   WONDERBASKETSORTSCO.REST — DESIGN SYSTEM: SOFT MODERN
   Palette: Future Ink, Deep Slate, Soft Graphite, Cloud White, Cool Ivory
   Accents: Digital Mint, Signal Aqua, Future Blue, Soft Violet
   Spacing System: 4 / 8 / 16 / 24 / 40 / 64px
   ========================================================================== */

:root {
  /* Primary Foundations */
  --c-future-ink: #17212B;
  --c-deep-slate: #26343D;
  --c-soft-graphite: #39464D;
  --c-cloud-white: #F8FAF8;
  --c-cool-ivory: #F1F4F1;

  /* Soft Technology Accents */
  --c-digital-mint: #9FD8C7;
  --c-signal-aqua: #8CCFD1;
  --c-future-blue: #91B9D8;
  --c-soft-violet: #B2A7D6;
  --c-digital-lilac: #C5BFE0;
  --c-machine-sand: #D7C8AE;
  --c-warm-silver: #C7D0D0;

  /* Interaction & State */
  --c-signal-green: #5D9F83;
  --c-tech-blue: #5D8FB5;
  --c-precision-violet: #7C70A8;
  --c-danger: #D66D67;

  /* Surfaces & Borders */
  --surface-page: var(--c-cloud-white);
  --surface-card: #FFFFFF;
  --surface-alt: var(--c-cool-ivory);
  --surface-dark: var(--c-deep-slate);
  --surface-darkest: var(--c-future-ink);

  --border-subtle: #E2E8E4;
  --border-strong: #C4CFC9;
  --border-dark: var(--c-soft-graphite);

  /* Shadows - Soft Controlled Micro-shadows */
  --shadow-sm: 0 2px 8px rgba(23, 33, 43, 0.04);
  --shadow-md: 0 6px 20px rgba(23, 33, 43, 0.06);
  --shadow-lg: 0 12px 36px rgba(23, 33, 43, 0.12);
  --shadow-popup: 0 18px 45px rgba(10, 18, 26, 0.38);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;

  /* Spacing */
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-40: 40px;
  --sp-64: 64px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --max-width: 1200px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--surface-page);
  color: var(--c-future-ink);
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--c-future-ink);
  background-color: var(--surface-page);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

/* Accessible Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--c-future-ink);
  color: var(--c-digital-mint);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* Accessibility Focus States */
:focus-visible {
  outline: 3px solid var(--c-signal-green);
  outline-offset: 3px;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--c-future-ink);
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: anywhere;
}

p {
  overflow-wrap: anywhere;
}

a {
  color: var(--c-future-ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   HEADER (NON-STICKY, 64px height on desktop)
   ========================================================================== */

.site-header {
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 1000;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-future-ink);
}

.brand-mark {
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-future-ink);
  overflow-wrap: anywhere;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 28px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-soft-graphite);
  padding: 6px 0;
  position: relative;
}

.nav-link:hover {
  color: var(--c-future-ink);
}

.nav-link.active,
.nav-link[aria-current="page"] {
  color: var(--c-future-ink);
  font-weight: 600;
}

.nav-link.active::after,
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--c-signal-green);
  border-radius: 2px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #FFFFFF;
  background-color: var(--c-deep-slate);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.nav-cta:hover {
  background-color: var(--c-future-ink);
  color: var(--c-digital-mint);
}

.nav-cta.active,
.nav-cta[aria-current="page"] {
  background-color: var(--c-future-ink);
  color: var(--c-digital-mint);
  box-shadow: inset 0 0 0 1px var(--c-signal-green);
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.2s ease;
}

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

.toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--c-future-ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-toggle.is-active .toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.is-active .toggle-bar:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.is-active .toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   BUTTONS & MICRO-COMPONENTS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background-color: var(--c-future-ink);
  color: var(--c-digital-mint);
}

.btn-secondary {
  background-color: #FFFFFF;
  color: var(--c-deep-slate);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background-color: var(--c-cool-ivory);
  border-color: var(--c-soft-graphite);
}

.btn-outline {
  background-color: transparent;
  color: var(--c-soft-graphite);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background-color: #FFFFFF;
  color: var(--c-future-ink);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.eyebrow-pill {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-deep-slate);
  background-color: #E6EFEA;
  border: 1px solid #D2E4DA;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.badge-accent {
  background-color: #17212B;
  color: var(--c-digital-mint);
  border: 1px solid var(--c-soft-graphite);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--c-deep-slate);
  background-color: var(--c-cool-ivory);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.inline-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--c-signal-green);
  text-decoration: underline;
  cursor: pointer;
}

.inline-link-btn:hover {
  color: var(--c-future-ink);
}

/* ==========================================================================
   HOMEPAGE: HERO
   ========================================================================== */

.hero-section {
  padding: var(--sp-64) 0;
  background-color: var(--surface-page);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--sp-40);
  align-items: center;
}

.hero-content {
  min-width: 0;
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--c-future-ink);
  margin-bottom: var(--sp-16);
}

.hero-lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--c-soft-graphite);
  margin-bottom: var(--sp-24);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-16);
  margin-bottom: var(--sp-40);
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
}

.meta-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--c-soft-graphite);
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

/* Hero Visual Panel */
.hero-visual-frame {
  min-width: 0;
}

.visual-panel {
  background-color: var(--c-future-ink);
  border: 1px solid var(--c-soft-graphite);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: #121A22;
  border-bottom: 1px solid var(--c-soft-graphite);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--c-digital-mint);
  display: inline-block;
}

.panel-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-warm-silver);
  letter-spacing: 0.05em;
}

.schematic-graphic {
  background-color: var(--c-future-ink);
  overflow: hidden;
  position: relative;
}

.visual-photo {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.visual-panel:hover .visual-photo {
  transform: scale(1.02);
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: #121A22;
  border-top: 1px solid var(--c-soft-graphite);
}

.panel-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-digital-mint);
}

/* ==========================================================================
   STATEMENT SECTION
   ========================================================================== */

.section {
  padding: var(--sp-64) 0;
}

.statement-section {
  padding-top: var(--sp-40);
  padding-bottom: var(--sp-40);
}

.statement-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--c-signal-green);
  border-radius: var(--radius-md);
  padding: var(--sp-40);
  box-shadow: var(--shadow-sm);
}

.statement-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-signal-green);
  margin-bottom: var(--sp-8);
}

.statement-heading {
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--c-future-ink);
  margin-bottom: var(--sp-16);
  letter-spacing: -0.02em;
}

.statement-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--c-soft-graphite);
  max-width: 900px;
}

/* ==========================================================================
   HORIZONTAL SPLIT CARDS
   ========================================================================== */

.section-header {
  margin-bottom: var(--sp-40);
}

.section-header.text-center {
  text-align: center;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-8);
}

.section-desc {
  font-size: 1.1rem;
  color: var(--c-soft-graphite);
  max-width: 680px;
}

.max-width-text {
  margin-left: auto;
  margin-right: auto;
}

.card-stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-40);
}

.split-card {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: var(--sp-40);
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.split-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-visual {
  min-width: 0;
  background-color: var(--c-deep-slate);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.card-photo {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.split-card:hover .card-photo {
  transform: scale(1.03);
}

.card-content {
  min-width: 0;
  padding: 32px 32px 32px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--c-tech-blue);
  margin-bottom: var(--sp-8);
}

.card-title {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-16);
  color: var(--c-future-ink);
}

.card-description {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--c-soft-graphite);
  margin-bottom: var(--sp-24);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
  margin-bottom: var(--sp-24);
}

.card-cta-row {
  margin-top: auto;
}

/* ==========================================================================
   HOMEPAGE: THE TECHNOLOGY STACK IS CHANGING
   ========================================================================== */

.stack-section {
  background-color: var(--surface-alt);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.stack-diagram-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-40);
  box-shadow: var(--shadow-sm);
}

.stack-flow-horizontal {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: var(--sp-16);
  align-items: center;
  margin-bottom: var(--sp-40);
}

.stack-node {
  background-color: var(--c-cloud-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--sp-24);
  display: flex;
  flex-direction: column;
}

.node-step {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-signal-green);
  margin-bottom: var(--sp-4);
}

.node-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--c-future-ink);
  margin-bottom: var(--sp-8);
}

.node-body {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--c-soft-graphite);
}

.stack-arrow {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--border-strong);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stack-explainer {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--sp-24);
}

.explainer-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--sp-8);
}

.stack-explainer p {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--c-soft-graphite);
  max-width: 960px;
}

/* CTA Card */
.cta-section {
  padding-top: var(--sp-40);
  padding-bottom: var(--sp-64);
}

.cta-card {
  background-color: var(--c-deep-slate);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: var(--sp-40);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-24);
}

.cta-card .eyebrow-pill {
  background-color: #17212B;
  color: var(--c-digital-mint);
  border-color: var(--c-soft-graphite);
}

.cta-title {
  color: #FFFFFF;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: var(--sp-8);
}

.cta-desc {
  color: var(--c-warm-silver);
  font-size: 1.05rem;
  max-width: 600px;
}

.cta-actions {
  flex-shrink: 0;
}

/* ==========================================================================
   TOPIC SUB-PAGES
   ========================================================================== */

.topic-page {
  padding-bottom: var(--sp-64);
}

.topic-header {
  padding: var(--sp-40) 0;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--c-soft-graphite);
  margin-bottom: var(--sp-16);
}

.breadcrumbs a {
  color: var(--c-soft-graphite);
}

.breadcrumbs a:hover {
  color: var(--c-future-ink);
  text-decoration: underline;
}

.topic-h1 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-16);
  max-width: 900px;
}

.topic-lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--c-soft-graphite);
  max-width: 820px;
}

.topic-visual-section {
  margin-top: var(--sp-40);
  margin-bottom: var(--sp-40);
}

.topic-article-content {
  margin-top: var(--sp-40);
}

.content-prose {
  max-width: 840px;
}

.content-prose h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: var(--sp-40);
  margin-bottom: var(--sp-16);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.content-prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: var(--sp-24);
  margin-bottom: var(--sp-8);
}

.content-prose p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--c-soft-graphite);
  margin-bottom: var(--sp-16);
}

.content-prose ul, .content-prose ol {
  margin-bottom: var(--sp-24);
  padding-left: var(--sp-24);
}

.content-prose li {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--c-soft-graphite);
  margin-bottom: var(--sp-8);
}

.content-prose strong {
  color: var(--c-future-ink);
}

/* Schematic Figure & Inline SVGs */
.schematic-figure {
  margin: var(--sp-32, 32px) 0;
  background-color: var(--c-deep-slate);
  border: 1px solid var(--c-soft-graphite);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card-svg {
  width: 100%;
  height: auto;
  display: block;
}

.schematic-caption {
  padding: 10px 16px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--c-digital-mint);
  background-color: #1a252c;
  border-top: 1px solid var(--c-soft-graphite);
}

/* Evaluation Matrices */
.evaluation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-24);
  margin-top: var(--sp-40);
  margin-bottom: var(--sp-40);
}

.eval-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--sp-24);
  box-shadow: var(--shadow-sm);
}

.eval-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: var(--sp-8);
}

.eval-watch {
  border-top: 4px solid var(--c-tech-blue);
}

.eval-good {
  border-top: 4px solid var(--c-signal-green);
}

.eval-know {
  border-top: 4px solid var(--c-precision-violet);
}

.eval-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--c-soft-graphite);
}

/* Related Guides */
.related-section {
  background-color: var(--surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: var(--sp-40);
  margin-bottom: var(--sp-40);
}

.related-section h3 {
  font-size: 1.2rem;
  margin-bottom: var(--sp-16);
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
}

.related-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-soft-graphite);
  box-shadow: var(--shadow-sm);
}

.related-cat {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-signal-green);
  font-weight: 700;
  margin-bottom: var(--sp-4);
}

.related-card strong {
  font-size: 1.1rem;
  color: var(--c-future-ink);
  margin-bottom: var(--sp-4);
}

.related-card p {
  font-size: 0.9rem;
  color: var(--c-soft-graphite);
}

.topic-cta-box {
  background-color: var(--c-deep-slate);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: var(--sp-40);
  margin-top: var(--sp-40);
}

.topic-cta-box h3 {
  color: #FFFFFF;
  font-size: 1.5rem;
  margin-bottom: var(--sp-8);
}

.topic-cta-box p {
  color: var(--c-warm-silver);
  font-size: 1.05rem;
  margin-bottom: var(--sp-24);
  max-width: 600px;
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

.page-content-padding {
  padding-top: var(--sp-40);
  padding-bottom: var(--sp-64);
}

.page-intro {
  margin-bottom: var(--sp-40);
}

.page-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-16);
}

.page-lead {
  font-size: 1.15rem;
  color: var(--c-soft-graphite);
  max-width: 720px;
  line-height: 1.6;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: var(--sp-40);
  align-items: start;
}

.contact-form-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-40);
  box-shadow: var(--shadow-sm);
}

.form-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: var(--sp-4);
}

.form-subtitle {
  font-size: 0.95rem;
  color: var(--c-soft-graphite);
  margin-bottom: var(--sp-24);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
}

.form-group {
  margin-bottom: var(--sp-16);
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-future-ink);
  margin-bottom: 6px;
}

.required {
  color: var(--c-danger);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--c-future-ink);
  background-color: var(--surface-page);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--c-signal-green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(93, 159, 131, 0.2);
}

.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--c-danger);
  background-color: #FFF8F8;
}

.error-msg {
  display: none;
  font-size: 0.8rem;
  color: var(--c-danger);
  margin-top: 4px;
  font-weight: 500;
}

.error-msg.is-visible {
  display: block;
}

.submit-btn {
  margin-top: var(--sp-8);
  width: 100%;
}

.form-feedback-card {
  margin-top: var(--sp-24);
  padding: 20px;
  background-color: #EAF4EE;
  border: 1px solid var(--c-signal-green);
  border-radius: var(--radius-md);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.form-feedback-card[hidden] {
  display: none !important;
}

.feedback-status-icon {
  background-color: var(--c-signal-green);
  color: #FFFFFF;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.feedback-text h3 {
  font-size: 1.1rem;
  color: var(--c-future-ink);
  margin-bottom: 4px;
}

.feedback-text p {
  font-size: 0.92rem;
  color: var(--c-soft-graphite);
  margin-bottom: 6px;
}

.feedback-meta {
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.contact-info-sidebar .info-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--sp-8);
}

.entity-name {
  font-weight: 700;
  color: var(--c-future-ink);
  margin-bottom: 6px;
}

.divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: var(--sp-16) 0;
}

.office-address {
  font-style: normal;
  line-height: 1.6;
  color: var(--c-soft-graphite);
  margin-bottom: var(--sp-16);
}

.location-graphic {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--sp-16);
}

.map-vector {
  width: 100%;
  height: auto;
}

.static-note {
  font-size: 0.85rem;
  color: var(--c-soft-graphite);
}

/* ==========================================================================
   LEGAL PAGES
   ========================================================================== */

.legal-article {
  max-width: 860px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-40);
  box-shadow: var(--shadow-sm);
  margin-left: auto;
  margin-right: auto;
}

.legal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--sp-24);
  margin-bottom: var(--sp-24);
}

.legal-body h2 {
  font-size: 1.35rem;
  margin-top: 32px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}

.legal-body p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--c-soft-graphite);
  margin-bottom: var(--sp-16);
}

.legal-contact-block {
  font-style: normal;
  background-color: var(--surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--sp-16);
  margin: var(--sp-16) 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.table-responsive {
  overflow-x: auto;
  margin: var(--sp-24) 0;
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.policy-table th,
.policy-table td {
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
}

.policy-table th {
  background-color: var(--c-cool-ivory);
  font-weight: 700;
  color: var(--c-future-ink);
}

.policy-table td {
  color: var(--c-soft-graphite);
}

/* ==========================================================================
   FOOTER (CONSISTENT REQUIREMENT + MANDATORY DOMAIN & LOGO LINKS)
   ========================================================================== */

.site-footer {
  background-color: var(--c-future-ink);
  color: var(--c-warm-silver);
  border-top: 1px solid var(--c-soft-graphite);
  margin-top: auto;
  padding: var(--sp-64) 0 32px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-40);
  margin-bottom: var(--sp-40);
}

.footer-brand-column {
  min-width: 0;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--sp-16);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.footer-domain-link {
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}

.footer-domain-link:hover,
.footer-domain-link:focus-visible {
  color: var(--c-digital-mint);
  text-decoration: underline;
}

.footer-mission {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--c-warm-silver);
  margin-bottom: var(--sp-16);
  max-width: 480px;
}

.footer-entity-details {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--c-warm-silver);
}

.footer-entity-details strong {
  color: #FFFFFF;
}

.footer-entity-details a {
  color: var(--c-digital-mint);
}

.footer-entity-details a:hover {
  text-decoration: underline;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: var(--sp-16);
}

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

.footer-nav a {
  font-size: 0.9rem;
  color: var(--c-warm-silver);
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--c-digital-mint);
  text-decoration: underline;
}

.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--c-warm-silver);
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease;
}

.footer-link-btn:hover,
.footer-link-btn:focus-visible {
  color: var(--c-digital-mint);
  text-decoration: underline;
}

.footer-bottom-bar {
  border-top: 1px solid var(--c-soft-graphite);
  padding-top: var(--sp-24);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: #8C9999;
}

.copyright-text {
  color: var(--c-warm-silver);
}

.disclaimer-text {
  max-width: 800px;
  line-height: 1.5;
}

/* ==========================================================================
   COOKIE POPUP SECTION & PREFERENCES MODAL
   ========================================================================== */

/* Floating Cookie Popup Card */
.cookie-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9995;
  max-width: 440px;
  width: calc(100% - 48px);
  animation: cookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cookie-popup[hidden] {
  display: none !important;
}

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cookie-popup-card {
  background-color: var(--c-future-ink);
  color: #FFFFFF;
  border: 1px solid var(--c-soft-graphite);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-popup);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.cookie-popup-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-signal-green), var(--c-signal-aqua), var(--c-digital-mint));
}

.cookie-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cookie-popup-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cookie-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c-digital-mint);
  text-transform: uppercase;
}

.cookie-badge svg {
  color: var(--c-digital-mint);
  flex-shrink: 0;
}

.cookie-popup-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.cookie-close-quick {
  background: none;
  border: none;
  color: var(--c-warm-silver);
  font-size: 1.4rem;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.cookie-close-quick:hover {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.1);
}

.cookie-popup-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cookie-popup-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--c-warm-silver);
}

.cookie-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cookie-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--c-warm-silver);
}

.cookie-pill.active {
  background-color: rgba(93, 159, 131, 0.16);
  border-color: rgba(93, 159, 131, 0.4);
  color: var(--c-digital-mint);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--c-signal-green);
  flex-shrink: 0;
}

.pill-dot.optional {
  background-color: var(--c-warm-silver);
  opacity: 0.6;
}

.cookie-policy-notice {
  font-size: 0.8rem;
  color: #8C9999;
}

.cookie-policy-link {
  color: var(--c-digital-mint);
  text-decoration: underline;
  transition: color 0.15s ease;
}

.cookie-policy-link:hover {
  color: #FFFFFF;
}

.cookie-popup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.cookie-popup-actions .btn {
  flex: 1 1 auto;
  padding: 9px 12px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.cookie-popup-actions .btn-primary {
  background-color: var(--c-signal-green);
  color: #FFFFFF;
  border-color: var(--c-signal-green);
}

.cookie-popup-actions .btn-primary:hover {
  background-color: #6fb296;
  border-color: #6fb296;
  color: #FFFFFF;
}

.cookie-popup-actions .btn-secondary {
  background-color: var(--c-deep-slate);
  color: #FFFFFF;
  border-color: var(--c-soft-graphite);
}

.cookie-popup-actions .btn-secondary:hover {
  background-color: #32434e;
  border-color: var(--border-strong);
  color: var(--c-digital-mint);
}

.cookie-popup-actions .btn-outline {
  background-color: transparent;
  color: #FFFFFF;
  border-color: var(--border-strong);
}

.cookie-popup-actions .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--c-digital-mint);
  border-color: var(--c-digital-mint);
}

/* Floating Re-Open Trigger Button */
.cookie-floating-trigger {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9980;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #FFFFFF;
  color: var(--c-deep-slate);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(23, 33, 43, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cookie-floating-trigger:hover,
.cookie-floating-trigger:focus-visible {
  background-color: var(--c-future-ink);
  color: var(--c-digital-mint);
  border-color: var(--c-soft-graphite);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cookie-floating-trigger svg {
  flex-shrink: 0;
}

/* Preferences Modal Backdrop & Dialog */
.cookie-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(23, 33, 43, 0.72);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeInModal 0.2s ease forwards;
}

.cookie-modal-backdrop[hidden] {
  display: none !important;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cookie-modal {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background-color: #FFFFFF;
}

.modal-title-wrap {
  display: flex;
  flex-direction: column;
}

.modal-title-wrap .eyebrow-pill {
  margin-bottom: 6px;
}

.modal-header h3 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--c-soft-graphite);
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--c-future-ink);
  background-color: var(--c-cool-ivory);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 65vh;
  overflow-y: auto;
}

.modal-intro {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--c-soft-graphite);
}

.pref-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background-color: var(--surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.pref-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pref-title-row strong {
  font-size: 0.95rem;
  color: var(--c-future-ink);
}

.pref-info p {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--c-soft-graphite);
  margin-top: 4px;
}

.pref-status {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-signal-green);
  background-color: rgba(93, 159, 131, 0.12);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(93, 159, 131, 0.3);
  flex-shrink: 0;
}

/* Modern Switch Slider */
.switch-label {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-label input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-strong);
  transition: 0.25s ease;
  border-radius: 24px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch-label input:checked + .switch-slider {
  background-color: var(--c-signal-green);
}

.switch-label input:checked + .switch-slider:before {
  transform: translateX(20px);
}

.switch-label input:focus-visible + .switch-slider {
  box-shadow: 0 0 0 3px rgba(93, 159, 131, 0.3);
}

.modal-footer {
  padding: 16px 24px;
  background-color: var(--surface-alt);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (320px UPWARD, NO HORIZONTAL OVERFLOW)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-40);
  }

  .split-card {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .card-content {
    padding: 32px;
  }

  .card-visual {
    height: 300px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand-column {
    grid-column: 1 / -1;
  }

  .stack-flow-horizontal {
    grid-template-columns: 1fr;
    gap: var(--sp-16);
  }

  .stack-arrow {
    transform: rotate(90deg);
  }

  .evaluation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--border-subtle);
    padding: 20px;
    box-shadow: var(--shadow-lg);
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 8px 0;
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
  }

  .mobile-toggle {
    display: flex;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .cookie-popup {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: calc(100% - 32px);
    width: auto;
  }

  .cookie-popup-actions {
    flex-direction: column;
  }

  .cookie-popup-actions .btn {
    width: 100%;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
  }

  .card-visual {
    height: 220px;
  }

  .card-content {
    padding: 20px;
  }

  .contact-form-card,
  .statement-card,
  .stack-diagram-card,
  .legal-article,
  .topic-cta-box {
    padding: 20px;
  }

  .cookie-floating-trigger span {
    display: none;
  }

  .cookie-floating-trigger {
    padding: 10px;
    border-radius: 50%;
  }
}

/* Reduced Motion Mode */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}