/* ═══════════════════════════════════════════════════════════════
   CLARITY COUNTS BOOKKEEPING — Master Stylesheet
   Detective base + Magazine animations + Apothecary cards
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════
   SECTION 1: COLOR THEMES (3 swappable via data-theme)
   ═══════════════════════════════════════ */

/* THEME 1: Blue & Gold (Default) */
[data-theme="blue-gold"], :root {
  --primary-darkest:  #0d1629;
  --primary-dark:     #16213E;
  --primary-mid:      #3060D0;
  --primary-light:    #5A82FF;
  --primary-lightest: #D6E4F7;
  --accent:           #E8A838;
  --accent-hover:     #c98f22;
  --accent-red:       #c0392b;
  --accent-gradient:  linear-gradient(90deg, #FFD700 0%, #E8A838 40%, #E8650A 100%);
  --bg-body:          #F5F0E8;
  --bg-section-alt:   #EDE7DA;
  --bg-card:          #D6E4F7;
  --bg-card-alt:      #C8D8F5;
  --text-primary:     #1E2B45;
  --text-secondary:   #4A5E7A;
  --text-on-dark:     #F5F0E8;
  --card-border:      rgba(30,43,69,0.14);
  --cream:            #F5F0E8;
  --cream-dim:        rgba(245,240,232,0.65);
  --primary-mid-rgb:  48, 96, 208;
}

/* THEME 2: Blue & Warm (Warm) */
[data-theme="blue-cream"] {
  --primary-darkest:  #1a1410;
  --primary-dark:     #2c2418;
  --primary-mid:      #B5862A;
  --primary-light:    #C9A84C;
  --primary-lightest: #F2E8D5;
  --accent:           #D4A843;
  --accent-hover:     #b8922f;
  --accent-red:       #b03020;
  --accent-gradient:  linear-gradient(90deg, #FFD700 0%, #D4A843 40%, #C06020 100%);
  --bg-body:          #F9F4EC;
  --bg-section-alt:   #F0E8D8;
  --bg-card:          #E8D8BA;
  --bg-card-alt:      #DDD0A8;
  --text-primary:     #2A1E0A;
  --text-secondary:   #5C4A28;
  --text-on-dark:     #F5F0E8;
  --card-border:      rgba(42,30,10,0.18);
  --cream:            #F5F0E8;
  --cream-dim:        rgba(245,240,232,0.65);
  --primary-mid-rgb:  181, 134, 42;
}

/* THEME 3: Blue & Slate (Modern) */
[data-theme="blue-slate"] {
  --primary-darkest:  #090d14;
  --primary-dark:     #111824;
  --primary-mid:      #2855C0;
  --primary-light:    #4D7AFF;
  --primary-lightest: #D0DCF5;
  --accent:           #4D7AFF;
  --accent-hover:     #2855C0;
  --accent-red:       #e05050;
  --accent-gradient:  linear-gradient(90deg, #6B91FF 0%, #4D7AFF 50%, #2855C0 100%);
  --bg-body:          #EDF2FF;
  --bg-section-alt:   #E4EBF9;
  --bg-card:          #D0DCF5;
  --bg-card-alt:      #C4D2F0;
  --text-primary:     #0F1E3A;
  --text-secondary:   #364E78;
  --text-on-dark:     #EDF2FF;
  --card-border:      rgba(15,30,58,0.16);
  --cream:            #EDF2FF;
  --cream-dim:        rgba(237,242,255,0.65);
  --primary-mid-rgb:  40, 85, 192;
}


/* ═══════════════════════════════════════
   SECTION 2: SHARED TOKENS (non-swappable)
   ═══════════════════════════════════════ */

:root {
  --font-type:     'Special Elite', cursive;
  --font-mono:     'Source Code Pro', monospace;
  --font-headline: 'Playfair Display', serif;
  --font-body:     'Lato', sans-serif;
  --font-ui:       'Roboto Condensed', sans-serif;
  --nav-height: 64px;
  --max-width: 1200px;
  --section-pad: clamp(60px, 8vw, 120px);
}


/* ═══════════════════════════════════════
   SECTION 3: RESET & BASE
   ═══════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  color: var(--text-primary);
  line-height: 1.1;
}

h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 900; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; }
h3 { font-size: clamp(22px, 3vw, 32px); font-weight: 700; }
h4 { font-size: clamp(18px, 2.5vw, 24px); font-weight: 700; }

p {
  margin-bottom: 1em;
  max-width: 70ch;
}

a {
  color: var(--primary-mid);
  text-decoration: none;
  transition: color 0.2s;
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--primary-darkest);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

/* Section spacing */
section {
  padding: var(--section-pad) 0;
}

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

/* Nav spacer — push content below fixed nav */
.nav-spacer {
  height: var(--nav-height);
}


/* ═══════════════════════════════════════
   SECTION 4: HERO SECTION
   ═══════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #0d0d1a 0%, #16213E 40%, #1a1a2e 100%);
  overflow: hidden;
  padding: calc(var(--nav-height) + 80px) 2rem 80px;
}

/* Venetian blind shadow — the detective signature */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -15deg,
    rgba(0, 0, 0, 0.55) 0px,
    rgba(0, 0, 0, 0.55) 18px,
    transparent 18px,
    transparent 42px
  );
  z-index: 1;
  pointer-events: none;
}

/* Radial gold glow */
.hero::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 35%;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(212, 168, 67, 0.1) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero .container,
.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 760px;
}

.hero h1 {
  font-family: var(--font-type);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  color: #F5F0E8;
  margin-bottom: 1.6rem;
  font-weight: 400; /* Special Elite is already bold in character */
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero .section-tag {
  color: var(--accent);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  animation: fadeSlideUp 0.6s 0.3s both;
}

.hero .section-tag::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.hero p {
  color: rgba(245, 240, 232, 0.75);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 2.2rem;
}

.hero .btn-primary {
  animation: fadeSlideUp 0.7s 0.8s both;
}

.hero .btn-secondary {
  color: rgba(245, 240, 232, 0.7);
  border-color: rgba(245, 240, 232, 0.3);
}

.hero .btn-secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Hero badge — decorative SVG bottom-right */
.hero-badge {
  position: absolute;
  right: 5%;
  bottom: 12%;
  z-index: 2;
  width: 140px;
  height: 140px;
  opacity: 0;
  animation: fadeIn 1s 1.5s forwards;
}

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

/* Typewriter inside hero */
.hero .typewriter-container {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: rgba(245, 240, 232, 0.65);
  min-height: 2.2em;
  margin-bottom: 2.2rem;
}

/* Hero animations */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════
   SECTION 4B: FILM GRAIN OVERLAY
   ═══════════════════════════════════════ */

.has-grain {
  position: relative;
}

.has-grain::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

.has-grain > * {
  position: relative;
  z-index: 2;
}


/* ═══════════════════════════════════════
   SECTION 5: ANIMATION CLASSES (Magazine reveal system)
   ═══════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* Stagger delays for siblings */
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ═══════════════════════════════════════
   SECTION 6: NAVIGATION
   ═══════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 22, 41, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  transition: box-shadow 0.3s;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* 3-column layout: logo | links centered | cta */
.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  gap: 0;
}

.nav-logo {
  grid-column: 1;
  justify-self: start;
}

.hamburger,
.nav-hamburger {
  grid-column: 1;
  justify-self: start;
}

.nav-links {
  grid-column: 2;
  justify-self: center;
}

.nav-cta-wrap {
  grid-column: 3;
  justify-self: end;
}

[data-theme="blue-cream"] .nav {
  background: rgba(26, 20, 16, 0.97);
}

[data-theme="blue-slate"] .nav {
  background: rgba(9, 13, 20, 0.97);
}

.nav.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-logo span {
  font-family: var(--font-type);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

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

.nav-links a.active {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* Nav CTA button */
.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--primary-darkest);
  padding: 0.5rem 1.2rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background 0.2s, transform 0.1s;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: var(--primary-darkest);
  transform: translateY(-1px);
}

/* Hamburger menu — .hamburger in HTML */
.hamburger,
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.hamburger span,
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-on-dark);
  transition: transform 0.3s, opacity 0.3s;
}

/* Hamburger animation when open */
.nav-open .hamburger span:nth-child(1),
.nav-open .nav-hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-open .hamburger span:nth-child(2),
.nav-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-open .hamburger span:nth-child(3),
.nav-open .nav-hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav — .mobile-menu and .nav-mobile-menu both supported */
.mobile-menu,
.nav-mobile-menu {
  position: fixed;
  top: var(--nav-height);
  right: 0;
  bottom: 0;
  width: 280px;
  background: rgba(13, 13, 26, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 99;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.nav-open .mobile-menu,
.nav-open .nav-mobile-menu {
  transform: translateX(0);
}

.mobile-menu a,
.nav-mobile-menu a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.8);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a.active,
.nav-mobile-menu a:hover,
.nav-mobile-menu a.active {
  color: var(--accent);
}

.mobile-menu .btn-primary,
.nav-mobile-menu .nav-cta {
  margin-top: 1rem;
  text-align: center;
  justify-content: center;
}


/* ═══════════════════════════════════════
   SECTION 7: FOOTER (Apothecary-adapted)
   ═══════════════════════════════════════ */

.footer {
  background: var(--primary-darkest);
  padding: 60px 40px 40px;
  color: var(--text-on-dark);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

/* Column 1: Brand */
.footer-brand h3 {
  font-family: var(--font-headline);
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 6px;
}

.footer-brand .footer-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-contact a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: var(--accent);
}

/* Column 2 & 3 headings */
.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

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

.footer-col a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Bottom bar */
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(245,240,232,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: rgba(245,240,232,0.3);
  font-style: italic;
}

.footer-bottom a {
  color: rgba(245,240,232,0.4);
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--accent);
}


/* ═══════════════════════════════════════
   SECTION 8: SHARED SECTION PATTERNS
   ═══════════════════════════════════════ */

/* Section tag/overline */
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 12px;
}

/* Trailing gold line after section-tag text — left-aligned tags only */
.section-tag::after {
  content: '';
  flex: 1;
  max-width: 48px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

/* Centered section headers: flanking lines instead of trailing line */
.section-header .section-tag::after {
  display: inline-block;
  flex: none;
  max-width: 32px;
  width: 32px;
  opacity: 1;
}

/* ── Intro band (stat strip directly below hero) ── */
.intro-band {
  background: var(--primary-dark);
  border-top: 1px solid rgba(232,168,56,0.15);
  border-bottom: 1px solid rgba(232,168,56,0.15);
  padding: 48px 20px;
}

.intro-band .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.intro-stat {
  text-align: center;
  padding: 0 2rem;
  border-right: 1px solid rgba(245,240,232,0.12);
}

.intro-stat:last-child { border-right: none; }

.intro-stat-number {
  font-family: var(--font-type);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.intro-stat-number .stat-accent { color: var(--accent); }

.intro-stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.65);
}

@media (max-width: 600px) {
  .intro-band .container {
    grid-template-columns: 1fr;
  }
  .intro-stat {
    border-right: none;
    border-bottom: 1px solid rgba(245,240,232,0.12);
    padding: 1.2rem 1rem;
  }
  .intro-stat:last-child { border-bottom: none; }
}

/* Gold divider bar (after section headline) */
.gold-divider {
  width: 48px;
  height: 2px;
  background: var(--accent-gradient);
  margin: 1rem 0 1.5rem;
}

/* Section headline uses Special Elite like demo */
.section-headline {
  font-family: var(--font-type);
  font-size: clamp(1.9rem, 4vw, 3rem);
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

/* Magazine editorial headline */
.headline {
  font-family: var(--font-headline);
  font-weight: 900;
  line-height: 1.05;
  color: var(--text-primary);
}

.headline-lg { font-size: clamp(36px, 5vw, 64px); }
.headline-md { font-size: clamp(28px, 4vw, 48px); }
.headline-sm { font-size: clamp(22px, 3vw, 36px); }

/* Pull quote band — both .pull-quote and .pullquote-band supported */
.pull-quote,
.pullquote-band {
  background: var(--primary-dark);
  padding: var(--section-pad) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pull-quote::before,
.pullquote-band::before {
  content: '\201C';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  font-family: var(--font-headline);
  font-size: clamp(200px, 30vw, 400px);
  color: var(--accent);
  opacity: 0.1;
  line-height: 1;
  pointer-events: none;
}

.pull-quote blockquote,
.pullquote-band blockquote {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: clamp(20px, 3.5vw, 46px);
  color: #FFFFFF;
  line-height: 1.25;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.pull-quote cite,
.pull-quote .attribution,
.pullquote-band cite,
.pullquote-band .attribution {
  display: block;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 20px;
  position: relative;
  z-index: 2;
}

/* Stats band — also works with stat items directly inside */
.stats-band {
  background: var(--primary-darkest);
  padding: clamp(40px, 6vw, 80px) 0;
  color: #FFFFFF;
}

/* If stat items are direct children of stats-band */
.stats-band > .stat-item {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-band > .stat-item:last-child {
  border-right: none;
}

/* Wrapper grid (explicit .stats-grid) */
.stats-grid,
.stats-band {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
}

/* stats-band itself shouldn't constrain width when it's full-bleed */
.stats-band {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* Center the inner grid within the band */
.stats-band .stats-grid {
  max-width: var(--max-width);
  margin: 0 auto;
}

.stats-grid {
  /* inherits max-width/padding from above */
}

.stat-item {
  text-align: center;
  padding: 24px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-type);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

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

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 4px;
  color: rgba(245, 240, 232, 0.75);
}

.stat-desc {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.45);
  margin-top: 4px;
}

/* Cover story / feature section (sticky sidebar) */
.feature-section {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.feature-narrative {
  font-size: 17px;
  line-height: 1.7;
}

.feature-narrative p:first-of-type::first-letter {
  font-family: var(--font-headline);
  font-size: 3.8em;
  float: left;
  line-height: 0.85;
  margin-right: 8px;
  margin-top: 4px;
  color: var(--accent);
  font-weight: 700;
}

.feature-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Feature label bar */
.feature-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.feature-label-text {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--primary-darkest);
  color: var(--text-on-dark);
  padding: 6px 14px;
  white-space: nowrap;
}

.feature-label-line {
  flex: 1;
  height: 1px;
  background: var(--primary-darkest);
}

/* Card styles (apothecary-inspired) */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Button styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--primary-darkest);
  padding: 0.65rem 1.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background 0.2s, transform 0.1s;
  min-height: 44px;
  min-width: 44px;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  color: var(--text-secondary);
  padding: 0.65rem 0;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid var(--text-secondary);
  transition: color 0.2s, border-color 0.2s;
  min-height: 44px;
}

/* In hero context btn-secondary should be light */
.hero .btn-secondary {
  color: rgba(245,240,232,0.75);
  border-bottom-color: rgba(245,240,232,0.4);
}

.hero .btn-secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
}


/* ═══════════════════════════════════════
   SECTION 9: RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════ */

/* Mobile-first: base styles are for 375px */

@media (min-width: 480px) {
  /* small phone -> large phone */
}

@media (min-width: 600px) {
  /* phone -> small tablet */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  /* tablet */
  .container {
    padding: 0 32px;
  }
}

@media (max-width: 899px) {
  /* Mobile: hide desktop nav, show hamburger */
  .nav-links {
    display: none;
  }

  .hamburger,
  .nav-hamburger {
    display: flex;
  }

  /* Hero — tighter padding on mobile */
  .hero {
    padding: calc(var(--nav-height) + 40px) 1.25rem 48px;
    min-height: 0;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
  }

  .hero-content {
    max-width: 100%;
  }

  /* Hide decorative badge on mobile — too cramped */
  .hero-badge {
    display: none;
  }

  /* Feature section stacks */
  .feature-section {
    grid-template-columns: 1fr;
  }

  /* Footer single column */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Feature section stacks */
  .feature-section {
    grid-template-columns: 1fr;
  }

  .feature-sidebar {
    position: static;
  }

  /* Stats stack */
  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
  }

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

@media (min-width: 900px) {
  /* nav expands, grids go multi-column */
  .hamburger,
  .nav-hamburger {
    display: none;
  }

  .mobile-menu,
  .nav-mobile-menu {
    display: none !important;
  }
}

@media (min-width: 1050px) {
  /* feature sidebars, full stats grids */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) {
  /* max-width container */
}


/* ═══════════════════════════════════════
   SECTION 10: COLOR TOGGLE WIDGET
   ═══════════════════════════════════════ */

.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 24px;
}

.theme-toggle button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  padding: 0;
}

.theme-toggle button:hover {
  transform: scale(1.15);
}

.theme-toggle button.active {
  border-color: #FFFFFF;
}

.theme-toggle button[data-theme="blue-gold"] {
  background: #5A82FF;
}

.theme-toggle button[data-theme="blue-cream"] {
  background: #6B91FF;
}

.theme-toggle button[data-theme="blue-slate"] {
  background: #4D7AFF;
}

@media (max-width: 480px) {
  .theme-toggle {
    bottom: 12px;
    right: 12px;
  }
}


/* ═══════════════════════════════════════
   TYPEWRITER CURSOR (home page)
   ═══════════════════════════════════════ */

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}


/* ═══════════════════════════════════════
   SECTION 11: DARK CTA SECTION
   ═══════════════════════════════════════ */

.dark-section {
  background: var(--primary-darkest);
  color: var(--text-on-dark);
  padding: var(--section-pad) 0;
  position: relative;
  overflow: hidden;
}

.dark-section::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 35%;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(212, 168, 67, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.dark-section .container {
  position: relative;
  z-index: 1;
}

.dark-section h2,
.dark-section h3,
.dark-section h4 {
  color: var(--text-on-dark);
}

.dark-section .section-tag {
  color: var(--accent);
}

.dark-section p {
  color: rgba(232, 238, 255, 0.75);
}

/* ═══════════════════════════════════════
   SECTION 12: PROCESS STEPS GRID
   ═══════════════════════════════════════ */

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  text-align: center;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-circle {
  width: 80px;
  height: 80px;
  background: var(--bg-card);
  border: 2px solid rgba(232,168,56,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(232,168,56,0.12);
}

.step-number {
  font-family: var(--font-type);
  font-size: 1.8rem;
  color: var(--accent);
  line-height: 1;
}

.process-step h4 {
  font-family: var(--font-type);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.process-step p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 240px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════
   SECTION 17: DETECTIVE TEAM CARDS
   ═══════════════════════════════════════ */

.detective-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.detective-team-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-radius: 4px;
}

.detective-team-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

.detective-team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.badge-shield {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.badge-shield svg {
  width: 70px;
  height: 70px;
}

.mag-hover {
  display: inline-block;
  transition: transform 0.3s ease;
}

.mag-hover:hover {
  transform: rotate(25deg) scale(1.1);
}

/* spinIn — triggered by JS when card enters viewport */
@keyframes spinIn {
  from { transform: rotate(-30deg) scale(0.7); opacity: 0; }
  to   { transform: rotate(0deg)   scale(1);   opacity: 1; }
}

.badge-shield.spin-ready {
  animation: spinIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.detective-team-name {
  font-family: var(--font-type);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.detective-team-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.detective-team-bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0;
}

.detective-team-detail {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  opacity: 0.7;
  letter-spacing: 0.06em;
  margin-bottom: 0;
}

/* ═══════════════════════════════════════
   SECTION 13: TESTIMONIAL CARDS
   ═══════════════════════════════════════ */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.testimonial-card {
  background: linear-gradient(160deg, var(--bg-card-alt), var(--bg-card));
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* multicolor top bar */
.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(232,168,56,0.2);
}

.testimonial-card blockquote,
.testimonial-card > p:first-child {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.testimonial-card .client-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.testimonial-card .client-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin: 0;
}

/* ═══════════════════════════════════════
   SECTION 14: SERVICE CARDS (detective dark)
   ═══════════════════════════════════════ */

.service-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.service-card {
  background: linear-gradient(160deg, var(--bg-card-alt), var(--bg-card));
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 2rem 1.8rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* multicolor gradient top border */
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

/* manila folder tab */
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  width: 60px;
  height: 5px;
  background: var(--accent);
  opacity: 0.4;
  border-radius: 0 0 4px 4px;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(232,168,56,0.2);
}

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

.case-number {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  opacity: 0.85;
}

.card-icon {
  font-size: 1.25rem;
  color: var(--accent);
}

.card-title {
  font-family: var(--font-type);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.clue-label,
.resolution-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 6px;
}

.clue-label { color: var(--accent-red); }
.resolution-label { color: var(--accent); }

.clue-text {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.card-divider {
  border: none;
  border-top: 1px dashed rgba(232,168,56,0.25);
  margin: 0 0 1.25rem;
}

.resolution-text {
  font-size: 0.88rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  line-height: 1.55;
}

.resolution-arrow {
  color: var(--accent);
  margin-right: 4px;
}

/* ═══════════════════════════════════════
   SECTION 15: SECTION HEADER (centred)
   ═══════════════════════════════════════ */

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--section-pad);
}

.section-header .section-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.section-header .section-tag::before,
.section-header .section-tag::after {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0 auto;
}

/* ═══════════════════════════════════════
   SECTION 16: FEATURE CARD (sidebar cards)
   ═══════════════════════════════════════ */

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.feature-card h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}

.feature-card p,
.feature-card li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.feature-card ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-card ul li::before {
  content: '→ ';
  color: var(--accent);
  font-weight: 700;
}

/* stat-accent alias for .accent class used in HTML */
.stat-accent,
.accent {
  color: var(--accent);
}

.text-center-mt { text-align: center; margin-top: 3rem; }
.detective-team-grid.wide { max-width: 100%; }
.team-bio-quote { font-style: italic; margin-top: 0.75rem; }

.stat-description {
  font-family: Georgia, serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
}

/* ═══════════════════════════════════════
   SECTION 18: CREAM/WHITE TYPOGRAPHY POLISH
   ═══════════════════════════════════════ */

/* Inline content blockquotes (not pull-quote band) */
article blockquote,
.feature-content blockquote,
.feature-narrative blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.65;
  background: rgba(30,43,69,0.06);
}

/* FAQ question */
.faq-q {
  color: var(--text-primary);
}

/* Resolution text — cream gold mono */
.resolution-text {
  color: var(--accent);
}

/* Section headers — use text-primary (dark on light, light on dark contexts) */
.section-header h2 {
  color: var(--text-primary);
}

/* Footer headings cream */
.footer h3,
.footer h4 {
  color: var(--cream);
}

/* Footer body text */
.footer p,
.footer-contact a,
.footer a {
  color: var(--text-secondary);
}

.footer-contact a:hover,
.footer a:hover {
  color: var(--accent);
}

/* Stat desc — slightly more legible */
.stat-desc {
  color: rgba(245,240,232,0.55);
}

/* Feature narrative body — cream body copy */
.feature-narrative p,
.feature-content p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Key emphasis within body copy */
.feature-narrative strong,
.feature-content strong {
  color: var(--cream);
  font-weight: 700;
}

/* Process step headings */
.process-step h4 {
  color: var(--cream);
}

.detective-team-name {
  color: var(--text-primary);
}

/* Card section divider lines — subtle cream */
.card-divider {
  border-top-color: rgba(245,240,232,0.12);
}

/* Pull quote band — vivid cream blockquote */
.pull-quote blockquote,
.pullquote-band blockquote {
  color: var(--cream);
}

/* Mobile menu links — always on dark mobile panel */
.mobile-menu a,
.nav-mobile-menu a {
  color: rgba(245,240,232,0.8);
}

/* ═══════════════════════════════════════
   SECTION 19: BOLD TEXT ENHANCEMENT
   ═══════════════════════════════════════ */

/* Global strong — heavier, darker, more presence */
strong, b {
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Strong inside secondary-colored contexts should pop */
.text-secondary strong,
p strong,
li strong {
  color: var(--primary-mid);
  font-weight: 800;
}

/* Bold inside dark sections — use accent */
.dark-section strong,
.pull-quote strong,
.stats-band strong {
  color: var(--accent);
}

/* Section-tag accent gradient treatment */
.hero .section-tag {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-menu a:hover,
.nav-mobile-menu a:hover {
  color: var(--accent);
}
