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

:root {
  --bg: #0c0c0c;
  --bg-raised: #111111;
  --bg-card: #161616;
  --bg-hover: #1a1a1a;
  --border: #222222;
  --border-hover: #2a2a2a;

/* ===== Brightened Text Colors for Higher Contrast ===== */
  --text-primary: #f5f5f5;    /* Crisp white for main headlines */
  --text-secondary: #c0c0c0;  /* Clear silver for body text (was #a0a0a0) */
  --text-muted: #949494;      /* Readable grey for descriptions & cards (was #595959) */

  /* ===== Accents & Brand ===== */
  --brand: #808080;           /* Slightly brighter grey for section labels (was #696969) */
  --brand-dim: hsla(0, 0%, 50%, 0.12);
  --brand-glow: hsla(0, 0%, 50%, 0.25);

  --font: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover { color: #888; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header / Full-width Nav ===== */
header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-bottom: 4px;
}

header nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 56px;
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  z-index: 200;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-inner a,
nav ul.nav a,
nav ul a {
  color: var(--text-muted);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.15s;
  position: relative;
  padding: 4px 0;
}

.nav-inner a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width 0.2s ease;
}

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

.nav-inner a:hover::after {
  width: 100%;
}

.nav-inner a.nav-current,
nav ul.nav a.nav-current,
nav ul li.nav-current a {
  color: var(--text-primary);
}

.nav-inner a.nav-current::after,
nav ul.nav a.nav-current::after {
  width: 100%;
}

/* Ghost overrides nav layout */
nav ul.nav,
nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 56px;
  margin: 0;
  padding: 0;
}

nav ul.nav li,
nav ul li {
  display: inline-block;
  margin: 0;
  padding: 0;
}

/* ===== Hero (Centered) ===== */
.hero {
  background: var(--bg);
  text-align: center;
  padding: 0 0 4px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(105,105,105,0.06) 0%, transparent 65%);
  pointer-events: none;
}

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

.hero-logo {
  width: 100%;
  max-width: 800px;
  margin: 48px auto 120px;
}

.hero-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text-primary);
  text-wrap: balance;
}

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

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 36px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.15); }

.btn-primary {
  background: var(--brand);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--text-primary);
  background: var(--brand-dim);
  filter: none;
}

/* ===== Sections ===== */
section {
  padding: 80px 0;
}

section.alt {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brand);
  margin-bottom: 16px;
  display: block;
}

section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: all 0.25s ease;
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--brand-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== Process Steps ===== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step {
  text-align: center;
  padding: 24px 12px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.step p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.7;
}

.about-text p strong { color: var(--text-primary); }

/* ===== Pain/Problem Section ===== */
.pain {
  background: var(--bg);
}

.pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.pain-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: all 0.25s ease;
}

.pain-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.pain-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.pain-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .pain-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== CTA ===== */
.cta {
  text-align: center;
}

.cta h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.cta p {
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  text-align: center;
  background: var(--bg);
}

footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ===== Ghost Editor Content ===== */
.page-content {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.page-content h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  margin-top: 40px;
  color: var(--text-primary);
}

.page-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  margin-top: 32px;
}

.page-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.page-content ul,
.page-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.page-content li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.page-content blockquote {
  border-left: 2px solid var(--brand);
  padding-left: 20px;
  margin: 32px 0;
  color: var(--text-muted);
  font-style: italic;
}

.page-content pre {
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.85rem;
  margin: 24px 0;
  border: 1px solid var(--border);
}

.page-content code {
  font-size: 0.85rem;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 2px 6px;
  border-radius: 4px;
}

.page-content pre code {
  background: transparent;
  padding: 0;
}

.page-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.page-content .kg-card { margin: 32px 0; }

.kg-width-wide {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.kg-width-full {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ===== Page Hero ===== */
.page-hero {
  text-align: center;
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.page-hero p {
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 1.1rem;
}

/* ===== About Page ===== */
.about-hero {
  padding: 100px 0 80px;
}

.about-hero-content {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.about-hero-avatar {
  margin-bottom: 28px;
}

.about-hero-avatar img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  border: 2px solid var(--border);
  display: inline-block;
}

.about-hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.about-hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* Stats bar */
.stats-bar {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

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

.about-stat {
  padding: 8px 0;
}

.about-stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.about-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .about-hero {
    padding: 64px 0 48px;
  }

  .about-hero h1 {
    font-size: 1.8rem;
  }

  .about-hero p {
    font-size: 1rem;
  }

  .about-hero-avatar img {
    width: 120px;
    height: 120px;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
  }

  .about-stat-num {
    font-size: 1.5rem;
  }
}

/* ===== Mobile (continued) ===== */
@media (max-width: 768px) {
  .header-inner { height: 56px; }
  nav a { margin-left: 16px; font-size: 0.7rem; }

  /* Mobile nav: hamburger visible, nav hidden */
  header nav {
    justify-content: flex-end;
    position: relative;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-inner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 12, 12, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 36px;
    z-index: 150;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

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

  .nav-inner a,
  nav ul.nav a,
  nav ul a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .nav-inner a.nav-current,
  nav ul.nav a.nav-current,
  nav ul li.nav-current a {
    color: var(--brand);
  }

  /* Fix Ghost navigation ul inside overlay */
  .nav-inner ul,
  .nav-inner ul.nav,
  .nav-inner ul li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nav-inner ul li a::after,
  nav ul.nav li a::after {
    display: none;
  }

  /* Override any row-direction ul rules */
  header nav ul.nav,
  header nav ul {
    flex-direction: column;
    gap: 36px;
  }

  .hero { padding: 80px 0 56px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero-actions { gap: 12px; }

  section { padding: 56px 0; }
  section h2 { font-size: 1.4rem; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .process-steps { grid-template-columns: 1fr 1fr; }

  .btn { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; }
  .btn-ghost { margin-left: 0; }

  .page-hero h1 { font-size: 1.8rem; }
}

/* About page headshot — circular crop, focal point shifted up */
.page-content .kg-image-card:first-of-type img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 25%;
  border: 2px solid var(--border);
}

::selection {
  background: hsla(0, 0%, 41%, 0.3);
  color: var(--text-primary);
}

/* ===== Centered Mobile Header ===== */
.mobile-header-title {
  display: none;
}

@media (max-width: 768px) {
  header nav {
    display: grid;
    grid-template-columns: 48px 1fr 48px; /* 48px left spacer | Centered title | 48px hamburger */
    align-items: center;
    height: 56px;
    padding: 0 16px;
    position: relative;
  }

  .mobile-header-title {
    display: block;
    grid-column: 2;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #f0f0f0);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    margin: 0 auto;
    max-width: 100%;
  }

  .mobile-header-title:hover {
    color: var(--text-primary, #f0f0f0);
  }

  .nav-toggle {
    grid-column: 3;
    justify-self: end;
    display: flex;
  }
}