/* ==========================================================================
   Coffee Science Lab — Main Stylesheet v3
   Color Palette: Espresso #140A05 | Cream #F7F2EC | Roast #7A5235
                  Gold #C87A3A | Gold Light #E09456 | Parchment #EDE8E1
   Typography:    Cormorant Garamond (headings) | DM Sans (body) | JetBrains Mono (data)
   Breakpoints:   768px (tablet) | 480px (mobile)
   ========================================================================== */

/* ----- CSS Custom Properties ----- */
:root {
  --espresso: #140A05;
  --espresso-light: #2A1510;
  --cream: #F7F2EC;
  --parchment: #EDE8E1;
  --roast: #7A5235;
  --gold: #C87A3A;
  --gold-light: #E09456;
  --slate: #374357;
  --white: #FFFFFF;
  --espresso-90: rgba(20, 10, 5, 0.92);
  --shadow-sm: 0 2px 10px rgba(20, 10, 5, 0.08);
  --shadow-md: 0 6px 28px rgba(20, 10, 5, 0.14);
  --shadow-lg: 0 16px 56px rgba(20, 10, 5, 0.22);
  --shadow-gold: 0 4px 24px rgba(200, 122, 58, 0.3);
  --radius: 4px;
  --radius-lg: 8px;
  --transition: 0.28s ease;
  --nav-height: 70px;
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--espresso);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--espresso);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.85rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.01em; }

p { margin-bottom: 1rem; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}

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

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

ul, ol { list-style: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Utility Classes ----- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 5rem 0;
}

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

.btn-primary,
.btn-secondary,
.btn-outline {
  display: inline-block;
  padding: 0.8rem 2.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  border: 2px solid transparent;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.btn-primary {
  background-color: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.btn-primary:hover {
  background-color: #b56934;
  border-color: #b56934;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-secondary {
  background-color: transparent;
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.5);
}

.btn-secondary:hover {
  background-color: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.8);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn-outline:hover {
  background-color: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* ----- Animations ----- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: scaleX(0); transform-origin: left; }
  to   { opacity: 1; transform: scaleX(1); transform-origin: left; }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in.delay-1 { animation-delay: 0.15s; }
.fade-in.delay-2 { animation-delay: 0.3s; }
.fade-in.delay-3 { animation-delay: 0.45s; }
.fade-in.delay-4 { animation-delay: 0.6s; }

/* Scroll animation */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   1. Navigation — .navbar, .nav-container, .nav-logo, .nav-toggle, .nav-links
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: var(--espresso);
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(200, 121, 65, 0.15), 0 2px 16px rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(200, 121, 65, 0.1);
}

.navbar.scrolled {
  box-shadow: 0 1px 0 rgba(200, 121, 65, 0.2), 0 6px 24px rgba(0, 0, 0, 0.4);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.01em;
  line-height: 1.1;
  display: inline-block;
}

.nav-logo:hover { color: var(--gold); }

.nav-logo span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-top: 1px;
  opacity: 0.85;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  color: var(--cream);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after { width: 100%; }

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-left: 1.5rem;
}

.lang-switcher a {
  color: rgba(247, 242, 236, 0.5);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.06em;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  transition: color var(--transition), background var(--transition);
}

.lang-switcher a:hover {
  color: var(--gold);
  background: rgba(200, 122, 58, 0.08);
}

.lang-switcher a.active {
  color: var(--gold);
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}

.nav-toggle .hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--cream);
  transition: all var(--transition);
  border-radius: 2px;
}

.nav-toggle:hover .hamburger-line { background-color: var(--gold); }

/* ==========================================================================
   2. Hero Section — .hero, .hero-content, .hero-cta
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: var(--nav-height);
  background-color: var(--espresso);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(200, 121, 65, 0.18) 0%, transparent 60%),
    linear-gradient(160deg, rgba(28, 15, 8, 0.96) 0%, rgba(60, 35, 18, 0.88) 50%, rgba(28, 15, 8, 0.95) 100%);
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  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)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 780px;
  padding: 2rem 1.5rem;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
  animation: fadeInUp 0.85s ease 0.1s both;
  font-style: italic;
  font-weight: 600;
}

.hero-content h1::after {
  content: '';
  display: block;
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(200, 122, 58, 0.2));
  margin: 1.4rem auto 0;
  border-radius: 2px;
  animation: slideInRight 0.6s ease 0.9s both;
}

.hero-content p {
  color: rgba(247, 242, 236, 0.78);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  margin-bottom: 2rem;
  line-height: 1.8;
  font-weight: 300;
  animation: fadeInUp 0.85s ease 0.35s both;
}

.hero-subheadline {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem) !important;
  margin-bottom: 1rem !important;
}

.hero-intro {
  font-size: 1rem !important;
  opacity: 0.85;
  margin-bottom: 2rem !important;
}

.hero-personal {
  font-size: 0.95rem !important;
  opacity: 0.8;
  font-style: italic;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.85s ease 0.55s both;
}

/* ==========================================================================
   3. Section Heading — used as h2 class directly
   ========================================================================== */
.section-heading {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  letter-spacing: -0.02em;
}

.section-heading::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(200, 121, 65, 0.3));
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ==========================================================================
   4. Pillar Cards — index.html
   ========================================================================== */
.pillars {
  padding: 5rem 0;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.pillar-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pillar-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--gold);
}

.pillar-card h3 {
  margin-bottom: 0.75rem;
}

.pillar-card p {
  color: var(--roast);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ==========================================================================
   5. Stats Bar — .stats-bar, .stats-grid, .stat
   ========================================================================== */
.stats-bar {
  background-color: var(--espresso);
  padding: 3.5rem 0;
  border-top: 1px solid rgba(200, 122, 58, 0.15);
  border-bottom: 1px solid rgba(200, 122, 58, 0.1);
}

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

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--gold);
  display: block;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(247, 242, 236, 0.6);
  font-weight: 400;
  display: block;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ==========================================================================
   6. About Lab Section — index.html
   ========================================================================== */
.about-lab {
  padding: 5rem 0;
  background-color: var(--cream);
}

.about-lab .container {
  max-width: 800px;
  text-align: center;
}

.about-lab p {
  color: var(--roast);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.about-lab .btn-outline {
  margin-top: 1rem;
}

/* ==========================================================================
   7. About Page — .about-bio, .bio-grid, .about-vision, .about-timeline
   ========================================================================== */

/* Bio Section */
.about-bio {
  padding: 5rem 0;
}

.bio-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.bio-photo {
  display: flex;
  justify-content: center;
}

.photo-placeholder {
  width: 250px;
  height: 300px;
  background-color: var(--cream);
  border: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.photo-icon {
  font-size: 4rem;
}

.photo-placeholder p {
  font-weight: 600;
  color: var(--roast);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.bio-text h2 {
  margin-bottom: 0.5rem;
}

.bio-title {
  color: var(--gold);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.bio-text p {
  color: var(--roast);
  line-height: 1.7;
}

/* Vision Section */
.about-vision {
  padding: 5rem 0;
  background-color: var(--cream);
}

.about-vision .container {
  max-width: 800px;
}

.vision-quote {
  border-left: 4px solid var(--gold);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background-color: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.vision-quote p {
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--espresso);
  margin-bottom: 0;
}

/* Timeline Section */
.about-timeline {
  padding: 5rem 0;
}

.timeline {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--gold);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding: 0 0 2rem 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background-color: var(--gold);
  border-radius: 50%;
  transform: translateX(-4.5px);
}

.timeline-year {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
  letter-spacing: 0.05em;
}

.timeline-content p {
  color: var(--roast);
  margin-bottom: 0;
}

/* ==========================================================================
   8. Research Page — .research-intro, .research-cards, .research-card
   ========================================================================== */

/* Research Intro */
.research-intro {
  padding: 4rem 0 2rem;
}

.lead-text {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--roast);
}

/* Research Cards */
.research-cards {
  padding: 2rem 0 5rem;
}

.research-cards .container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.research-card {
  background-color: var(--espresso-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--gold);
  padding: 2.25rem 2.5rem;
  transition: transform var(--transition), box-shadow var(--transition), border-left-color var(--transition);
}

.research-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-left-color: var(--gold-light);
}

.research-card-body h3 {
  margin-bottom: 0.75rem;
  color: var(--cream);
}

.research-card-body p {
  color: rgba(247, 242, 236, 0.72);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

/* Color variants */
.research-card--docking  { border-left-color: #D4956A; }
.research-card--network  { border-left-color: #C87A3A; }
.research-card--maillard { border-left-color: #E0B070; }
.research-card--admet    { border-left-color: #A86030; }

.research-link {
  display: inline-block;
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition);
}

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

/* Research CTA */
.research-cta {
  padding: 5rem 0;
  background-color: var(--cream);
  text-align: center;
}

.research-cta h2 {
  margin-bottom: 1rem;
}

.research-cta p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--roast);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Publications Section */
.publications {
  padding: 5rem 0;
  background-color: var(--white);
}

.publications .section-heading {
  text-align: center;
  margin-bottom: 0.5rem;
}

.publications-intro {
  text-align: center;
  color: var(--roast);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.pub-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--gold);
  transition: transform var(--transition), box-shadow var(--transition);
}

.pub-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pub-item:nth-child(2) { border-left-color: var(--roast); }
.pub-item:nth-child(3) { border-left-color: #D4A574; }
.pub-item:nth-child(4) { border-left-color: #6B3A1F; }
.pub-item:nth-child(5) { border-left-color: #2D6A4F; }

.pub-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: 0.2rem 0.8rem;
  border-radius: 1rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.pub-badge--conference { background: #2D6A4F; }

.pub-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--espresso);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.pub-authors {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--roast);
  margin-bottom: 0.5rem;
}

.pub-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.pub-abstract {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.pub-abstract summary {
  cursor: pointer;
  color: var(--roast);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: var(--font-body);
}

.pub-abstract summary:hover {
  color: var(--gold);
}

.pub-abstract p {
  margin-top: 0.75rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--cream);
}

.pub-keywords {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.pub-keyword {
  background: var(--cream);
  color: var(--roast);
  padding: 0.15rem 0.6rem;
  border-radius: 1rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 500;
  border: 1px solid rgba(139, 94, 60, 0.15);
}

.pub-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pub-link {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.pub-link:hover {
  background: var(--gold);
  color: var(--white);
}

.pub-link--primary {
  background: var(--gold);
  color: var(--white);
}

.pub-link--primary:hover {
  background: var(--roast);
  border-color: var(--roast);
}

/* ==========================================================================
   9. Book Page — cover, USP, TOC, comparison, signup
   ========================================================================== */

/* Book Cover Section */
.book-cover-section {
  padding: 5rem 0;
  background-color: var(--cream);
}

.book-cover-mockup {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.book-spine {
  width: 30px;
  background: linear-gradient(180deg, var(--espresso) 0%, var(--roast) 100%);
  flex-shrink: 0;
}

.book-front {
  flex: 1;
  background: linear-gradient(145deg, var(--espresso), var(--roast));
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 500px;
}

.book-cover-label {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.book-cover-title {
  color: var(--cream) !important;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.book-cover-subtitle {
  color: rgba(245, 240, 235, 0.8);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.book-cover-author {
  color: var(--gold);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0;
}

/* USP Grid */
.book-usp {
  padding: 5rem 0;
}

.usp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.usp-item {
  text-align: center;
  padding: 1.5rem;
}

.usp-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
}

.usp-item p {
  color: var(--roast);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Table of Contents (book page — uses divs, not ol/ul) */
.book-toc {
  padding: 5rem 0;
  background-color: var(--cream);
}

.book-toc .toc-list {
  max-width: 600px;
  margin: 0 auto;
}

.toc-part {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(139, 94, 60, 0.15);
  padding-left: 1.5rem;
  position: relative;
}

.toc-part::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.6rem;
  width: 8px;
  height: 8px;
  background-color: var(--gold);
  border-radius: 50%;
}

.toc-part h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.toc-part p {
  color: var(--roast);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Comparison Table */
.book-comparison {
  padding: 5rem 0;
}

.comparison-intro {
  text-align: center;
  color: var(--roast);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(139, 94, 60, 0.15);
}

.comparison-table th {
  background-color: var(--espresso);
  color: var(--cream);
  font-weight: 600;
  font-size: 0.9rem;
}

.comparison-table tbody tr:hover {
  background-color: rgba(196, 149, 106, 0.05);
}

.comparison-highlight {
  background-color: rgba(196, 149, 106, 0.12) !important;
}

.comparison-highlight td {
  color: var(--espresso);
}

/* Signup Section */
.book-signup {
  padding: 5rem 0;
  background-color: var(--cream);
  text-align: center;
}

.book-signup p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--roast);
  font-size: 1.05rem;
  line-height: 1.7;
}

.signup-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 500px;
  margin: 0 auto 1rem;
}

.signup-form input[type="email"] {
  flex: 1;
  min-width: 250px;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--espresso);
  background-color: var(--white);
  border: 2px solid rgba(139, 94, 60, 0.2);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.signup-form input[type="email"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.2);
}

.signup-note {
  font-size: 0.85rem;
  color: var(--roast);
  opacity: 0.7;
  margin-bottom: 0 !important;
}

/* Download Grid */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 700px;
  margin: 2rem auto 0;
}

.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.download-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.download-icon {
  font-size: 2.5rem;
}

.download-label {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--espresso);
}

.download-desc {
  font-size: 0.85rem;
  color: var(--roast);
  text-align: center;
  line-height: 1.5;
}

/* ==========================================================================
   10. Contact Page
   ========================================================================== */
.contact-section {
  padding: 5rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-form-wrapper h2 {
  margin-bottom: 1.5rem;
}

.form-note {
  background-color: var(--cream);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--roast);
  margin-bottom: 1.5rem;
}

/* Contact Form */
.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form .form-group label,
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--espresso);
}

.contact-form .form-group input,
.contact-form .form-group textarea,
.contact-form .form-group select,
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--espresso);
  background-color: var(--white);
  border: 2px solid rgba(139, 94, 60, 0.2);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.2);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(139, 94, 60, 0.45);
}

/* Error message for form validation */
.error-message {
  display: none;
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.input-error {
  border-color: #c0392b !important;
}

/* Contact Info */
.contact-info h2 {
  margin-bottom: 1.5rem;
}

.info-block {
  margin-bottom: 2rem;
}

.info-block h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--espresso);
}

.info-block p {
  color: var(--roast);
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-links li {
  list-style: none;
}

.social-links a {
  color: var(--gold);
  font-weight: 500;
  font-size: 0.95rem;
}

.social-links a:hover {
  color: var(--roast);
}

/* ==========================================================================
   11. Footer — .site-footer, .footer-grid, .footer-col, .footer-bottom
   ========================================================================== */
.site-footer {
  background-color: var(--espresso);
  color: var(--cream);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
}

.footer-col p {
  color: rgba(245, 240, 235, 0.7);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col ul li {
  list-style: none;
}

.footer-col a {
  color: rgba(245, 240, 235, 0.7);
  font-size: 0.95rem;
  transition: color var(--transition);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(245, 240, 235, 0.1);
  font-size: 0.85rem;
  color: rgba(245, 240, 235, 0.5);
}

/* ==========================================================================
   12. Background Helpers
   ========================================================================== */
.bg-cream { background-color: var(--cream); }
.bg-espresso { background-color: var(--espresso); }
.bg-white { background-color: var(--white); }

/* ==========================================================================
   13. Responsive — Tablet (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  /* Navigation */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--espresso);
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  }

  .nav-links.active { display: flex; }

  .nav-toggle { display: flex; }

  .nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active .hamburger-line:nth-child(2) { opacity: 0; }

  .nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Hero */
  .hero { min-height: 70vh; }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Pillars */
  .pillar-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Bio grid */
  .bio-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .bio-photo {
    justify-content: center;
  }

  /* Research cards */
  .research-cards .container {
    gap: 1.5rem;
  }

  /* Download grid */
  .download-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
  }

  /* Service grid — 2 columns on tablet */
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Book cover */
  .book-cover-mockup {
    max-width: 320px;
  }

  .book-front {
    min-height: 400px;
    padding: 2rem 1.5rem;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Section spacing */
  .pillars,
  .about-bio,
  .about-vision,
  .about-timeline,
  .research-cards,
  .research-cta,
  .book-cover-section,
  .book-usp,
  .book-toc,
  .book-comparison,
  .book-signup,
  .contact-section,
  .about-lab,
  .section-padding { padding: 3.5rem 0; }

  .research-intro { padding: 3rem 0 1rem; }
}

/* ==========================================================================
   14. Responsive — Mobile (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  body { font-size: 15px; }

  .container { padding: 0 1rem; }

  .pillars,
  .about-bio,
  .about-vision,
  .about-timeline,
  .research-cards,
  .research-cta,
  .book-cover-section,
  .book-usp,
  .book-toc,
  .book-comparison,
  .book-signup,
  .contact-section,
  .about-lab,
  .section-padding { padding: 2.5rem 0; }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Service grid — single column on mobile */
  .service-grid {
    grid-template-columns: 1fr;
  }

  .stat-number { font-size: 2rem; }

  /* Hero */
  .hero { min-height: 60vh; }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    width: 100%;
    max-width: 280px;
  }

  /* Buttons */
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
  }

  /* USP grid */
  .usp-grid {
    grid-template-columns: 1fr;
  }

  /* Signup form */
  .signup-form {
    flex-direction: column;
    align-items: stretch;
  }

  .signup-form input[type="email"] {
    min-width: auto;
  }

  /* Comparison table */
  .comparison-table {
    font-size: 0.85rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.6rem 0.5rem;
  }

  /* Footer */
  .site-footer { padding: 3rem 0 1.5rem; }
}

/* ==========================================================================
   15. Print Styles
   ========================================================================== */
@media print {
  .navbar,
  .site-footer,
  .btn-primary,
  .btn-secondary,
  .btn-outline,
  .nav-toggle {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  .hero { min-height: auto; padding: 2rem 0; margin-top: 0; }
  .hero::before { display: none; }
  .hero-content h1 { color: #000; }
  .hero-content p { color: #333; }
}

/* ============================================
   B2B SERVICE COMPONENTS
   ============================================ */

/* Buyer Segment Strip */
.buyer-strip {
    background: var(--espresso-light);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(200, 122, 58, 0.18);
    border-bottom: 1px solid rgba(200, 122, 58, 0.1);
}
.buyer-strip p {
    color: var(--cream);
    opacity: 1;
    font-size: 0.95rem;
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-bottom: 1.5rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}
.buyer-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}
.buyer-tag {
    background: rgba(200, 122, 58, 0.12);
    color: var(--gold-light);
    border: 1px solid rgba(200, 122, 58, 0.3);
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: background var(--transition), color var(--transition);
}
.buyer-tag:hover {
    background: rgba(200, 122, 58, 0.22);
    color: var(--cream);
}

/* Service Cards */
.services-section {
    padding: 5rem 0;
    background: var(--parchment);
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
}
.service-card {
    background: var(--white);
    border: 1px solid rgba(20, 10, 5, 0.06);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.25rem;
    transition: box-shadow 0.28s, transform 0.28s, border-left-color 0.28s;
    position: relative;
}
.service-card:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
    border-left-color: var(--gold-light);
}
.service-tier {
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    margin-bottom: 0.75rem;
}
.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--espresso);
    font-family: var(--font-heading);
}
.service-card p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #5a4a3a;
}

/* Credibility / Proof Strip */
.proof-strip {
    background: var(--cream);
    border-top: 1px solid rgba(20, 10, 5, 0.08);
    border-bottom: 1px solid rgba(20, 10, 5, 0.06);
    padding: 4.5rem 0;
}
.proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    text-align: center;
}
.proof-item h4 {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--espresso);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}
.proof-item p {
    font-size: 0.88rem;
    color: #6a5a50;
    line-height: 1.6;
}

/* Segment Cards (Who We Help) */
.segments-section {
    padding: 5rem 0;
}
.segment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}
.segment-card {
    border: 1px solid rgba(28, 15, 8, 0.08);
    border-radius: var(--radius-lg);
    padding: 2rem;
    background: white;
    transition: box-shadow 0.22s;
}
.segment-card:hover {
    box-shadow: var(--shadow-sm);
}
.segment-card h3 {
    color: var(--espresso);
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.3rem;
}
.segment-label {
    display: inline-block;
    background: rgba(200, 121, 65, 0.1);
    color: var(--roast);
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}
.segment-card p {
    font-size: 0.92rem;
    color: #5a4a3a;
    line-height: 1.65;
    margin-bottom: 1rem;
}
.segment-card .segment-reports {
    font-size: 0.82rem;
    color: var(--gold);
    font-style: italic;
    font-family: var(--font-body);
}

/* B2B Hero override */
.hero-b2b h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.15;
}
.hero-b2b .hero-tagline {
    font-size: 1.05rem;
    color: rgba(248, 243, 238, 0.78);
    max-width: 700px;
    margin: 1.5rem auto 0;
    line-height: 1.75;
    font-weight: 300;
}

/* Report Type Cards (reports.html) */
.report-type-card {
    background: white;
    border: 1px solid rgba(28, 15, 8, 0.07);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius);
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.22s, border-left-color 0.22s;
}
.report-type-card:hover {
    box-shadow: var(--shadow-sm);
    border-left-color: #b56934;
}
.report-type-card .report-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: #999;
    letter-spacing: 0.02em;
}
.report-type-card h3 {
    color: var(--espresso);
    font-size: 1.35rem;
    font-family: var(--font-heading);
    margin-bottom: 0.75rem;
}

/* B2B Contact Form selects */
.contact-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(28, 15, 8, 0.15);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: white;
    color: var(--espresso);
}

/* Section subheading */
.section-subheading {
    text-align: center;
    color: #7a6a60;
    font-size: 1rem;
    font-family: var(--font-body);
    margin-top: 0.5rem;
    font-weight: 400;
}
