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

:root {
  --bg: #0c0c0e;
  --surface: #131316;
  --surface2: #1a1a1f;
  --surface3: #222228;
  --border: #2a2a32;
  --border-light: #38384a;
  --text: #e0dfe6;
  --text-dim: #9090a0;
  --text-muted: #5a5a6e;
  --orange: #ff5520;
  --orange-dim: #cc4418;
  --cyan: #00d4aa;
  --cyan-dim: #00a888;
  --magenta: #e040a0;
  --yellow: #f0c020;
  --blue: #4080ff;
  --green: #40d060;
  --red: #ff3040;
  --pad-1: #ff5520;
  --pad-2: #00d4aa;
  --pad-3: #e040a0;
  --pad-4: #4080ff;
  --pad-5: #f0c020;
  --pad-6: #40d060;
  --heading: 'Outfit', system-ui, sans-serif;
  --mono: 'Space Mono', 'Courier New', monospace;
  --body: 'Outfit', system-ui, sans-serif;
}

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== GRID BACKGROUND ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,85,32,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,85,32,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ===== UTILITY ===== */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); position: relative; z-index: 1; }
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 2px;
  flex-shrink: 0;
}

h2 {
  font-family: var(--heading);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 20px;
}

/* ===== HERO ===== */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(255,85,32,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(0,212,170,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--orange);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

.hero h1 {
  font-family: var(--heading);
  font-size: clamp(44px, 9vw, 100px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -2px;
  color: #fff;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.6s 0.35s forwards;
}

.hero h1 .accent { color: var(--orange); }
.hero h1 .dim { color: var(--text-muted); font-weight: 300; }

.hero-desc {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.6;
  opacity: 0;
  animation: fadeUp 0.6s 0.5s forwards;
}

/* Decorative pad grid */
.hero-pads {
  position: absolute;
  top: 15%;
  right: clamp(20px, 8vw, 120px);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  opacity: 0.12;
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: 0;
}

.hero-pad {
  width: clamp(20px, 3vw, 36px);
  height: clamp(20px, 3vw, 36px);
  border-radius: 4px;
  animation: padPulse 3s ease-in-out infinite;
}

@keyframes padPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp 0.6s 0.65s forwards;
}

.hero-stat-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.hero-stat-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dim);
}

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12,12,14,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav-inner {
  display: flex;
  gap: 0;
  min-width: max-content;
}

.nav a {
  display: block;
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); border-bottom-color: var(--orange); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--orange); }

/* ===== SECTION SPACING ===== */
.section {
  padding: clamp(60px, 8vw, 120px) 0;
  border-bottom: 1px solid var(--border);
}

/* ===== OVERVIEW ===== */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 32px;
}

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

.overview-grid p {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.8;
}
.overview-grid p strong { color: var(--text); font-weight: 600; }

/* ===== SPECS ===== */
.spec-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.spec-cat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.spec-cat-header {
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 14px;
}
.spec-row:last-child { border-bottom: none; }

.spec-key { color: var(--text-dim); }
.spec-val { color: var(--text); font-weight: 500; text-align: right; }
.spec-val.hl { color: var(--cyan); }

/* ===== MACROS ===== */
.macro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 24px;
}

.macro-item {
  background: var(--surface);
  padding: 16px 14px;
  text-align: center;
}

.macro-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.macro-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.macro-shift {
  font-size: 11px;
  color: var(--orange-dim);
  margin-top: 4px;
}

/* ===== CHEAT SHEET ===== */
.cheat-intro {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.cheat-group {
  margin-bottom: 32px;
}

.cheat-group-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 12px 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cheat-group-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cheat-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.cheat-table tr { border-bottom: 1px solid rgba(255,255,255,0.03); }
.cheat-table tr:last-child { border-bottom: none; }
.cheat-table tr:hover { background: rgba(255,255,255,0.015); }

.cheat-table td {
  padding: 10px 20px;
  font-size: 14px;
  vertical-align: top;
}

.cheat-table td:first-child {
  color: var(--text-dim);
  width: 45%;
}

.cheat-table td:last-child {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
}

kbd {
  display: inline-block;
  background: var(--surface3);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
  white-space: nowrap;
  line-height: 1.6;
}

.cheat-table .plus {
  color: var(--text-muted);
  margin: 0 2px;
}

/* ===== TIPS ===== */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.tip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: border-color 0.2s;
}
.tip-card:hover { border-color: var(--border-light); }

.tip-icon {
  font-size: 20px;
  margin-bottom: 12px;
}

.tip-title {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  margin-bottom: 8px;
}

.tip-body {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
}

.tip-body kbd { font-size: 10px; }

/* ===== COMPARISON ===== */
.compare-table-wrap {
  overflow-x: auto;
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.compare-table th {
  text-align: left;
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.compare-table th:nth-child(2) { color: var(--orange); }
.compare-table th:nth-child(3) { color: var(--cyan); }

.compare-table td {
  padding: 10px 20px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.compare-table td:first-child { color: var(--text-dim); font-weight: 500; }
.compare-table td:nth-child(2) { color: var(--text); }
.compare-table td:nth-child(3) { color: var(--text-dim); }

.compare-table tr:last-child td { border-bottom: none; }

.check { color: var(--green); }
.cross { color: var(--red); opacity: 0.5; }

/* ===== RESOURCES ===== */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.resource-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  text-decoration: none;
  transition: all 0.2s;
}
.resource-card:hover {
  border-color: var(--border-light);
  background: var(--surface2);
  transform: translateY(-2px);
}

.resource-badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 10px;
}
.resource-badge.official { background: rgba(255,85,32,0.15); color: var(--orange); }
.resource-badge.community { background: rgba(0,212,170,0.12); color: var(--cyan); }
.resource-badge.video { background: rgba(224,64,160,0.12); color: var(--magenta); }
.resource-badge.doc { background: rgba(64,128,255,0.12); color: var(--blue); }

.resource-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
}

.resource-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.resource-arrow {
  float: right;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.resource-card:hover .resource-arrow { transform: translateX(3px); color: var(--orange); }

/* ===== FIRMWARE ===== */
.fw-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 32px;
  margin-top: 24px;
}

.fw-version {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--orange);
  margin-bottom: 4px;
}

.fw-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.fw-features {
  list-style: none;
  display: grid;
  gap: 8px;
}

.fw-features li {
  font-size: 14px;
  color: var(--text-dim);
  padding-left: 20px;
  position: relative;
}

.fw-features li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--green);
  font-family: var(--mono);
  font-weight: 700;
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 48px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--orange); }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .hero-stats { flex-direction: column; gap: 12px; }
  .spec-categories { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .macro-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-pads { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
