/*
CatInCloud Labs — Bright Theme (Blue Variant, modernized with color-mix)
Purpose: pivot the site to a clean sky blue + blue + white scheme with token-driven scales.
*/

/* ==================================================================== */
/* 1. TOKENS & FALLBACKS                                                */
/* ==================================================================== */

:root {
  /* === Base brand colors === */
  --accent: #0ea5e9;         /* primary blue */
  --brand:  #0ea5e9;

  /* === Accent scale generated with color-mix (perceptual OKLab) === */
  --accent-50:  color-mix(in oklab, var(--accent) 6%,  white);
  --accent-100: color-mix(in oklab, var(--accent) 12%, white);
  --accent-200: color-mix(in oklab, var(--accent) 25%, white);
  --accent-300: color-mix(in oklab, var(--accent) 40%, white);
  --accent-400: color-mix(in oklab, var(--accent) 55%, white);
  --accent-500: var(--accent);
  --accent-600: color-mix(in oklab, var(--accent) 85%, black);
  --accent-700: color-mix(in oklab, var(--accent) 70%, black);
  --accent-800: color-mix(in oklab, var(--accent) 55%, black);
  --accent-900: color-mix(in oklab, var(--accent) 40%, black);

  /* === Neutrals === */
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* === Semantic tokens === */
  --bg-page:     color-mix(in oklab, var(--accent) 8%, #f9fafb);
  --bg-surface:  #ffffff;
  --bg-elevated: #ffffff;

  --text:        var(--gray-900);
  --text-muted:  var(--gray-600);

  --link:        var(--accent-600);
  --link-hover:  var(--accent-500);

  --primary:         var(--accent-500);
  --primary-hover:   color-mix(in oklab, var(--primary) 85%, black);
  --primary-pressed: color-mix(in oklab, var(--primary) 70%, black);

  --ring:            var(--accent-400);

  /* Radius, shadows, transitions */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 6px 16px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 12px 30px rgba(17, 24, 39, 0.12);
  --transition-fast: 120ms ease;
  --transition: 200ms cubic-bezier(.2,.7,.2,1);
  --maxw-readable: 72ch;
  --safe-top: env(safe-area-inset-top, 0px);
}

/* Fallback for browsers without color-mix */
@supports not (color: color-mix(in oklab, white 50%, black)) {
  :root {
    /* Subtle light blue page background fallback */
    --bg-page:    #f3f7fb;

    --accent-50:  #f0f9ff;
    --accent-100: #e0f2fe;
    --accent-200: #bae6fd;
    --accent-300: #7dd3fc;
    --accent-400: #38bdf8;
    --accent-500: #0ea5e9;
    --accent-600: #0284c7;
    --accent-700: #0369a1;
    --accent-800: #075985;
    --accent-900: #0c4a6e;

    --link: var(--accent-600);
    --link-hover: var(--accent-500);
    --primary: var(--accent-500);
    --primary-hover: #0284c7;
    --primary-pressed:#0369a1;
  }
}

/* ==================================================================== */
/* 2. BASE / TYPOGRAPHY / LAYOUT / UTILITIES                            */
/* ==================================================================== */

/* Base */
html { 
  color-scheme: light; 
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column; /* sticky footer layout */
}

/* Media should never overflow */
img, svg, video, canvas { 
  max-width: 100%; 
  height: auto; 
  display: block; 
}

/* Skip link (single definition) */
.skip-link {
  position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;
}
.skip-link:focus {
  position:fixed;left:16px;top:16px;width:auto;height:auto;padding:.6rem .8rem;
  background:#fff;border:1px solid var(--gray-300);border-radius:10px;z-index:9999;
  color: var(--text); box-shadow: var(--shadow-sm);
}

/* Typography */
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3rem); line-height: 1.15; margin: 0 0 .5rem; }
h2 { font-size: clamp(1.5rem, 1rem + 1.5vw, 2rem); margin: 2rem 0 .75rem; }
h3 { font-size: 1.25rem; margin: 1.25rem 0 .5rem; }
p  { margin: 0 0 1rem; }
small, .muted { color: var(--text-muted); }

/* Hero kicker (small label above H1) */
.kicker {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.92;
  color: var(--text-muted);
}

/* Kicker when it lives over the hero video */
:is(.hero__content, .ci-hero__content) .kicker {
  color: #e5f6ff;
  text-shadow:
    0 0 4px rgba(15, 23, 42, 0.8),
    0 0 10px rgba(15, 23, 42, 0.9);
  margin-bottom: 0.1rem;
}

/* Links */
a { 
  color: var(--link); 
  text-decoration: none; 
  transition: color var(--transition-fast); 
}
a:hover { 
  color: var(--link-hover); 
  text-decoration: underline; 
}

/* Layout */
.container { width: min(1100px, 92vw); margin-inline: auto; }
.section  { padding-inline: clamp(16px, 4vw, 24px); }  /* prevents >100vw with child 100vw */
.stack > * + * { margin-top: var(--stack-gap, 1.25rem); }
.grid { display: grid; gap: 1.25rem; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

main { flex: 1; } /* sticky footer support */

/* Mobile: make section + container gutters perfectly even */
@media (max-width: 640px) {
  .section {
    padding-inline: 1rem;        /* ~16px page gutter */
  }

  .section > .container {
    width: 100%;                 /* fill the padded area */
    margin-inline: 0;
  }
}

/* Utilities */
.badge   { display:inline-block; padding:.2rem .5rem; border-radius:999px; background: var(--accent-100); color: var(--accent-700); font-weight:600; }
.border  { border: 1px solid var(--gray-200); }
.rounded { border-radius: var(--radius-md); }
.shadow  { box-shadow: var(--shadow-sm); }
.center  { text-align:center; }

/* Animations */
.reveal { opacity: 0; transform: translateY(6px); animation: revealIn .5s var(--transition) forwards; }
@keyframes revealIn { to { opacity: 1; transform: none; } }

/* Respect reduced motion for your reveal animation too */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
}

/* Global focus styles (matches your button ring) */
a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* Stack spacing helpers */
.stack--hero   { --stack-gap: 1.1rem; }
.stack--section{ --stack-gap: 1.25rem; }
.stack--tight  { --stack-gap: 0.75rem; }

/* Common narrow card layout */
.card--narrow {
  max-width: var(--maxw-readable);
  margin-inline: auto;
}

/* ==================================================================== */
/* 3. GLOBAL COMPONENTS: HEADER / NAV / CARDS / BUTTONS / INPUTS / FOOTER*/
/* ==================================================================== */

/* Header & nav */
.header {
  background: color-mix(in oklab, #fff 85%, transparent);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(1.2) blur(6px);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; }
.nav a.brand { font-weight: 700; color: var(--gray-900); }
.nav .menu { display: flex; gap: 1rem; }
.nav .menu a { color: var(--gray-700); padding: .5rem .6rem; border-radius: 8px; }
.nav .menu a:hover { background: var(--gray-100); }

/* Nav: visible active state + keyboard focus */
.nav .menu a[aria-current="page"] {
  color: var(--accent-700);
  background: var(--accent-50);
  font-weight: 700;
}
.nav .menu a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 40%, transparent);
  border-radius: 8px;
}

/* MOBILE HEADER: LEFT-ALIGNED LOGO + FULL-WIDTH NAV STRIP
   Top Row: Logo (Left) ......... Contact (Right)
   Btm Row: [About] [Projects] [Services] [Blog] (Justified)
*/
@media (max-width: 640px) {
  /* 1. Container */
  .header .nav {
    display: block;
    position: relative;
    padding: 0.85rem 1rem 0; 
  }

  /* 2. Logo: Left Aligned */
  .header .brand {
    display: inline-block;
    margin-bottom: 0.2rem; /* Tight gap to the nav row */
  }
  .header .brand img {
    height: 28px;
  }

  /* 3. "Contact" Button: Pinned Top-Right */
  .nav .menu a[href*="contact"] {
    position: absolute;
    top: 0.7rem;   /* Aligns with logo baseline */
    right: 1rem;
    z-index: 2;
    
    /* Button Styling */
    background-color: var(--gray-100) !important;
    color: var(--gray-900) !important;
    border: 1px solid var(--gray-200) !important;
    padding: 0.35rem 0.85rem !important; 
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: none;
    line-height: 1;
  }

  /* 4. Navigation Menu: "Tab Bar" Style */
  .menu {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    
    /* "space-between" fills the width, removing side white space. 
       "center" clumps them in the middle. 
       space-between is best for that "filled" app feel. */
    justify-content: space-between; 
    
    /* Layout tweaks */
    gap: 0; /* Let space-between handle the gaps */
    margin-left: 0;
    margin-right: 0;
    padding-left: 0.2rem;  /* Tiny buffer from edge */
    padding-right: 0.2rem; 
    padding-bottom: 0.85rem;
    padding-top: 0.35rem; 
    
    /* Scroll polish (hidden but functional if text gets huge) */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .menu::-webkit-scrollbar {
    display: none;
  }

  /* 5. Hide "Home" link */
  .menu a[href="/"] {
    display: none;
  }

  /* 6. Style the Links */
  .menu a {
    white-space: nowrap;
    font-size: 1rem; /* Increased size to fill space better (16px) */
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.25rem 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  /* Active State Indicator */
  .nav .menu a[aria-current="page"] {
    color: var(--accent-700);
    background: transparent;
    position: relative;
  }
  
  .nav .menu a[aria-current="page"]::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background: var(--accent-500);
    position: absolute;
    bottom: -2px;
    left: 0;
    border-radius: 2px;
  }
  
  /* Neutralize button styles on standard links */
  .menu a.button,
  .menu a.button.ghost {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

/* Slightly larger tap targets for main nav on touch screens */
@media (pointer: coarse) {
  .nav .menu a { padding: .65rem .7rem; }
}

/* Cards & eyebrow */
.card { 
  background: var(--bg-surface); 
  border: 1px solid var(--gray-200); 
  border-radius: var(--radius-lg); 
  padding: 1.25rem; 
  box-shadow: var(--shadow-sm); 
}
.card:hover { box-shadow: var(--shadow-md); }

.eyebrow {
  font-size:.8rem;
  font-weight:600;
  color: var(--accent-700);
  letter-spacing:.06em;
  text-transform:uppercase;
}

/* Normalize eyebrow spacing inside cards */
.card .eyebrow {
  margin-top: 0;
}

/* Buttons */
.button { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: .5rem; 
  padding: .7rem 1rem; 
  border-radius: var(--radius-md); 
  border: 1px solid transparent; 
  font-weight: 600; 
  cursor: pointer; 
  transition: transform var(--transition), background var(--transition); 
}
.button.primary { background: var(--primary); color: white; box-shadow: var(--shadow-md); }
.button.primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.button.primary:active { background: var(--primary-pressed); transform: translateY(0); }
.button.ghost { background: white; border-color: var(--gray-200); color: var(--link); }
.button.ghost:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); color: var(--link-hover); }

/* Generic CTA buttons (hero, etc.) */
.ci-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    color var(--transition);
}
.ci-btn:focus-visible {
  outline:3px solid var(--ring);
  outline-offset:2px;
}
.ci-btn--primary {
  background: var(--primary);
  color:#fff;
  box-shadow: var(--shadow-md);
}
.ci-btn--primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}
.ci-btn--primary:active {
  background: var(--primary-pressed);
  transform: translateY(0);
}
.ci-btn--ghost {
  background:#fff;
  border-color: var(--gray-200);
  color: var(--link);
}
.ci-btn--ghost:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
  color: var(--link-hover);
}

/* Inputs */
.input { 
  width: 100%; 
  padding: .7rem .9rem; 
  border-radius: 12px; 
  border: 1px solid var(--gray-300); 
  background: white; 
  color: var(--text); 
}
.input:focus { 
  border-color: var(--accent-400); 
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent-400) 25%, transparent); 
  outline: none; 
}

/* Footer */
.footer { 
  margin-top: 3rem; 
  background: var(--bg-surface);  /* solid white footer on light-blue page */
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.04);
}
.footer .inner { padding: 1.5rem 0; color: var(--gray-700); text-align: center; }

/* Footer link color consistency */
.footer a { color: var(--link); }
.footer a:hover { color: var(--link-hover); text-decoration: underline; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

/* Card content spacing helpers */
.card h3 + ul {
  margin-top: 0.75rem;
  margin-bottom: 1.75rem;
}
.card p.muted {
  max-width: 65ch;
  margin-inline: auto;
}

/* CTA card on Projects/Services pages */
.card--cta {
  margin-top: 2.25rem;
  text-align: center;
}

/* Make the footer CTA button match the Hero button styles (Desktop) */
.card--cta .ci-btn {
  min-width: 260px;        /* Match hero width */
  justify-content: center;
  
  /* MATCHING HERO TUNING */
  padding: 0.95rem 1.5rem; 
  font-size: 1.05rem;      
  letter-spacing: 0.01em;  /* Adjusted to match hero */
  
  white-space: nowrap;     /* Prevents wrapping on tablets */
  box-sizing: border-box;  /* Ensures padding doesn't break width */
  
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card--cta .ci-btn:hover {
  transform: translateY(-2px);
}

@media (min-width: 1024px) {
  .card--cta {
    margin-top: 2.75rem;
  }
}

/* Mobile: Full width confident button */
@media (max-width: 640px) {
  .card--cta .ci-btn {
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
    padding: 0.7rem 0.9rem; /* Match hero mobile padding */
    font-size: 0.95rem;     /* Match hero mobile font */
  }
}

/* Services grid: align intro copy so bullet lists start on the same row */
@media (min-width: 900px) {
  .services-grid .services-intro {
    height: 6.75rem; /* tweak up/down after eyeballing on desktop */
  }
}

/* Stacked/mobile layout: let intros size naturally */
@media (max-width: 899.98px) {
  .services-grid .services-intro {
    height: auto;
  }
}

/* ==================================================================== */
/* 4. HERO (VIDEO) + SUBPAGE HERO + SUBHEAD PILL + OVERFLOW CLAMP       */
/* ==================================================================== */

/* Support both new (.hero) and previous (.ci-hero) class names */
:is(.hero, .ci-hero){
  position: relative;
  min-height: clamp(420px, 72svh, 880px);
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 6%, white), #fff 60%);
  overflow: hidden;
}
@supports (height: 72dvh) {
  :is(.hero, .ci-hero){ min-height: 72dvh; }
}

/* Media fills the section */
:is(.hero__media, .ci-hero__media){ position:absolute; inset:0; overflow:hidden; }
:is(.hero__video, .ci-hero__video){
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  filter: brightness(0.78);
}

/* Content sits above the video */
:is(.hero__content, .ci-hero__content){
  position: relative; z-index: 1;
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: clamp(56px, 10vh, 110px) 16px 16px;
  text-align: center;
  color: var(--text);
}
:is(.hero__content, .ci-hero__content) h1{
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 1.2rem + 3vw, 3rem);
  line-height: 1.12;
}
:is(.hero__content, .ci-hero__content) p{
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: clamp(1rem, .6rem + 1vw, 1.125rem);
}

/* Hero text widths */
.hero__content .title {
  max-width: 22ch;
  margin-inline: auto;
}

.hero__content .subtitle {
  max-width: 34rem;
  margin-inline: auto;
  margin-bottom: 0.75rem;
  font-size: clamp(0.98rem, 0.7rem + 0.6vw, 1.05rem);
  color: rgba(249, 250, 251, 0.92);
}

/* --- BUTTONS: DESKTOP DEFAULTS --- */
.hero__cta,
.ci-hero__cta {
  display: flex;
  justify-content: center;
  align-items: center;
  /* Adds space between the side-by-side buttons */
  gap: 1.25rem; 
  flex-wrap: wrap;
  width: 100%;
  max-width: 42rem; /* Increased slightly to fit side-by-side buttons comfortably */
  margin-inline: auto;
}

/* Desktop Button Styling */
.hero__cta .ci-btn,
.ci-hero__cta .ci-btn {
  /* Locks both buttons to the same substantial width */
  min-width: 260px; 
  justify-content: center;
  letter-spacing: 0.025em;
  
  /* TUNING: Taller padding for a premium feel */
  padding: 0.95rem 1.5rem; 
  
  /* TUNING: Slightly larger text to match the button size */
  font-size: 1.05rem; 
  letter-spacing: 0.01em; /* Tiny bit of air for readability */
  
  white-space: nowrap; 
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Optional: Add a subtle lift on hover to make them feel tactile */
.hero__cta .ci-btn:hover,
.ci-hero__cta .ci-btn:hover {
  transform: translateY(-2px);
}

/* Footnote: its own full-width row inside the CTA flex container */
.hero-footnote {
  flex: 0 0 100%;
  width: 100%;
  max-width: 36rem;
  margin: 0.75rem auto 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(249, 250, 251, 0.78);
  text-align: center;
  text-wrap: balance;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  :is(.hero__video, .ci-hero__video){ display:none; }
  :is(.hero, .ci-hero){ background: url('/assets/video/hero-fallback.jpg') center/cover no-repeat, var(--bg-page); }
}

/* --- MOBILE & TABLET (Stacking Logic) ---------------------------------- */
@media (max-width: 640px){
  :is(.hero, .ci-hero){ min-height: clamp(520px, 84svh, 920px); }
  :is(.hero__video, .ci-hero__video){ object-position: 47.5% 100%; }
  
  :is(.hero__content, .ci-hero__content){
    padding-top: calc(var(--safe-top) + clamp(48px, 9vh, 96px));
    padding-inline: 14px;
  }
  
  :is(.hero__content, .ci-hero__content) h1{
    max-width: 16ch;
    margin-inline: auto;
    font-size: clamp(1.6rem, 5.2vw + .6rem, 2.1rem);
    line-height: 1.12;
    text-wrap: balance;
  }
  
  :is(.hero__content, .ci-hero__content) p{
    font-size: .95rem;
    margin-bottom: .9rem;
    text-shadow:
      0 0 2px rgba(0,0,0,.7),
      0 0 6px rgba(0,0,0,.35);
  }

  /* Force stack on mobile */
  .hero__cta,
  .ci-hero__cta{
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
  }

  /* Full width mobile buttons */
  .hero__cta .ci-btn,
  .ci-hero__cta .ci-btn {
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
  }
}

/* Laptop + desktop: subtly zoom video */
@media (min-width: 768px) {
  :is(.hero__video, .ci-hero__video){
    transform: scale(1.07);
    transform-origin: center center;
    object-position: 50% 82%;
  }
}

/* HERO contrast + overlay */

/* Light text over video */
:is(.hero, .ci-hero){
  color: #f9fafb;
}

/* Dark overlay so text doesn't blend into the DAG video */
:is(.hero, .ci-hero)::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at center,
      rgba(15, 23, 42, 0.45),
      rgba(15, 23, 42, 0.90)
    );
  z-index: 1;
  pointer-events: none;
}

/* Ensure stacking order: video → overlay → content */
:is(.hero__media, .ci-hero__media){ z-index: 0; }
:is(.hero__content, .ci-hero__content){
  position: relative;
  z-index: 2;
}

/* Stronger text styling over video */
:is(.hero__content, .ci-hero__content) h1,
:is(.hero__content, .ci-hero__content) p{
  color: #f9fafb;
  text-shadow:
    0 0 8px rgba(15, 23, 42, 0.85),
    0 0 18px rgba(15, 23, 42, 0.9);
}

/* Desktop hero polish */
@media (min-width: 1024px) {
  :is(.hero, .ci-hero)::before{
    background:
      radial-gradient(
        circle at center,
        rgba(15, 23, 42, 0.35),
        rgba(15, 23, 42, 0.75)
      );
  }

  :is(.hero__content, .ci-hero__content) h1{
    text-shadow:
      0 0 6px rgba(15, 23, 42, 0.8),
      0 0 14px rgba(15, 23, 42, 0.85);
  }

  :is(.hero__content, .ci-hero__content) p{
    text-shadow:
      0 0 4px rgba(15, 23, 42, 0.7),
      0 0 10px rgba(15, 23, 42, 0.75);
  }

  /* Increase font size slightly on large screens */
  .ci-btn{
    font-size: 1.05rem; 
  }

  :is(.hero__content, .ci-hero__content){
    padding-top: clamp(56px, 7vh, 104px);
    padding-bottom: clamp(48px, 11vh, 96px);
  }
}

/* Large desktop (27"+): drop the hero text slightly for better balance */
@media (min-width: 1440px) {
  :is(.hero__content, .ci-hero__content){
    padding-top: clamp(100px, 12.5vh, 144px);
    padding-bottom: clamp(56px, 11vh, 120px);
  }
}

/* Compact subpage heroes (Privacy/Terms/Security/Contact) */
.hero:has(.hero-simple) {
  position: relative;
  min-height: clamp(160px, 22svh, 320px);
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--accent) 4%, white),
    #fff 40%
  );
  color: var(--text);            /* back to normal dark text */
  margin-bottom: clamp(1.25rem, 3vh, 2rem); /* new: space before first card */
}

/* Mobile polish for simple subpage heroes (About / Projects / Services / Contact) */
@media (max-width: 640px) {
  /* Overall hero sizing & gap to first section */
  .hero:has(.hero-simple) {
    min-height: auto; /* let the content define the height */
    margin-bottom: 1.4rem;
  }

  .hero:has(.hero-simple) .hero-simple .stack {
    padding-block: 1.5rem 1.6rem;
  }

  /* Eyebrow label (ABOUT / PROJECTS / SERVICES / CONTACT) */
  .hero:has(.hero-simple) .kicker {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    margin-bottom: 0.3rem;
  }

  /* H1: slightly smaller + nicer wrap for long titles */
  .hero:has(.hero-simple) h1 {
    font-size: 1.9rem;
    line-height: 1.18;
    text-wrap: balance;
    margin-bottom: 0.75rem;
  }

  /* Intro copy under the H1 */
  .hero:has(.hero-simple) .subtitle,
  .hero:has(.hero-simple) p {
    font-size: 0.96rem;
    line-height: 1.6;
    max-width: var(--maxw-readable);
    margin-bottom: 0.9rem;
  }

  /* Keep the first section/card close, but not cramped */
  .hero:has(.hero-simple) + .section {
    padding-top: 0.75rem;
  }

  /* Services hero CTA button: confident width on mobile */
  .page--services .hero-simple .button.primary {
    margin-top: 1.1rem;
    width: 100%;
    max-width: 260px;
  }
}

/* Services page hero – mobile refinements */
@media (max-width: 640px) {
  .page--services .hero:has(.hero-simple) {
    /* Slightly shorter hero, bring the card a bit closer */
    margin-bottom: 1.1rem;
  }

  /* Headline: a hair smaller + balanced wrap */
  .page--services .hero-simple h1 {
    font-size: 1.8rem;
    line-height: 1.18;
    text-wrap: balance;
    max-width: 20ch;
  }

  /* Intro paragraphs under the H1 */
  .page--services .hero-simple .subtitle,
  .page--services .hero-simple p {
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: var(--maxw-readable);
  }

  /* CTA button spacing + width */
  .page--services .hero-simple .button.primary {
    margin-top: 1.25rem;  /* a bit more breathing room above the button */
    margin-bottom: 0.2rem;
    width: 100%;
    max-width: 260px;
  }
}

@media (max-width: 640px) {
  .page--services .hero-simple .subtitle {
    margin-bottom: 0.55rem;
  }

  .page--services .hero-simple p.muted {
    margin-bottom: 0.85rem;
  }
}

/* Projects page hero – mobile refinements */
@media (max-width: 640px) {
  .page--projects .hero:has(.hero-simple) {
    /* Slightly tighter gap before the first card */
    margin-bottom: 1.2rem;
  }

  /* Headline: a touch smaller + balanced wrap */
  .page--projects .hero-simple h1 {
    font-size: 1.8rem;
    line-height: 1.18;
    text-wrap: balance;
    max-width: 22ch;
  }

  /* Intro copy under the H1 */
  .page--projects .hero-simple .subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: var(--maxw-readable);
    margin-bottom: 0.8rem;
  }
}

/* Kill the dark video overlay on simple heroes */
.hero:has(.hero-simple)::before {
  content: none;
}

/* Inner layout + text reset */
.hero:has(.hero-simple) .hero-simple .stack {
  padding-block: clamp(16px, 3vh, 24px);
}
.hero:has(.hero-simple) .title,
.hero:has(.hero-simple) .subtitle {
  color: var(--text);
  text-shadow: none;
}
.hero:has(.hero-simple) .title {
  margin-bottom: 0.4rem;
}
.hero:has(.hero-simple) .subtitle {
  max-width: 60ch;
}

/* HERO SUBHEAD PILL (between hero and flagship card) */
.hero-subhead-pill {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;

  padding: 0.6rem 1.1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.4);

  max-width: min(720px, 94vw);
  margin: 0.85rem auto 1.75rem;
  position: relative;
  z-index: 3;
}

.hero-subhead-kicker {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-600, #0284c7);
  color: #f9fafb;
  white-space: nowrap;
}

.hero-subhead-text {
  font-weight: 400;
}

/* Tablet+: tuck it slightly up towards the hero */
@media (min-width: 768px) {
  .hero-subhead-pill {
    margin-top: -1.75rem;
    margin-bottom: 2.25rem;
    border-radius: 999px;
  }
}

/* Large desktop: a bit more overlap */
@media (min-width: 1200px) {
  .hero-subhead-pill {
    margin-top: -2.5rem;
  }
}

/* Laptop/desktop: lower the hero subhead pill so it doesn't cover the "load" task */
@media (min-width: 1024px) {
  .hero-subhead-pill {
    margin-top: -0.85rem;
    margin-bottom: 2.25rem;
  }
}

/* MOBILE HORIZONTAL OVERFLOW CLAMP
   Fixes the white gutter / grid peeking in on iOS/Chrome incognito. */
:is(.hero, .ci-hero), [data-full-bleed] {
  position: relative;
  overflow-x: clip;
}

/* Let the subhead pill overlap upward without being clipped */
:is(.hero, .ci-hero){
  overflow-y: visible;
}

/* If decorative backgrounds use pseudo-elements, keep them inside */
:is(.hero, .ci-hero)::before,
:is(.hero, .ci-hero)::after {
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  transform: none !important;
}

/* Figures/cards shouldn’t let children bleed past rounded corners */
figure, .card { overflow: hidden; }

/* Use dynamic viewport width when supported */
@supports (width: 100dvw) {
  :is(.hero, .ci-hero), [data-full-bleed] {
    inline-size: 100dvw;
    max-inline-size: 100dvw;
  }
}

/* Mobile container width tweaks */
@media (max-width: 768px) {
  .container { width: min(1100px, 94vw); }
  .header .container {
    width: min(1100px, 90vw);
  }
}

/* Data saver: fall back to hero image */
@media (prefers-reduced-data: reduce) {
  .hero__video, .ci-hero__video { display: none; }
  .hero, .ci-hero {
    background: url('/assets/video/hero-fallback.jpg') center/cover no-repeat, var(--bg-page);
  }
}

/* ==================================================================== */
/* 5. DIAGRAMS / PROOF GALLERY / LIGHTBOX / PROOF SHELL                 */
/* ==================================================================== */

/* Diagrams */
.proof-diagram.card {
  border-radius: 1rem;
  background: var(--bg-surface);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  padding: clamp(16px, 3vw, 28px);
  margin: clamp(16px, 3vw, 28px) auto;
}

.diagram-figure {
  margin: 0;
  position: relative;
  text-align: center;
  overflow: visible;
}

/* Extra breathing room between two diagram figures */
.diagram-figure + .diagram-figure {
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

@media (min-width: 1024px) {
  .diagram-figure .proof-zoom-pill {
    bottom: -1rem;
  }
}

.diagram {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin-inline: auto;
  cursor: zoom-in;
}

.diagram-caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 60ch;
  margin-inline: auto;
}

/* Extra breathing room under the security diagram on Projects (mobile) */
@media (max-width: 640px) {
  .page--projects .diagram-figure:last-of-type {
    margin-bottom: 1.75rem;
  }
}

/* Proof of Success gallery */
.proof-gallery .section-title { margin-block: 1.5rem; }

.proof-grid {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: start;
}

.proof-card { margin: 0; }
.proof-card figcaption {
  font-size: 0.95rem;
  line-height: 1.4;
  opacity: 0.85;
  margin-top: 0.5rem;
}

.proof-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.08);
}

.proof-zoom img { display: block; width: 100%; height: auto; }

/* Reusable 'Click to zoom' pill */
.proof-zoom-pill {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;

  background: rgb(255 255 255 / 0.86);
  color: #4b5563;
  border: 1px solid rgb(148 163 184 / 0.6);
  box-shadow: 0 4px 10px rgb(15 23 42 / 0.16);

  pointer-events: none;
  opacity: 0.2;
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

/* Specific override: Bottom-Left Zoom Pill for vertical diagram */
#diagram-architecture .proof-zoom-pill {
  right: auto;
  left: 0.6rem;
  bottom: 0.6rem;
}

/* On hover/focus, make it clear but still small */
.proof-figure__button:hover .proof-zoom-pill,
.proof-figure__button:focus-visible .proof-zoom-pill,
.proof-thumb:hover .proof-zoom-pill,
.proof-thumb:focus-visible .proof-zoom-pill {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* "Click to zoom" pill on touch devices */
@media (pointer: coarse) {
  .proof-zoom-pill {
    display: block;
  }
}

/* Proof of Success: 3-panel image */
.proof-figure {
  margin-top: 2rem;
  text-align: center;
}
.proof-figure__button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  position: relative;
  display: inline-block;
}

/* Slightly larger on desktop, but still responsive */
.proof-figure__img {
  width: 100%;
  max-width: 960px;
  height: auto;
  border-radius: 1.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.26);
}

/* Caption under the 3-panel image */
.proof-figure__caption {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4b5563;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.proof-figure__caption ol {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
}

@media (max-width: 640px) {
  .proof-figure {
    margin-top: 1.5rem;
  }

  .proof-figure__caption {
    font-size: 0.9rem;
    line-height: 1.55;
  }
}

/* Proof shell container */
.proof-shell {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
  margin-top: 0.75rem;
}

/* Main proof image (deduped block) */
.proof-shell img[data-proof-img] {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 1.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.26);
}

/* Carousel nav buttons (class version for re-use) */
.proof-shell__nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  cursor: pointer;
}
.proof-shell__nav-btn--prev { left: 0.4rem; }
.proof-shell__nav-btn--next { right: 0.4rem; }

/* Thumbnail button wrapper */
.proof-thumb {
  border: 0;
  padding: 0;
  background: none;
  display: block;
  position: relative;
}

/* Caption under the main proof image */
.proof-caption {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: #334155;
}

/* Anything that opens the lightbox should feel zoomable on desktop */
@media (pointer: fine) {
  .proof-thumb,
  .proof-figure__button,
  .diagram-figure .proof-figure__button {
    cursor: zoom-in;
  }
}

/* Lightbox base */
.lb[aria-hidden="false"] { display: block; }
.lb[hidden]             { display: none !important; }

/* Lightbox: centering, sizing, mobile behavior */

.lb {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0.75rem;
  overflow-x: hidden;
}

.lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
}

/* The white card that holds the image + caption */
.lb__stage {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  border-radius: 1.5rem;
  background: #ffffff;
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
}

/* Zoomed image */
.lb__img {
  width: 100%;
  max-height: calc(100vh - 7rem);
  object-fit: contain;
  border-radius: 1rem;
}

/* Close button */
.lb__close {
  position: absolute;
  top: 6px; right: 8px;
  font-size: 2rem; line-height: 1;
  width: 2.25rem; height: 2.25rem;
  border: none; background: transparent; color: #000;
  cursor: pointer;
}

/* Caption */
.lb__caption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #111827;
  text-wrap: balance;
}

/* Optional nav arrows (currently disabled in JS for panels) */
.lb__nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.lb__prev, .lb__next {
  pointer-events: auto;
  border: none;
  background: rgb(255 255 255 / 0.85);
  width: 2.5rem; height: 2.5rem;
  border-radius: 999px;
  font-size: 1.25rem;
  display: grid; place-items: center;
  cursor: pointer;
  margin: 0 0.5rem;
}

/* Small-screen polish */
@media (max-width: 768px) {
  .lb {
    padding: 2.25rem 0.75rem 2rem;
  }

  .lb__stage {
    border-radius: 1.25rem;
  }
}

/* ==================================================================== */
/* 6. PROJECTS PAGE: CHART / OPTIONS TABLE / TICKER SNAPSHOT / INSIGHTS */
/* ==================================================================== */

/* Inline chart (Export 1) */
.chart-shell {
  width: 100%;
  max-width: 960px;
  margin: 1rem auto 0;
  min-height: 260px;
}

/* Ensure Plotly figure fills the shell */
.chart-shell .js-plotly-plot,
.chart-shell .plotly-graph-div {
  width: 100% !important;
  height: 100% !important;
}

/* Loading / empty states */
.chart-loading,
.chart-empty {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.chart-loading {
  font-style: italic;
}

/* Small badge for the date window above Export 1 */
.chart-window-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  margin-right: 0.5rem;
  margin-bottom: 0.15rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle, #e5e7eb);
  background: var(--bg-subtle, #f3f4f6);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

/* === Center-align the subtitle and bridge text === */
.chart-bridge {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

.chart-subtitle {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 60ch;
}

/* Shared footnote style (used under charts *and* the bridge text) */
.chart-footnote {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 60ch;
  margin-inline: auto;
}

/* Bridge paragraph between diagrams and exports */
.chart-bridge {
  max-width: 60ch;
  margin: 1.1rem auto 0;
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text); /* normal body color so it reads as core copy */
}

@media (max-width: 640px) {
  .chart-bridge {
    font-size: 0.94rem;
    line-height: 1.65;
  }
}

/* Ticker selector on Projects chart */
.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.ticker-label select {
  font: inherit;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle, #e5e7eb);
  background-color: #fff;
}

/* Mobile tweaks for Export 1 */
@media (max-width: 640px) {
  .chart-shell {
    min-height: 220px;
    margin-top: 0.75rem;
    margin-inline: 0;
  }

  .chart-window-badge {
    display: inline-block;
    margin-right: 0;
    margin-bottom: 0.4rem;
  }

  .chart-subtitle {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.6rem;
  }

  .chart-footnote {
    font-size: 0.78rem;
    line-height: 1.5;
    margin-top: 0.6rem;
  }

  .ticker-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    font-size: 0.9rem;
  }
  .ticker-label select {
    padding: 0.25rem 0.75rem;
  }
}

/* Options top-contracts table (Export 2) */
.options-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.options-table thead {
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
}
.options-table th,
.options-table td {
  padding: 0.35rem 0.5rem;
  text-align: right;
  white-space: nowrap;
}
.options-table th:first-child,
.options-table td:first-child {
  text-align: left;
}
.options-table th:nth-child(2),
.options-table td:nth-child(2) {
  text-align: left;
}
.options-table tbody tr:nth-child(even) {
  background: var(--bg-subtle, #f9fafb);
}

/* Mobile tweaks for Export 2 */
@media (max-width: 640px) {
  .options-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.8rem;
  }
  .options-table th,
  .options-table td {
    padding: 0.3rem 0.4rem;
  }
}

.options-table th {
  cursor: pointer;
  user-select: none;
}
.options-table th[aria-sort="ascending"],
.options-table th[aria-sort="descending"] {
  text-decoration: underline;
}

/* Optional: controls row above options table */
.options-table-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}
.options-table-controls label {
  color: var(--text-muted);
}
.options-table-controls select {
  font-size: 0.85rem;
  padding: 0.15rem 0.4rem;
}

/* Status line under options table intro */
.options-table-status {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Pagination controls for options table */
.options-table-pagination-root {
  margin-top: 0.5rem;
}
.options-table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.options-table-pagination__controls {
  display: inline-flex;
  gap: 0.5rem;
}
.options-table-pagination__btn {
  font-size: 0.8rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle, #e5e7eb);
  background: #fff;
  cursor: pointer;
}
.options-table-pagination__btn[disabled] {
  opacity: 0.45;
  cursor: default;
}

/* Mobile-only hint to swipe table */
.table-scroll-hint {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .table-scroll-hint {
    display: block;
  }
}

/* Ticker daily features snapshot (Export 3) */
.ticker-features-shell {
  width: 100%;
  max-width: 560px;
  margin-top: 1rem;
  margin-inline: auto;
}
.ticker-features-latest {
  background: var(--bg-subtle, #f9fafb);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  font-size: 0.86rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--border-subtle, #e5e7eb);
}
.ticker-features-heading {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
}
.ticker-features-subtitle {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Definition-list grid for metrics */
.ticker-features-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 0.4rem;
  column-gap: 1.25rem;
  margin: 0;
}
@media (min-width: 540px) {
  .ticker-features-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ticker-features-summary-grid dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.ticker-features-summary-grid dd {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Mobile tweaks for Export 3 */
@media (max-width: 640px) {
  .ticker-features-shell {
    margin-top: 0.85rem;
    margin-inline: 0;
  }
  .ticker-features-latest {
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    font-size: 0.84rem;
  }
  .ticker-features-heading {
    font-size: 0.93rem;
    margin-bottom: 0.2rem;
  }
  .ticker-features-subtitle {
    font-size: 0.78rem;
    margin-bottom: 0.7rem;
  }
  .ticker-features-summary-grid {
    row-gap: 0.45rem;
  }
  .ticker-features-summary-grid dt {
    font-size: 0.68rem;
  }
  .ticker-features-summary-grid dd {
    font-size: 0.86rem;
    margin-bottom: 0.35rem;
  }
}

/* Code Snapshot inside Project Stats Card */
.code-snapshot {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.code-snapshot-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.code-snapshot-btn {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--gray-900); /* Dark bg matches code theme */
  position: relative; 
  cursor: zoom-in;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  
  /* --- NEW: VERTICAL SPACE SAVER --- */
  max-height: 380px; /* Controls the visible height. Tweak this if you want more/less. */
  overflow: hidden;  /* Cuts off the rest of the long image */
}

/* --- NEW: FADE OUT GRADIENT --- */
.code-snapshot-btn::after {
  content: "";
  position: absolute;
  bottom: 0; 
  left: 0; 
  right: 0;
  height: 140px; /* How tall the fade is */
  /* Gradient from transparent to dark (matching the code image background) */
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.2) 40%, rgba(0,0,0,0.9));
  pointer-events: none; /* Ensures clicks still register on the button */
  z-index: 1;
}

.code-snapshot-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent-400);
  box-shadow: var(--shadow-sm);
}

/* Ensure the zoom pill on the button is clearly visible */
.code-snapshot-btn:hover .proof-zoom-pill,
.code-snapshot-btn:focus-visible .proof-zoom-pill {
  opacity: 1;
  transform: translateY(-1px);
}

.code-snapshot-img {
  width: 100%;
  height: auto;
  display: block;
  filter: contrast(1.05);
  /* Ensures we see the top of the SQL logic (the CTEs) first */
  object-position: top center; 
}

/* Positioning the zoom pill */
.code-snapshot-btn .proof-zoom-pill {
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--gray-900);
  border: none;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  opacity: 0.9; 
  z-index: 2; /* IMPORTANT: Keeps the button above the fade layer */
}

/* Insights Section */
.insights-panel {
  background: var(--gray-50); 
  border: 1px solid var(--gray-200);
  
  border-radius: 0.75rem;
  padding: 1.75rem 2rem;
  max-width: 70ch;
  margin: 2.5rem auto 0;
  line-height: 1.6;
}
.insights-panel h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}
.insights-panel > p {
  margin-bottom: 1.4rem;
}

/* 1. The pseudo-code metadata block */
.insights-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  margin-top: -0.5rem;
  display: block;
  color: var(--text-muted);
}

/* 2. The legal/risk disclaimer */
.insights-disclaimer {
  font-size: 0.8rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
  color: var(--text-muted);
}

/* Section labels inside insights */
.insights-panel h4 {
  font-size: 0.78rem;
  font-weight: 600; /* Increased weight slightly for better contrast */
  text-transform: uppercase;
  letter-spacing: 0.09em;
  
  /* Cloud Theme: Matching the Snapshot Badge style */
  color: var(--accent-800);              /* Deep Blue text */
  background: var(--accent-100);         /* Light Blue Cloud background */
  border: 1px solid var(--accent-200);   /* Soft Blue border for definition */
  
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  
  margin-top: 1.4rem;
  margin-bottom: 0.6rem;
}

/* Bullet lists & spacing */
.insights-panel ul {
  margin: 0 0 1.15rem;
  padding-left: 1.35rem;
}
.insights-panel li + li {
  margin-top: 0.45rem;
}
.insights-panel li strong {
  font-weight: 600;
}

@media (max-width: 640px) {
  .insights-panel {
    padding: 1.5rem 1.35rem;
    margin-top: 2rem;
    max-width: 100%;
  }
  .insights-panel h3 {
    margin-bottom: 0.85rem;
  }
  .insights-panel > p {
    margin-bottom: 1rem;
  }
  .insights-panel h4 {
    font-size: 0.75rem;
    padding: 0.14rem 0.5rem;
    margin-top: 1.15rem;
  }
}

/* ==================================================================== */
/* 7. CONTACT FORM & PAGE-SPECIFIC CARD SPACING                         */
/* ==================================================================== */

.contact-form {
  --field-radius: 0.75rem;
  --field-border-muted: color-mix(in oklab, var(--accent) 6%, #e5e7eb);
  --field-border-strong: color-mix(in oklab, var(--accent) 25%, #d1d5db);
  --field-bg: #ffffff;

  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Slightly less constraint on smaller screens if desired */
@media (max-width: 768px) {
  .contact-form {
    max-width: 100%;
  }
}

.contact-form .field {
  text-align: left;
}
.contact-form .field-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-subtle, #374151);
}
.contact-form .required {
  color: var(--accent-500, var(--accent));
  font-weight: 600;
}
.contact-form .field-optional {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--field-radius);
  border: 1px solid var(--field-border-muted);
  background: var(--field-bg);
  font: inherit;
  line-height: 1.4;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    background-color 120ms ease;
}
.contact-form textarea {
  resize: vertical;
  min-height: 6rem;
}

.contact-form input[type="text"]:focus-visible,
.contact-form input[type="email"]:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
  border-color: var(--field-border-strong);
  box-shadow: 0 0 0 1px var(--accent-200);
}

/* Make the select look a bit nicer cross-browser */
.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 9px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.contact-form .form-footnote {
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
  margin-top: 0.25rem;
}

/* Contact page card spacing */
.page--contact .card,
.page--contact .contact-card {
  padding-inline: clamp(1.75rem, 4vw, 2.5rem);
}
@media (max-width: 640px) {
  .page--contact .card,
  .page--contact .contact-card {
    padding-inline: 1.25rem;
  }
}

/* Keep everything full-width inside the form */
.page--contact .contact-form .field,
.page--contact .contact-form button,
.page--contact .contact-form .form-footnote {
  width: 100%;
}

/* Contact form: ensure all controls are the same width */
.page--contact .contact-form select,
.page--contact .contact-form button.button {
  display: block;
  width: 100% !important;
  box-sizing: border-box;
}

/* ==================================================================== */
/* 7b. CONTACT FORM – FINAL ALIGNMENT OVERRIDE                          */
/* ==================================================================== */

.page--contact .card.card--narrow .contact-form {
  /* Let the form itself stretch to the full inner width of the card */
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0 0;
}

.page--contact .card.card--narrow .contact-form .field,
.page--contact .card.card--narrow .contact-form input[type="text"],
.page--contact .card.card--narrow .contact-form input[type="email"],
.page--contact .card.card--narrow .contact-form select,
.page--contact .card.card--narrow .contact-form textarea,
.page--contact .card.card--narrow .contact-form button {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* ==================================================================== */
/* 8. FORMSPREE THANK YOU PAGE                                          */
/* ==================================================================== */

/* Let the hero be as tall as its content (no extra vertical stretch) */
.page--thank-you .hero {
  min-height: auto;
}

/* Small, consistent gap between hero and card */
.page--thank-you .hero:has(.hero-simple) {
  margin-bottom: 1rem;
}

/* Keep the card close to both hero and footer */
.page--thank-you .section {
  padding-top: 0;
  padding-bottom: 0.75rem;
}

/* Remove extra vertical margin around the card itself */
.page--thank-you .card.card--narrow {
  margin-top: 0;
  margin-bottom: 0;
}

/* Tighten the footer gap on this page only */
.page--thank-you .footer {
  margin-top: 0.75rem;
}

/* Thank-you page: mobile refinements */
@media (max-width: 640px) {
  /* Hero spacing + typography */
  .page--thank-you .hero:has(.hero-simple) .hero-simple .stack {
    padding-block: 1.5rem 1.6rem;
  }

  .page--thank-you .hero-simple h1 {
    font-size: 1.9rem;
    line-height: 1.18;
    text-wrap: balance;
    margin-bottom: 0.8rem;
  }

  .page--thank-you .hero-simple .subtitle {
    font-size: 0.96rem;
    line-height: 1.6;
    max-width: var(--maxw-readable);
    margin-bottom: 1rem;
  }

  /* Card padding + typography */
  .page--thank-you .card.card--narrow {
    padding-inline: 1.25rem;
    padding-block: 1.4rem 1.5rem;
  }

  .page--thank-you .card.card--narrow h2 {
    font-size: 1.55rem;
    margin-bottom: 0.8rem;
  }

  .page--thank-you .card.card--narrow p,
  .page--thank-you .card.card--narrow li {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .page--thank-you .card.card--narrow ul {
    padding-left: 1.25rem;
    margin-bottom: 1.1rem;
  }

  /* CTA buttons: confident, centered, full-width-ish */
  .page--thank-you .card.card--narrow .button {
    width: 100%;
    max-width: 260px;
    margin-inline: auto;
    justify-content: center;
  }
}

/* ==================================================================== */
/* 9. BLOG & ARTICLES                                                   */
/* ==================================================================== */

/* Blog Index: Card Links */
.blog-link-wrapper {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Hover: highlight the title, keep the rest neutral */
.blog-link-wrapper:hover h2 {
  color: var(--link-hover);
  text-decoration: underline;
}

.read-more {
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--link);
}

/* Blog Post: Typography Overrides */
.article-body ul, 
.article-body ol {
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body li strong {
  color: var(--gray-800);
}

/* Blog Post: Images */
.article-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  margin: 1.5rem 0 2rem 0;
  box-shadow: var(--shadow-sm);
}

/* Remove border from architecture diagrams in blog posts */
.article-img.diagram-clean {
  border: none;
  box-shadow: none;
  background: transparent;
}

/* Component: Pro-Tip / Engineering Note Box */
.pro-tip {
  background-color: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 2.5rem;
}

.pro-tip h3 {
  margin-top: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-800);
}

.file-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--link);
  text-decoration: underline;
  word-break: break-all;
}

.file-link:hover {
  color: var(--link-hover);
}

/* Fix for the "Back to Blog" link in the Kicker */
.kicker a {
  color: inherit;
  text-decoration: none;
}
.kicker a:hover {
  text-decoration: underline;
}

/* Small footer note inside Pro-Tip box */
.pro-tip-footer {
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* ==================================================================== */
/* 10. SUBPAGE LAYOUT POLISH (All Pages)                                */
/* ==================================================================== */

/* Forces the "Simple Hero" (used on About, Projects, Services, Blog)
   to be centered. This fixes the "left-heavy" feel on wide screens.
*/
.hero-simple .stack {
  text-align: center;
  align-items: center; /* Centers flex items vertically/horizontally depending on dir */
  margin-inline: auto;
  max-width: 800px;    /* Prevents header text from getting unreadably wide */
}

.hero-simple .subtitle {
  margin-inline: auto;
}

/* Ensures the content cards (About cards, Project cards) 
   are strictly centered in the viewport.
*/
.card--narrow {
  margin-inline: auto !important;
}

/* Optional: Center the CTA buttons in the hero if they wrap */
.hero__cta,
.ci-hero__cta {
  justify-content: center;
}

/* ==================================================================== */
/* 11. DASHBOARD GRID & CHARTS (Projects Page)                          */
/* ==================================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  /* Span both columns for wide tables */
  .dashboard-grid .full-width {
    grid-column: span 2;
  }
}

.chart-container {
  background: var(--bg-surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  min-height: 420px; /* Prevents visual collapse while fetching data */
  display: flex;
  flex-direction: column;
}

.chart-header {
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 0.75rem;
}

.chart-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 0.25rem 0;
}

.chart-meta {
  font-size: 0.85rem;
  color: var(--gray-500);
  display: block;
}

/* "Snapshot" Badge */
.snapshot-badge {
  display: inline-block;
  background: var(--accent-100); /* Light blue */
  color: var(--accent-800);      /* Dark blue text */
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Target div for Plotly/JS injection */
.chart-target {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 300px;
}

/* Mobile: Allow charts/tables to shrink below content width so they can scroll */
@media (max-width: 640px) {
  .chart-container,
  .chart-target {
    min-width: 0;
  }
}

/* Loading & Empty States */
.chart-loading,
.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}

/* "Year in Review" Alert Box */
/* Using distinct orange tones to differentiate from the blue brand theme */
.callout-alert {
  background-color: #fff7ed; /* Orange-50 */
  border-left: 4px solid #f97316; /* Orange-500 */
  color: #9a3412; /* Orange-900 */
  padding: 1rem;
  margin-bottom: 2rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.5;
}

.callout-alert strong {
  font-weight: 600;
  color: #c2410c; /* Orange-700 */
  display: block;
  margin-bottom: 0.25rem;
}

/* Descriptive blurb under chart headers (e.g. Chaos Scatter) */
.chart-explainer {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1rem 0;
  line-height: 1.5;
  max-width: 65ch;
}

/* ==================================================================== */
/* 12. PROJECT ALERTS & CHART EXPLAINERS                                */
/* ==================================================================== */

.callout-alert {
  /* Cloud Theme: Using the site's defined blue variables */
  background-color: var(--accent-50);   /* Very light blue tint */
  border-left: 4px solid var(--accent); /* Primary Brand Blue (#0ea5e9) */
  color: var(--accent-900);             /* Deep Blue text for readability */
  
  /* Keep existing layout styles */
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

.callout-alert-title {
  display: block;
  color: var(--accent-700); /* Slightly brighter deep blue for the headline */
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

/* Reset for standard bold text inside the alert */
.callout-alert strong {
  font-weight: 600;
  color: inherit; /* Inherits the deep blue from parent */
  display: inline;
}

/* Descriptive blurb under chart headers */
.chart-explainer {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1.25rem 0;
  line-height: 1.5;
  max-width: 65ch;
}

/* ==================================================================== */
/* 13. COMPONENT UPDATES (Ticker Footer)                                */
/* ==================================================================== */

.ticker-features-footer {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--gray-200); /* Matches existing border tokens */
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.ticker-features-footer strong {
  font-weight: 600;
  color: var(--gray-700); /* Slightly darker than muted text for contrast */
}

.ticker-features-summary-grid .unit {
  font-size: 0.85em;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.2rem;
}

/* Code Snapshot inside Project Stats Card */
.code-snapshot {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.code-snapshot-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.code-snapshot-btn {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: var(--gray-900); /* Dark background prevents white flashes while loading */
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  position: relative; /* Context for the zoom pill */
}

.code-snapshot-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent-400);
  box-shadow: var(--shadow-sm);
}

.code-snapshot-img {
  width: 100%;
  height: auto;
  display: block;
  /* Slight contrast boost makes code highlight syntax pop */
  filter: contrast(1.05);
}

/* Ensure the zoom pill sits correctly on top of the code image */
.code-snapshot-btn .proof-zoom-pill {
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--gray-900);
  border: none;
  opacity: 0.9; /* More visible by default on this complex image */
}

/* ==================================================================== */
/* 14. ACCESSIBILITY: HIGH CONTRAST / FORCED COLORS FIX                 */
/* ==================================================================== */

@media (forced-colors: active) {
  /* 1. Force borders on containers so structure is visible without shadows/backgrounds */
  .card, 
  .proof-diagram, 
  .hero-subhead-pill,
  .ticker-features-latest,
  .insights-panel,
  .callout-alert,
  .ticker-features-footer,
  .code-snapshot {
    border: 2px solid CanvasText !important;
    box-shadow: none !important;
    background: Canvas !important; /* Ensures strictly opaque background */
  }

  /* 2. Ensure interactive elements have clear, distinct boundaries */
  .button, 
  .ci-btn, 
  .proof-zoom-pill,
  .input,
  select {
    border: 2px solid ButtonText !important;
  }

  /* 3. Fix Hero Section: Strip video and overlay so text sits on plain system background */
  .hero, .ci-hero {
    background: Canvas !important;
    color: CanvasText !important;
  }
  
  /* Hide the video media AND the dark overlay */
  .hero::before, .ci-hero::before,
  .hero__media, .ci-hero__media,
  .hero__video, .ci-hero__video {
    display: none !important;
  }

  /* 4. Safety Check: Force revealed state */
  /* Ensures content is visible even if animations fail or are suppressed by the OS */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ==================================================================== */
/* 14. TECH STACK BAR + PAIN POINTS GRID                                */
/* ==================================================================== */

.tech-stack-bar {
  padding: 0 0 2rem;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.02));
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.tech-stack-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: #9ca3af; /* Slightly lighter to reduce visual noise */
  margin-bottom: 1rem;
  text-align: center;
}

.tech-stack-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem 3rem; 
}

.tech-stack-logo {
  height: 36px; /* Bumps size up for better legibility */
  width: auto;
  
  /* The Fixes */
  filter: grayscale(100%);
  opacity: 0.6;
  mix-blend-mode: multiply; /* REMOVES THE WHITE BOX on the AWS logo */
  
  transition: all 0.3s ease;
}

.tech-stack-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  mix-blend-mode: normal; /* Restores color/white on hover if needed */
  transform: translateY(-1px); /* Subtle lift */
}

/* Mobile tweak */
@media (max-width: 600px) {
  .tech-stack-grid {
    gap: 1.5rem 2rem;
  }
  .tech-stack-logo {
    height: 28px;
  }
}

/* ==================================================================== */
/* 14. DARK MODE PAIN POINTS SECTION (Refined "Terminal" Look)          */
/* ==================================================================== */

/* Full-width dark container */
.pain-points-section {
  background-color: #111827; /* Gray-900 */
  color: #f3f4f6;            /* Gray-100 text */
  padding-block: 6rem;       
  position: relative;
  
  /* TWEAK 1: A subtle seam line to separate from the white section above */
  border-top: 1px solid #374151; 
}

/* The Layout Wrapper */
.split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: start;
}

/* Desktop: Side-by-Side */
@media (min-width: 900px) {
  .split-layout {
    grid-template-columns: 1fr 1.5fr; 
    gap: 5rem;
  }
  
  .split-content {
    position: sticky;
    top: 8rem; 
  }
}

/* Typography */
.split-content h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff; 
  margin-bottom: 1.5rem;
  text-wrap: balance; 
}

.split-content h2 em {
  display: block;
  color: #9ca3af; /* Gray-400 */
  font-style: italic;
  font-weight: 400;
  font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;
  margin-top: 0.1rem;
}

.intro-text {
  font-size: 1.125rem;
  line-height: 1.6;
  color: #d1d5db; /* Gray-300 */
  max-width: 32ch;
  font-weight: 450;
}

/* Kicker Line */
.split-content::before {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  background: var(--accent); 
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

/* Right Side Stack */
.split-grid {
  display: grid;
  grid-template-columns: 1fr; 
  gap: 1.25rem; 
}

/* DARK CARD STYLING */
.card--feature {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  
  background-color: #1f2937; /* Gray-800 */
  border: 1px solid #374151; /* Gray-700 */
  border-radius: var(--radius-lg);
  
  /* TWEAK 2: "Inner Bevel" - Adds a 1px white highlight at the top to give depth */
  box-shadow: 
    0 1px 0 0 rgba(255, 255, 255, 0.05) inset, 
    0 4px 6px -1px rgba(0, 0, 0, 0.5);
  
  transition: transform var(--transition), border-color var(--transition);
}

.card--feature:hover {
  transform: translateY(-2px);
  border-color: var(--accent); /* Blue border glow on hover */
}

/* Title with Icon */
.feature-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Dark Icon Bubbles */
.feature-title span[aria-hidden="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background-color: #374151; 
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
}

/* The Pain/Fix Rows */
.feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* TWEAK 3: Monospace font for labels = Engineering Aesthetic */
.f-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em; /* Open tracking for monospace */
  font-weight: 700;
  text-align: right;
  padding-top: 0.2rem;
  opacity: 0.9;
}

/* Pain Row */
.f-pain { 
  color: #f87171; /* Red-400 */
}
.feature-row:has(.f-pain) .f-content {
  color: #9ca3af; /* Gray-400 */
  text-decoration: line-through;
  text-decoration-color: #4b5563; /* Darker strikethrough line */
}

/* Fix Row */
.f-fix { 
  color: #34d399; /* Emerald-400 */
}
.feature-row:has(.f-fix) .f-content {
  color: #ffffff; 
  font-weight: 500;
}

/* ==================================================================== */
/* 15. PROOF OF SUCCESS: SYSTEM CONSOLE STYLE                           */
/* ==================================================================== */

/* Container for the whole "Console" look */
.proof-console {
  margin-top: 1.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden; /* Clips the children to the border radius */
  background-color: var(--bg-subtle, #f9fafb);
}

/* 1. Status Bar (Top) */
.proof-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 0.75rem 1rem;
  background-color: #f1f5f9; /* Slate-100 */
  border-bottom: 1px solid var(--gray-200);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.75rem;
  color: var(--gray-600);
  letter-spacing: 0.05em;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981; /* Emerald-500 */
  border-radius: 50%;
  display: inline-block;
}

/* "Live" pulsing animation */
.status-dot.pulse {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 2. Image Tweaks */
.proof-console .proof-figure {
  margin: 0; /* Remove default margins inside this container */
  border-bottom: 1px solid var(--gray-200);
}

.proof-console .proof-figure__img {
  border-radius: 0; /* Remove rounded corners since it's inside the console */
  box-shadow: none; /* Remove shadow, the container has the border */
  display: block;
}

/* 3. Breakdown Grid (Bottom) */
.proof-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Slightly wider min-width */
  gap: 2rem; /* More breathing room between columns */
  padding: 2rem; /* More internal padding */
  background-color: #ffffff;
}

.proof-point {
  font-size: 0.9rem;
  line-height: 1.5;
  /* The Fix: Strong top border aligns content perfectly */
  border-top: 2px solid var(--gray-200); 
  padding-top: 1rem;
}

.proof-num {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.75rem; /* Slightly larger for readability */
  color: var(--accent-600);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.proof-point strong {
  color: var(--gray-900);
  display: block;
  font-weight: 700;
  font-size: 0.95rem; /* Distinct hierarchy */
  margin-bottom: 0.35rem;
}

.proof-point p {
  color: var(--gray-600);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Mobile Tweak: Stack vertically */
@media (max-width: 600px) {
  .proof-breakdown-grid {
    grid-template-columns: 1fr; 
    gap: 1.5rem;
    padding: 1.5rem;
  }
}
