/* Latent Labs — static marketing site (Executive dark + matte brass) */

:root {
  /* Background stack — navy base (no pure black); gold reads richer on navy */
  --bg-base: #060D16;
  --bg-elevated: #0b1422;
  --bg-panel: #0f1929;
  --bg-header: rgba(6, 13, 22, 0.75);

  --stroke-soft: rgba(255, 255, 255, 0.06);
  --stroke-strong: rgba(255, 255, 255, 0.10);

  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.70);
  --text-muted: rgba(255, 255, 255, 0.50);

  --accent: #c8a24d;
  --accent-hover: #d4b466;

  /* Aliases for compatibility */
  --bg: var(--bg-base);
  --surface: var(--bg-panel);
  --border: var(--stroke-strong);
  --text: var(--text-primary);
  --text-2: var(--text-secondary);
  --text-3: var(--text-muted);

  /* Status */
  --success: #3CCB7F;
  --warning: #F2B950;
  --danger: #F25F5C;
  --info: #4DA3FF;
  /* Type */
  --font-sans: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  /* Layout */
  --space: 1.25rem;
  --container: min(90vw, 72rem);
  --maxw: 1180px;
  --pad-x: 24px;
  /* Radii */
  --radius: 6px;
  --r-btn: 6px;
  --r-card: 16px;
  /* Shadows */
  --shadow-1: 0 6px 18px rgba(0,0,0,0.35);
  --shadow-2: 0 10px 28px rgba(0,0,0,0.45);
  /* Focus (WCAG visible, no glow) */
  --focus: 0 0 0 2px var(--accent);
}

/* Light theme — overrides when data-theme="light" */
html[data-theme="light"] {
  --bg-base: #f4f5f7;
  --bg-elevated: #eef0f3;
  --bg-panel: #ffffff;
  --bg-header: rgba(244, 245, 247, 0.85);

  --stroke-soft: rgba(0, 0, 0, 0.08);
  --stroke-strong: rgba(0, 0, 0, 0.14);

  --text-primary: rgba(0, 0, 0, 0.88);
  --text-secondary: rgba(0, 0, 0, 0.65);
  --text-muted: rgba(0, 0, 0, 0.5);

  --accent: #a67c3d;
  --accent-hover: #8f6a32;

  --shadow-1: 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-2: 0 10px 28px rgba(0, 0, 0, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a {
  color: var(--text);
  text-decoration: none;
}
a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* Small caps section labels */
.section-label,
.kicker {
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

hr {
  border: none;
  border-top: 1px solid var(--stroke-soft);
}

/* Utility: pill / tag */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--stroke-strong);
  color: var(--text-secondary);
  background: var(--bg-panel);
  font-size: 0.875rem;
}

/* Utility: subtle divider (no gradient) */
.glow-line {
  height: 1px;
  border: 0;
  background: var(--stroke-soft);
}

/* Header — glass, stays dark, engineered */
.site-header {
  background: var(--bg-header);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stroke-soft);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.logo {
  display: block;
  text-decoration: none;
}
.logo img {
  display: block;
  height: 6rem;
  width: auto;
  object-fit: contain;
  /* Dark mode: black → white, then hue-rotate so inverted gold reads as gold again */
  filter: invert(1) hue-rotate(180deg);
}

html[data-theme="light"] .logo img {
  /* Light mode: use logo as-is (no invert) */
  filter: none;
}
.logo:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

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

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  margin-left: 0.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.125rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

html:not([data-theme="light"]) .theme-toggle .icon-moon {
  display: block;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: var(--space);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--stroke-soft);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--stroke-soft);
  }

  .nav-menu a {
    display: block;
    padding: 1rem;
  }
}

/* Hero */
.hero {
  position: relative;
  padding-block: clamp(4rem, 10vw, 7rem) clamp(4rem, 8vw, 5rem);
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(180, 200, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(180, 200, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

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

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 1.25rem;
  max-width: 26ch;
  color: var(--text);
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 52ch;
  margin: 0 0 1rem;
}

.hero-support {
  font-size: 0.9375rem;
  color: var(--text-3);
  max-width: 48ch;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Buttons — heavy, controlled, executive */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: all 180ms ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn-primary {
  background: var(--accent);
  color: #0a0d12;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--stroke-strong);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Sections */
.section {
  padding-block: clamp(4rem, 8vw, 6rem);
  border-top: 1px solid var(--stroke-soft);
}

/* Alternating depth — capital operators like visual structure */
.section-alt {
  background: var(--bg-elevated);
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.section-lead {
  color: var(--text-2);
  margin: 0 0 2rem;
  max-width: 40ch;
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* Cards */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  padding: 2rem;
  background: var(--bg-panel);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--r-card);
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--stroke-strong);
}

.card-icon {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0.9;
  display: block;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* Work */
.work-placeholder {
  padding: 3rem;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px dashed var(--stroke-strong);
  border-radius: var(--r-card);
  color: var(--text-secondary);
}

.work-placeholder a {
  color: var(--accent);
  text-decoration: none;
}

.work-placeholder a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Contact */
.contact-block {
  margin-top: 1rem;
}

.contact-email {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.contact-email:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Section lists (audience, problem, fit) */
.section-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.section-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.section-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

.section-intro {
  color: var(--text-2);
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

/* Audience as scannable pills */
.audience-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
}

.audience-pills li {
  display: inline-flex;
  padding: 0.4rem 0.75rem;
  margin-bottom: 0;
  padding-left: 0.75rem;
  background: var(--bg-panel);
  border: 1px solid var(--stroke-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.audience-pills li::before {
  display: none;
}

.section-list-wrap + .section-filter,
.section-list + .section-filter {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stroke-soft);
}

.section-filter {
  color: var(--text-3);
  font-size: 0.9375rem;
  max-width: 42ch;
  margin: 0;
}

/* Misconception section (prose + question) */
.misconception-body p {
  margin: 0 0 1rem;
  color: var(--text-2);
  max-width: 52ch;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.misconception-body p:last-of-type {
  margin-bottom: 1.5rem;
}

.misconception-question {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  max-width: 36ch;
  margin: 0;
}

/* Core leverage question — intellectual anchor (emphasis only) */
.leverage-anchor {
  font-size: clamp(1.5rem, 2.5vw, 2rem) !important;
  font-weight: 650;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--stroke-soft);
  display: block;
}

/* Approach steps */
.approach-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2rem 0;
  margin: 2rem 0;
}

.approach-step {
  flex: 1 1 260px;
  min-width: 260px;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--stroke-soft);
}

.approach-step:last-child {
  border-bottom: none;
}

.approach-arrow {
  display: none;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-3);
  padding: 0 0.25rem;
  align-self: center;
}

@media (min-width: 768px) {
  .approach-grid {
    flex-wrap: nowrap;
    gap: 0;
  }

  .approach-step {
    flex: 1 1 0;
    min-width: 0;
    padding: 1.5rem 1rem;
    border-bottom: none;
    border-right: 1px solid var(--stroke-soft);
  }

  .approach-step:last-child {
    border-right: none;
  }

  .approach-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    padding: 0;
    color: var(--accent);
    opacity: 0.8;
  }
}

.approach-step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.approach-step h3 {
  font-size: 1.25rem;
  font-weight: 650;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.approach-step p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.approach-tagline {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  margin-top: 1rem;
}

/* Proof / representative outcomes */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.proof-card {
  padding: 1.75rem;
  background: var(--bg-panel);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--r-card);
  transition: border-color 0.2s;
}

.proof-card:hover {
  border-color: var(--stroke-strong);
}

.proof-card-sector {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.75rem;
}

.proof-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.proof-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.book-fallback {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-2);
}

.book-email {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.book-email:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Services list */
.services-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.services-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 0.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--stroke-soft);
}

.services-list li:last-child {
  border-bottom: none;
}

.service-icon {
  grid-row: 1 / 3;
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  color: var(--accent);
  background: var(--bg-panel);
  border: 1px solid var(--stroke-strong);
  border-radius: 6px;
}

.service-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.services-list h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  margin: 0;
  grid-column: 2;
  color: var(--text);
}

.services-list li p {
  grid-column: 2;
}

.services-list p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 52ch;
}

/* Fit section (we are not) */
.fit-block {
  margin-top: 1rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-panel);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--r-card);
  max-width: 42rem;
}

.fit-block .section-intro {
  margin-top: 0;
}

.fit-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.fit-list li {
  padding-left: 1.25rem;
  margin-bottom: 0.35rem;
  position: relative;
  color: var(--text-2);
}

.fit-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-3);
}

.fit-close {
  color: var(--text-2);
  font-size: 0.9375rem;
  max-width: 40ch;
  margin: 0;
}

/* About: spacing between multiple section-lead paragraphs */
#about .section-lead + .section-lead {
  margin-top: 1.25rem;
}

/* Geo block */
.geo-block {
  text-align: center;
  padding: 1rem 0;
}

.geo-block > p {
  margin: 0.75rem 0 0;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.geo-map-wrap {
  margin: 0 auto 0;
  max-width: 36rem;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--stroke-strong);
}

.geo-map-link {
  display: block;
  position: relative;
  background: var(--surface);
}

.geo-map-iframe {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
}

.geo-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.geo-pin svg {
  width: 100%;
  height: 100%;
}

.geo-map-caption {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* Final CTA section */
.cta-section {
  text-align: center;
  padding-block: clamp(4rem, 8vw, 6rem) clamp(5rem, 10vw, 7rem);
}

.cta-section .section-title {
  max-width: 28ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .section-lead {
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  margin-top: 2rem;
}

.cta-actions .btn {
  min-width: 12rem;
}

.cta-actions .book-fallback {
  margin-top: 1.25rem;
}

.cta-support {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--text-2);
  max-width: 42ch;
  margin-inline: auto;
}

.cta-support + .cta-support {
  margin-top: 0.25rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--stroke-soft);
  padding-block: 2rem;
  background: var(--bg-base);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-3);
}

.footer-contact {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-3);
}

.footer-contact a {
  color: var(--accent);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Mobile: tighter padding and type */
@media (max-width: 768px) {
  :root {
    --pad-x: 18px;
  }
  .section {
    padding-block: 72px 0;
  }
}
