/**
 * BeargrassTransitions.com Design System v3.0
 * Beargrass & Transitions: Mountains, mist, calm
 * Unicode symbols only — zero emojis
 */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */
:root {
  /* Backgrounds — neutral near-black (SMS-aligned) */
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #1a1a1d;
  --bg-elevated: #222225;

  /* Text — pure white, neutral grays */
  --text-primary: #ffffff;
  --text-secondary: #a1a1a6;
  --text-tertiary: #6e6e73;
  --text-muted: #48484a;

  /* Brand accent — vibrant teal (SMS-aligned) */
  --brand: #20B9B1;
  --brand-light: #2dd4c8;
  --brand-dark: #1a9d94;
  --brand-subtle: rgba(32, 185, 177, 0.12);
  --brand-glow: rgba(32, 185, 177, 0.25);

  /* Section overlays — neutral (not green-tinted) */
  --mountain-far: rgba(17, 17, 19, 0.5);
  --mountain-mid: rgba(17, 17, 19, 0.7);
  --mountain-near: rgba(10, 10, 11, 0.9);
  --mist-overlay: rgba(17, 17, 19, 0.3);

  /* Borders — neutral */
  --border: #2c2c2e;
  --border-subtle: #1c1c1e;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem);
  --text-5xl: clamp(3rem, 2rem + 5vw, 5rem);

  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-width-content: 56rem;
  --max-width-wide: 72rem;
  --max-width-prose: 69rem;
  --container-padding: clamp(0.75rem, 3vw, 1.5rem);

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions — softer, calmer */
  --transition-fast: 200ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 400ms ease;

  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;

  /* Shadow tokens (SMS/TerpTune — event-driven, 0.5 opacity for dark bg) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
}

/* ==========================================================================
   Layout: Page Wrapper & Content
   ========================================================================== */
.page-wrapper {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.content {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: var(--space-16) var(--space-4);
}

@media (min-width: 1024px) {
  .content {
    padding: var(--space-16) var(--space-8);
  }
}

main {
  flex: 1;
  padding-top: 4rem;
}
/* Home: hero flush with nav, no gap */
.page-home main {
  padding-top: 0;
}
.page-home .content {
  padding-top: 0;
}

/* Unicode symbol — mountain (▲) replaces emoji */
.symbol-mountain {
  margin-right: 0.25em;
  opacity: 0.9;
  font-weight: var(--font-bold);
}

/* Content sections — peaks and valleys (mountain transitions) */
.content-section {
  position: relative;
  padding: var(--space-12) 0;
  margin: 0 calc(-1 * var(--container-padding));
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  overflow: visible;
}

.content-section:first-child {
  padding-top: 0;
}

.content-section--base {
  background: var(--bg-primary);
}

/* Home hero: mountain lake + accent glow (SMS/TerpTune architecture) */
/* Full-bleed: hero breaks out of content container to span viewport */
.page-home .content-section:first-child {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: var(--space-16) var(--container-padding);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
  padding-left: max(var(--container-padding), calc(50vw - var(--max-width-content) / 2 + var(--container-padding)));
  padding-right: max(var(--container-padding), calc(50vw - var(--max-width-content) / 2 + var(--container-padding)));
  background-image:
    linear-gradient(
      rgba(10, 15, 20, 0.75),
      rgba(10, 15, 20, 0.85)
    ),
    url('/images/hero-mountain-lake.jpg');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-color: var(--bg-primary);
}
/* Accent glow overlay (SMS-style radial gradients) */
.page-home .content-section:first-child::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(32, 185, 177, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(32, 185, 177, 0.03) 0%, transparent 50%);
  z-index: 0;
}
.page-home .content-section:first-child h1,
.page-home .content-section:first-child p {
  position: relative;
  z-index: 1;
  color: var(--text-primary);
}
.page-home .content-section:first-child h1 {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.page-home .content-section:first-child p {
  text-shadow: 0 0 8px #000, 0 0 16px #000, 0 2px 4px #000;
}
.page-home .content-section:first-child {
  align-items: center;
  text-align: center;
}
.page-home .content-section:first-child h1 {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: var(--font-bold);
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: none;
}
.page-home .content-section:first-child h1,
.page-home .content-section:first-child p {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
.hero-problem {
  font-size: 1.25rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}
.hero-solution {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--brand);
}
.hero-local {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 2rem;
  opacity: 0.9;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
  position: relative;
  z-index: 1;
}
.hero-ctas .cta-button:not(.cta-button--secondary) {
  color: #000;
}
.hero-ctas .cta-button:not(.cta-button--secondary):hover {
  color: #000;
}
.hero-ctas .cta-button--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.hero-ctas .cta-button--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
}
@media (max-width: 768px) {
  .page-home .content-section:first-child {
    min-height: 100vh;
    min-height: 100dvh;
    background-attachment: scroll;
    background-position: center;
    align-items: center;
    text-align: center;
  }
  .page-home .content-section:first-child h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    text-align: center;
  }
  .page-home .content-section:first-child p {
    text-align: center;
  }
  .page-home .content-section:first-child .hero-ctas {
    justify-content: center;
  }
}
.content-section--base:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--bg-primary);
  clip-path: polygon(
    0 100%, 8% 55%, 16% 85%, 24% 45%, 32% 70%, 40% 50%, 48% 90%, 56% 45%, 64% 75%, 72% 55%, 80% 80%, 88% 50%, 96% 70%, 100% 100%
  );
  z-index: 1;
}

.content-section--mountain {
  background: var(--bg-secondary);
  margin-top: -24px;
  padding-top: calc(var(--space-12) + 24px);
}
/* Peaks rising from valley (top of mountain section) */
.content-section--mountain::before {
  content: '';
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--bg-secondary);
  clip-path: polygon(
    0 100%, 6% 60%, 14% 88%, 22% 48%, 30% 72%, 38% 52%, 46% 85%, 54% 50%, 62% 70%, 70% 55%, 78% 82%, 86% 52%, 94% 68%, 100% 100%
  );
  z-index: 1;
}
/* Valley between mountain and next base */
.content-section--mountain::after {
  content: '';
  position: absolute;
  bottom: -24px;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--bg-secondary);
  clip-path: polygon(
    0 0, 12% 65%, 24% 20%, 36% 58%, 48% 30%, 60% 62%, 72% 25%, 84% 55%, 100% 0
  );
  z-index: 1;
}

/* Industry tiles — compact, scannable */
.industry-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  max-width: 1000px;
  margin: var(--space-8) auto var(--space-6);
}
.industry-tiles .tile {
  display: block;
  text-align: center;
  padding: var(--space-8) var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.industry-tiles .tile:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--brand);
  transform: translateY(-4px);
}
.industry-tiles .tile-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: var(--space-3);
  color: var(--brand);
}
.industry-tiles .tile h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-2);
  font-weight: 600;
  color: var(--text-primary);
}
.industry-tiles .tile p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}
.industries-note {
  text-align: center;
  margin-top: var(--space-6);
}
.industries-note a {
  color: var(--brand);
  font-weight: 500;
}

/* Industry cards (legacy — wrap_industry_cards) */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.industry-card {
  background: var(--bg-tertiary);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-6);
}
.industry-card[data-industry="tourism"] { border-left-color: #20B9B1; }
.industry-card[data-industry="restaurants"] { border-left-color: #f59e0b; }
.industry-card[data-industry="healthcare"] { border-left-color: #10b981; }
.industry-card h3 { margin-top: 0; }
.industry-card p { margin-bottom: var(--space-2); }
.industry-card p:last-of-type { margin-bottom: 0; }
@media (max-width: 768px) {
  .industry-grid { grid-template-columns: 1fr; }
}

/* Problem cards (Common Problems section) */
.problem-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.problem-card {
  background: var(--bg-tertiary);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-6);
}
.problem-card h3 { margin-top: 0; }

/* Services comparison (Traditional vs BeargrassTransitions) */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-6);
}
.comparison-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  border: 1px solid var(--border);
}
.comparison-card--negative {
  border-left: 3px solid #f59e0b;
}
.comparison-card--negative ul li::before {
  content: '✗';
  color: #f59e0b;
}
.comparison-card--positive {
  border-left: 3px solid var(--brand);
}
.comparison-card--positive ul li::before {
  content: '✓';
}
@media (max-width: 768px) {
  .comparison-grid { grid-template-columns: 1fr; }
}

/* How I Work - Services page numbered process */
.work-process {
  list-style: none;
  counter-reset: step;
  padding: 0;
  max-width: 600px;
  margin: 2rem auto;
}

.work-process li {
  counter-increment: step;
  padding: 1rem 0 1rem 3rem;
  position: relative;
  border-left: 2px solid var(--brand);
  margin-bottom: 1rem;
}

.work-process li::before {
  content: counter(step);
  position: absolute;
  left: -1rem;
  top: 0.75rem;
  background: var(--brand);
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  text-align: center;
  line-height: 2rem;
  font-weight: bold;
}

.work-process strong {
  color: var(--brand);
}

/* About page: Montana photography (wildflowers, campfire) */
.page-about .content-section:first-child {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}
.page-about .content-section:first-child h1,
.page-about .content-section:first-child > p {
  grid-column: 1;
}
.page-about .content-section:first-child .about-image {
  grid-column: 2;
  grid-row: 1 / -1;
}
.about-image,
.about-personal-image {
  position: relative;
}
.about-image img,
.about-personal-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
}
.about-image-caption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-style: italic;
  text-align: center;
}
@media (max-width: 968px) {
  .page-about .content-section:first-child {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .page-about .content-section:first-child .about-image {
    grid-column: 1;
    grid-row: auto;
    order: -1; /* Image above text on mobile */
  }
}

/* About personal section: campfire image */
.about-personal-image {
  margin-top: var(--space-8);
  max-width: 480px;
}
@media (max-width: 768px) {
  .about-personal-image {
    max-width: 100%;
  }
}

/* ==========================================================================
   Prose / Markdown Content — SMS/TerpTune typography hierarchy
   ========================================================================== */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  font-family: var(--font-primary);
  line-height: 1.05;
  color: var(--text-primary);
}

/* H1 — loudest voice: 800 weight, uppercase, 0.02em letter-spacing */
.prose h1 {
  font-size: clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem);
  font-weight: var(--font-extrabold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-6);
  line-height: 1.1;
}

/* Per-word gradient: white → accent (SMS/TerpTune pattern) */
.grad-word[data-word-idx="0"] { color: #ffffff; }
.grad-word:last-of-type { color: var(--brand); }
/* 2 words: white, accent — handled by above */
.grad-word[data-word-count="3"][data-word-idx="1"] { color: color-mix(in srgb, #ffffff 50%, var(--brand)); }
.grad-word[data-word-count="4"][data-word-idx="1"] { color: color-mix(in srgb, #ffffff 67%, var(--brand)); }
.grad-word[data-word-count="4"][data-word-idx="2"] { color: color-mix(in srgb, #ffffff 33%, var(--brand)); }
.grad-word[data-word-count="5"][data-word-idx="1"] { color: color-mix(in srgb, #ffffff 75%, var(--brand)); }
.grad-word[data-word-count="5"][data-word-idx="2"] { color: color-mix(in srgb, #ffffff 50%, var(--brand)); }
.grad-word[data-word-count="5"][data-word-idx="3"] { color: color-mix(in srgb, #ffffff 25%, var(--brand)); }
.grad-word[data-word-count="6"][data-word-idx="1"] { color: color-mix(in srgb, #ffffff 80%, var(--brand)); }
.grad-word[data-word-count="6"][data-word-idx="2"] { color: color-mix(in srgb, #ffffff 60%, var(--brand)); }
.grad-word[data-word-count="6"][data-word-idx="3"] { color: color-mix(in srgb, #ffffff 40%, var(--brand)); }
.grad-word[data-word-count="6"][data-word-idx="4"] { color: color-mix(in srgb, #ffffff 20%, var(--brand)); }
.grad-word[data-word-count="7"][data-word-idx="1"] { color: color-mix(in srgb, #ffffff 83%, var(--brand)); }
.grad-word[data-word-count="7"][data-word-idx="2"] { color: color-mix(in srgb, #ffffff 67%, var(--brand)); }
.grad-word[data-word-count="7"][data-word-idx="3"] { color: color-mix(in srgb, #ffffff 50%, var(--brand)); }
.grad-word[data-word-count="7"][data-word-idx="4"] { color: color-mix(in srgb, #ffffff 33%, var(--brand)); }
.grad-word[data-word-count="7"][data-word-idx="5"] { color: color-mix(in srgb, #ffffff 17%, var(--brand)); }
/* Hover glow on last word */
.prose h1 .grad-word:last-of-type:hover {
  text-shadow: 0 0 20px var(--brand-glow);
}

/* H2 — section headers: 700 weight, tight letter-spacing */
.prose h2 {
  font-size: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  font-weight: var(--font-bold);
  letter-spacing: -0.025em;
  margin-top: var(--space-16);
  margin-bottom: var(--space-6);
}

/* H3 — accent-colored subsections */
.prose h3 {
  font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  font-weight: var(--font-semibold);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  color: var(--brand);
}

.prose h4 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.prose p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.prose p + p {
  margin-top: 0;
}

.prose strong {
  color: var(--text-primary);
  font-weight: var(--font-semibold);
}

.prose ul,
.prose ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.prose ul { list-style: none; }
.prose ul li {
  position: relative;
  padding-left: var(--space-4);
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}
.prose ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: var(--font-bold);
}

.prose ol {
  list-style: decimal;
}
.prose ol li {
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--brand) 50%, transparent 100%);
  opacity: 0.4;
  margin: var(--space-12) auto;
  max-width: 300px;
  position: relative;
}
.prose hr::before {
  content: '◆';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.5rem;
  color: var(--brand);
  background: var(--bg-primary);
  padding: 0 var(--space-3);
  opacity: 0.6;
}

.prose a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.prose a:hover {
  color: var(--brand-light);
}

.prose a:not(.cta-button):not(.btn) {
  position: relative;
}
.prose a:not(.cta-button):not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--brand);
  transition: width var(--transition-base);
}
.prose a:not(.cta-button):not(.btn):hover::after {
  width: 100%;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-6);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.prose thead {
  background: var(--brand);
  color: var(--bg-primary);
}
.prose th,
.prose td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.prose th { font-weight: var(--font-semibold); }
.prose tbody tr:hover { background: var(--bg-elevated); }

.prose blockquote {
  border-left: 4px solid var(--brand);
  padding-left: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.prose code {
  background: var(--bg-tertiary);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--brand);
}

/* ==========================================================================
   Contact Form (page-contact)
   ========================================================================== */
.contact-form {
  max-width: 36rem;
  margin: var(--space-12) 0;
}
.contact-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.contact-form .form-row {
  min-width: 0;
}
.contact-form .form-row-full {
  grid-column: 1 / -1;
}
.contact-form label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.contact-form .optional {
  font-weight: var(--font-normal);
  color: var(--text-tertiary);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}
.contact-form textarea {
  resize: vertical;
  min-height: 6rem;
}
.contact-form .form-actions {
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
}
@media (max-width: 600px) {
  .contact-form .form-grid {
    grid-template-columns: 1fr;
  }
}
.contact-form .cta-button {
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-base);
  cursor: pointer;
  border: none;
}
.form-status {
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}
.form-status--success {
  color: var(--brand);
}
.form-status--error {
  color: #ef4444;
}
.contact-alternatives {
  margin-top: var(--space-8);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ==========================================================================
   Announcement Banner
   ========================================================================== */
.announcement-banner {
  width: 100%;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px var(--space-4);
  text-align: center;
  font-weight: var(--font-medium);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.announcement-banner a {
  color: var(--brand);
  font-weight: var(--font-semibold);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.announcement-banner a:hover {
  color: var(--brand-light);
}

.announcement-banner-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.announcement-banner-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 var(--space-2);
  margin-left: var(--space-2);
  opacity: 0.7;
}
.announcement-banner-close:hover {
  color: var(--text-primary);
  opacity: 1;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
nav {
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: var(--z-fixed);
}

.nav-container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.nav-logo {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.nav-logo a {
  color: var(--text-primary);
  text-decoration: none;
}
.nav-logo a:hover {
  color: var(--brand);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-item {
  position: relative;
}

.nav-item a {
  display: block;
  position: relative;
  padding: 8px 10px;
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
  border-radius: var(--radius-md);
}

.nav-item a:hover {
  color: var(--brand);
  text-decoration: none;
}

.nav-item.active a {
  color: var(--text-primary);
  background: transparent;
  border: none;
}

.nav-item.active a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--brand);
  border-radius: 1px;
}

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 0.65rem;
  margin-left: 0.25rem;
  transition: transform var(--transition-fast);
}
.nav-dropdown:hover .nav-dropdown-toggle::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
  margin-top: var(--space-2);
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu li { margin: 0; }
.nav-dropdown-menu a {
  display: block;
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  border-radius: 0;
}
.nav-dropdown-menu a:hover {
  background: var(--bg-tertiary);
  color: var(--brand);
}

/* Nav CTA */
.nav-cta { margin-left: var(--space-4); }
.nav-cta a {
  background: var(--brand);
  color: var(--bg-primary);
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: var(--font-medium);
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.nav-cta a:hover {
  background: var(--brand-light);
  color: var(--bg-primary);
  text-decoration: none;
  box-shadow: 0 4px 20px var(--brand-glow);
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: var(--space-2);
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu.active { max-height: 500px; }
  .nav-item a {
    padding: var(--space-4);
    border-radius: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-dropdown-menu {
    position: static;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    box-shadow: none;
    border: none;
    transform: none;
    margin-top: 0;
  }
  .nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 300px;
    background: var(--bg-tertiary);
  }
  .nav-dropdown-menu a {
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-8);
  }
  .nav-cta {
    margin-left: 0;
    padding: var(--space-4);
    border-top: 1px solid var(--border);
  }
  .nav-cta a { display: block; text-align: center; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.cta-button,
.btn,
.btn-primary {
  display: inline-block;
  background: var(--brand);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: var(--font-medium);
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.cta-button:hover,
.btn:hover,
.btn-primary:hover {
  background: var(--brand-light);
  color: var(--bg-primary);
  text-decoration: none;
  box-shadow: 0 0 0 4px var(--brand-subtle);
  transform: translateY(-1px);
}

.cta-button--large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
}

.cta-button--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.cta-button--secondary:hover {
  background: var(--bg-tertiary);
  color: var(--brand);
  border-color: var(--brand);
}

.cta-button--outline {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
}
.cta-button--outline:hover {
  background: var(--brand);
  color: var(--bg-primary);
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-fast);
}
.card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 20px var(--brand-glow);
}

.pricing-card {
  position: relative;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: var(--shadow-xl), 0 0 40px var(--brand-glow);
  transition: transform var(--transition-base), border-color var(--transition-fast), box-shadow var(--transition-base);
}
@media (prefers-reduced-motion: reduce) {
  .pricing-card:hover {
    transform: none;
  }
}

/* Compact pricing cards — summary at top, fit all three in view */
.page-pricing .pricing-cards {
  align-items: stretch;
  gap: var(--space-6);
}
.page-pricing .pricing-card {
  padding: var(--space-6);
  text-align: left;
}
.page-pricing .pricing-card h3 {
  font-size: var(--text-xl);
  margin-top: 0;
  margin-bottom: var(--space-2);
  color: var(--brand);
}
.page-pricing .pricing-card p {
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}
.page-pricing .pricing-card p:first-of-type {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.page-pricing .pricing-card ul {
  margin: var(--space-2) 0 var(--space-4);
  padding-left: var(--space-5);
  list-style: none;
}
.page-pricing .pricing-card ul li {
  margin-bottom: var(--space-1);
  padding-left: var(--space-3);
  position: relative;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.page-pricing .pricing-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: var(--font-bold);
  font-size: 0.75rem;
}
.page-pricing .pricing-card p:last-of-type a {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 8px 16px;
  background: var(--brand);
  color: var(--bg-primary);
  border-radius: 8px;
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.page-pricing .pricing-card p:last-of-type a:hover {
  background: var(--brand-light);
}
.page-pricing .pricing-card hr {
  display: none;
}

/* Pricing page: At a Glance table prominence */
.page-pricing .prose table {
  margin: var(--space-4) 0 var(--space-8);
  font-size: var(--text-sm);
}
.page-pricing .prose table th,
.page-pricing .prose table td {
  padding: var(--space-2) var(--space-3);
}
.page-pricing .prose h2 {
  margin-top: var(--space-8);
}
.page-pricing .prose h2:first-of-type {
  margin-top: 0;
}

.pricing-card-name {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.pricing-card-price {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--brand);
  margin-bottom: var(--space-1);
}

.pricing-card-period {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--space-6);
}

.pricing-card-features {
  list-style: none;
  margin: var(--space-6) 0;
  text-align: left;
}
.pricing-card-features li {
  padding: var(--space-2) 0;
  padding-left: var(--space-6);
  position: relative;
  color: var(--text-secondary);
  font-size: var(--text-base);
}
.pricing-card-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: var(--font-bold);
}

.discount-badge {
  position: absolute;
  top: -12px;
  right: var(--space-6);
  background: var(--brand);
  color: var(--bg-primary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: var(--font-bold);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 10;
}

/* ==========================================================================
   Grid & Sections
   ========================================================================== */
.container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.grid {
  display: grid;
  gap: var(--space-8);
}
.grid--2col {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.grid--3col {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
@media (min-width: 900px) {
  .pricing-cards.grid--3col {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

section {
  padding: var(--space-16) 0;
}
section.section--light { background: var(--bg-secondary); }
section.section--cream { background: var(--bg-tertiary); }
section.section--dark {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 60px 24px 40px;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-section h3 {
  color: var(--text-tertiary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-section a {
  color: var(--brand);
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-section a:hover {
  color: var(--brand-light);
}

.footer-section a.cta-button {
  color: var(--bg-primary);
}
.footer-section a.cta-button:hover {
  color: var(--bg-primary);
}

.footer-section ul { list-style: none; margin: 0; }
.footer-section li { margin-bottom: var(--space-2); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-8);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}
.footer-bottom a {
  color: var(--brand);
}
.footer-bottom a:hover {
  color: var(--brand-light);
}

.footer-social {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}
.footer-social a:hover {
  background: var(--brand);
  color: var(--bg-primary);
}

/* ==========================================================================
   Forms
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--text-base);
  transition: border-color var(--transition-fast);
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-subtle);
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

/* ==========================================================================
   Chat Widget
   ========================================================================== */
#bt-chat-widget {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  font-family: var(--font-primary);
}

#bt-chat-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--brand);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 20px;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  box-shadow: 0 4px 20px var(--brand-glow);
  transition: all var(--transition-fast);
  min-height: 44px;
}
#bt-chat-toggle svg {
  flex-shrink: 0;
}
#bt-chat-toggle:hover {
  background: var(--brand-light);
  transform: translateY(-2px);
}
#bt-chat-toggle.chat-toggle-active { background: var(--bg-elevated); }
#bt-chat-toggle.chat-toggle-active .chat-toggle-label { display: none; }

.chat-panel-hidden { display: none !important; }

#bt-chat-panel {
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: 4rem;
  right: 0;
  width: 380px;
  max-height: 520px;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  overflow: hidden;
  border: 1px solid var(--border);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--brand);
  color: var(--bg-primary);
}
.chat-header-info strong { font-size: var(--text-base); }
.chat-header-subtitle {
  font-size: var(--text-xs);
  opacity: 0.8;
}
#bt-chat-close {
  background: none;
  border: none;
  color: var(--bg-primary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 var(--space-1);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  min-height: 280px;
  max-height: 340px;
  background: var(--bg-primary);
}

.chat-message { margin-bottom: var(--space-3); }
.chat-message p {
  margin: 0 0 var(--space-1) 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
}
.chat-message-user p {
  background: var(--brand);
  color: var(--bg-primary);
  margin-left: auto;
  border-bottom-right-radius: var(--radius-sm);
}
.chat-message-assistant p {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-bottom-left-radius: var(--radius-sm);
}
.chat-meta {
  font-size: var(--text-xs) !important;
  color: var(--text-tertiary) !important;
  background: transparent !important;
  font-style: italic;
}

.chat-input-area {
  display: flex;
  padding: var(--space-3);
  gap: var(--space-2);
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
#bt-chat-input {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  color: var(--text-primary);
  font-size: var(--text-sm);
}
#bt-chat-input:focus { border-color: var(--brand); }
#bt-chat-send {
  background: var(--brand);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-2);
  cursor: pointer;
}
#bt-chat-send:hover { background: var(--brand-light); }
#bt-chat-send:disabled { background: var(--text-muted); cursor: not-allowed; }

.chat-footer {
  padding: var(--space-2) var(--space-3);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  text-align: center;
}
.chat-footer span {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .chat-toggle-label { display: none; }
  #bt-chat-toggle { padding: 12px; border-radius: var(--radius-full); }
}
@media (max-width: 480px) {
  #bt-chat-panel {
    width: calc(100vw - 2rem);
    right: -0.5rem;
    bottom: 3.5rem;
    max-height: 70vh;
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-tertiary); }
.mt-2 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-4); }

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .announcement-banner,
  nav,
  footer,
  .nav-toggle,
  .cta-button,
  #bt-chat-widget { display: none !important; }
  body { background: #fff; color: #000; }
}
