/* ============================================
   OpptyCon Pages — Shared Styles
   Design System: Heretics House canonical (NetherOps property → violet accent)
   Tokens align with /styles/tokens.css when the page links it first.
   ============================================ */

/* --- Fonts (canonical: Fraunces display + TWK Everett body + JetBrains Mono) --- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,100..900,0..100,0..1&family=JetBrains+Mono:wght@400;500;700&display=swap');

@font-face { font-family: 'TWK Everett'; src: url('/fonts/TWKEverett-Light.otf') format('opentype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'TWK Everett'; src: url('/fonts/TWKEverett-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'TWK Everett'; src: url('/fonts/TWKEverett-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }

/* --- Tokens — canonical Heretics House light (warm paper #F4F1EA, violet accent)
       Dark-mode overrides at the bottom of this :root block (data-theme="dark"). --- */
:root {
  --bg-base:      #F4F1EA;
  --bg-surface:   #FBFAF6;
  --bg-white:     #FFFFFF;
  --bg-inverse:   #16161A;
  --bg-code:      #1A1A1E;
  --bg-raised:    #FFFFFF;
  --ink:          #1A1A1E;
  --ink-mid:      #57544D;
  --ink-muted:    #8E8A80;
  --ink-inv:      #ECEAE3;
  --ink-inv-mid:  #9A968C;
  --ink-code:     #8C73FF;
  --border-subtle: rgba(20,18,14,0.07);
  --border-mid:    rgba(20,18,14,0.12);
  --border-strong: rgba(20,18,14,0.18);
}

/* Dark mode — flips the page-local tokens to match tokens.css dark canon. */
[data-theme="dark"] {
  --bg-base:      #121214;
  --bg-surface:   #1A1A1E;
  --bg-white:     #212126;
  --bg-inverse:   #ECEAE3;
  --bg-code:      #0A0A0D;
  --bg-raised:    #212126;
  --ink:          #ECEAE3;
  --ink-mid:      #9A968C;
  --ink-muted:    #6E6A62;
  --ink-inv:      #1A1A1E;
  --ink-inv-mid:  #57544D;
  --border-subtle: rgba(255,255,255,0.07);
  --border-mid:    rgba(255,255,255,0.12);
  --border-strong: rgba(255,255,255,0.18);
}

:root {
  --accent:        var(--accent-ink);
  --accent-text:   #ECEAE3;
  --accent-lime:   var(--accent-ink);
  --accent-lime-dark: var(--accent-ink);
  --accent-violet:   var(--accent-ink);
  --accent-violet-light: color-mix(in srgb, var(--accent-ink) 10%, transparent);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:    'TWK Everett', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 200ms;
  --green: #1A8A4A;
  --amber: #C07800;
  --rose: #CC3340;
  --violet: #5B3DF0;
  --blue: #2563EB;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.10);
  --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 425;
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144, "wght" 425, "SOFT" 0, "WONK" 0;
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--accent-violet); font-weight: 425; }

code, .mono {
  font-family: var(--font-mono);
}

a { color: var(--accent-violet); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--ink); }

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

/* --- Layout --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ============================================
   NAVIGATION — with OpptyCon dropdown
   ============================================ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(235,235,235,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
}

.site-nav .container-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo img {
  height: 28px;
  width: auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.nav-links > li {
  position: relative;
}

.nav-links > li > a,
.nav-links > li > button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-mid);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
  white-space: nowrap;
}

.nav-links > li > a:hover,
.nav-links > li > button:hover,
.nav-links > li.active > a,
.nav-links > li.active > button {
  color: var(--ink);
}

/* Dropdown arrow */
.nav-links .dropdown-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform var(--dur) var(--ease);
}

/* Dropdown panel */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: var(--bg-white);
  border: 1px solid var(--border-mid);
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
  transform: translateX(-50%) translateY(4px);
}

.nav-links > li:hover > .nav-dropdown,
.nav-links > li:focus-within > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-links > li:hover .dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-mid);
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown a:hover {
  background: var(--bg-base);
  color: var(--ink);
}

.nav-dropdown a.dropdown-active {
  color: var(--accent-violet);
  background: var(--accent-violet-light);
}

.nav-dropdown .dropdown-label {
  display: block;
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-top: 2px;
  font-weight: 400;
}

.nav-dropdown .dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 8px;
}

/* Nav CTA buttons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-nav-ghost {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-mid);
  transition: color var(--dur) var(--ease);
}

.btn-nav-ghost:hover { color: var(--ink); }

.btn-nav-primary {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--accent);
  border-radius: 0;
  transition: background var(--dur) var(--ease), transform 0.1s;
}

.btn-nav-primary:hover {
  background: var(--ink-mid);
  color: #fff;
  transform: translateY(-1px);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: 0.2s;
}

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

  .nav-links,
  .nav-actions {
    display: none;
  }

  .site-nav.open .nav-links,
  .site-nav.open .nav-actions {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-mid);
    padding: 16px 24px;
    box-shadow: var(--shadow-md);
  }

  .site-nav.open .nav-links { gap: 0; }

  .site-nav.open .nav-actions {
    top: auto;
    padding-top: 0;
    border: none;
    box-shadow: none;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    padding-bottom: 20px;
  }

  .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    background: transparent;
    display: none;
  }

  .nav-links > li.mobile-open > .nav-dropdown {
    display: block;
  }
}

/* ============================================
   PAGE HERO
   ============================================ */
.page-hero {
  padding: calc(var(--nav-h) + 120px) 0 120px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-mid);
  text-align: center;
}

.page-hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-violet);
  margin-bottom: 28px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 425;
  color: var(--ink);
  margin: 0 auto 36px;
  max-width: 18ch;
  letter-spacing: -0.012em;
  line-height: 1.02;
  font-variation-settings: "opsz" 144, "wght" 425, "SOFT" 0, "WONK" 0;
}

.page-hero h1 em {
  font-style: italic;
  color: var(--accent-violet);
  font-weight: 425;
}

.page-hero .hero-sub {
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-mid);
  max-width: 56ch;
  line-height: 1.6;
  margin: 0 auto 40px;
}

.page-hero .hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: var(--accent-violet);
  color: #16161A;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--accent-violet);
  border-radius: 2px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.page-hero .hero-cta:hover {
  background: transparent;
  color: var(--accent-violet);
  transform: none;
}

.page-hero .hero-cta svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   SECTION LAYOUT
   ============================================ */
.section {
  padding: 80px 0;
}

.section + .section {
  border-top: 1px solid var(--border-mid);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 375;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
  max-width: 640px;
  font-variation-settings: "opsz" 96, "wght" 375, "SOFT" 0, "WONK" 0;
}
.section h2 em { font-style: italic; color: var(--accent-violet); font-weight: 375; }

.section .section-lead {
  font-size: 17px;
  color: var(--ink-mid);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 40px;
}

/* --- Problem Section (darker bg) --- */
.section-problem {
  background: var(--bg-surface);
}

.section-problem .problem-text {
  font-size: 17px;
  color: var(--ink-mid);
  max-width: 640px;
  line-height: 1.8;
}

.section-problem .problem-text p + p {
  margin-top: 16px;
}

.section-problem .problem-text strong {
  color: var(--ink);
  font-weight: 600;
}

/* --- Outcomes Grid --- */
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.outcome-card {
  background: var(--bg-white);
  border: 1px solid var(--border-mid);
  border-radius: 0;
  padding: 28px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.outcome-card:hover {
  border-color: var(--accent-violet);
  box-shadow: var(--shadow-sm);
}

.outcome-card .outcome-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-violet-light);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent-violet);
}

.outcome-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 8px;
}

.outcome-card p {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.6;
}

/* --- Capabilities List --- */
.capabilities-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
}

.capability-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-mid);
  border-radius: 0;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
  transition: border-color var(--dur) var(--ease);
}

.capability-item:hover {
  border-color: var(--accent-violet);
}

.capability-item .cap-marker {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--accent-lime);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.capability-item .cap-marker svg {
  width: 12px;
  height: 12px;
  color: var(--ink);
}

/* --- What You Control Section --- */
.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.control-item {
  padding: 20px 24px;
  background: var(--bg-white);
  border-left: 3px solid var(--accent-violet);
  border-radius: 0;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

/* --- CTA Banner --- */
.section-cta {
  background: var(--ink);
  padding: 64px 0;
  text-align: center;
}

.section-cta h2 {
  color: #fff;
  max-width: none;
  margin-bottom: 12px;
}

.section-cta p {
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  margin-bottom: 32px;
}

.section-cta .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--accent-lime);
  /* Fixed dark text — lime fill is always lime, so text must always be dark,
     even in dark-mode (where --ink flips to ivory and would read as light-on-lime). */
  color: #111111;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 0;
  transition: background var(--dur) var(--ease), transform 0.15s;
}

.section-cta .cta-btn:hover {
  background: var(--accent-lime-dark);
  color: #111111;
  transform: translateY(-2px);
}

.section-cta .cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 16px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 400;
  transition: color var(--dur) var(--ease);
}

.section-cta .cta-secondary:hover { color: #fff; }

/* CTA section: stay dark in both modes (it's a brand-defined inverse panel,
   not a theme-following surface). In dark mode --ink flips to ivory which
   would invert the panel — explicitly hold it. */
body.dark .section-cta { background: #0F0F0F; }
body.dark .section-cta h2 { color: #ECECE6; }
body.dark .section-cta p { color: rgba(255,255,255,0.65); }

/* ============================================
   OVERVIEW PAGE — Role Picker
   ============================================ */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.role-card {
  background: var(--bg-white);
  border: 1px solid var(--border-mid);
  border-radius: 0;
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform 0.15s;
}

.role-card:hover {
  border-color: var(--accent-violet);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.role-card .role-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-violet);
  margin-bottom: 12px;
}

.role-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 300;
  margin-bottom: 8px;
}

.role-card .role-personas {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.role-card p {
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}

.role-card .role-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-violet);
  transition: gap var(--dur) var(--ease);
}

.role-card:hover .role-link { gap: 10px; }

.role-card .role-link svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   OVERVIEW — Features Section
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

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

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border-mid);
  border-radius: 0;
  padding: 24px;
  text-align: center;
}

.feature-card .feature-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  color: var(--accent-violet);
  margin-bottom: 4px;
}

.feature-card .feature-label {
  font-size: 13px;
  color: var(--ink-mid);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  /* Fixed dark — footer is a brand inverse panel, not theme-following.
     Hard-coded #0F0F0F so dark-mode --ink flip doesn't invert this to light. */
  background: #0F0F0F;
  color: rgba(255,255,255,0.55);
  padding: 48px 0 32px;
  font-size: 13px;
}
body.dark .site-footer { background: #0A0A0D; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand .footer-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.footer-brand p {
  max-width: 300px;
  line-height: 1.6;
}

.footer-cols {
  display: flex;
  gap: 48px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  padding: 3px 0;
  transition: color var(--dur) var(--ease);
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.5s var(--ease) forwards;
  opacity: 0;
}

.fade-up:nth-child(2) { animation-delay: 0.1s; }
.fade-up:nth-child(3) { animation-delay: 0.2s; }
.fade-up:nth-child(4) { animation-delay: 0.3s; }
.fade-up:nth-child(5) { animation-delay: 0.4s; }
.fade-up:nth-child(6) { animation-delay: 0.5s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 700px) {
  .page-hero { padding: calc(var(--nav-h) + 56px) 0 64px; }
  .page-hero h1 {
    font-size: clamp(2rem, 9vw, 3.2rem);
    margin-bottom: 28px;
    max-width: 14ch;
  }
  .page-hero .eyebrow { margin-bottom: 20px; }
  .page-hero .hero-sub { font-size: 16px; margin-bottom: 28px; }
  .section { padding: 56px 0; }
  .outcomes-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-cols { flex-wrap: wrap; gap: 32px; }
  .section-cta .cta-secondary { display: block; margin: 16px 0 0; }
}

/* ============================================================
   Brand lockup wordmark mask — was propagated as empty span;
   CSS missing on opptycon/* pages because they use this external
   stylesheet rather than inline <style>. Fixed 2026-05-30.
   ============================================================ */
.brand-lockup{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}
.brand-raven{width:36px;height:36px;flex-shrink:0;display:block;color:var(--accent-ink)}
.brand-raven path{fill:currentColor}
.brand-wordmark{display:inline-block;height:26px;width:160px;background-color:var(--ink);-webkit-mask:url('/assets/netherops-logo.svg') left center no-repeat;mask:url('/assets/netherops-logo.svg') left center no-repeat;-webkit-mask-size:auto 26px;mask-size:auto 26px;flex-shrink:0}
