/*
 * ============================================================
 *  Pantheon: Will of the Gods — GDD Stylesheet
 *  File: pantheon-structure.css
 *  Contains: Reset, layout, typography, spacing, components
 *  Contains NO color values — load a theme file alongside this
 *
 *  Load order:
 *    1. Google Fonts (see below)
 *    2. pantheon-structure.css   (this file)
 *    3. pantheon-dark.css        (or pantheon-light.css)
 *
 *  Google Fonts URL:
 *  https://fonts.googleapis.com/css2?family=Inknut+Antiqua:wght@400;600;700
 *    &family=Vollkorn:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600
 *    &family=Fira+Code:wght@300;400&display=swap
 * ============================================================
 */


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


/* ── Structural tokens ── */
:root {
  --font-display:  'Inknut Antiqua', serif;
  --font-body:     'Vollkorn', serif;
  --font-mono:     'Fira Code', monospace;
  --nav-width:     224px;
}


/* ── Base ── */
html, body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}


/* ================================================================
   LAYOUT
   ================================================================ */

.shell {
  display: flex;
  min-height: 100vh;
}


/* ── Sidebar ── */
.sidebar {
  width: var(--nav-width);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 28px 22px 22px;
  position: relative;
}

/* Accent underline on logo — color set by theme */
.sidebar-logo::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 22px;
  width: 48px;
  height: 2px;
}

.logo-eyebrow {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.logo-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.logo-sub {
  font-family: var(--font-body);
  font-size: 11px;
  font-style: italic;
  margin-top: 5px;
}

.nav-section-label {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 16px 22px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 22px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 8px;
  min-width: 16px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 22px;
}

.sidebar-footer-text {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  line-height: 1.6;
}


/* ── Main area ── */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-meta {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.content {
  padding: 44px 48px 80px;
  max-width: 860px;
}


/* ================================================================
   TYPOGRAPHY
   ================================================================ */

.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.page-subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 20px;
}

/* H2 */
.section-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

/* H3 */
.sub-heading {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  margin: 24px 0 10px;
}

.body-text {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  margin-bottom: 20px;
}

.caption {
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  line-height: 1.6;
}


/* ================================================================
   COMPONENTS
   ================================================================ */

/* ── Ornamental divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
}

.divider-line {
  flex: 1;
  height: 1px;
}

.divider-ornament {
  font-size: 13px;
  line-height: 1;
}

/* ── Tags ── */
.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 3px;
  border-width: 1px;
  border-style: solid;
}

/* ── Pull quote ── */
.pullquote {
  border-left-width: 2px;
  border-left-style: solid;
  padding: 10px 20px;
  margin: 24px 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  border-radius: 0 4px 4px 0;
}

/* ── Stat cards ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 28px 0;
}

.stat-card {
  border-width: 1px;
  border-style: solid;
  border-radius: 6px;
  padding: 14px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stat-card-val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1;
  margin-bottom: 5px;
}

.stat-card-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ── Formula block ── */
.formula-block {
  border-width: 1px;
  border-style: solid;
  border-left-width: 3px;
  border-radius: 0 6px 6px 0;
  padding: 14px 20px;
  margin: 16px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
}

/* ── Warning block ── */
.warning-block {
  border-width: 1px;
  border-style: solid;
  border-radius: 5px;
  padding: 12px 18px;
  margin: 16px 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-style: italic;
  font-weight: 700;
  line-height: 1.6;
}

/* ── Design note ── */
.design-note {
  border-width: 1px;
  border-style: solid;
  border-radius: 5px;
  padding: 12px 18px;
  margin: 16px 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-style: italic;
  line-height: 1.65;
}

.design-note::before {
  content: 'Design note — ';
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-style: normal;
}


/* ── Data table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

.data-table th {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  border-bottom-width: 2px;
  border-bottom-style: solid;
}

.data-table td {
  padding: 10px 14px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  vertical-align: top;
  line-height: 1.6;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table caption {
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  text-align: left;
  padding: 8px 0 12px;
  caption-side: bottom;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
  .sidebar    { display: none; }
  .content    { padding: 28px 24px 60px; }
  .stat-row   { grid-template-columns: repeat(2, 1fr); }
  .topbar     { padding: 12px 24px; }
  .page-title { font-size: 28px; }
}
