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

:root {
  --bg: #0d0f0e;
  --bg-2: #141816;
  --bg-3: #1c201e;
  --border: #2a2e2c;
  --orange: #e8430a;
  --orange-dim: #7a2008;
  --orange-lt: #ff6b35;
  --green: #4a7c59;
  --green-lt: #6db88a;
  --text: #c8ccc9;
  --text-dim: #6b7570;
  --text-lt: #e8ebe9;
  --font-head: "Barlow Condensed", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --font-body: "IBM Plex Sans", sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Nav ===== */
body > nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 2.5rem;
  background: rgba(13,15,14,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.nav-logo img { height: 30px; width: auto; background: white; border-radius: 4px; padding: 3px 5px; }
.nav-logo span { font-family: var(--font-mono); font-size: .9rem; color: var(--text-dim); letter-spacing: .04em; }
.nav-logo em { font-style: normal; color: var(--orange); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: var(--font-mono); font-size: .8rem; color: var(--text);
  text-decoration: none; letter-spacing: .08em; text-transform: uppercase; transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--orange); }
.gh-icon { display: inline-block; width: .85em; height: .85em; vertical-align: -0.1em; margin-right: .3em; }
.gh-icon path { fill: currentColor; }

/* Nav Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after { content: ' ▾'; font-size: .6rem; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--bg-2); border: 1px solid var(--border);
  list-style: none; min-width: 180px; padding: .5rem 0;
  padding-top: 1rem; border-radius: 2px; z-index: 200;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a, .dropdown-menu li .coming-soon {
  display: block; padding: .5rem 1.25rem;
  font-family: var(--font-mono); font-size: .78rem; color: var(--text);
  text-decoration: none; letter-spacing: .06em; white-space: nowrap; transition: color .2s;
  text-transform: none;
}
.dropdown-menu li a:hover { color: var(--orange); background: var(--bg-3); }
.dropdown-menu .coming-soon { color: var(--text-dim); cursor: default; }
.dropdown-menu .coming-soon em {
  font-style: normal; font-size: .65rem; color: var(--green);
  margin-left: .5rem; border: 1px solid var(--green); padding: .1rem .35rem; border-radius: 2px;
}

/* ===== Typography ===== */
h1 {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--text-lt);
  letter-spacing: -.01em;
  line-height: 1.0;
  margin-bottom: 2rem;
}
h1 em { font-style: normal; color: var(--orange); }

h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--text-lt);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -.01em;
}

section { padding: 6rem 2.5rem; }

.section-label {
  font-family: var(--font-mono); font-size: .7rem; color: var(--orange-dim);
  letter-spacing: .15em; text-transform: uppercase; margin-bottom: 1.5rem;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .85rem; color: var(--bg);
  background: var(--orange); padding: .85rem 1.75rem; text-decoration: none;
  letter-spacing: .04em; transition: background .2s, transform .15s; border-radius: 2px;
}
.btn-primary:hover { background: #ff6b35; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .85rem; color: var(--text);
  background: transparent; border: 1px solid var(--border); padding: .85rem 1.75rem;
  text-decoration: none; letter-spacing: .04em;
  transition: border-color .2s, color .2s, transform .15s; border-radius: 2px;
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-1px); }

/* ===== Tags & Meta ===== */
.post-date { font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); letter-spacing: .06em; }
.post-tag {
  font-family: var(--font-mono); font-size: .65rem; color: var(--green-lt);
  border: 1px solid var(--green); padding: .15rem .45rem; border-radius: 2px;
  letter-spacing: .08em; text-transform: uppercase;
}

/* ===== Footer ===== */
footer {
  padding: 2rem 2.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-left { display: flex; align-items: center; gap: 0.65rem; }
.footer-left img { height: 22px; background: white; border-radius: 3px; padding: 2px 4px; }
.footer-left span { font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 2rem; }
.footer-links a {
  font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim);
  text-decoration: none; letter-spacing: .08em; transition: color .2s;
}
.footer-links a:hover { color: var(--orange); }

/* ===== Hero (index.html) ===== */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 8rem 2.5rem 4rem; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 40%, rgba(74,124,89,.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(212,168,67,.05) 0%, transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px; opacity: .3; pointer-events: none;
}
.hero-content { position: relative; max-width: 900px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .75rem; color: var(--green-lt);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2rem;
  padding: .4rem .8rem; border: 1px solid var(--green); border-radius: 2px;
}
.hero-tag::before {
  content: ''; width: 6px; height: 6px; background: var(--green-lt);
  border-radius: 50%; animation: pulse 2s infinite;
}
.hero-product {
  font-family: var(--font-mono); font-size: .85rem; color: var(--orange);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: .95;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem); font-weight: 300; color: var(--text);
  max-width: 560px; margin-bottom: 3rem; line-height: 1.8;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.install-strip {
  margin-top: 4rem; padding: 1.25rem 1.5rem;
  background: var(--bg-2); border: 1px solid var(--border);
  border-left: 3px solid var(--orange); border-radius: 2px;
  display: inline-flex; align-items: center; gap: 1rem;
}
.install-strip code { font-family: var(--font-mono); font-size: .9rem; color: var(--green-lt); }
.install-label {
  font-family: var(--font-mono); font-size: .7rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .1em; white-space: nowrap;
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes fadeUp { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }
.hero-product { animation: fadeUp .5s ease both; }
.hero-tag { animation: fadeUp .5s .1s ease both; }
.hero h1 { animation: fadeUp .5s .2s ease both; }
.hero-sub { animation: fadeUp .5s .2s ease both; }
.hero-actions { animation: fadeUp .5s .3s ease both; }
.install-strip { animation: fadeUp .5s .4s ease both; }

/* ===== Truth Section (index.html) ===== */
.truth-section {
  background: var(--bg-2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.truth-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  max-width: 1100px; margin: 0 auto; align-items: start;
}
.truth-left p { font-size: 1.05rem; line-height: 1.9; color: var(--text); margin-bottom: 1.25rem; }
.truth-left strong { color: var(--text-lt); font-weight: 400; }
.truth-right { display: flex; flex-direction: column; gap: 1.5rem; }
.truth-item { padding: 1.5rem; background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px; }
.truth-item-label {
  font-family: var(--font-mono); font-size: .7rem; color: var(--orange);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5rem;
}
.truth-item p { font-size: .9rem; color: var(--text); line-height: 1.6; }

/* ===== Principles Section (index.html) ===== */
.principles-section {
  background: var(--bg-2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.principles-inner { max-width: 1100px; margin: 0 auto; }
.principles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; margin-top: 3rem; }
.principle {
  padding: 2rem; border: 1px solid var(--border); border-radius: 2px;
  background: var(--bg-3); transition: border-color .2s;
}
.principle:hover { border-color: var(--orange-dim); }
.principle-icon { font-size: 1.2rem; color: var(--orange); margin-bottom: 1rem; }
.principle h3 {
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 700;
  color: var(--text-lt); margin-bottom: .5rem;
}
.principle p { font-size: .9rem; color: var(--text-dim); line-height: 1.7; }

/* ===== CTA Section (index.html) ===== */
.cta-section { text-align: center; max-width: 700px; margin: 0 auto; }
.cta-section > p { color: var(--text-dim); margin-bottom: 2.5rem; font-size: 1.05rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.alpha-note { margin-top: 2rem; font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim); }

/* ===== Blog Header & Posts (blog.html) ===== */
.blog-header { padding: 8rem 2.5rem 3rem; max-width: 800px; margin: 0 auto; }
.blog-header h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
}
.blog-header p { font-size: 1.05rem; color: var(--text-dim); max-width: 520px; line-height: 1.8; }
.posts-list { max-width: 800px; margin: 0 auto; padding: 0 2.5rem 6rem; }
.post-card { display: block; padding: 2.5rem 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.post-card:hover .post-title { color: var(--orange); }
.post-card:last-child { border-bottom: none; }
.post-meta { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.post-title {
  font-family: var(--font-head); font-size: 1.9rem; font-weight: 700;
  color: var(--text-lt); margin-bottom: .75rem; letter-spacing: -.01em;
  transition: color .2s; line-height: 1.1;
}
.post-excerpt { font-size: 1rem; color: var(--text-dim); line-height: 1.8; max-width: 620px; }
.read-more {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem;
  font-family: var(--font-mono); font-size: .78rem; color: var(--orange); letter-spacing: .04em;
}

/* ===== Article (docs/posts/) ===== */
.article-back { padding: 6rem 2.5rem 0; max-width: 720px; margin: 0 auto; }
.back-link {
  font-family: var(--font-mono); font-size: .78rem; color: var(--text-dim);
  text-decoration: none; letter-spacing: .06em; transition: color .2s;
}
.back-link:hover { color: var(--orange); }
.article-content { max-width: 720px; margin: 0 auto; padding: 2.5rem 2.5rem 6rem; }
.article-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.article-content h1 { margin-bottom: 3rem; }
.article-body p { font-size: 1.1rem; line-height: 1.9; color: var(--text); margin-bottom: 1.5rem; }
.article-body strong { color: var(--text-lt); font-weight: 400; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }
.article-footer {
  margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.article-footer a {
  color: var(--orange); text-decoration: none; font-family: var(--font-mono); font-size: .85rem;
}
.article-footer a:hover { color: var(--orange-lt); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1rem; }
  section { padding: 4rem 1.5rem; }
  .truth-grid { grid-template-columns: 1fr; gap: 2rem; }
  .principles-grid { grid-template-columns: 1fr; }
  .blog-header, .posts-list { padding-left: 1.5rem; padding-right: 1.5rem; }
  .article-back, .article-content { padding-left: 1.5rem; padding-right: 1.5rem; }
  footer { flex-direction: column; gap: 1.5rem; text-align: center; }
}
