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

/* -- Custom Properties -- */
:root {
  /* Palette */
  --bg:          #f5f2ed;
  --bg-content:  #ffffff;
  --text-head:   #1c1c1c;
  --text-body:   #3d3d3d;
  --text-sec:    #6b6b6b;
  --accent:      #3d6b5e;
  --accent-light:#e8f0ed;
  --border:      #e0dbd3;
  --border-light:#ece8e2;

  /* Tier colors */
  --trail:       #4a78a8;
  --trail-bg:    #edf2f7;
  --range:       #a8893a;
  --range-bg:    #f7f3ea;
  --summit:      #a85a5a;
  --summit-bg:   #f7eded;

  /* Typography */
  --font-head:   'Crimson Pro', Georgia, serif;
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-w:       900px;
  --nav-h:       56px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.75;
  padding-top: var(--nav-h);
}

/* -- Typography -- */
h1 { font-family: var(--font-head); font-size: 2rem; font-weight: 600; color: var(--text-head); line-height: 1.3; margin-bottom: 0.75rem; }
h2 { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; color: var(--text-head); line-height: 1.35; margin-bottom: 0.5rem; }
h3 { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; color: var(--text-head); line-height: 1.4; margin-bottom: 0.4rem; }
p { margin-bottom: 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* -- Layout -- */
main { max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.5rem; }
section { margin-bottom: 3.5rem; }
section:last-child { margin-bottom: 0; }
hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* -- Nav -- */
.odx-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h); background: var(--bg-content);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; font-family: var(--font-body);
}
.odx-nav-logo {
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 600;
  color: var(--text-head); text-decoration: none;
}
.odx-nav-logo:hover { text-decoration: none; }
.odx-nav-tabs { display: flex; gap: 0.25rem; align-items: center; }
.odx-nav-tabs a {
  font-size: 0.82rem; font-weight: 500; color: var(--text-sec);
  padding: 0.4rem 0.75rem; border-radius: 4px; text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.odx-nav-tabs a:hover { color: var(--text-head); background: var(--accent-light); text-decoration: none; }
.odx-nav-tabs a.active { color: var(--accent); border-bottom: 2px solid var(--accent); border-radius: 0; }
.odx-nav-tabs a.coming-soon { color: var(--border); cursor: default; }
.odx-nav-tabs a.coming-soon:hover { background: none; color: var(--border); }

/* -- Footer -- */
.odx-footer {
  max-width: var(--max-w); margin: 0 auto; padding: 2rem 1.5rem;
  border-top: 1px solid var(--border); text-align: center;
  font-size: 0.78rem; color: var(--text-sec); line-height: 1.8;
}

/* -- Buttons -- */
.btn {
  display: inline-block; padding: 0.65rem 1.5rem; border-radius: 4px;
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 500;
  text-decoration: none; transition: background 0.2s, color 0.2s;
  cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2f5548; text-decoration: none; color: #fff; }
.btn-outline { background: none; border: 1px solid var(--border); color: var(--text-body); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* -- Tables -- */
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.88rem; }
thead th {
  text-align: left; padding: 0.75rem 1rem; font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-sec);
  border-bottom: 2px solid var(--border);
}
tbody td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border-light); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }

/* Tier-colored column headers */
th.col-trail { color: var(--trail); }
th.col-range { color: var(--range); }
th.col-summit { color: var(--summit); }

/* -- Tier Badges -- */
.tier-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.2rem 0.6rem; border-radius: 3px;
}
.tier-badge.trail { background: var(--trail-bg); color: var(--trail); }
.tier-badge.range { background: var(--range-bg); color: var(--range); }
.tier-badge.summit { background: var(--summit-bg); color: var(--summit); }

/* -- Content Cards (simple, not grid) -- */
.content-card {
  background: var(--bg-content); border: 1px solid var(--border-light);
  border-radius: 6px; padding: 2rem; margin-bottom: 1.5rem;
}

/* -- Value Props (overview page) -- */
.value-props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 2rem 0; }
.value-prop { text-align: left; }
.value-prop h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.value-prop p { font-size: 0.88rem; color: var(--text-sec); }

/* -- Tier Cards (membership page) -- */
.tier-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 2rem 0; }
.tier-card {
  background: var(--bg-content); border: 1px solid var(--border-light);
  border-radius: 6px; padding: 2rem; position: relative; overflow: hidden;
}
.tier-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.tier-card.trail::before { background: var(--trail); }
.tier-card.range::before { background: var(--range); }
.tier-card.summit::before { background: var(--summit); }
.tier-card .tier-name { font-family: var(--font-head); font-size: 1.2rem; color: var(--text-head); margin-bottom: 0.15rem; }
.tier-card .tier-subtitle { font-size: 0.78rem; color: var(--text-sec); margin-bottom: 0.75rem; }
.tier-card .tier-price { font-size: 1.4rem; font-weight: 600; color: var(--text-head); font-variant-numeric: tabular-nums; }
.tier-card .tier-monthly { font-size: 0.78rem; color: var(--text-sec); margin-bottom: 1.25rem; }
.tier-card .tier-section-label {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-sec); margin: 1rem 0 0.4rem;
}
.tier-card ul { list-style: none; padding: 0; }
.tier-card li { font-size: 0.85rem; padding: 0.25rem 0; color: var(--text-body); }

/* -- Archetype Cards (stories page) -- */
.archetype {
  background: var(--bg-content); border: 1px solid var(--border-light);
  border-radius: 6px; padding: 2rem; margin-bottom: 2rem;
}
.archetype-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.archetype-name { font-family: var(--font-head); font-size: 1.2rem; color: var(--text-head); }
.archetype-name span { display: block; font-family: var(--font-body); font-size: 0.82rem; color: var(--text-sec); font-weight: 400; }
.archetype-tagline { font-family: var(--font-head); font-style: italic; color: var(--accent); font-size: 0.95rem; margin-bottom: 1rem; }
.archetype-costs {
  display: flex; gap: 1.5rem; padding: 1rem 1.25rem; margin: 1.25rem 0;
  background: var(--bg); border-radius: 4px;
}
.archetype-costs .cost-item { text-align: center; flex: 1; }
.archetype-costs .cost-value { font-size: 1.1rem; font-weight: 600; color: var(--text-head); display: block; font-variant-numeric: tabular-nums; }
.archetype-costs .cost-label { font-size: 0.68rem; color: var(--text-sec); text-transform: uppercase; letter-spacing: 0.06em; }

/* -- Comparison Table (membership page) -- */
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 2rem 0; }
.comparison-panel { background: var(--bg-content); border: 1px solid var(--border-light); border-radius: 6px; padding: 1.75rem; }
.comparison-panel h3 { font-size: 1rem; margin-bottom: 1rem; }
.comparison-panel.assembled { border-top: 3px solid #c0392b; }
.comparison-panel.odx { border-top: 3px solid var(--accent); }

/* -- Passcode Gate -- */
.gate-overlay {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
}
.gate-box { text-align: center; max-width: 360px; padding: 2rem; }
.gate-box h2 { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 0.25rem; }
.gate-box p { color: var(--text-sec); font-size: 0.85rem; margin-bottom: 1.5rem; }
.gate-box input {
  width: 100%; padding: 0.65rem 1rem; border: 1px solid var(--border);
  border-radius: 6px; background: var(--bg-content); color: var(--text-head);
  font-size: 0.95rem; margin-bottom: 0.75rem; outline: none; font-family: inherit;
}
.gate-box input:focus { border-color: var(--accent); }
.gate-box button {
  width: 100%; padding: 0.65rem; border: none; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 0.95rem;
  cursor: pointer; font-family: inherit; font-weight: 500;
}
.gate-box button:hover { background: #2f5548; }
.gate-error { color: #c0392b; font-size: 0.8rem; margin-top: 0.5rem; opacity: 0; transition: opacity 0.3s; }

/* -- Responsive -- */
@media (max-width: 768px) {
  .value-props { grid-template-columns: 1fr; }
  .tier-cards { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .odx-nav-tabs { display: none; }
  /* TODO: hamburger menu for mobile */
  main { padding: 2rem 1rem; }
}

@media print {
  .odx-nav { display: none; }
  body { padding-top: 0; }
}
