/* ============================================================
   Zenella — Static Site Styles
   Dark theme with AMD-inspired red/orange accent palette
   ============================================================ */

:root {
  --bg:        #0e0e12;
  --bg-alt:    #13131a;
  --surface:   #1a1a24;
  --border:    #2a2a3a;
  --accent:    #e05a00;
  --accent2:   #ff7a2f;
  --green:     #2ecc71;
  --red:       #e74c3c;
  --text:      #dcdce8;
  --text-dim:  #7e7e9a;
  --code-bg:   #111118;
  --radius:    8px;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  overflow-x: hidden; /* prevent horizontal blowout on iOS */
}

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

code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
  color: #ffab6e;
}

/* ── NAV ─────────────────────────────────────────────────── */
nav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 14, 18, 0.92);
  -webkit-backdrop-filter: blur(10px); /* iOS Safari */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-img {
  height: 32px;
  width: auto;
  margin-right: 2px;
}

nav ul {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

nav ul a {
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav ul a:hover { color: var(--text); text-decoration: none; }

/* ── HAMBURGER ──────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.menu-open {
  overflow: hidden;
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(224,90,0,0.12) 0%, transparent 70%),
              var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 6rem 2rem 5rem;
  text-align: center;
}

.hero-inner { max-width: 760px; margin: 0 auto; }

.hero-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 30px rgba(224,90,0,0.4));
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.tagline {
  font-size: 1.2rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.hero-badges {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.25em 0.85em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.badge-green { border-color: var(--green); color: var(--green); background: rgba(46,204,113,0.08); }
.badge-red   { border-color: var(--red);   color: var(--red);   background: rgba(231,76,60,0.08);  }

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

.btn {
  display: inline-block;
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--accent);
  color: #fff;
  transition: background 0.2s, transform 0.1s;
}
.btn:hover { background: var(--accent2); text-decoration: none; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); background: rgba(224,90,0,0.08); }

/* ── SECTIONS ─────────────────────────────────────────────── */
.section      { padding: 5rem 2rem; }
.section-alt  { background: var(--bg-alt); }

.container { max-width: 1200px; margin: 0 auto; }

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 0.5rem;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 760px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* ── FEATURES ─────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
  min-width: 0; /* allow grid cell to shrink below content size on iOS */
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }

.feature-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p  { font-size: 0.9rem; color: var(--text-dim); line-height: 1.7; }

/* ── LAYOUT MAP ───────────────────────────────────────────── */
.layout-wrapper {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 800px) {
  .layout-wrapper { grid-template-columns: 1fr; }
}

.layout-map {
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: 70px;
}

@media (max-width: 800px) {
  .layout-map {
    position: static; /* no sticky inside single-col grid on mobile */
  }
}

.seg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 12px;
  border-radius: 4px;
  border-left: 3px solid transparent;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.seg-label { font-weight: 600; }
.seg-addr  { color: var(--text-dim); font-size: 0.72rem; }
.seg-size  { color: var(--text-dim); font-size: 0.7rem; }

.seg-header { background: rgba(224,90,0,0.15);  border-color: var(--accent); }
.seg-crypto { background: rgba(155,89,182,0.12); border-color: #9b59b6; }
.seg-meta   { background: rgba(52,152,219,0.12); border-color: #3498db; }
.seg-regs   { background: rgba(22,160,133,0.12); border-color: #16a085; }
.seg-ucode  { background: rgba(46,204,113,0.12); border-color: var(--green); }

/* ── LAYOUT TABLE ─────────────────────────────────────────── */
.layout-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0; /* allow grid cell to shrink */
}

.layout-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.layout-table th {
  text-align: left;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.layout-table td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  overflow: hidden;
  word-break: break-word;
}

.layout-table th:nth-child(1),
.layout-table td:nth-child(1) { min-width: 140px; }
.layout-table th:nth-child(2),
.layout-table td:nth-child(2) { min-width: 80px; }
.layout-table th:nth-child(3),
.layout-table td:nth-child(3) { min-width: 70px; }
.layout-table th:nth-child(4),
.layout-table td:nth-child(4) { min-width: 130px; }
/* Description column takes the rest */

.layout-table tr:hover td { background: rgba(255,255,255,0.03); }

.row-header td:first-child { border-left: 3px solid var(--accent); }
.row-crypto td:first-child { border-left: 3px solid #9b59b6; }
.row-meta   td:first-child { border-left: 3px solid #3498db; }
.row-regs   td:first-child { border-left: 3px solid #16a085; }
.row-ucode  td:first-child { border-left: 3px solid var(--green); }

/* ── COMMANDS ─────────────────────────────────────────────── */
.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.cmd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  min-width: 0;
}

.cmd-card-primary {
  border-color: var(--accent);
  background: rgba(224,90,0,0.06);
}

.cmd-path {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.3em 0.6em;
  margin-bottom: 0.9rem;
  display: block;             /* full width so long text wraps */
  word-break: break-all;      /* break long plugin paths on mobile */
  overflow-wrap: break-word;
}

.cmd-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.recommended {
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  padding: 0.15em 0.55em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: sans-serif;
}

.cmd-card p { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.9rem; line-height: 1.7; }

.cmd-list { padding-left: 1.2rem; font-size: 0.875rem; color: var(--text-dim); }
.cmd-list li { margin-bottom: 0.3rem; }

.plugin-screenshot { text-align: center; }
.plugin-screenshot img {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.caption {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
}

/* ── TYPES ────────────────────────────────────────────────── */
.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.type-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  min-width: 0;
  overflow: hidden; /* clip any overflowing monospace content */
}

.type-card-wide { grid-column: 1 / -1; }

.type-card h3 {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: #ffab6e;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.type-size {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 400;
  font-family: var(--font-mono);
}

.type-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.type-table td {
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.type-table td:first-child { color: #7eb8f7; width: 45%; }
.type-table td:last-child  { color: var(--text); }

.enum-title {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1rem 0 0.5rem;
}

.enum-table td:first-child { color: #f7c96e; }

/* ── INSTALL ──────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 0; margin-bottom: 2.5rem; }

.step {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.step:first-child { padding-top: 0; }

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.step-body h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.step-body p  { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.75rem; }

.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.code-block pre {
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #c8d3f5;
  line-height: 1.7;
  white-space: pre-wrap;      /* wrap long lines on narrow screens */
  word-break: break-all;
}

.comment { color: var(--text-dim); }

.requirements-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
}

.requirements-box h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.requirements-box ul { padding-left: 1.2rem; font-size: 0.9rem; color: var(--text-dim); }
.requirements-box li { margin-bottom: 0.35rem; }

/* ── WORKFLOW ─────────────────────────────────────────────── */
.workflow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 2rem;
}

@media (max-width: 800px) {
  .workflow-grid { grid-template-columns: 1fr; }
}

.workflow-steps { display: flex; flex-direction: column; gap: 1.5rem; }

.wstep {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.wstep-icon { font-size: 1.6rem; flex-shrink: 0; }
.wstep h3   { font-size: 0.97rem; font-weight: 600; margin-bottom: 0.3rem; }
.wstep p    { font-size: 0.87rem; color: var(--text-dim); line-height: 1.7; }

.workflow-video video {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  display: block;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.note-box {
  background: rgba(52,152,219,0.08);
  border: 1px solid rgba(52,152,219,0.25);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
}
.note-box strong { color: var(--text); }

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2rem;
}

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

.footer-meta { font-size: 0.85rem; color: var(--text-dim); }

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.footer-links a:hover { color: var(--text); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 960px) {
  nav ul { gap: 1rem; }
  nav ul a { font-size: 0.8rem; }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(14, 14, 18, 0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    gap: 0;
  }

  nav ul.open {
    display: flex;
  }

  nav ul li {
    border-bottom: 1px solid var(--border);
  }
  nav ul li:last-child {
    border-bottom: none;
  }

  nav ul a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .hero { padding: 4rem 1.25rem 3rem; }
  .hero h1 { font-size: 2.2rem; }
  .tagline { font-size: 1rem; }
  .section { padding: 3.5rem 1.25rem; }
  .type-card-wide { grid-column: 1; }
  .footer-inner { flex-direction: column; text-align: center; }

  /* prevent hero actions from overflowing on very small screens */
  .hero-actions { flex-wrap: wrap; justify-content: center; }
  .btn { width: 100%; max-width: 220px; text-align: center; }

  /* step layout on small screens */
  .step { flex-direction: column; gap: 0.75rem; }

  /* workflow: stack nicely */
  .wstep { flex-direction: row; align-items: flex-start; }
}

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
