/* ──────────────────────────────────────────────────────────
   DashDNS Helm Charts — GitHub Pages stylesheet
   ────────────────────────────────────────────────────────── */

/* 1. Design tokens */
:root {
  --color-bg:          #0d1117;
  --color-surface:     #161b22;
  --color-surface-2:   #1c2230;
  --color-border:      #30363d;
  --color-text:        #e6edf3;
  --color-text-muted:  #7d8590;
  --color-accent:      #6366f1;   /* indigo — umbrella chart */
  --color-blue:        #0ea5e9;   /* DashDNS */
  --color-green:       #10b981;   /* controller */
  --color-code-bg:     #161b22;
  --font-sans:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono:         "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --radius:            8px;
  --radius-lg:         14px;
  --max-width:         1100px;
  --shadow:            0 4px 24px rgba(0,0,0,.45);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: var(--font-mono);
  font-size: .88em;
}

/* 3. Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 4. Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--color-text);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.logo-icon { font-size: 1.4rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: .92rem;
  transition: color .15s;
}
.site-nav a:hover { color: var(--color-text); text-decoration: none; }

.nav-github {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: .85rem !important;
}
.nav-github:hover {
  border-color: var(--color-accent);
  color: var(--color-accent) !important;
}

/* 5. Hero */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: .3rem .9rem;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.35);
  border-radius: 999px;
  font-size: .8rem;
  color: #a5b4fc;
  margin-bottom: 1.5rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 1.2rem;
}

.hero h1 span {
  background: linear-gradient(135deg, #6366f1, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  text-decoration: none;
}
.btn:hover { opacity: .85; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

/* 6. Section layout */
.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.section-sub {
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* 7. Quickstart */
.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(99,102,241,.2);
  color: #a5b4fc;
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .75rem;
}

/* 8. Code blocks */
.code-block {
  position: relative;
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-block pre {
  margin: 0;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  font-size: .85rem;
  line-height: 1.6;
}

.copy-btn {
  position: absolute;
  top: .5rem;
  right: .5rem;
  padding: .25rem .6rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  color: var(--color-text-muted);
  font-size: .75rem;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.copy-btn:hover { color: var(--color-text); border-color: var(--color-accent); }
.copy-btn.copied { color: var(--color-green); border-color: var(--color-green); }

/* 9. Chart cards */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.chart-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.chart-icon {
  font-size: 2rem;
  line-height: 1;
}

.chart-version {
  font-size: .75rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  background: rgba(99,102,241,.15);
  color: #a5b4fc;
  white-space: nowrap;
}

.chart-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.chart-desc {
  color: var(--color-text-muted);
  font-size: .92rem;
  flex: 1;
}

.chart-install {
  font-size: .8rem;
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: .6rem .85rem;
  overflow-x: auto;
  white-space: nowrap;
  color: #93c5fd;
  font-family: var(--font-mono);
}

/* 10. Architecture diagram */
.arch-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  overflow-x: auto;
}

.arch-section pre {
  font-size: .82rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  white-space: pre;
}

/* 11. Values table */
.values-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin-top: 1.5rem;
}

.values-table th {
  text-align: left;
  padding: .6rem 1rem;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.values-table td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.values-table tr:last-child td { border-bottom: none; }
.values-table tr:hover td { background: var(--color-surface-2); }

.values-table td:first-child code {
  color: #93c5fd;
  font-size: .82rem;
}

.values-table td:nth-child(2) code {
  color: #6ee7b7;
  font-size: .82rem;
}

/* 12. Alert box */
.alert {
  display: flex;
  gap: .75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border-left: 3px solid;
  margin: 1.5rem 0;
  font-size: .92rem;
}
.alert-info {
  background: rgba(14,165,233,.08);
  border-color: var(--color-blue);
  color: #bae6fd;
}
.alert-warn {
  background: rgba(245,158,11,.08);
  border-color: #f59e0b;
  color: #fde68a;
}

/* 13. Divider */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 3rem 0;
}

/* 14. Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  color: var(--color-text-muted);
  font-size: .88rem;
}
.footer-copy a { color: var(--color-text-muted); }
.footer-copy a:hover { color: var(--color-text); }

.footer-nav {
  display: flex;
  gap: 1.5rem;
}
.footer-nav a {
  color: var(--color-text-muted);
  font-size: .85rem;
}
.footer-nav a:hover { color: var(--color-text); text-decoration: none; }

/* 15. Responsive */
@media (max-width: 640px) {
  .site-nav a:not(.nav-github) { display: none; }
  .hero { padding: 3rem 0 2.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* 16. Copy-button JS hook */
.hljs { background: transparent !important; }
