/* Epanya Docs — shared styles */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

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

:root {
  --bg:         #0c0c10;
  --surface:    #151519;
  --surface-2:  #1c1c22;
  --sidebar-bg: #0e0e12;
  --border:     rgba(200,200,210,0.08);
  --border-hi:  rgba(200,200,210,0.15);
  --text:       #e8d5b0;
  --text-bright:#f0ead8;
  --muted:      #777;
  --muted-hi:   #999;
  --gold:       #c4943d;
  --gold-light: #f0d080;
  --gold-grad:  linear-gradient(135deg, #c4943d, #f0d080, #c4943d);
  --green:      #059669;
  --amber:      #d97706;
  --red:        #dc2626;
  --blue:       #3b82f6;
  --mono:       'DM Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
}

html { background: var(--bg); }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* ── Header / Nav ─────────────────────────────────────────── */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-img { max-height: 24px; display: block; }

nav { display: flex; align-items: center; }
nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  margin-left: 28px;
  transition: color .15s;
}
nav a:hover { color: var(--text); }
nav a.active { color: var(--gold); font-weight: 500; }

/* ── Page wrapper ─────────────────────────────────────────── */
.page-wrapper {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 56px;
  align-items: flex-start;
}

/* ── Sidebar ──────────────────────────────────────────────── */
aside.sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 72px;
  padding: 32px 0;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
aside.sidebar h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: 8px;
  margin-top: 24px;
}
aside.sidebar h4:first-child { margin-top: 0; }
aside.sidebar a {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  transition: color .15s;
}
aside.sidebar a:hover { color: var(--text-bright); }
aside.sidebar a.active { color: var(--gold); }

/* ── Main content ─────────────────────────────────────────── */
main.content {
  flex: 1;
  min-width: 0;
  max-width: 780px;
  padding: 40px 0 100px;
}

/* ── Hero (index.html) ───────────────────────────────────── */
.hero {
  padding: 80px 32px 72px;
  text-align: center;
  background: var(--bg) radial-gradient(ellipse at 50% 50%, rgba(196,148,61,.03) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  background: linear-gradient(135deg, #a8a8b0, #e0e0e8, #888890, #d0d0d8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.hero p {
  font-size: 17px;
  font-weight: 300;
  color: var(--muted);
  margin: 0 auto;
  max-width: 580px;
  line-height: 1.7;
}
.btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}
.btn-primary {
  background: var(--gold-grad);
  color: #1a0e00;
  border: none;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: #c8c8d0;
  border: 1px solid rgba(200,200,210,.2);
}
.btn-secondary:hover { border-color: rgba(200,200,210,.4); color: var(--text-bright); }

/* ── Typography ───────────────────────────────────────────── */
h1 {
  font-family: 'Cinzel', serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 14px;
  line-height: 1.2;
  letter-spacing: -.01em;
}
h2 {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-bright);
  margin-top: 52px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -.005em;
}
h2:first-child { margin-top: 0; }
h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-bright);
  margin-top: 28px;
  margin-bottom: 10px;
}
p { margin-bottom: 14px; }
ul, ol { margin: 0 0 16px 20px; }
li { margin-bottom: 5px; color: var(--text); }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; color: var(--text-bright); }
em { font-style: italic; }

/* ── Code ─────────────────────────────────────────────────── */
pre, code { font-family: var(--mono); font-size: 13px; }
code {
  background: #1a1a20;
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--gold);
  font-size: 12.5px;
}
pre {
  background: #0a0a0e;
  color: #a8c090;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  overflow-x: auto;
  margin: 14px 0 18px;
  line-height: 1.6;
}
pre code { background: none; color: inherit; padding: 0; font-size: 13px; }

/* ── Endpoint cards ───────────────────────────────────────── */
.endpoint {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color .2s;
}
.endpoint:hover { border-color: rgba(196,148,61,.2); }
.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--sidebar-bg);
}
.method {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.get    { background: rgba(5,150,105,.15);  color: #34d399; }
.post   { background: rgba(59,130,246,.15); color: #60a5fa; }
.patch  { background: rgba(217,119,6,.15);  color: #fbbf24; }
.delete { background: rgba(220,38,38,.15);  color: #f87171; }
.path {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-bright);
  font-weight: 500;
}
.auth-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid var(--border-hi);
  color: var(--muted-hi);
  white-space: nowrap;
}
.endpoint-body { padding: 16px 18px; }
.endpoint-body > p { margin-bottom: 10px; font-size: 14px; }
.endpoint-body > p:last-child { margin-bottom: 0; }

/* ── Cards grid ───────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color .2s;
}
.card:hover { border-color: rgba(196,148,61,.2); }
.card h3 {
  margin-top: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 8px;
}
.card p { font-size: 13.5px; color: var(--muted); margin: 0; }

/* ── Step list ────────────────────────────────────────────── */
.steps { counter-reset: step; list-style: none; margin: 0 0 20px; padding: 0; }
.steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.steps li::before {
  content: counter(step);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gold-grad);
  color: #1a0e00;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-family: 'DM Sans', sans-serif;
}

/* ── Table ────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 18px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
th {
  background: var(--surface);
  text-align: left;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-hi);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(200,200,210,.06);
  vertical-align: top;
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: rgba(200,200,210,.03); }

/* ── Callout ──────────────────────────────────────────────── */
.callout {
  border-left: 3px solid var(--gold);
  background: rgba(196,148,61,.06);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--text);
}
.callout.warning {
  border-color: var(--amber);
  background: rgba(217,119,6,.06);
}
.callout.tip {
  border-color: var(--gold);
  background: rgba(196,148,61,.06);
}
.callout strong { color: var(--text-bright); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { padding: 0 20px; }
  .page-wrapper { flex-direction: column; padding: 0 20px; }
  aside.sidebar { display: none; }
  main.content { padding: 28px 0 60px; }
  .hero { padding: 56px 20px 48px; }
  .hero h1 { font-size: 26px; }
  nav a { margin-left: 16px; font-size: 13px; }
}
