/* ============================================================
   CUSTOMSGENIUS — INSTITUTIONAL PRECISION
   ============================================================ */

:root {
  --accent: #f04d00;          /* vivid orange */
  --accent-hover: #d94400;
  --accent-muted: #b33900;    /* lower luminance for subtext */
  --accent-wash: #fef0e8;     /* very desaturated accent for bg tints */
  --btn: #151415;             /* near-black for buttons */
  --btn-hover: #2a2829;
  --complement: var(--accent);           /* was green, now matches accent */
  --complement-muted: var(--accent-muted); /* was green, now matches accent */
  --navy: #0F172A;
  --navy-light: #1E293B;
  --navy-mid: #334155;
  --bg: #FFFFFF;              /* crisp white */
  --bg-dark: #0F172A;
  --text: #0F172A;
  --text-muted: #6B7280;
  --text-light: #CBD5E1;
  --card-bg: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --radius: 8px;
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: clip;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(240, 77, 0, 0.15);
  padding: 0 40px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.nav-brand img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--accent);
}

.nav-cta {
  background: var(--btn) !important;
  color: #FFFFFF !important;
  padding: 10px 28px;
  border-radius: 6px;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s !important;
}
.nav-cta:hover {
  background: var(--btn-hover) !important;
  transform: translateY(-1px);
}

/* ---- Mobile hamburger toggle ---- */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger span + span {
  margin-top: 5px;
}
.nav-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Subtle grid pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240, 77, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 77, 0, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Radial glow */
.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(240, 77, 0, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 780px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
  color: var(--text);
}

.accent {
  color: var(--accent);
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 44px;
  line-height: 1.75;
}

.hero-form {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 0 0 1px var(--border);
}

.hero-form input {
  flex: 1;
  min-width: 0;
  padding: 18px 24px;
  border: none;
  background: #F8FAFC;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-display);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.hero-form input::placeholder {
  color: #94A3B8;
}
.hero-form input:focus {
  background: #F1F5F9;
}

.hero-form button {
  padding: 18px 36px;
  background: var(--btn);
  color: #FFFFFF;
  border: none;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.2;
  letter-spacing: 0.01em;
  transition: background 0.2s;
}
.hero-form button:hover {
  background: var(--btn-hover);
}

/* ============================================================
   SECTION 1 — LOGOS
   ============================================================ */
.section-logos {
  padding: 56px 24px 72px;
  text-align: center;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.section-logos-abi {
  border-top: none;
}

.logos-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 36px;
}

.logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 44px;
  max-width: 900px;
  margin: 0 auto;
}

.institution-logo {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.85) contrast(0.6) opacity(0.55);
  transition: filter 0.35s ease, opacity 0.35s ease;
}
.institution-logo:hover {
  filter: none;
}

/* ============================================================
   SECTION 2 — POSTS + CENTER TEXT
   ============================================================ */
.section-posts {
  display: flex;
  align-items: stretch;
  padding: 80px 0 120px;
  background: var(--bg);
  position: relative;
  min-height: 100vh;
}

/* --- Posts columns --- */
.posts-column {
  width: 25%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 24px;
  -webkit-mask-image: radial-gradient(
    circle 220px at var(--reveal-x, -9999px) var(--reveal-y, -9999px),
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 55%,
    rgba(0,0,0,0) 100%
  );
  mask-image: radial-gradient(
    circle 220px at var(--reveal-x, -9999px) var(--reveal-y, -9999px),
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 55%,
    rgba(0,0,0,0) 100%
  );
}

.post-card {
  background: var(--card-bg);
  color: var(--text);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid var(--border-light);
}

/* Post header: profile icon + author/title side by side */
.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

/* Site icon circle */
.post-site-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.post-site-icon img {
  width: 20px;
  height: 20px;
}

.post-meta {
  display: flex;
  flex-direction: column;
}

.post-author {
  font-family: var(--font-display);
  font-size: 0.92rem;
  margin-bottom: 1px;
  line-height: 1.3;
}

.post-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.post-body {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* --- Center animated text --- */
.center-text {
  width: 50%;
  flex-shrink: 0;
  padding: 0 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.anim-line {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 600;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.anim-line.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   SECTION 3 — WORKFLOW
   ============================================================ */
.section-workflow {
  background: var(--bg);
  padding: 0 24px 100px;
  position: relative;
  overflow: visible;
}

.workflow-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  padding: 20px 24px 48px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: left;
  max-width: 1100px;
  margin: 0 auto;
}

/* --- Sticky container for OCR scroll effect --- */
.workflow-sticky-container {
  height: 200vh;
  position: relative;
}

/* --- OCR region (table + source images + connectors) --- */
.cs-ocr-region {
  position: sticky;
  top: calc(50vh - 220px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding-top: 24px;
}

.cs-ocr-table-wrapper {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
  background: var(--card-bg);
  position: relative;
  z-index: 2;
  border: 1px solid var(--border);
}

.cs-ocr-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--navy);
}

.cs-ocr-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.cs-ocr-dot.red { background: #EF4444; }
.cs-ocr-dot.yellow { background: #F59E0B; }
.cs-ocr-dot.green { background: #22C55E; }

.cs-ocr-toolbar-title {
  font-size: 0.75rem;
  color: #94A3B8;
  margin-left: 8px;
  font-family: var(--font-display);
}

.cs-ocr-table-scroll {
  overflow-x: auto;
}

.cs-ocr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.cs-ocr-table thead {
  background: #F8FAFC;
  border-bottom: 2px solid var(--border);
}

.cs-ocr-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-display);
}

.cs-ocr-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}

.cs-ocr-table tbody tr:hover {
  background: #F8FAFC;
}

.cs-entry-num {
  font-weight: 600;
  color: var(--navy);
}

.cs-cell-green {
  font-weight: 700;
  color: var(--complement-muted);
}

/* Desktop: show full filenames, hide short labels */
.file-short { display: none; }
.file-full  { display: inline; }

/* Percent labels in headers */
.th-pct { /* visible by default on desktop */ }

.cs-cell-file {
  display: inline-block;
  background: #F1F5F9;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
  font-family: var(--font-display);
}
.cs-cell-file:hover {
  background: #E2E8F0;
}
.cs-cell-file:hover::after {
  content: 'Open file';
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  font-size: 0.65rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  font-family: var(--font-display);
}

/* Dimmed rows during spotlight */
.cs-ocr-table tbody tr.cs-row-dimmed {
  opacity: 0.2;
  transition: opacity 0.5s ease;
}

/* --- Buttons at bottom of table --- */
.cs-ocr-buttons {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: #F8FAFC;
}

.cs-btn-ace {
  padding: 10px 24px;
  background: var(--btn);
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  transition: background 0.2s;
}
.cs-btn-ace:hover { background: var(--btn-hover); }

.cs-btn-export {
  padding: 10px 24px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.cs-btn-export:hover { border-color: var(--accent); color: var(--accent); }

/* --- Source images (circle crop + connector lines) --- */
.cs-source-img {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 3;
}
.cs-source-img.visible {
  opacity: 1;
}

.cs-source-left {
  flex-direction: row;
  margin-right: -8px;
  margin-top: 70px;
}

.cs-source-right {
  flex-direction: row-reverse;
  margin-left: -8px;
  margin-top: 70px;
}

.cs-source-circle {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid var(--navy);
  flex-shrink: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.cs-source-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Page dim overlay for spotlight --- */
.cs-page-dim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 900;
  pointer-events: none;
  transition: opacity 0.5s ease;
  opacity: 0;
}
.cs-page-dim.active {
  display: block;
  opacity: 1;
}
.cs-page-dim.fading {
  display: block;
  opacity: 0;
}

/* Table and source images rise above dim */
.cs-ocr-region.spotlight {
  z-index: 901;
}

/* ============================================================
   SECTION 4 — CASE STUDY
   ============================================================ */
.section-case-study {
  padding: 100px 24px 140px;
  background: var(--bg);
  position: relative;
  overflow: visible;
}

.case-study-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.case-study-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.case-study-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.case-study-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 48px;
}

/* --- Highlight metrics --- */
.cs-metrics-row {
  display: flex;
  gap: 24px;
  margin-bottom: 48px;
}

.cs-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 36px 16px;
  background: linear-gradient(135deg, #FAFAFA 0%, var(--accent-wash) 100%);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(240, 77, 0, 0.06);
  border: 1px solid rgba(240, 77, 0, 0.1);
}

.cs-metric-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.cs-metric-asterisk {
  font-size: 0.4em;
  vertical-align: super;
  line-height: 1;
}

.cs-metric-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cs-metric-footnote {
  font-family: var(--font-body);
  font-size: 0.68rem;
  color: #64748B;
  margin-top: 10px;
  font-style: italic;
}

/* --- Stats row --- */
.cs-stats-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.cs-stat {
  flex: 1;
  min-width: 140px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
}

.cs-stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.cs-stat-flag {
  color: #DC2626;
}

.cs-stat-accent {
  color: var(--complement-muted);
}

.cs-stat-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Tariff context --- */
.cs-tariff-context {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: #F1F5F9;
  border-radius: var(--radius);
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

.cs-tariff-context-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cs-tariff-context-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

/* --- Breakdown table --- */
.cs-breakdown {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
}

.cs-breakdown-header,
.cs-breakdown-row,
.cs-breakdown-total {
  display: grid;
  grid-template-columns: 2fr 0.7fr 0.7fr 1.3fr;
  padding: 14px 24px;
  align-items: center;
  font-size: 0.9rem;
}

.cs-breakdown-header {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
}

.cs-breakdown-row {
  border-bottom: 1px solid var(--border-light);
}

.cs-breakdown-total {
  font-weight: 700;
  background: var(--accent-wash);
  border-top: 2px solid var(--accent);
}

.cs-program-name {
  font-family: var(--font-display);
  font-weight: 600;
}

.cs-refund-value {
  font-weight: 700;
  color: var(--complement-muted);
}

/* ============================================================
   ABOUT US
   ============================================================ */
.section-about {
  padding: 120px 24px 100px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.about-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 64px;
}

.about-left {
  flex-shrink: 0;
  width: 380px;
}

.about-text {
  flex: 1;
}

.about-beta-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 20px;
  text-align: center;
  max-width: 380px;
}

.about-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 24px;
}

.about-body {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 640px;
}

.about-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  margin-top: 0;
}

.about-form input {
  padding: 16px 24px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-display);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background: var(--card-bg);
  transition: border-color 0.2s;
}
.about-form input:focus {
  border-color: var(--accent);
}

.about-form button {
  padding: 16px 32px;
  background: var(--btn);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.2;
  letter-spacing: 0.01em;
  transition: background 0.2s;
}
.about-form button:hover {
  background: var(--btn-hover);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: #94A3B8;
  padding: 72px 24px 0;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 48px 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(240, 77, 0, 0.10);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 140px;
}

.footer-brand {
  flex: 1.5;
  min-width: 200px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-img {
  height: 28px;
  width: auto;
}

.footer-tagline {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #64748B;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748B;
  margin-bottom: 4px;
}

.footer-col a {
  color: #94A3B8;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--accent);
}

.footer-address {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #64748B;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: #475569;
}

/* ============================================================
   JOIN POPUP MODAL
   ============================================================ */
.join-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.5);
}
.join-overlay.active {
  display: flex;
}

.join-modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px 36px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  position: relative;
  border: 1px solid var(--border);
}

.join-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.join-modal-close:hover {
  color: var(--text);
}

.join-modal h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.join-modal-sub {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.55;
}

.join-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-modal-form input {
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-display);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
}
.join-modal-form input:focus {
  border-color: var(--accent);
}

.join-modal-form button {
  padding: 14px 24px;
  background: var(--btn);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.2;
  transition: background 0.2s;
}
.join-modal-form button:hover {
  background: var(--btn-hover);
}

.join-modal-beta {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
  margin-top: 16px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .section-posts {
    flex-direction: column;
    align-items: center;
  }
  .posts-column {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 0 24px;
  }
  .post-card {
    min-width: 260px;
  }
  .center-text {
    width: 100%;
    padding: 60px 24px 0;
  }
  .posts-left {
    order: 2;
  }
  .center-text {
    order: 1;
  }
  .posts-right {
    order: 3;
  }
}

@media (max-width: 768px) {
  /* --- Kill ALL horizontal overflow --- */
  html, body {
    overflow-x: clip;
    max-width: 100vw;
  }

  /* --- Navbar --- */
  .site-nav { padding: 0 20px; }
  .nav-inner { height: 56px; }
  .nav-brand { font-size: 1rem; }
  .nav-brand img { height: 26px; }

  .nav-hamburger { display: flex; flex-direction: column; }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 24px 20px;
    gap: 0;
    border-bottom: 1px solid rgba(240, 77, 0, 0.15);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: 0.95rem;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-cta {
    margin-top: 8px;
    text-align: center;
    display: block;
  }

  /* --- Hero --- */
  .hero {
    padding: 60px 16px 32px;
    min-height: auto;
  }
  .hero-title {
    font-size: 2rem;
  }

  .section-logos {
    padding: 20px 16px 32px;
  }

  .section-posts {
    padding: 32px 0 10px;
    min-height: auto;
  }

  .posts-column {
    display: none;
  }

  .center-text {
    padding: 16px 16px 0;
  }

  /* --- Workflow section --- */
  .section-workflow {
    padding: 0 16px 16px;
    overflow-x: clip;
  }

  .workflow-title {
    padding: 0 0 16px;
    font-size: 1.2rem;
  }

  .workflow-subtitle {
    display: none;
  }

  /* --- OCR table: disable sticky --- */
  .workflow-sticky-container {
    height: auto;
  }

  .cs-ocr-region {
    position: relative;
    top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0;
    padding-bottom: 125px;
    gap: 0;
  }

  .cs-ocr-table-wrapper {
    order: 1;
    width: 100%;
    position: relative;
    z-index: 1;
  }

  .cs-source-img {
    opacity: 1;
    margin-top: 0 !important;
  }

  .cs-source-left {
    position: absolute;
    bottom: 50px;
    left: 0;
    margin: 0;
    z-index: 3;
  }

  .cs-source-right {
    position: absolute;
    bottom: 50px;
    right: 0;
    margin: 0;
    flex-direction: row;
    z-index: 3;
  }

  .cs-source-circle {
    width: 150px;
    height: 150px;
    border-width: 6px;
  }

  .cs-page-dim {
    display: none !important;
  }

  /* --- OCR table: fit on phone --- */
  .cs-ocr-table-scroll {
    overflow-x: hidden;
  }

  .cs-ocr-table {
    font-size: 0.55rem;
    table-layout: fixed;
    width: 100%;
  }

  .cs-ocr-table th {
    font-size: 0.5rem;
    padding: 6px 3px;
    letter-spacing: 0;
    word-break: break-word;
    white-space: normal;
  }

  .th-pct {
    display: none;
  }

  .file-full { display: none; }
  .file-short { display: inline; }

  .cs-ocr-table td {
    padding: 6px 4px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cs-cell-file {
    font-size: 0.5rem;
    padding: 2px 5px;
  }

  /* --- Case study --- */
  .section-case-study {
    padding: 24px 16px 40px;
  }

  .case-study-title {
    font-size: 1.6rem;
  }

  .case-study-subtitle {
    font-size: 0.92rem;
    margin-bottom: 24px;
  }

  .cs-metrics-row {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
  }

  .cs-metric {
    padding: 20px 16px;
  }

  .cs-metric-value {
    font-size: 1.5rem;
  }

  .cs-stats-row {
    gap: 12px;
    margin-bottom: 20px;
  }

  .cs-stat {
    min-width: calc(50% - 6px);
    flex: none;
    width: calc(50% - 6px);
    padding: 16px 14px;
  }

  .cs-stat-number {
    font-size: 1.3rem;
  }

  .cs-stat-label {
    font-size: 0.7rem;
  }

  .cs-tariff-context {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
  }

  .cs-breakdown-header,
  .cs-breakdown-row,
  .cs-breakdown-total {
    grid-template-columns: 1.8fr 0.5fr 0.5fr 1.1fr;
    padding: 10px 12px;
    font-size: 0.75rem;
  }

  .cs-breakdown-header {
    font-size: 0.62rem;
  }

  /* --- About section --- */
  .section-about {
    padding: 32px 16px 56px;
  }

  .about-inner {
    flex-direction: column;
    gap: 24px;
  }

  .about-left {
    width: 100%;
    order: 2;
  }

  .about-text {
    order: 1;
  }

  .about-body {
    display: none;
  }

  .about-form {
    max-width: 100%;
  }

  .about-beta-label {
    max-width: 100%;
  }

  .about-headline {
    font-size: 1.5rem;
  }

  /* --- Footer --- */
  .site-footer {
    padding: 32px 16px 0;
  }

  .footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
    padding-bottom: 28px;
  }

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

@media (max-width: 600px) {
  .hero-form {
    flex-direction: column;
    border-radius: 0;
    box-shadow: none;
    gap: 12px;
    overflow: visible;
  }
  .hero-form input {
    border: 2px solid var(--border);
    border-radius: 8px;
    background: #F8FAFC;
  }
  .hero-form button {
    border-radius: 8px;
  }
}
