/* ============================================================
   DaneroHQ.com — brand stylesheet
   Two-world theme system (Paper = light, Ink = dark),
   typographic scale, signature devices, focus + a11y.
   All colour lives in CSS variables. No raw hexes in markup.
   ============================================================ */

/* ---------- Theme tokens ---------- */

/* Light theme — the Paper world (default) */
:root {
  --bg:           #FBF6EE;
  --surface:      #FFFFFF;
  --surface-2:    #FFFFFF;
  --text:         #0C0C0D;
  --text-strong:  #0C0C0D;
  --text-muted:   #5F5A52;
  --border:       #8A847A;
  --border-soft:  rgba(138,132,122,0.25);
  --accent:       #EF6C2B;
  --accent-text:  #C0501A;

  color-scheme: light;
}

/* Dark theme tokens — the Ink world. Shared block applied to
   (a) an explicit choice and (b) the closing ink band class. */
:root[data-theme="dark"],
.ink {
  --bg:           #0C0C0D;
  --surface:      #161618;
  --surface-2:    #1E1E21;
  --text:         #F7F3EC;
  --text-strong:  #FFFFFF;
  --text-muted:   #A7A097;
  --border:       #2A2A2D;
  --border-soft:  rgba(255,255,255,0.10);
  --accent:       #EF6C2B;
  --accent-text:  #EF6C2B;

  color-scheme: dark;
}

/* System dark preference, only when the visitor has made no explicit choice */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:           #0C0C0D;
    --surface:      #161618;
    --surface-2:    #1E1E21;
    --text:         #F7F3EC;
    --text-strong:  #FFFFFF;
    --text-muted:   #A7A097;
    --border:       #2A2A2D;
    --border-soft:  rgba(255,255,255,0.10);
    --accent:       #EF6C2B;
    --accent-text:  #EF6C2B;

    color-scheme: dark;
  }
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 200ms ease, color 200ms ease;
}

/* The .ink band paints its own world even inside the Paper theme */
.ink {
  background: var(--bg);
  color: var(--text);
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) {
  .container { padding-inline: 32px; }
}

.section {
  padding-block: clamp(64px, 10vw, 120px);
}
.section-tight {
  padding-block: clamp(48px, 7vw, 80px);
}

/* ---------- Typography scale ---------- */

.display {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
h1, .h1 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--text-strong);
  margin: 0;
}
h2, .h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  margin: 0;
}
h3, .h3 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--text-strong);
  margin: 0;
}
.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text);
}
.meta {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Eyebrow — mono uppercase label */
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-text);
  margin: 0;
}
.eyebrow-muted { color: var(--text-muted); }

/* ---------- Signature devices ---------- */

/* The dash sign-off / opener — horizontal orange stub */
.dash {
  display: block;
  width: 38px;
  height: 6px;
  background: var(--accent);
  border-radius: 1px;
}

/* The wordmark logo — vertical orange bar + DaneroHQ */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
}
.wordmark-bar {
  display: inline-block;
  width: 6px;
  height: 1.05em;
  background: var(--accent);
  border-radius: 1px;
  flex: none;
}
.wordmark-text {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.3rem;
}
.wm-danero { color: var(--text-strong); }
.wm-hq     { color: var(--accent); }

.wordmark-lg .wordmark-text { font-size: clamp(2rem, 6vw, 3.5rem); }
.wordmark-lg .wordmark-bar  { width: 9px; }

/* ---------- Links ---------- */

a { color: inherit; }

.link {
  color: var(--accent-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease;
}
.link:hover { border-bottom-color: var(--accent); }

.nav-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.nav-link:hover { color: var(--text); }
.nav-link[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Mono "find me" labels in footer / contact */
.findme-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 2px;
  transition: border-color 150ms ease, color 150ms ease;
}
.findme-link:hover {
  color: var(--accent-text);
  border-bottom-color: var(--accent);
}

/* ---------- Buttons / form controls ---------- */

.btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  cursor: pointer;
  transition: filter 150ms ease;
}
.btn:hover { filter: brightness(1.06); }

.field {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 1rem;
  transition: border-color 150ms ease;
}
.field::placeholder { color: var(--text-muted); }
.field:hover { border-color: var(--border); }

.field-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 7px;
}

/* Visually hidden (honeypot, skip-link, screen-reader text) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
/* honeypot stays in the DOM but off-screen and out of tab order */
.hp {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  height: 0;
  width: 0;
}

/* ---------- Cards / venture entries ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}

.slot {
  border: 1px dashed var(--border);
  border-radius: 14px;
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.status-badge {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 4px 12px;
}

/* hairline rule */
.rule {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 26px);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* On narrow screens the nav drops to its own full-width row so all four
   links and the toggle stay reachable (header markup is unchanged). */
@media (max-width: 640px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    row-gap: 6px;
    padding-block: 10px;
  }
  .site-header nav { width: 100%; }
  .nav-list {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }
  .nav-link { font-size: 0.72rem; letter-spacing: 0.02em; }
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.theme-toggle:hover { border-color: var(--border); color: var(--accent-text); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
/* show the correct glyph for the active world */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun  { display: block; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
  z-index: 100;
  transition: top 150ms ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding-block: clamp(48px, 7vw, 72px);
}

/* ---------- Focus states ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
a:focus-visible,
.field:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- QualPath inline logo sizing ---------- */
.qp-logo { color: var(--text-strong); }
.qp-logo svg { height: 56px; width: auto; }

/* ---------- Topics (About: "Seven Pillars") ---------- */
/* Interleaved buttons + panels in one flex container.
   Mobile-first: vertical list, the open pillar's description sits DIRECTLY
   beneath its own button (accordion-style), all pillars visible.
   From 768px up: a centred horizontal row, with the open description shown
   centred below the whole row (panels moved down via flex `order`). */
.topics {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-soft);
}
.topic-tab {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  border-left: 3px solid transparent;   /* open marker on phone */
  width: 100%;
  text-align: left;
  padding: 15px 12px;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}
.topic-tab:hover { color: var(--text-strong); }
.topic-tab[aria-expanded="true"] {
  color: var(--accent-text);
  border-left-color: var(--accent);
  border-bottom-color: transparent;     /* let the panel below carry the hairline */
}
.topic-panel { border-bottom: 1px solid var(--border-soft); }
.topic-panel p {
  margin: 0;
  padding: 2px 12px 16px;
  max-width: 54ch;
  font-family: "Source Sans 3", sans-serif;
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--text);
}
.topic-panel:not([hidden]) { animation: topicReveal 200ms ease; }
@keyframes topicReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
  .topics {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    border-top: 0;
  }
  .topic-tab {
    order: 0;                 /* all pillars first, in the row */
    width: auto;
    text-align: center;
    white-space: nowrap;
    font-size: 1.0625rem;
    line-height: 1.2;
    border-left: 0;
    border-bottom: 2px solid var(--border-soft);
    padding: 12px 16px;
  }
  .topic-tab[aria-expanded="true"] {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }
  .topic-panel {
    order: 1;                 /* the open description drops below the whole row */
    flex-basis: 100%;
    border-bottom: 0;
    margin-top: 32px;
    text-align: center;
  }
  .topic-panel p {
    padding: 0;
    max-width: 44ch;
    margin-inline: auto;
    font-size: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topic-tab { transition: none; }
  .topic-panel:not([hidden]) { animation: none; }
}
