/* ===================================================
   Browserflare — Dark Industrial + Warm Glow
   =================================================== */

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

:root {
  --bg-base: #0a0a0a;
  --bg-surface: #141414;
  --bg-elevated: #1a1a1a;
  --border: #252525;
  --border-hover: #f9731640;
  --text: #e5e5e5;
  --text-muted: #888;
  --accent: #f97316;
  --accent-glow: #fbbf24;
  --accent-dim: #f9731620;
  --font-display: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --nav-height: 64px;
  --max-width: 1120px;
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-glow);
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-elevated);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  color: var(--accent);
}

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children inside grids */
.features__grid .card:nth-child(2) { transition-delay: 0.08s; }
.features__grid .card:nth-child(3) { transition-delay: 0.16s; }
.features__grid .card:nth-child(4) { transition-delay: 0.24s; }
.features__grid .card:nth-child(5) { transition-delay: 0.32s; }
.features__grid .card:nth-child(6) { transition-delay: 0.4s; }
.features__grid .card:nth-child(7) { transition-delay: 0.48s; }
.features__grid .card:nth-child(8) { transition-delay: 0.56s; }

.steps .step:nth-child(2) { transition-delay: 0.08s; }
.steps .step:nth-child(3) { transition-delay: 0.16s; }
.steps .step:nth-child(4) { transition-delay: 0.24s; }
.steps .step:nth-child(5) { transition-delay: 0.32s; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}

.nav.is-scrolled {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav__logo:hover {
  color: var(--text);
}

.nav__logo-icon {
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav__link:hover {
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: 30%;
  left: 50%;
  width: 700px;
  height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(249, 115, 22, 0.12) 0%, rgba(249, 115, 22, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.4;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero__content {
  position: relative;
  max-width: 680px;
}

.hero__title {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  background: linear-gradient(135deg, var(--text) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  margin-top: 20px;
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero__ctas {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--accent);
  color: #0a0a0a;
}

.btn--primary:hover {
  background: #fb923c;
  color: #0a0a0a;
  box-shadow: 0 0 24px rgba(249, 115, 22, 0.35);
  transform: translateY(-1px);
}

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

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.1);
  transform: translateY(-1px);
}

/* ---------- Section Shared ---------- */
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 52px;
}

/* ---------- Features ---------- */
.features {
  padding: 100px 24px;
}

.features__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.06), inset 0 0 30px rgba(249, 115, 22, 0.02);
  transform: translateY(-3px);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- Getting Started ---------- */
.getting-started {
  padding: 100px 24px;
  background: var(--bg-surface);
}

.getting-started__inner {
  max-width: 680px;
  margin: 0 auto;
}

.steps {
  position: relative;
  padding-left: 48px;
}

/* vertical line */
.steps::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--border) 100%);
}

.step {
  position: relative;
  margin-bottom: 40px;
}

.step:last-child {
  margin-bottom: 0;
}

.step__number {
  position: absolute;
  left: -48px;
  top: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

.step__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.step__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---------- Footer ---------- */
.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
}

.footer__links a {
  color: var(--text-muted);
}

.footer__links a:hover {
  color: var(--text);
}

.footer__sep {
  color: var(--border);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .nav__links {
    gap: 18px;
  }

  .nav__link {
    font-size: 0.8125rem;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 32px);
    padding-bottom: 60px;
    min-height: auto;
  }

  .hero__sub {
    font-size: 1rem;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .features {
    padding: 64px 20px;
  }

  .getting-started {
    padding: 64px 20px;
  }

  .section-title {
    margin-bottom: 36px;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}
