/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --bg: #0a0b10;
  --bg-alt: #0f1119;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.10);
  --text: #eef0f6;
  --text-muted: #9aa0b4;
  --accent-a: #7c5cff;
  --accent-b: #22d3ee;
  --accent-a-ink: var(--accent-a);
  --accent-b-ink: var(--accent-b);
  --gradient: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  --glass-top: var(--surface-strong);
  --glass-bottom: var(--surface);
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-a);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Background glow ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(124, 92, 255, 0.25), transparent 60%),
    radial-gradient(700px 500px at 85% 25%, rgba(34, 211, 238, 0.18), transparent 60%),
    radial-gradient(500px 400px at 50% 90%, rgba(255, 95, 162, 0.12), transparent 60%),
    var(--bg);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 16, 0.65);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.brand-mark { flex-shrink: 0; }
.brand-dot {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
  font-size: 0.82em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text) !important;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  line-height: 1;
}
.nav-cta:hover { border-color: var(--accent-b); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  border: none;
  box-sizing: border-box;
  vertical-align: middle;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--gradient);
  color: #0a0b10;
  box-shadow: 0 10px 30px -10px rgba(124, 92, 255, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(124, 92, 255, 0.7); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent-b); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

.icon-arrow {
  flex-shrink: 0;
  display: block;
  transition: transform 0.2s ease;
}
.btn:hover .icon-arrow { transform: translate(2px, -2px); }

/* ---------- Sections shared ---------- */
section { padding: 120px 0; }
.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-b-ink);
  font-weight: 600;
  margin-bottom: 14px;
}
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 14px; }
.section-lead { color: var(--text-muted); font-size: 1.05rem; }

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Hero ---------- */
.hero { padding-top: 140px; padding-bottom: 100px; }
.hero-inner { max-width: 760px; }
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-stack li {
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 999px;
}

/* ---------- App grid ---------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 28px;
}

.app-card {
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease;
}
.app-card.is-visible { opacity: 1; transform: translateY(0); }
.app-card:hover { border-color: rgba(124, 92, 255, 0.45); }

.app-card-top { display: flex; align-items: center; gap: 18px; }

.app-logo-wrap {
  position: relative;
  flex-shrink: 0;
  width: 78px;
  height: 78px;
  border-radius: 20px;
  padding: 11px;
  background: #ffffff;
  box-shadow: 0 16px 32px -14px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.app-card:hover .app-logo-wrap {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 20px 38px -14px rgba(124, 92, 255, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.app-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.app-card h3 { font-size: 1.3rem; margin-bottom: 4px; }
.app-tagline { color: var(--accent-b-ink); font-size: 0.88rem; font-weight: 500; }
.app-desc { color: var(--text-muted); font-size: 0.95rem; flex-grow: 1; }

.app-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.app-tags li {
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 11px;
  border-radius: 999px;
}

.app-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- About ---------- */
.about-inner { max-width: 760px; }
.about-text { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 36px; }
.about-text a { color: var(--accent-b-ink); border-bottom: 1px solid rgba(11, 114, 133, 0.35); }
.skill-list { display: flex; flex-wrap: wrap; gap: 12px; }
.skill-list li {
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 14px;
  margin: 8px 0 36px;
}
.stat-tile {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
}
.stat-tile dt {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-tile dd {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 20px;
  margin-bottom: 36px;
}
.example-card {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.example-card:hover {
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 18px 40px -22px rgba(124, 92, 255, 0.45);
}
.example-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.example-card img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  border-radius: 10px;
  transition: transform 0.3s ease;
}
.example-card:hover img { transform: scale(1.035); }
.example-card figcaption {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mini-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 28px 0 10px;
}
.mini-label:first-of-type { margin-top: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(5, 6, 10, 0.88);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(920px, 92vw);
  max-height: 90vh;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}
.lightbox.is-open .lightbox-content { transform: scale(1); }
.lightbox img {
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  border-radius: 16px;
  background: var(--bg-alt);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  cursor: default;
}
.lightbox-caption {
  margin-top: 18px;
  max-width: 640px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.lightbox-caption strong { color: var(--text); }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-close:hover { border-color: var(--accent-b); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}
.footer-note { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px; }
.social-icons { display: flex; gap: 10px; margin-top: 16px; }
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.social-icons a:hover { color: var(--text); border-color: var(--accent-b); transform: translateY(-2px); }
.footer-links { display: flex; gap: 20px; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-copy {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  section { padding: 88px 0; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: rgba(10, 11, 16, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 12px 6vw 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links li { width: 100%; padding: 10px 0; }
  .nav-cta { display: inline-block; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-card { transition: none; opacity: 1; transform: none; }
}

/* ---------- Guide page ---------- */
.nav-links a.is-current { color: var(--accent-b-ink); font-weight: 600; }

.page-hero { padding-top: 140px; padding-bottom: 72px; }
.page-hero-inner { max-width: 720px; }
.page-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.page-hero .hero-lead { margin-bottom: 36px; }

.chip-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-nav a {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.chip-nav a:hover { color: var(--text); border-color: var(--accent-b); }

.guide { padding: 64px 0; border-top: 1px solid var(--border); }
.guide-article { max-width: 760px; position: relative; }
.guide-number {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--accent-a-ink);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.guide-p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 18px;
}
.guide-p code { color: var(--accent-b-ink); }

.guide-steps {
  color: var(--text-muted);
  font-size: 1rem;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.guide-steps li { padding-left: 4px; }
.guide-steps strong { color: var(--text); }

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.88em;
}

.code-block {
  background: #0d0f16;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  overflow-x: auto;
  margin-bottom: 20px;
}
.code-block code {
  background: none;
  border: none;
  padding: 0;
  color: #d7dae4;
  font-size: 0.88rem;
  line-height: 1.7;
  white-space: pre;
}

.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.pkg-card {
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 34px -24px rgba(23, 26, 43, 0.3);
}
.pkg-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.pkg-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 14px; }
.pkg-card-accent { border-color: rgba(124, 92, 255, 0.4); }

@media (max-width: 640px) {
  .guide { padding: 48px 0; }
}
