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

:root {
  --color-bg: #060d1f;
  --color-bg-alt: #0b1633;
  --color-surface: #0f1e3f;
  --color-surface-2: #132750;
  --color-primary: #22d3ee;
  --color-primary-dark: #06b6d4;
  --color-accent: #38bdf8;
  --color-text: #e2e8f0;
  --color-heading: #f8fafc;
  --color-muted: #94a3b8;
  --color-border: rgba(34, 211, 238, 0.18);
  --color-border-strong: rgba(34, 211, 238, 0.4);
  --radius: 12px;
  --max-width: 1200px;
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.25);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  background-image:
    radial-gradient(
      ellipse at top left,
      rgba(34, 211, 238, 0.12),
      transparent 55%
    ),
    radial-gradient(
      ellipse at bottom right,
      rgba(56, 189, 248, 0.08),
      transparent 60%
    );
  background-attachment: fixed;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero ── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78vh;
  text-align: center;
  padding: 96px 24px;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at center,
      rgba(34, 211, 238, 0.18) 0%,
      transparent 60%
    ),
    linear-gradient(160deg, #0b1633 0%, #060d1f 70%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 80%);
  pointer-events: none;
}

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

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--color-heading);
  background: linear-gradient(90deg, #f8fafc 0%, #67e8f9 60%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin: 20px auto 0;
  font-size: 1.18rem;
  color: var(--color-muted);
  max-width: 560px;
}

.btn-primary {
  display: inline-block;
  margin-top: 36px;
  padding: 14px 34px;
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-accent) 100%
  );
  color: #021018;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow-glow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 55px rgba(34, 211, 238, 0.45);
}

/* ── Section titles ── */
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 48px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
}

/* ── Benefits ── */
.benefits {
  padding: 96px 0;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.benefit-card {
  position: relative;
  background: linear-gradient(
    160deg,
    var(--color-surface) 0%,
    var(--color-bg-alt) 100%
  );
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.benefit-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.35),
    transparent 60%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.benefit-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.18);
  transform: translateY(-4px);
}

.benefit-card:hover::before {
  opacity: 1;
}

.benefit-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.benefit-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  color: var(--color-primary);
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.5);
}

.benefit-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--color-heading);
}

.benefit-card p {
  font-size: 0.92rem;
  color: var(--color-muted);
}

/* ── Tutorial steps ── */
.tutorial {
  padding: 96px 0;
  background: linear-gradient(
    180deg,
    var(--color-bg) 0%,
    var(--color-bg-alt) 100%
  );
}

.steps {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-primary), transparent);
  opacity: 0.35;
}

.step {
  display: flex;
  gap: 22px;
  margin-bottom: 44px;
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
  position: relative;
}

.step.visible {
  opacity: 1;
  transform: translateX(0);
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-accent)
  );
  color: #021018;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.45);
  position: relative;
  z-index: 1;
}

.step-body h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--color-heading);
}

.step-body p {
  font-size: 0.95rem;
  color: var(--color-muted);
}

.step-body strong {
  color: var(--color-primary);
  font-weight: 600;
}
.step-body em {
  color: var(--color-accent);
  font-style: normal;
}

.code-block {
  margin-top: 12px;
  padding: 14px 18px;
  background: rgba(6, 13, 31, 0.7);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.85rem;
  overflow-x: auto;
  font-family: "SF Mono", "Fira Code", monospace;
  color: #67e8f9;
}

/* ── Demo ── */
.demo {
  padding: 96px 0;
}

.demo-sub {
  text-align: center;
  color: var(--color-muted);
  margin-top: -32px;
  margin-bottom: 36px;
}

.demo-frame {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(6, 13, 31, 0.7),
    0 0 60px rgba(34, 211, 238, 0.15);
  background: var(--color-surface);
}

.demo-frame iframe {
  display: block;
  width: 100%;
  height: 768px;
  border: none;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 36px 24px;
  font-size: 0.85rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.footer a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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