/* marketing.css — Shield Unified Design DNA */

/* Design Tokens & CSS Variables — "Rose + Slate" theme
   Warm blush background (trauma-informed, supportive) paired with slate ink
   for serious SaaS-grade readability. Pink accents stay — only the
   foreground flips from wine to slate. */
:root {
  --bg: #F0F9FF;            /* sky-50 — soft blue-white page bg */
  --bg-secondary: #E0F2FE;  /* sky-100 — for alternating sections */
  --bg-3: #BAE6FD;          /* sky-200 — for inputs / hovers */
  --card: #FFFFFF;          /* pure white cards on sky */
  --card-tinted: #F0F9FF;   /* barely-blue cards for subtle differentiation */
  --border: #7DD3FC;        /* sky-300 — visible border */
  --border-hover: #38BDF8;  /* sky-400 — hover */

  --fg: #0F172A;            /* slate-900 — confident, trust-blue readability */
  --fg-secondary: #475569;  /* slate-600 — body copy */
  --fg-muted: #64748B;      /* slate-500 — meta labels, captions */

  --accent: #0EA5E9;        /* sky-500 — primary CTA, links (OF-inspired) */
  --accent-2: #0284C7;      /* sky-600 — hover */
  --accent-3: #7DD3FC;      /* sky-300 — soft accents */
  --accent-ink: #0F172A;    /* slate-900 — "trust" CTAs (Sign in, Get started) */
  --accent-ink-hover: #1E293B;
  --info: #0369A1;          /* sky-700 — for code/terminal blocks */
  --danger: #B91C1C;        /* deep red */
  --success: #047857;       /* emerald-700 */
  --warning: #C2410C;       /* orange-700 */

  --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-editorial: 'Instrument Serif', serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-width: 1280px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --transition-duration: 250ms;

  /* Sky-tinted shadows — match the brand accent */
  --shadow-soft: 0 4px 20px rgba(14, 165, 233, 0.10);
  --shadow-hover: 0 12px 32px rgba(14, 165, 233, 0.18);
  --shadow-card: 0 2px 8px rgba(125, 211, 252, 0.45);

  /* Browser chrome color (referenced from <meta name="theme-color">) */
  --theme-color: #0EA5E9;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  color: var(--fg);
  font-weight: 500;
  letter-spacing: -0.02em;
}

p {
  color: var(--fg-secondary);
}

a {
  color: inherit;
  text-decoration: none;
}

em {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 400;
}

/* Accessibility visible focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Layout System */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

section {
  padding: 96px 0;
  position: relative;
  scroll-margin-top: 100px;
}

section:nth-child(even) {
  background-color: transparent;
}

.section-header {
  max-width: 800px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.section-title {
  font-size: clamp(34px, 4.4vw, 46px);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1.5px;
  text-wrap: balance;
}

.section-desc {
  font-size: 18px;
  color: var(--fg-secondary);
  max-width: 650px;
  margin: 0 auto;
}

/* Buttons Styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-duration) var(--ease);
  border: 1px solid transparent;
  text-align: center;
}

.btn-primary {
  background-color: var(--fg);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15);
}

.btn-secondary {
  background-color: transparent;
  color: var(--fg);
  border-color: var(--border-hover);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--fg);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.05);
}

.btn-text {
  color: var(--fg-secondary);
  background: none;
  border: none;
  font-weight: 500;
  transition: color var(--transition-duration) var(--ease);
}

.btn-text:hover {
  color: var(--fg);
}

.btn-large {
  padding: 18px 36px;
  font-size: 16px;
}

/* Card Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 400ms var(--ease);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
}

/* Custom Border Glow Pseudo-element */
.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 20px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.08), transparent);
  border-radius: 20px 20px 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-duration) var(--ease);
  z-index: 1;
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  color: var(--fg);
  margin-bottom: 32px;
  display: flex;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}

.card-title {
  font-size: 20px;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.card-body {
  font-size: 16px;
  color: var(--fg-secondary);
  flex: 1;
  line-height: 1.6;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 32px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Floating Navigation */
.nav-wrapper {
  position: fixed;
  top: 24px;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-duration) var(--ease);
}

.nav-pill {
  background: #FFFFFF;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-width: 1200px;
  margin: 0 auto;
  width: calc(100% - 48px);
  transition: all var(--transition-duration) var(--ease);
  box-shadow: var(--shadow-soft);
}

.nav-pill.scrolled {
  padding: 14px 24px;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-color: var(--accent-2);
  box-shadow: var(--shadow-hover);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--fg);
  border-radius: 6px;
  color: var(--bg);
}

.brand-logo svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.5;
}

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

.nav-links a {
  font-size: 15px;
  color: var(--fg-secondary);
  position: relative;
  transition: color var(--transition-duration) var(--ease);
  text-decoration: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--fg);
  transition: width var(--transition-duration) var(--ease);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--fg);
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

/* Nav dropdown — used for grouped menu items (For You, Resources) */
.nav-item-dropdown {
  position: relative;
}
.nav-item-dropdown > .nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  color: var(--fg-secondary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.nav-item-dropdown > .nav-trigger::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  margin-left: 2px;
  transition: transform var(--transition-duration) var(--ease);
}
.nav-item-dropdown.open > .nav-trigger::after {
  transform: rotate(225deg) translateY(-1px);
}
.nav-item-dropdown .nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  min-width: 240px;
  box-shadow: 0 16px 40px -16px rgba(15, 23, 42, 0.2);
  display: none;
  z-index: 1000;
}
/* Invisible bridge — keeps hover state alive when moving from trigger to dropdown */
.nav-item-dropdown .nav-dropdown::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
  background: transparent;
}
.nav-item-dropdown.open .nav-dropdown,
.nav-item-dropdown:hover .nav-dropdown {
  display: block;
  transform: translateX(-50%) translateY(0);
  animation: navDropdownIn 180ms var(--ease);
}
@keyframes navDropdownIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.nav-dropdown a {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 150ms var(--ease);
}
.nav-dropdown a:hover {
  background-color: var(--bg);
}
.nav-dropdown a .nav-dropdown-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 2px;
}
.nav-dropdown a .nav-dropdown-desc {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.4;
}
.nav-dropdown a::after {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg);
  padding: 4px;
}

.burger-btn svg line {
  transition: transform var(--transition-duration) var(--ease), opacity var(--transition-duration) var(--ease);
  transform-origin: center;
}

.burger-btn.active .line-mid {
  opacity: 0;
}

.burger-btn.active .line-top {
  transform: translateY(6px) rotate(45deg);
}

.burger-btn.active .line-bot {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Overlay Menu */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(240, 249, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  padding: 96px 24px 32px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-duration) var(--ease);
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-section:last-of-type {
  border-bottom: none;
}
.mobile-menu-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 8px;
  padding: 0 12px;
}
.mobile-menu-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
.mobile-menu-links a {
  font-size: 17px;
  color: var(--fg);
  font-weight: 500;
  padding: 12px;
  border-radius: 8px;
  transition: background-color 150ms var(--ease);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-menu-links a:hover, .mobile-menu-links a.active {
  background-color: rgba(14, 165, 233, 0.08);
}
.mobile-menu-links a::after {
  content: '\2192';
  color: var(--fg-muted);
  font-size: 16px;
  margin-left: 8px;
}
.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
  padding: 0 0 16px;
}
.mobile-menu-footer {
  margin-top: auto;
  padding: 20px 12px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 13px;
  color: var(--fg-muted);
}
.mobile-menu-footer a {
  color: var(--fg-secondary);
  text-decoration: none;
}
.mobile-menu-footer a:hover {
  color: var(--accent);
}

@media (max-width: 1024px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .burger-btn {
    display: flex;
  }
}

/* Hero Sections (Landing vs Subpages) */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 160px;
  padding-bottom: 96px;
  position: relative;
}

.hero-radial {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero-noise {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  z-index: 1;
}

.hero-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--fg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  background-color: rgba(255, 255, 255, 0.02);
  display: inline-block;
  margin-bottom: 32px;
  text-transform: uppercase;
}

.hero .hero-title {
  font-size: clamp(40px, 6.4vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  margin-bottom: 28px;
  letter-spacing: -2px;
  text-wrap: balance;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-desc {
  font-size: 20px;
  color: var(--fg-secondary);
  max-width: 650px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 80px;
}

.hero-trust {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--fg-secondary);
}

.trust-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--success);
}

.hero-section {
  padding-top: 140px;
  padding-bottom: 80px;
  text-align: center;
  position: relative;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: block;
}

.hero-section .hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -2px;
  text-wrap: balance;
}

/* Staggered Hero Reveals */
.hero-reveal {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 600ms var(--ease) forwards;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll-triggered reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.stagger-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.stagger-item.active {
  opacity: 1;
  transform: translateY(0);
}

/* Statistics Section */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

@media (max-width: 1024px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
  }
}

@media (max-width: 600px) {
  .stats-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(48px, 6vw, 64px);
  font-weight: 500;
  line-height: 1;
  color: var(--fg);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 15px;
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Alternating Editorial Sections */
.editorial-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: center;
  margin-bottom: 140px;
}

.editorial-row:nth-child(even) {
  grid-template-columns: 1.2fr 1fr;
}

.editorial-row:last-child {
  margin-bottom: 0;
}

.editorial-text h3 {
  font-family: var(--font-ui);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 1.25rem;
}

.editorial-text p {
  font-size: 16.5px;
  color: var(--fg-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.editorial-benefits {
  list-style: none;
  margin-bottom: 2rem;
}

.editorial-benefits li {
  font-size: 15px;
  color: var(--fg-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.editorial-benefits li::before {
  content: '✓';
  color: var(--accent);
  font-weight: bold;
}

/* Timeline Layout */
.timeline-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
}

.timeline-line {
  position: absolute;
  top: 0;
  left: 4px;
  width: 1px;
  height: 100%;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--fg);
  border: 2px solid var(--bg);
  z-index: 2;
}

.timeline-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.timeline-title {
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 1rem;
}

.timeline-body {
  color: var(--fg-secondary);
  font-size: 16px;
  line-height: 1.7;
}

/* Flow Row Layout */
.flow-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 60px;
}

.flow-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  flex: 1;
  min-width: 160px;
  position: relative;
  transition: border-color 0.2s;
}

.flow-step:hover {
  border-color: var(--border-hover);
}

.flow-step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
}

.flow-step-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg);
}

.flow-connector {
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Interface Preview Grid Mockup */
.mockup-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  height: 520px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  margin-top: 80px;
}

.mockup-sidebar {
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mockup-nav-item {
  height: 36px;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  width: 100%;
}

.mockup-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mockup-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mockup-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.mockup-stat-card {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  padding: 16px;
}

.mockup-table {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  flex: 1;
  padding: 16px;
}

/* Pricing Grid — 4 monthly tiers + wide creator banner below */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* Creator callout — clean horizontal strip below the 4 monthly tiers */
.creator-callout {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  background-color: #0F172A;
  color: #FFFFFF;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 28px 32px;
  margin: 32px 0 40px;
  text-decoration: none;
  transition: all 300ms var(--ease);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.5);
}
.creator-callout::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.35) 0%, transparent 70%);
  pointer-events: none;
}
.creator-callout:hover {
  transform: translateY(-3px);
  border-color: #0EA5E9;
  box-shadow: 0 16px 40px -16px rgba(14, 165, 233, 0.5);
}
.creator-callout-body,
.creator-callout-cta {
  position: relative;
  z-index: 1;
}
.creator-callout-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7DD3FC;
  margin-bottom: 8px;
}
.creator-callout-title {
  font-size: 19px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 6px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.creator-callout-desc {
  font-size: 14.5px;
  color: #CBD5E1;
  line-height: 1.55;
  max-width: 60ch;
}
.creator-callout-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 1;
}
.creator-callout-price {
  font-size: 30px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
  letter-spacing: -0.02em;
}
.creator-callout-price span {
  font-size: 14px;
  font-weight: 500;
  color: #CBD5E1;
  margin-left: 4px;
  letter-spacing: 0;
}
.creator-callout-action {
  font-size: 13px;
  color: #7DD3FC;
  font-weight: 600;
  letter-spacing: 0.01em;
}

@media (max-width: 768px) {
  .creator-callout {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: left;
    padding: 24px;
  }
  .creator-callout-cta {
    align-items: flex-start;
  }
  .creator-callout-desc {
    max-width: none;
  }
}

.price-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 400ms var(--ease);
  position: relative;
}

.price-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
}

.price-card.featured {
  border-color: var(--accent);
  padding: 48px 24px 40px;
  transform: translateY(-4px);
}

.price-card.featured:hover {
  transform: translateY(-10px);
}

.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-tier {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.price-val {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 8px;
}

.price-val span {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--fg-muted);
}

.price-desc {
  font-size: 14.5px;
  color: var(--fg-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.price-features {
  list-style: none;
  margin-bottom: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-features li {
  font-size: 14.5px;
  color: var(--fg-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-features svg {
  width: 14px;
  height: 14px;
  stroke: var(--success);
  flex-shrink: 0;
}

.pricing-note {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  font-size: 14.5px;
  color: var(--fg-secondary);
  max-width: 800px;
  margin: 40px auto 0;
  text-align: center;
}

/* Compare Matrix */
.compare-wrapper {
  margin-top: 100px;
}

.compare-title {
  font-family: var(--font-ui);
  font-size: 28px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 2.5rem;
  text-align: center;
}

table.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  text-align: left;
}

table.compare-table th, table.compare-table td {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

table.compare-table th {
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--fg);
}

table.compare-table td {
  color: var(--fg-secondary);
}

table.compare-table tr:hover td {
  background-color: var(--bg-secondary);
}

/* Security Layout Grid */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

@media (max-width: 1024px) {
  .two-col-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
}

.security-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

.security-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.security-icon {
  width: 40px;
  height: 40px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.security-icon svg {
  width: 18px;
  height: 18px;
}

.security-text h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.security-text p {
  font-size: 14.5px;
  color: var(--fg-secondary);
  line-height: 1.5;
}

/* Terminal UI components */
.terminal-container {
  background-color: #080808;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13.5px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  width: 100%;
}

.terminal-header {
  background-color: #0C0C0C;
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.5;
}

.dot-red {
  background-color: var(--danger);
}

.dot-cyan {
  background-color: #F59E0B;       /* amber — yellow third dot for mac-style terminal feel */
}

.dot-green {
  background-color: var(--success);
}

.terminal-title {
  color: var(--fg-muted);
  font-size: 12px;
}

.terminal-body {
  padding: 24px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.terminal-body .comment {
  color: var(--fg-muted);
}

.terminal-body .keyword {
  color: var(--accent);
}

.terminal-body .key {
  color: var(--fg-secondary);
}

.terminal-body .string {
  color: var(--success);
}

/* Accordions (FAQs & Trust Policy Modules) */
.accordion-stack, .accordion-wrapper {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-title {
  width: 100%;
  background: none;
  border: none;
  padding: 24px 0;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition-duration) var(--ease);
}

.accordion-title:hover {
  color: var(--accent);
}

.accordion-title svg {
  width: 18px;
  height: 18px;
  color: var(--fg-muted);
  transition: transform var(--transition-duration) var(--ease);
}

.accordion-item.active .accordion-title svg {
  transform: rotate(180deg);
  color: var(--fg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms var(--ease), padding 400ms var(--ease);
  padding: 0;
}

.accordion-content p {
  font-size: 16px;
  color: var(--fg-secondary);
  line-height: 1.75;
  margin-bottom: 24px;
}

/* Docs & Article Layout */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3.5rem;
  margin-top: 60px;
}

.docs-sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.docs-nav {
  list-style: none;
}

.docs-nav li {
  margin-bottom: 0.85rem;
}

.docs-nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 15px;
  font-family: var(--font-ui);
  transition: color 0.2s;
}

.docs-nav a.active, .docs-nav a:hover {
  color: var(--fg);
}

.docs-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.docs-text h3 {
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 1rem;
}

.docs-text p {
  font-size: 16px;
  color: var(--fg-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* Article View Container */
.article-container {
  max-width: 960px;
  margin: 0 auto;
  padding-top: 180px;
  padding-bottom: 140px;
}

.article-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 4rem;
}

.article-sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.sidebar-meta {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.meta-val {
  color: var(--fg-secondary);
  font-size: 14.5px;
  margin-bottom: 1rem;
  display: block;
}

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

.outline-list a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14.5px;
  transition: color 0.2s;
}

.outline-list a:hover {
  color: var(--fg);
}

.article-body {
  color: var(--fg-secondary);
  font-size: 17.5px;
  line-height: 1.8;
  max-width: 680px;
}

.article-body h1 {
  font-family: var(--font-ui);
  font-size: 48px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 2rem;
  letter-spacing: -1.5px;
}

.article-body h1 em {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 400;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body h2 {
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 500;
  color: var(--fg);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.5px;
}

.article-body ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

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

/* Form layouts */
.form-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: flex-start;
}

.form-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
}

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

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  height: 56px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  padding: 0 1.25rem;
  font-family: var(--font-ui);
  font-size: 16px;
  outline: none;
  transition: all 0.2s;
}

.form-control:focus {
  border-color: var(--fg);
}

textarea.form-control {
  height: 160px;
  padding: 1.25rem;
  resize: vertical;
}

/* Badges & Status Accents */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-success {
  background: rgba(57, 196, 106, 0.08);
  color: var(--success);
  border: 1px solid rgba(57, 196, 106, 0.2);
}

.badge-warning {
  background: rgba(244, 200, 75, 0.08);
  color: var(--warning);
  border: 1px solid rgba(244, 200, 75, 0.2);
}

.badge-danger {
  background: rgba(217, 74, 73, 0.08);
  color: var(--danger);
  border: 1px solid rgba(217, 74, 73, 0.2);
}

/* Final CTA Section */
.cta-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.cta-content .section-title {
  font-size: clamp(38px, 6vw, 64px);
  margin-bottom: 24px;
}

.cta-content .section-desc {
  font-size: 20px;
  margin-bottom: 48px;
}

/* Footer layout */
footer.app-footer {
  border-top: 1px solid var(--border);
  padding: 120px 0 60px;
  background-color: var(--bg);
  color: var(--fg-muted);
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 80px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.footer-brand p {
  margin-top: 16px;
  line-height: 1.6;
  max-width: 320px;
  font-size: 14.5px;
}

.footer-col h4 {
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 24px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: var(--fg-muted);
  transition: color var(--transition-duration) var(--ease);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--fg);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

/* Media query for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-reveal,
  .reveal,
  .stagger-item,
  .price-card,
  .card,
  .btn,
  .accordion-title svg {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive Layout Overrides */
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    display: none;
  }
  .docs-content {
    grid-template-columns: 1fr;
  }
  .editorial-row, .editorial-row:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .form-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .article-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .article-sidebar {
    position: static;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  section {
    padding: 100px 0;
  }
  .stats-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .flow-row {
    flex-direction: column;
    gap: 1.5rem;
  }
  .flow-connector {
    transform: rotate(90deg);
  }
  /* Two-col / security grid: shrink children below their min-content
     so columns don't expand to fit unbreakable children (terminal, code) */
  .two-col-grid > * { min-width: 0; }
  .security-text { min-width: 0; }
  .security-text p { overflow-wrap: anywhere; word-break: break-word; }
  /* Terminal body: horizontal-scroll inside the box, not the page */
  .terminal-container { max-width: 100%; }
  .terminal-body { white-space: pre; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Compare table: stacked card layout on phone */
  .compare-wrapper { margin-top: 60px; padding: 0 4px; }
  .compare-title { font-size: 22px; margin-bottom: 1.5rem; padding: 0 8px; }
  table.compare-table,
  table.compare-table thead,
  table.compare-table tbody,
  table.compare-table tr,
  table.compare-table th,
  table.compare-table td { display: block; width: 100% !important; box-sizing: border-box; }
  table.compare-table thead { display: none; }
  table.compare-table tr {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    margin-bottom: 14px;
    padding: 6px 0;
    overflow: hidden;
  }
  /* Row label (first cell, now <th scope="row">) — card title */
  table.compare-table th[scope="row"] {
    padding: 12px 14px 8px 14px;
    color: var(--fg);
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
  }
  table.compare-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14.5px;
    text-align: right;
  }
  table.compare-table td:last-child { border-bottom: 0; }
  table.compare-table td::before {
    content: attr(data-label);
    color: var(--fg-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex: 0 0 auto;
    max-width: 55%;
    text-align: left;
  }
  /* Creator callout: stack on mobile */
  .creator-callout { grid-template-columns: 1fr; gap: 18px; padding: 22px 20px; }
  .creator-callout-cta { justify-content: space-between; align-items: baseline; }
  /* Pricing card padding */
  .price-card { padding: 24px 22px; }
  /* Nav: tighten the floating pill */
  .nav-wrapper { top: 12px; }
  .nav-pill { padding: 10px 14px; width: calc(100% - 24px); }
  .nav-pill.scrolled { padding: 8px 12px; }
  .brand span { display: none; }   /* logo only on phones to save space */
  /* Section / hero typography: lower floor for phone */
  .section-title { font-size: clamp(26px, 7.5vw, 46px); }
  .hero-title { font-size: clamp(30px, 9vw, 64px) !important; letter-spacing: -1px; }
  .section-desc { font-size: 16px; }
  .hero-desc { font-size: 16px; }
  /* Hero sections: less top padding on mobile */
  .hero { padding-top: 120px; padding-bottom: 60px; }
  .hero-section { padding-top: 110px; }
  /* Generic: tap targets */
  .btn { min-height: 44px; padding: 12px 22px; }
  /* Footer: better spacing for thumb-reach */
  .app-footer { padding: 70px 0 40px; }
  .footer-col h4 { margin-bottom: 14px; }
  .footer-col a { display: inline-block; padding: 6px 0; min-height: 32px; }
  /* Docs / article tweaks */
  .docs-content { grid-template-columns: 1fr; }
  .article-container { padding-top: 110px; padding-bottom: 80px; }
  .article-body { font-size: 16.5px; }
  .article-body h1 { font-size: 32px; }
  .article-body h2 { font-size: 20px; }
  /* Forms: comfortable on phone */
  .form-card { padding: 24px 20px; border-radius: 16px; }
  .form-control { height: 50px; font-size: 16px; }   /* 16px prevents iOS zoom */
  /* Steps / flow */
  .step-card { padding: 22px 20px; }
  /* Hide desktop-only decorations */
  .hide-md { display: none !important; }
}

/* Small phones (≤ 480px) — extra polish */
@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .container { padding: 0 18px; }
  .nav-wrapper { top: 10px; }
  .nav-pill { padding: 8px 12px; width: calc(100% - 16px); }
  .burger-btn { padding: 8px; min-width: 40px; min-height: 40px; }
  .hero { padding-top: 100px; }
  .hero-title { font-size: clamp(28px, 9vw, 38px) !important; }
  .section-title { font-size: 26px; }
  /* Compare table: tighter cards on tiny screens */
  table.compare-table td { padding: 8px 12px; font-size: 14px; gap: 8px; }
  table.compare-table td::before { font-size: 10.5px; }
  /* Footer columns: tighter */
  .footer-grid { gap: 32px; margin-bottom: 50px; }
  .footer-bottom { font-size: 12px; }
  /* Auth-style form sections */
  .form-card { padding: 20px 16px; }
  /* Editorial rows: tighten */
  .editorial-text h3 { font-size: 22px; }
  /* Hide brand wordmark on very small screens */
  .brand span { display: none; }
}

/* Touch-device niceties */
/* ==========================================================================
   BLOG INDEX — listing-page redesign
   ========================================================================== */

/* Category filter pills row */
.blog-filters-section {
  margin-top: 24px;
  margin-bottom: 32px;
}
.blog-filters-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 14px;
}
.blog-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.blog-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  color: var(--accent);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 250ms var(--ease);
  white-space: nowrap;
}
.blog-pill:hover {
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(14, 165, 233, 0.30);
}
.blog-pill-filter.is-active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.blog-pill-filter.is-active:hover {
  background: var(--accent);
  color: var(--bg);
}
.blog-pill-accent {
  background: var(--accent);
  color: var(--bg);
}

/* Grid wrapper */
.blog-grid-section {
  padding-top: 0;
  padding-bottom: 120px;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 1100px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .blog-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* FEATURED POST — full-width, two-column hero card */
.blog-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 400ms var(--ease);
  position: relative;
}
.blog-featured:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.blog-featured-image {
  aspect-ratio: 1200 / 630;  /* matches OG image dimensions */
  overflow: hidden;
  position: relative;
  background: var(--bg-elevated);
}
.blog-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 600ms var(--ease);
}
.blog-featured:hover .blog-featured-image img { transform: scale(1.04); }
.blog-featured-content {
  padding: 56px 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-featured-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.blog-featured-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.blog-featured-title {
  font-family: var(--font-ui);
  font-size: 38px;
  font-weight: 500;
  color: var(--fg);
  margin: 0 0 18px;
  letter-spacing: -1.2px;
  line-height: 1.12;
}
.blog-featured-subtitle {
  font-size: 16.5px;
  color: var(--fg-secondary);
  line-height: 1.65;
  margin: 0 0 32px;
}
.blog-featured-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.blog-featured:hover .blog-featured-cta { color: var(--fg); }
@media (max-width: 900px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-content { padding: 36px 28px 32px; }
  .blog-featured-title { font-size: 28px; letter-spacing: -0.8px; }
  .blog-featured-subtitle { font-size: 15.5px; margin-bottom: 24px; }
}

/* REGULAR CARD — image-on-top, content below */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 400ms var(--ease);
  position: relative;
  height: 100%;
}
.blog-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
}
.blog-card-image {
  aspect-ratio: 1200 / 630;  /* matches the OG image dimensions */
  overflow: hidden;
  position: relative;
  background: var(--bg-elevated);
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 600ms var(--ease);
}
.blog-card:hover .blog-card-image img { transform: scale(1.04); }
.blog-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 12px;
  background: rgba(11, 17, 32, 0.78);
  color: #F8FAFC;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.blog-card-content {
  padding: 26px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.blog-card-dot { opacity: 0.4; }
.blog-card-title {
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 500;
  color: var(--fg);
  margin: 0 0 12px;
  letter-spacing: -0.4px;
  line-height: 1.3;
}
.blog-card-excerpt {
  font-size: 14.5px;
  color: var(--fg-secondary);
  line-height: 1.6;
  margin: 0 0 22px;
  flex: 1;
}
.blog-card-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.blog-card:hover .blog-card-cta { color: var(--fg); }

/* EMPTY STATE — when filter matches nothing */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  color: var(--fg-secondary);
  font-size: 16px;
}
.blog-empty-back {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
}
.blog-empty-back:hover { color: var(--fg); }

/* ==========================================================================
   BLOG INDEX — responsive (mobile/tablet)
   ========================================================================== */

/* Tablet (≤ 900px) — featured stacks vertically, image on top */
@media (max-width: 900px) {
  .blog-featured {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }
  .blog-featured-image {
    aspect-ratio: 1200 / 630;
    width: 100%;
  }
  .blog-featured-content {
    padding: 36px 28px 32px;
  }
  .blog-featured-title {
    font-size: 28px;
    letter-spacing: -0.8px;
  }
  .blog-featured-subtitle {
    font-size: 15.5px;
    margin-bottom: 24px;
  }
}

/* Phone (≤ 720px) — single column, horizontal-scroll filter pills */
@media (max-width: 720px) {
  .blog-filters-section {
    margin-top: 16px;
    margin-bottom: 24px;
  }
  .blog-filters-label {
    margin-bottom: 12px;
  }
  /* Horizontal-scroll pill row instead of multi-line wrap */
  .blog-filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
  }
  .blog-filter-pills::-webkit-scrollbar { display: none; }
  .blog-pill-filter {
    flex-shrink: 0;
  }

  .blog-grid-section {
    padding-bottom: 80px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  /* Featured post — tighter on phone */
  .blog-featured {
    border-radius: 18px;
  }
  .blog-featured-content {
    padding: 28px 24px;
  }
  .blog-featured-meta {
    margin-bottom: 16px;
  }
  .blog-featured-title {
    font-size: 24px;
    letter-spacing: -0.6px;
    margin-bottom: 14px;
  }
  .blog-featured-subtitle {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 22px;
  }
  .blog-featured-cta {
    font-size: 12px;
  }

  /* Card — tighter padding on phone */
  .blog-card {
    border-radius: 16px;
  }
  .blog-card-content {
    padding: 22px 22px 24px;
  }
  .blog-card-meta {
    font-size: 11px;
    margin-bottom: 12px;
  }
  .blog-card-title {
    font-size: 17.5px;
    letter-spacing: -0.3px;
    margin-bottom: 10px;
  }
  .blog-card-excerpt {
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 18px;
  }
  .blog-card-cta {
    font-size: 11.5px;
  }
  .blog-card-badge {
    top: 12px;
    left: 12px;
    font-size: 10px;
    padding: 5px 10px;
  }

  /* Empty state — less vertical padding */
  .blog-empty {
    padding: 56px 20px;
    font-size: 15px;
  }
}

/* Very small phones (≤ 380px) — extra polish for iPhone SE / similar */
@media (max-width: 380px) {
  .blog-featured-title {
    font-size: 21px;
  }
  .blog-featured-content {
    padding: 24px 20px;
  }
  .blog-card-content {
    padding: 20px 18px;
  }
}

/* Hub hero — phone-specific tweaks for the blog hub title */
@media (max-width: 720px) {
  .hero-section {
    padding-top: 130px !important;
    padding-bottom: 56px;
  }
  .hero-section .hero-title {
    font-size: clamp(32px, 11vw, 48px);
    letter-spacing: -1.2px;
  }
  .hero-desc {
    font-size: 15.5px !important;
    line-height: 1.55;
  }
}

/* ==========================================================================
   ARTICLE PAGE — mobile responsive
   ========================================================================== */

@media (max-width: 720px) {
  /* Hero image: shrink and crop less of the bottom motif on small screens */
  .article-hero {
    aspect-ratio: 16 / 10 !important;
    max-height: 40vh !important;
    margin-top: 76px !important;
  }

  /* Header band: tighter padding, smaller H1 (avoid duplicating the title from hero image) */
  .article-header-band {
    padding: 36px 0 24px !important;
  }
  .article-header-band h1 {
    font-size: 28px !important;
    line-height: 1.18 !important;
    letter-spacing: -0.7px !important;
    max-width: 100% !important;
  }
  .article-meta {
    font-size: 11px;
    gap: 0.6rem;
    margin-bottom: 1rem !important;
  }
  .article-meta .pill {
    padding: 3px 8px;
    font-size: 11px;
  }

  /* Article body — tighter padding, smaller text for thumb-reading */
  .article-container {
    padding: 48px 20px 80px !important;
  }
  .article-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .article-sidebar {
    position: static !important;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
  }
  .article-body {
    font-size: 16px !important;
    line-height: 1.7;
  }
  .article-body h1 {
    font-size: 28px !important;
    letter-spacing: -0.7px !important;
  }
  .article-body h2 {
    font-size: 22px !important;
    margin: 2.25rem 0 0.85rem;
  }
  .article-body h3 {
    font-size: 18px !important;
  }
  .article-body .cta-card {
    padding: 1.25rem;
    margin: 2rem 0;
  }

  /* Author bio — tighter */
  .author-bio {
    margin-top: 3rem;
    padding-top: 1.5rem;
  }
  .author-bio-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  /* Related posts — stack to 1 column */
  .related-section {
    padding: 40px 0 !important;
  }
  .related-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
}

/* Very small phones — extra font shrink */
@media (max-width: 380px) {
  .article-hero {
    max-height: 36vh !important;
  }
  .article-header-band h1 {
    font-size: 25px !important;
  }
  .article-body h1 {
    font-size: 25px !important;
  }
}

/* ==========================================================================
   READ-NEXT — article cards on pillar pages
   Compact 2-up grid that surfaces the most relevant blog content per pillar.
   ========================================================================== */
.read-next {
  padding-top: 4rem;
  padding-bottom: 4rem;
  border-top: 1px solid var(--border);
}
.read-next-head {
  text-align: center;
  margin-bottom: 2.5rem;
}
.read-next-head .section-label {
  margin-bottom: 0.75rem;
  display: block;
}
.read-next-head h2 {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--fg);
  margin: 0 auto 0.75rem;
  max-width: 720px;
  letter-spacing: -0.6px;
  line-height: 1.15;
}
.read-next-head p {
  color: var(--fg-secondary);
  max-width: 580px;
  margin: 0 auto;
  font-size: 16px;
}
.read-next-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.read-next-grid--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 880px;
}
.read-next-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 350ms var(--ease);
  position: relative;
  height: 100%;
}
.read-next-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.read-next-card-image {
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  position: relative;
  background: var(--bg-elevated);
}
.read-next-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 600ms var(--ease);
}
.read-next-card:hover .read-next-card-image img { transform: scale(1.04); }
.read-next-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 10px;
  background: rgba(11, 17, 32, 0.78);
  color: #F8FAFC;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.read-next-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.read-next-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.read-next-card-title {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  margin: 0 0 12px;
  letter-spacing: -0.4px;
  line-height: 1.3;
}
.read-next-card-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: auto;
}
.read-next-card:hover .read-next-card-cta { color: var(--fg); }

.read-next-foot {
  text-align: center;
  margin-top: 2.5rem;
}
.read-next-foot a {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: all 250ms var(--ease);
}
.read-next-foot a:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

/* Tablet — 2 columns */
@media (max-width: 1024px) {
  .read-next-grid,
  .read-next-grid--two {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }
}

/* Phone — single column */
@media (max-width: 720px) {
  .read-next {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .read-next-grid,
  .read-next-grid--two {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .read-next-card-body {
    padding: 20px 20px 22px;
  }
  .read-next-card-title {
    font-size: 16.5px;
  }
}

@media (hover: none) {
  /* On touch, remove hover-only transforms that feel "stuck" */
  .btn-primary:hover,
  .btn-secondary:hover,
  .price-card:hover,
  .card-meta-card:hover { transform: none; box-shadow: var(--shadow-soft); }
  .creator-callout:hover { transform: none; }
  /* Tap highlight: brand-tinted, not browser default blue */
  a, button { -webkit-tap-highlight-color: rgba(14, 165, 233, 0.18); }
}

