/* ============================================
   Tech Horizon Labs — Design System
   Editorial + Warm + Alive
   Fraunces (headings) + Instrument Sans (body)
   Fonts loaded via <link> in HTML for non-render-blocking performance.
   ============================================ */

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

/* --- Variables --- */
:root {
  --bg: #FAFAF8;
  --bg-warm: hsl(25 35% 95%);
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #7a7a7a;
  --accent: #B5654A;
  --accent-hover: #9E5740;
  --accent-light: hsl(18 45% 92%);
  --border: #e0ddd8;
  --border-light: #eceae6;
  --white: #ffffff;

  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;

  --max-width: 720px;
  --max-width-wide: 960px;
  --side-padding: 1.5rem;

  --space-xs: 1rem;
  --space-sm: 2rem;
  --space-md: 4rem;
  --space-lg: 6rem;
  --space-xl: 8rem;
}

/* --- Base --- */
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

/* Paper grain texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* Dot grid canvas */
#dot-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

/* Ensure content sits above canvas + grain */
body > *:not(#dot-grid) {
  position: relative;
  z-index: 1;
}

/* Nav must sit above sibling sections so mobile dropdown isn't obscured.
   Matches specificity of body > *:not(#dot-grid) which has ID-level weight. */
body > nav:not(#dot-grid) {
  z-index: 10;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

small {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --- Links --- */
a {
  color: var(--text);
  text-decoration: none;
}

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

.link-arrow {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.link-arrow:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--side-padding);
  padding-right: var(--side-padding);
}

.container-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding-left: var(--side-padding);
  padding-right: var(--side-padding);
}

.section {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

/* --- Accent Rule (replaces thin hr) --- */
.accent-rule {
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: var(--space-md) 0;
  border: none;
}

.accent-rule.centered {
  margin-left: auto;
  margin-right: auto;
}

/* Keep thin rules as an option */
.section-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* --- Warm Band (full-width tinted sections) --- */
.warm-band {
  background: var(--bg-warm);
  padding: var(--space-lg) 0;
  margin: 0 calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
}

/* Prevent double-stacking: warm-band provides padding, section doesn't need to add more */
.warm-band > .section {
  padding-top: 0;
  padding-bottom: 0;
}

/* --- Navigation --- */
.site-nav {
  padding: 1.5rem var(--side-padding);
  max-width: calc(var(--max-width-wide) + var(--side-padding) * 2);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-nav .brand {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.footer-logo {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.site-nav .brand:hover {
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-md) var(--side-padding);
  max-width: calc(var(--max-width-wide) + var(--side-padding) * 2);
  margin: 0 auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-left {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-left .footer-brand {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text);
  font-size: 0.9375rem;
  display: block;
  margin-bottom: 0.25rem;
}

.footer-right {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.footer-right a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-right a:hover {
  color: var(--text);
}

/* --- Hero --- */
.hero {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-lg);
  position: relative;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  max-width: 660px;
}

/* Large decorative accent line behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 2rem;
  right: -2rem;
  width: 120px;
  height: 4px;
  background: var(--accent);
  opacity: 0.35;
  border-radius: 2px;
}

.hero .subline {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  max-width: 540px;
}

.hero .tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.trust-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.trust-stat {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.trust-sep {
  color: var(--border);
  font-size: 0.875rem;
  line-height: 1;
}

/* --- Method / Process --- */
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 4rem;
  margin-top: var(--space-sm);
}

.method-phase {
  position: relative;
  padding-left: 1rem;
}

.method-number {
  font-family: var(--font-heading);
  font-size: 5.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  opacity: 0.06;
  position: absolute;
  top: -1rem;
  left: -0.25rem;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: transform;
}

/* Activated state — numbers become more visible */
.flow-active .method-number {
  opacity: 0.12;
}

.method-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  position: relative;
}

.method-duration {
  font-size: 0.8125rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.method-phase p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Phase left accent bar that draws in */
.method-phase::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  opacity: 0.25;
  transition: height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.flow-active .method-phase::before {
  height: 100%;
}

.flow-active .method-phase:nth-child(1)::before { transition-delay: 0s; }
.flow-active .method-phase:nth-child(2)::before { transition-delay: 0.2s; }
.flow-active .method-phase:nth-child(3)::before { transition-delay: 0.4s; }
.flow-active .method-phase:nth-child(4)::before { transition-delay: 0.6s; }

/* Flow line SVG (connecting phases) */
.flow-line-container {
  position: relative;
  margin-top: var(--space-sm);
}

.flow-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.flow-line path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0.15;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2s ease;
}

.flow-line path.drawn {
  stroke-dashoffset: 0;
}

.flow-dot {
  fill: var(--accent);
  opacity: 0.3;
}

@keyframes flow-pulse {
  0%, 100% { opacity: 0.15; r: 3; }
  50% { opacity: 0.4; r: 4; }
}

.flow-dot {
  animation: flow-pulse 2.5s ease-in-out infinite;
}

.flow-dot:nth-child(2) { animation-delay: 0.4s; }
.flow-dot:nth-child(3) { animation-delay: 0.8s; }
.flow-dot:nth-child(4) { animation-delay: 1.2s; }

/* --- Case Studies --- */
.case-study {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
}

.case-study:first-child {
  padding-top: 0;
}

.case-study:last-child {
  border-bottom: none;
}

.case-study-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.case-study h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.case-study p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.case-study .result {
  color: var(--text);
  font-weight: 500;
}

/* --- Metric Callouts --- */
.metric {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
  will-change: transform, opacity;
}

.metric-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

/* --- Client words intro line --- */
.client-words-intro {
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
  margin-bottom: 1.5rem;
}

/* --- Blockquote (testimonials) --- */
blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* --- Principles --- */
.principles p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  padding-left: 0;
}

/* --- Two Paths (bordered cards) --- */
.two-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: var(--space-sm);
}

.path {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease, border-color 0.3s ease;
}

.path:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-color: var(--accent);
}

.path h3 {
  margin-bottom: 0.75rem;
}

.path p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* --- Report Preview --- */
.report-preview {
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.report-preview.report-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.report-window {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}

.report-header {
  background: var(--text);
  color: var(--bg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.report-badge {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--accent);
  color: var(--white);
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
}

.report-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 500;
}

.report-body {
  padding: 1.5rem;
}

.report-section {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.report-section:last-child {
  border-bottom: none;
}

.report-visible .report-section-1 { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
.report-visible .report-section-2 { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }
.report-visible .report-section-3 { opacity: 1; transform: translateY(0); transition-delay: 0.9s; }

.report-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.report-section p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

.report-phase {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 4px;
}

.report-phase strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.25rem;
}

.report-table {
  font-size: 0.8125rem;
}

.report-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.report-row:last-child {
  border-bottom: none;
}

.report-row-header {
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--border);
}

/* --- Results Grid --- */
.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.result-card {
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.result-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Security Badges --- */
.security-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.25rem 0.625rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

/* --- Tool Grid --- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tool-item {
  padding: 1.5rem;
  border: 1px solid rgba(181, 101, 74, 0.15);
  border-radius: 6px;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease, border-color 0.3s ease;
}

.tool-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  border-color: var(--accent);
}

.tool-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.tool-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.tool-item p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* --- Security Grid --- */
.security-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: var(--space-sm);
}

.security-item {
  text-align: left;
}

.security-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.security-item h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.security-item p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* --- Academy Pricing --- */
.tier {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.tier:last-child {
  border-bottom: none;
}

.tier-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
}

.tier-price {
  color: var(--accent);
  font-weight: 600;
  margin-left: 0.5rem;
}

.tier p {
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

.btn-submit {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  background-color: var(--accent);
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-submit:hover {
  background-color: var(--accent-hover);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-message {
  margin-top: 1rem;
  font-size: 0.9375rem;
}

.form-message.success {
  color: #4a7c59;
}

.form-message.error {
  color: #b54a4a;
}

/* --- Photo Placeholder --- */
.photo-placeholder {
  width: 160px;
  height: 160px;
  background: var(--border-light);
  border-radius: 4px;
  margin: 1.5rem 0;
}

/* --- Credentials --- */
.credentials {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* --- Research Page --- */
.chart-container {
  margin: var(--space-sm) 0;
  overflow-x: auto;
}

.bar-chart {
  width: 100%;
}

.bar-chart .bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.bar-chart .bar-label {
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 120px;
  text-align: right;
  color: var(--text);
}

.bar-chart .bar-track {
  flex: 1;
  height: 28px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.bar-chart .bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 0;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
}

.bar-chart .bar-fill.animated {
  /* width set by JS */
}

.bar-chart .bar-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: var(--space-sm);
}

.company-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.company-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-color: var(--accent);
}

.company-card .company-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.company-card .company-stat {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.company-card .company-stat strong {
  color: var(--accent);
}

.company-card .company-detail {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.company-card.expanded .company-detail {
  display: block;
}

.company-header {
  cursor: pointer;
}

.company-header::after {
  content: '+';
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.company-card.expanded .company-header::after {
  content: '−';
}

.company-card {
  position: relative;
}

.company-card.expanded {
  grid-column: 1 / -1;
}

.dash-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.dash-tab {
  background: none;
  border: none;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  font-family: var(--font-body);
}

.dash-tab:hover {
  color: var(--text);
}

.dash-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.dash-panel {
  display: none;
}

.dash-panel.active {
  display: block;
}

.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.qs-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  transition: box-shadow 0.2s, transform 0.15s;
}

.qs-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.qs-name {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.qs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border-light);
}

.qs-row:last-child {
  border-bottom: none;
}

.qs-label {
  color: var(--text-muted);
}

.qs-value {
  font-weight: 600;
  color: var(--text);
}

.card-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.card-tab {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  font-family: var(--font-body);
}

.card-tab:hover {
  color: var(--text);
}

.card-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.card-panel {
  display: none;
}

.card-panel.active {
  display: block;
}

.funding-timeline {
  position: relative;
  padding-left: 1rem;
  border-left: 2px solid var(--border-light);
}

.tl-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto auto;
  gap: 0.5rem;
  padding: 0.5rem 0 0.5rem 1rem;
  position: relative;
  font-size: 0.8125rem;
  align-items: center;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--bg);
}

.tl-item.highlight::before {
  background: var(--accent);
  width: 10px;
  height: 10px;
}

.tl-item.highlight {
  font-weight: 600;
}

.tl-date {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.tl-round {
  color: var(--text);
}

.tl-amount {
  color: var(--accent);
  font-weight: 600;
  text-align: right;
}

.tl-val {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: right;
  min-width: 3.5rem;
}

.investor-group {
  margin-bottom: 1rem;
}

.investor-group h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.inv-tag {
  display: inline-block;
  background: var(--border-light);
  color: var(--text);
  padding: 0.25rem 0.625rem;
  border-radius: 3px;
  font-size: 0.8125rem;
  margin: 0 0.25rem 0.375rem 0;
  transition: background 0.2s;
}

.inv-tag:hover {
  background: var(--accent);
  color: var(--white);
}

.funding-chart-wrap {
  position: relative;
}

.funding-chart-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#funding-chart,
#valuation-race-chart {
  width: 100%;
  height: auto;
  max-height: 420px;
}

.funding-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  transition: background 0.2s, opacity 0.3s;
}

.legend-item:hover {
  background: var(--border-light);
}

.legend-item.dimmed {
  opacity: 0.25;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.funding-tooltip {
  display: none;
  position: absolute;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.funding-tooltip.visible {
  display: block;
}

/* --- Fade-in animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger > .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger > .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger > .fade-in:nth-child(3) { transition-delay: 0.2s; }
.stagger > .fade-in:nth-child(4) { transition-delay: 0.3s; }
.stagger > .fade-in:nth-child(5) { transition-delay: 0.4s; }
.stagger > .fade-in:nth-child(6) { transition-delay: 0.5s; }
.stagger > .fade-in:nth-child(7) { transition-delay: 0.6s; }
.stagger > .fade-in:nth-child(8) { transition-delay: 0.7s; }

/* --- Skip link (accessibility) --- */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--text);
  color: var(--bg);
  z-index: 100;
  font-size: 0.875rem;
  border-radius: 4px;
}

/* --- Security Page --- */
.security-section-header {
  margin-bottom: var(--space-sm);
}

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

.section-intro {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 560px;
}

.security-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: var(--space-sm);
}

.security-feature {
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease, border-color 0.3s ease;
}

.security-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  border-color: rgba(181, 101, 74, 0.3);
}

.security-feature h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.security-feature p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.security-sme-context {
  margin-top: var(--space-sm);
  padding: 1.75rem 2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}

.security-sme-context .security-badge {
  margin-bottom: 0.75rem;
}

.security-sme-context p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section-cta {
  margin-top: 1.5rem;
}

.faq-list {
  margin-top: var(--space-sm);
}

.faq-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

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

.faq-item h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.625rem;
  color: var(--text);
}

.faq-item p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

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

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

.faq-accordion .faq-question {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  padding: 1.125rem 2rem 1.125rem 0;
  cursor: pointer;
  position: relative;
  list-style: none;
  line-height: 1.4;
}

.faq-accordion .faq-question::-webkit-details-marker {
  display: none;
}

.faq-accordion .faq-question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.2s ease;
}

.faq-accordion details[open] .faq-question::after {
  content: "\2212";
}

.faq-accordion .faq-answer {
  padding: 0 0 1.25rem 0;
}

.faq-accordion .faq-answer p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.faq-accordion .faq-answer a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-accordion .faq-answer a:hover {
  color: var(--accent-hover);
}

/* --- About Page --- */
.about-intro {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: var(--space-sm);
}

.about-photo {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  object-position: center top;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border-light);
}

.about-bio p {
  color: var(--text-secondary);
}

/* --- Testimonials --- */
.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: var(--space-sm);
}

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 2rem 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-color: var(--accent);
}

.testimonial-card--email {
  border-left: 3px solid var(--accent);
  padding-left: calc(2rem - 2px);
}

.testimonial-type {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 1rem;
  align-self: flex-start;
}

.testimonial-type--email {
  color: var(--accent);
  background: var(--accent-light);
}

.testimonial-type--video {
  color: var(--text-muted);
  background: var(--bg-warm);
}

.testimonial-mark {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.12;
  position: absolute;
  top: 0.75rem;
  right: 1.5rem;
  user-select: none;
  pointer-events: none;
}

.testimonial-video-slot {
  margin-bottom: 1.25rem;
}

.testimonial-video-placeholder {
  background: var(--bg-warm);
  border: 1.5px dashed var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-video-placeholder svg {
  flex-shrink: 0;
  opacity: 0.35;
  color: var(--text-muted);
}

.testimonial-video-placeholder p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}

.testimonial-video-iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 6px;
}

.testimonial-quote {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 1.25rem;
  flex: 1;
  padding: 0;
  border: none;
}

.testimonial-attribution {
  border-top: 1px solid var(--border-light);
  padding-top: 0.875rem;
  margin-top: auto;
}

.testimonial-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
}

.testimonial-role {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.125rem;
}

/* ============================================
   Responsive
   ============================================ */

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

  .report-phases {
    grid-template-columns: repeat(2, 1fr);
  }

  .security-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .security-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --side-padding: 1.25rem;
    --space-lg: 4rem;
    --space-xl: 5rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero h1 { font-size: 2.5rem; }

  .about-intro {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-photo {
    max-width: 200px;
  }

  .method-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .method-number {
    font-size: 4rem;
  }

  .metric {
    font-size: 2.25rem;
  }

  .two-paths {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .company-grid {
    grid-template-columns: 1fr;
  }

  .tool-grid {
    grid-template-columns: 1fr 1fr;
  }

  .security-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .security-feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .security-sme-context {
    padding: 1.25rem 1.5rem;
  }

  .results-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-phases {
    grid-template-columns: 1fr;
  }

  .report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  :root {
    --side-padding: 1rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
  }

  body { font-size: 1rem; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }
  .hero h1 { font-size: 2rem; }

  .method-number {
    font-size: 3.5rem;
  }

  .metric {
    font-size: 2rem;
  }

  /* Mobile nav */
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    z-index: 50;
  }

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

  .nav-links a {
    display: block;
    padding: 0.75rem var(--side-padding);
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: relative;
  }

  .case-study {
    padding: var(--space-sm) 0;
  }


  .tool-grid {
    grid-template-columns: 1fr;
  }

  .security-feature-grid {
    grid-template-columns: 1fr;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .report-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 0.25rem;
  }

  .bar-chart .bar-label {
    min-width: 80px;
    font-size: 0.75rem;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .tl-item {
    grid-template-columns: 4.5rem 1fr;
    gap: 0.25rem;
  }

  .tl-amount, .tl-val {
    grid-column: 2;
    text-align: left;
  }

  .card-tab {
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
  }
}
