/* ════════════════════════════════════════════
   Reset
════════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0; padding: 0; border: 0;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
ol, ul { list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ════════════════════════════════════════════
   Base
════════════════════════════════════════════ */
:root {
  --bg:        #03080f;
  --surface:   rgba(6, 16, 38, 0.72);
  --border:    rgba(255,255,255,0.08);
  --border-hi: rgba(255,255,255,0.16);
  --blue:      #3b82f6;
  --blue-dim:  rgba(59,130,246,0.18);
  --red:       #E83951;
  --text:      #f0f4ff;
  --text-dim:  rgba(240,244,255,0.5);
  --text-mute: rgba(240,244,255,0.3);
  --radius:    14px;
  --radius-lg: 20px;
}

html, body {
  width: 100%;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ════════════════════════════════════════════
   Particle canvas (injected by demo.js)
════════════════════════════════════════════ */
#particles { display: none; }

/* ════════════════════════════════════════════
   Progress bar
════════════════════════════════════════════ */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), #818cf8);
  z-index: 1000;
  pointer-events: none;
  transition: width 0.08s linear;
  border-radius: 0 2px 2px 0;
}

/* ════════════════════════════════════════════
   Hero
════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
  padding: 80px 24px 120px;
}

/* Radial glow behind hero content */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(59,130,246,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 55%, rgba(232,57,81,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Howard ── */
.howard-wrap {
  margin-bottom: 28px;
  filter: drop-shadow(0 0 28px rgba(59,130,246,0.45));
  animation: howard-float 3s ease-in-out infinite;
}

.howard-gif {
  width: 155px;
  height: auto;
  border-radius: 12px;
}

@keyframes howard-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%       { transform: translateY(-14px) rotate(1.5deg); }
}

/* ── Title ── */
.hero-title {
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(32px, 6vw, 76px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #bfdbfe 55%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 18px;
}

/* ── Tagline ── */
.hero-tagline {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-bottom: 36px;
  max-width: 480px;
}

/* ── Hero buttons ── */
.hero-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 26px;
  border-radius: 100px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 28px rgba(59,130,246,0.35);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
}

.download-btn:hover {
  background: #2563eb;
  box-shadow: 0 0 44px rgba(59,130,246,0.55);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.download-btn .fas { font-size: 14px; }

.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  border-radius: 100px;
  border: 1px solid var(--border-hi);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.github-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.32);
  box-shadow: 0 0 24px rgba(59,130,246,0.2);
}

.github-btn .fab { font-size: 17px; }

/* ── Scroll cue ── */
.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-mute);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  z-index: 1;
}

.scroll-bounce {
  animation: scroll-bounce 2.2s ease-in-out infinite;
  font-size: 13px;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%       { transform: translateY(7px); opacity: 0.9; }
}

/* ════════════════════════════════════════════
   Page sections
════════════════════════════════════════════ */
.page-section {
  position: relative;
  z-index: 1;
  padding: 96px 24px;
}

/* Alternating subtle tint */
.page-section:nth-child(even) {
  background: rgba(6, 14, 32, 0.5);
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 52px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--blue);
}

.section-title {
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

/* ════════════════════════════════════════════
   App frame / preview
════════════════════════════════════════════ */
.app-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111827;
  border: 1px solid var(--border-hi);
  box-shadow:
    0 0 0 1px rgba(59,130,246,0.12),
    0 24px 80px rgba(0,0,0,0.7),
    0 0 120px rgba(59,130,246,0.08);
  animation: frame-glow 4s ease-in-out infinite;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.app-frame:hover {
  transform: translateY(-6px) scale(1.005);
  animation-play-state: paused;
  box-shadow:
    0 0 0 1px rgba(59,130,246,0.3),
    0 32px 100px rgba(0,0,0,0.75),
    0 0 160px rgba(59,130,246,0.18);
}

@keyframes frame-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(59,130,246,0.12), 0 24px 80px rgba(0,0,0,0.7), 0 0 120px rgba(59,130,246,0.08); }
  50%       { box-shadow: 0 0 0 1px rgba(59,130,246,0.30), 0 24px 80px rgba(0,0,0,0.7), 0 0 180px rgba(59,130,246,0.18); }
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: #0d1117;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.frame-title {
  font-size: 12px;
  color: var(--text-mute);
  margin-left: 8px;
  font-family: 'Inter', sans-serif;
}

/* ════════════════════════════════════════════
   Feature cards
════════════════════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-top: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  will-change: transform;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  overflow: hidden;
}

/* Subtle top glow matching icon color */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c, #3b82f6), transparent);
  opacity: 0.7;
}

.feature-card:hover {
  border-color: rgba(255,255,255,0.16);
  background: rgba(10, 24, 56, 0.82);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);
}

.card-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--c, var(--blue));
  background: rgba(from var(--c, #3b82f6) r g b / 0.12);
  background: color-mix(in srgb, var(--c, #3b82f6) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, #3b82f6) 25%, transparent);
  margin-bottom: 16px;
  flex-shrink: 0;
}

/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, red, blue)) {
  .card-icon-wrap {
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.2);
  }
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.card-list li {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
}

.card-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--c, var(--blue));
  opacity: 0.7;
}

/* ════════════════════════════════════════════
   Setup / Timeline
════════════════════════════════════════════ */
.prereq-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-left: 3px solid #F5A623;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prereq-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.prereq-head h4 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.prereq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prereq-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: var(--text-dim);
}

.prereq-list li .fas,
.prereq-list li .fab {
  font-size: 13px;
  flex-shrink: 0;
}

/* Timeline */
.setup-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.setup-steps::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 24px;
  bottom: 24px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(59,130,246,0.5), rgba(59,130,246,0.05));
}

.setup-step {
  display: flex;
  gap: 28px;
  position: relative;
  padding-bottom: 28px;
  align-items: flex-start;
}

.setup-step:last-child { padding-bottom: 0; }

.step-node {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(59,130,246,0.5);
  background: rgba(59,130,246,0.1);
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(59,130,246,0.25);
}

.step-body {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px 26px;
}

.step-body h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.step-intro {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 18px;
}

.step-list {
  list-style: none;
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-list li {
  counter-increment: step-counter;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.6;
  padding-left: 24px;
  position: relative;
}

.step-list li::before {
  content: counter(step-counter) ".";
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
}

.sub-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sub-list li {
  padding-left: 16px;
  color: var(--text-mute);
  counter-increment: none;
}
.sub-list li::before {
  content: '–';
  color: var(--text-mute);
  font-weight: 400;
}

.step-note {
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.6;
  border-left: 2px solid rgba(59,130,246,0.4);
  padding-left: 14px;
  margin-top: 4px;
}

.step-note .fas { color: var(--blue); margin-right: 6px; }

/* Permissions table */
.permissions-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}

.perm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
  align-items: center;
}
.perm-row:last-child { border-bottom: none; }

.perm-header {
  background: rgba(255,255,255,0.04);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.perm-row:not(.perm-header) { color: var(--text-dim); }
.perm-row:not(.perm-header):hover { background: rgba(255,255,255,0.03); }

/* Code block */
.code-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}

.code-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
}

.code-lang {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.code-file {
  font-size: 12px;
  color: var(--text-mute);
  font-family: 'JetBrains Mono', monospace;
}

.code-block pre {
  padding: 18px 20px;
  background: rgba(0,4,12,0.6);
  overflow-x: auto;
}

.code-block code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13.5px;
  line-height: 1.7;
}

.tok-brace  { color: rgba(240,244,255,0.45); }
.tok-key    { color: #93c5fd; }
.tok-str    { color: #86efac; }
.tok-punct  { color: rgba(240,244,255,0.35); }

.config-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-notes li {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
}

.config-notes li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-mute);
}

/* Shared inline elements */
a:hover { text-decoration: underline; }

code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.87em;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: 5px;
  padding: 1px 6px;
  color: #93c5fd;
}

.code-block code,
.code-block pre code { background: none; border: none; padding: 0; }

strong { color: var(--text); font-weight: 600; }
em     { color: var(--text-dim); font-style: italic; }

a { color: #93c5fd; }
a:hover { color: #bfdbfe; }

/* ════════════════════════════════════════════
   Footer
════════════════════════════════════════════ */
#footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-name {
  font-size: 13px;
  color: var(--text-mute);
}

.footer-name a {
  color: var(--text-dim);
  font-weight: 500;
}

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

/* ════════════════════════════════════════════
   Effects — typewriter cursor
════════════════════════════════════════════ */
.type-cursor {
  display: inline-block;
  width: 3px;
  height: 0.8em;
  background: var(--red);
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 1px;
  animation: cursor-blink 0.75s step-end infinite;
  transition: opacity 0.4s ease;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ════════════════════════════════════════════
   Effects — scroll fade-in
════════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════════
   Responsive
════════════════════════════════════════════ */
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .perm-row      { grid-template-columns: 1.2fr 0.8fr; }
}

@media (max-width: 640px) {
  .features-grid  { grid-template-columns: 1fr; }
  .setup-step     { flex-direction: column; gap: 14px; }
  .setup-steps::before { display: none; }
  .perm-row       { grid-template-columns: 1fr; gap: 3px; }
  .perm-header span:last-child { display: none; }
  .hero-title     { letter-spacing: 0.06em; }
}
