/* ── Design tokens ──────────────────────────────────── */
:root {
  --bg:           #0f0d0d;
  --bg-photo:     #241c18;
  --cyan:         #d9a75f;
  --cyan-border:  rgba(217, 167, 95, 0.28);
  --text:         #f2ece4;
  --text-dim:     #c8bfb2;
  --gold:         #f0c040;

  --font-display: 'Fraunces', serif;
  --font-mono:    'IBM Plex Mono', monospace;
  --font-body:    Georgia, 'Times New Roman', serif;

  --nav-h: 56px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

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

/* ── Nav ────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(8, 9, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cyan-border);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 200;
  background: var(--bg);
  color: var(--cyan);
  border: 1px solid var(--cyan);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.skip-link:focus {
  left: 0.75rem;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  text-decoration: none;
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-brand-name {
  color: var(--text-dim);
  font-weight: 400;
}

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

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

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

.nav-links a[aria-current="page"] {
  color: var(--cyan);
}

@media (max-width: 640px) {
  .nav-links a {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }
  .site-nav {
    padding: 0 1rem;
  }
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-top: 1px solid var(--cyan-border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--cyan);
  text-decoration: none;
}

@media (max-width: 640px) {
  .site-footer {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
    padding: 1rem;
  }
}

/* ── Homepage ───────────────────────────────────────── */
.authority-home {
  max-width: 980px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2rem) 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.authority-hero {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1rem;
  border: 1px solid var(--cyan-border);
  background: linear-gradient(140deg, rgba(217, 167, 95, 0.14), rgba(217, 167, 95, 0.04));
  padding: 1.3rem;
}

.authority-kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: var(--cyan);
  margin-bottom: 0.6rem;
}

.authority-hero h1 {
  font-size: 3rem;
  line-height: 1.02;
  margin-bottom: 0.5rem;
}

.authority-subtitle {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.authority-summary {
  margin-top: 0.8rem;
  line-height: 1.7;
}

.authority-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.authority-hero-photo {
  border-left: 1px solid var(--cyan-border);
  background: var(--bg-photo);
}

.authority-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.authority-insights,
.authority-frameworks {
  margin-top: 0.2rem;
}

@media (max-width: 640px) {
  .authority-home {
    padding: calc(var(--nav-h) + 1.2rem) 1rem 2rem;
  }

  .authority-hero {
    grid-template-columns: 1fr;
  }

  .authority-hero-photo {
    border-left: 0;
    border-top: 1px solid var(--cyan-border);
    min-height: 240px;
  }

  .authority-hero h1 {
    font-size: 2.25rem;
  }

}

/* ── Inner pages ─────────────────────────────────────── */
.inner-page {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--cyan-border);
}

.page-content {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
}

.page-content h2 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 2.5rem 0 1rem;
}

.page-content h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 1.5rem 0 0.75rem;
}

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

.page-content strong {
  color: var(--text);
  font-weight: 600;
}

.page-content a {
  color: var(--cyan);
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}

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

.page-content ul,
.page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content li {
  margin-bottom: 0.35rem;
}

.page-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.08);
  padding: 0.1em 0.35em;
}

@media (max-width: 640px) {
  .inner-page {
    padding: calc(var(--nav-h) + 1.5rem) 1rem 2rem;
  }
}

/* ── 404 ─────────────────────────────────────────────── */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h));
  padding-top: var(--nav-h);
  gap: 1rem;
  text-align: center;
}

.not-found-code {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 700;
  color: var(--text-dim);
  line-height: 1;
}

.not-found-msg {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.back-home-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ── Option previews ─────────────────────────────────── */
.option-preview-page {
  max-width: 980px;
}

.preview {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.preview h1,
.preview h2,
.preview h3 {
  text-transform: none;
  letter-spacing: normal;
}

.preview-hero {
  border: 1px solid var(--cyan-border);
  background: linear-gradient(140deg, rgba(0, 212, 255, 0.08), rgba(0, 212, 255, 0.02));
  padding: 1.5rem;
}

.preview-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.preview-sub {
  color: var(--text-dim);
}

.preview-cta-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.preview-btn {
  border: 1px solid var(--cyan-border);
  color: var(--text);
  text-decoration: none;
  padding: 0.45rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.preview-btn-primary {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
}

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

.preview-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preview-card {
  border: 1px solid var(--cyan-border);
  padding: 1rem;
  background: rgba(17, 19, 32, 0.45);
}

.preview-card p {
  margin: 0.6rem 0;
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.preview-metrics > div {
  border: 1px solid var(--cyan-border);
  padding: 0.8rem;
}

.preview-metrics strong {
  display: block;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 1rem;
}

.preview-metrics span {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.preview-case,
.preview-process,
.preview-cta-banner {
  border: 1px solid var(--cyan-border);
  padding: 1rem 1.2rem;
  background: rgba(17, 19, 32, 0.35);
}

.preview-process ol,
.preview-case ul {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
}

.preview-cta-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 800px) {
  .preview-grid,
  .preview-grid-two,
  .preview-metrics {
    grid-template-columns: 1fr;
  }

  .preview-cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Distinct preview directions */
body.preview-theme-exec .site-nav,
body.preview-theme-exec .site-footer {
  background: rgba(8, 9, 15, 0.94);
}

body.preview-theme-exec .preview {
  --preview-accent: var(--cyan);
}

body.preview-theme-funnel {
  --bg: #f6f7fb;
  --text: #111327;
  --text-dim: #535a72;
  --cyan: #2a4cff;
  --cyan-border: rgba(42, 76, 255, 0.25);
}

body.preview-theme-funnel .site-nav,
body.preview-theme-funnel .site-footer {
  background: rgba(246, 247, 251, 0.95);
  border-color: rgba(42, 76, 255, 0.2);
}

body.preview-theme-funnel .nav-brand-name,
body.preview-theme-funnel .nav-links a,
body.preview-theme-funnel .site-footer,
body.preview-theme-funnel .site-footer a {
  color: #3e4563;
}

body.preview-theme-funnel .preview-hero {
  background: linear-gradient(140deg, rgba(42, 76, 255, 0.12), rgba(42, 76, 255, 0.04));
  border-radius: 16px;
}

body.preview-theme-funnel .preview-card,
body.preview-theme-funnel .preview-process,
body.preview-theme-funnel .preview-case,
body.preview-theme-funnel .preview-cta-banner {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 22, 52, 0.06);
}

body.preview-theme-funnel .preview-btn {
  border-radius: 999px;
}

body.site-theme-authority,
body.preview-theme-authority {
  --bg: #0f0d0d;
  --text: #f2ece4;
  --text-dim: #c8bfb2;
  --cyan: #d9a75f;
  --cyan-border: rgba(217, 167, 95, 0.28);
  --font-display: 'Fraunces', serif;
  --font-body: Georgia, 'Times New Roman', serif;
}

body.site-theme-authority .site-nav,
body.site-theme-authority .site-footer,
body.preview-theme-authority .site-nav,
body.preview-theme-authority .site-footer {
  background: rgba(15, 13, 13, 0.95);
  border-color: rgba(217, 167, 95, 0.2);
}

body.site-theme-authority .nav-brand,
body.site-theme-authority .nav-links a,
body.site-theme-authority .site-footer a,
body.preview-theme-authority .nav-brand,
body.preview-theme-authority .nav-links a,
body.preview-theme-authority .site-footer a {
  color: #d9a75f;
}

body.preview-theme-authority .preview-hero {
  background: linear-gradient(140deg, rgba(217, 167, 95, 0.13), rgba(217, 167, 95, 0.04));
}

body.preview-theme-authority .preview-card,
body.preview-theme-authority .preview-case,
body.preview-theme-authority .preview-process,
body.preview-theme-authority .preview-cta-banner {
  background: rgba(58, 43, 29, 0.28);
}

body.preview-theme-authority .preview h1 {
  font-size: 2.7rem;
  line-height: 1.05;
}

body.preview-theme-authority .preview p,
body.preview-theme-authority .preview li {
  font-size: 1.02rem;
  line-height: 1.75;
}

.not-found a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-decoration: none;
}

.not-found a:hover {
  text-decoration: underline;
}
