/* =========================================
   VARIABLES
   ========================================= */
:root {
  /* Colors */
  --standard-green: #32b692;
  --standard-green-alt: #c6ffe0;
  --standard-light: #f6f4ec;
  --standard-light-alt: #ece8d9; /* Slightly darker beige for boxes */
  --standard-dark: #0d0221;
  --standard-dark-alt: #2c2c2c;
  --standard-red: #e4453a;
  --standard-blue: #6a7cff;
  --text-primary: #0d0221;
  --text-muted: #424242;
  --text-inverse: #f6f4ec;
  --standard-viola: #34147D;
  --light-viola: #ad96f7; /* Required for contrast in Black Method Box */

  /* Button Gradients */
  --blue-dark: linear-gradient(var(--standard-dark), var(--standard-dark)) padding-box, linear-gradient(90deg, var(--standard-blue) 0%, var(--standard-light) 38.02%, var(--standard-blue) 75.83%) border-box;
  --blue-blue: linear-gradient(var(--standard-blue), var(--standard-blue)) padding-box, linear-gradient(90deg, var(--standard-blue) 0%, var(--standard-light) 38.02%, var(--standard-blue) 75.83%) border-box;
  --blue-light: linear-gradient(var(--standard-light), var(--standard-light)) padding-box, linear-gradient(90deg, var(--standard-blue) 0%, var(--standard-light) 38.02%, var(--standard-blue) 75.83%) border-box;
  --blue-green: linear-gradient(var(--standard-green-alt), var(--standard-green-alt)) padding-box, linear-gradient(90deg, var(--standard-blue) 0%, var(--standard-light) 38.02%, var(--standard-blue) 75.83%) border-box;

  /* Typography */
  --header-family: "JetBrains Mono", monospace;
  --body-family: "DM Sans", sans-serif;
  --button-font-family: "JetBrains Mono", monospace;
  --font-size: clamp(0.9rem, 0.45vw + 0.9rem, 1rem);

  /* Layout & Spacing */
  --content-width: 1100px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-3xl: 32px;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-2xl: 6rem;
  --transition-base: 0.3s ease;
}

/* =========================================
   RESETS & GLOBALS
   ========================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: var(--body-family);
  color: var(--text-primary);
  /* Pure Beige Background - removed the blueish/greenish gradients */
  background: var(--standard-light);
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--header-family);
  color: var(--standard-dark);
  letter-spacing: -0.02em;
}

p, li {
  margin: 0;
}

p, li, td, label, small,
.hero-subtitle,
.hero-authors,
.table-note,
.video-card p,
.site-footer p {
  font-family: var(--body-family);
  color: var(--text-primary);
}

p {
  line-height: 1.75;
}

section p + p {
  margin-top: 0.85rem;
}

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

.container {
  width: min(var(--content-width), calc(100vw - 2rem));
  margin: 0 auto;
}

.content-narrow {
  width: min(860px, calc(100vw - 2rem));
  margin: 0 auto;
}

.section {
  padding: 5.5rem 0;
}

/* Section Dark Background Standardized to Solid Viola */
.section-dark {
  color: var(--text-inverse);
  background: var(--standard-dark);
}

.section-dark h2,
.section-dark h3,
.section-dark p,
.section-dark li,
.section-dark .section-label {
  color: var(--text-inverse);
}

.section-label {
  margin-bottom: 0.7rem;
  color: var(--standard-blue);
  font-family: var(--header-family);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: 1.1rem;
  font-size: clamp(1.8rem, 1.25rem + 2.3vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* =========================================
   TEXT UTILITIES & HIGHLIGHTS
   ========================================= */
.period {
  color: var(--standard-red) !important;
  font-style: normal;
}

.highlight-green {
  color: var(--standard-green) !important;
}

.highlight-green-alt {
  color: var(--standard-green-alt) !important;
}

.highlight-blue {
  color: var(--standard-blue) !important;
}

.highlight-result {
  color: var(--standard-green);
  font-weight: 700;
}

.highlight-keyword {
  color: #34147d;
  font-weight: 700;
}

.section-dark .highlight-keyword {
  color: #c5b6ff;
}

/* =========================================
   NAVBAR & MOBILE MENU
   ========================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--standard-dark);
  color: var(--standard-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  height: 80px;
}

.navbar .brand {
  font-family: var(--header-family);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.2rem;
  color: var(--standard-light); 
  z-index: 1001;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  font-family: var(--header-family);
  font-weight: 800;
  font-size: 0.85rem;
  color: inherit;
  text-decoration: none;
  border-radius: 5px;
  background: transparent;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--standard-blue);
}

.menu-toggle {
  display: none; 
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 900;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--standard-light);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.menu-toggle:checked ~ .hamburger span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle:checked ~ .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle:checked ~ .hamburger span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.overlay {
  display: none;
  pointer-events: none;
}

.menu-toggle:checked ~ .overlay {
  display: block;
  pointer-events: auto;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--standard-dark);
  opacity: 0.65;
  z-index: 800;
  cursor: pointer;
}

.mobile-nav {
  box-sizing: border-box;
  overflow-y: auto;
  display: flex;
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background-color: var(--standard-dark);
  z-index: 801;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  flex-direction: column;
  padding: 80px 30px 40px;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--standard-light);
  font-family: var(--header-family);
  display: block;
  padding: 10px 0;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  font-weight: bold;
  color: var(--standard-green-alt);
}

.menu-toggle:checked ~ .mobile-nav {
  transform: translateX(0);
}

body:has(.menu-toggle:checked) {
  overflow: hidden;
}

/* =========================================
   FULL-BLEED HERO STYLES (w/ ANIMATION)
   ========================================= */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.main-hero {
  /* Changed from Viola to Dark Blue as requested */
  background: linear-gradient(135deg, #f6f4ec 0%, #0d0221 25%, #0d0221 100%);
  background-size: 200% 200%;
  animation: gradientMove 12s ease infinite; /* Dynamic element to fix static feel */
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
  color: var(--standard-light);
}

.main-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.05), transparent);
  pointer-events: none;
  z-index: 1;
}

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

.main-hero-grid {
  display: block;
  max-width: 1000px;
}

.h1-size {
  font-size: clamp(2rem, 4vw + 1.25rem, 4.375rem);
  font-family: var(--header-family);
  letter-spacing: -6%;
  font-weight: 800;
}

.uppercase { text-transform: uppercase; }
.weak { font-weight: 400; }

.hero-authors {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.author-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.52rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--standard-dark);
  background: rgba(106, 124, 255, 0.12);
  border: 1px solid rgba(106, 124, 255, 0.25);
}

.hero-affiliation {
  margin-top: 0.3rem;
  color: var(--standard-blue);
  font-family: var(--header-family);
  font-weight: 700;
}

.hero-affiliation a {
  color: var(--standard-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.hero-affiliation a:hover {
  color: var(--standard-green);
}

/* =========================================
   BUTTONS
   ========================================= */
.cta-button, 
.cta-button-alt, 
.tag-button {
  color: var(--standard-light);
  border: 2px solid transparent;
  font-family: var(--button-font-family);
  font-size: var(--font-size);
  border-radius: 100px;
  padding: 10px 35px;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bolder;
  width: fit-content;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.cta-button { background: var(--blue-dark); }
.cta-button:hover { background: var(--blue-light); color: var(--standard-blue); }

/* =========================================
   CARDS & GRIDS (SPECIFIC METHOD BOXES)
   ========================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
}

.card-grid .card {
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  /* Added a subtle white border so Card 01 stays visible against the Viola background */
  border: 1px solid rgba(255, 255, 255, 0.15); 
}

.card-grid .card > * {
  margin: 0 0 1rem;
  position: relative;
  z-index: 2;
}

/* Custom Method Cards Backgrounds */
/* Custom Method Cards Backgrounds */
.card-grid .card-01 { background: var(--standard-blue); } /* #6a7cff */
.card-grid .card-02 { background: #1C1C1E; }
.card-grid .card-03 { background: var(--standard-green); } /* #32b692 */

/* Force whitish text for maximum contrast on all method cards AND bold text */
.card-grid .card p,
.card-grid .card span,
.card-grid .card strong { 
  font-family: var(--body-family); /* Maps to "DM Sans", sans-serif */
  color: var(--standard-light) !important; 
}

/* Specific styling for the Card Headings (Build Task Experts, etc.) */
.card-grid .card h3 {
  font-family: var(--header-family); /* 'JetBrains Mono', monospace */
  font-size: 16px;
  color: var(--standard-light) !important; /* #F6F4EC */
  margin-bottom: 0.8rem;
  font-weight: 800; /* Extra bold */
}

.pill-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

/* Force whitish text for pills AND their bold text */
.pill,
.pill strong {
  border-radius: 999px;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(44, 44, 44, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--standard-light) !important;
  font-size: 0.95rem;
}

/* =========================================
   PROTOCOLS & TABLES
   ========================================= */
.protocol-card {
  margin-top: 1.25rem;
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  background: linear-gradient(145deg, rgba(198, 255, 224, 0.52), rgba(225, 234, 255, 0.65));
  border: 1px solid rgba(50, 182, 146, 0.35);
  box-shadow: 0 10px 24px rgba(29, 61, 102, 0.08);
}

.protocol-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
}

.protocol-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.protocol-item {
  border-radius: 14px;
  border: 1px solid rgba(106, 124, 255, 0.28);
  background: rgba(255, 255, 255, 0.84);
  padding: 0.85rem;
}

.protocol-item h4 {
  margin: 0 0 0.35rem;
  font-family: var(--header-family);
  font-size: 0.9rem;
  color: var(--standard-dark);
  font-weight: 800;
}

.protocol-item p { font-size: 0.9rem; }

.table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table-wrap th,
.table-wrap td {
  padding: 0.62rem 0.72rem;
  font-size: 0.91rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.table-wrap td { color: var(--text-primary); }
.table-wrap th {
  color: var(--standard-dark);
  font-family: var(--header-family);
  background: rgba(106, 124, 255, 0.07);
}

.wizard-val {
  color: #0e8a68;
  font-weight: 700;
}

/* =========================================
   VIDEOS
   ========================================= */
.video-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.video-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.09);
  background: #fff;
}

.video-card video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  height: 220px;
  object-fit: cover;
  background: #0d0221;
}

.video-card p {
  padding: 0.7rem 0.75rem;
  font-size: 0.87rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.caption-sep {
  margin: 0 0.35rem;
  color: var(--standard-blue);
  opacity: 0.8;
}

.real-copy {
  border-radius: 16px;
  padding: 1rem;
}

.real-videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.real-videos .video-card video {
  height: 240px;
  object-position: center;
}

/* =========================================
   PROJECTS & INSIGHTS (ANALYSIS)
   ========================================= */
.project-body,
.insights-body {
  display: grid !important;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.project-stats,
.insights-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Keep Stat Cards White */
.stat-card {
  background: #ffffff;
  border-top: 0.5px solid #ddd;
  border-right: 0.5px solid #ddd;
  border-bottom: 0.5px solid #ddd;
  border-left: 3px solid var(--standard-green);
  border-radius: 0 12px 12px 0;
  padding: 1.5rem 1.75rem;
  color: var(--standard-dark);
}

.stat-card--green { border-left-color: var(--standard-green); }
.stat-card--blue { border-left-color: var(--standard-blue); }

.stat-number { font-size: 64px; font-weight: 500; line-height: 1; }
.stat-card--green .stat-number { color: var(--standard-green); }
.stat-card--blue .stat-number { color: var(--standard-blue); }

.stat-approx {
  font-size: 20px;
  font-weight: 400;
  vertical-align: super;
  opacity: 0.6;
  margin-right: 2px;
}

.stat-label {
  font-size: 14px;
  margin-top: 6px;
  opacity: 0.7;
  line-height: 1.5;
}

/* Adjusted spacing for Analysis Section blank space */
.insights-section { padding: 4rem 0 2rem; }
.why-section { background: var(--standard-light); } /* Changed from dark to beige */
.insights-content { padding: 0 2rem; }

.insights-content .insights-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

/* Force dark text since background is now beige */
.why-section h2, 
.why-section .section-title { color: var(--standard-dark) !important; }

.insights-content .insights-title h2 {
  margin: 0;
  font-weight: 800;
  line-height: 1.1;
}

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

/* Beige Analysis Boxes */
.why-section .analysis-card {
  background: var(--standard-light-alt); /* Beige boxes */
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.why-section .analysis-card h3 {
  color: var(--standard-dark) !important;
  font-weight: 800;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.why-section .analysis-card p {
  color: var(--text-muted) !important;
  font-weight: 400;
}

/* =========================================
   MISC UTILITIES
   ========================================= */
pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.85);
}

code {
  font-family: var(--header-family);
  font-size: 0.84rem;
}

.site-footer {
  padding: 1.8rem 0 2.1rem;
  background: #f1eddf;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   RESPONSIVE QUERIES
   ========================================= */
@media (max-width: 1024px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .main-hero { padding: var(--space-lg) 0; }
}

@media (max-width: 840px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  
  .protocol-grid,
  .real-videos { grid-template-columns: 1fr; }

  .video-card video,
  .real-videos .video-card video { height: 230px; }
}

@media (max-width: 768px) {
  .project-body,
  .insights-body,
  .card-grid,
  .insights-grid { grid-template-columns: 1fr !important; }
  .insights-body { grid-template-columns: 1fr !important; gap: 1rem !important; margin-top: 1.5rem !important; }
}

@media (max-width: 680px) {
  .section { padding: 4.2rem 0; }
  .video-grid { grid-template-columns: 1fr; }
  .video-card video,
  .real-videos .video-card video { height: 210px; }
  .hero-copy, .hero-media { padding: 1rem; }
  .container, .content-narrow { width: calc(100vw - 1.2rem); }
}

/* Phone layout: keep result tables on screen, no sideways scrolling */
@media (max-width: 680px) {
  .table-wrap { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
  .table-wrap table { white-space: normal !important; width: 100% !important; table-layout: auto; min-width: 0 !important; }
  .table-wrap th, .table-wrap td {
    padding: 0.55rem 0.3rem !important;
    font-size: 12px !important;
    line-height: 1.25;
    word-break: break-word;
  }
  .table-wrap th:first-child, .table-wrap td:first-child { padding-left: 0.6rem !important; }
  .stat-number { font-size: 2.2rem; }
  pre { font-size: 11px; }
}

@media (max-width: 680px) {
  .analysis-card { padding: 0.9rem !important; }
  .insights-content { width: calc(100vw - 1rem) !important; }
}
@media (max-width: 680px) {
  .insights-section .container { padding-left: 0.4rem; padding-right: 0.4rem; }
}
