*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #08080b;
  color: #f5f5f5;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}

img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

::selection {
  background: #f5f5f520;
  color: #f5f5f5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Grid Background ── */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(245, 245, 245, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 245, 245, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: 0 0;
}

.bg-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  will-change: transform;
}

.bg-glow-1 {
  top: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: #f5f5f5;
}

.bg-glow-2 {
  bottom: -10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: #f5f5f5;
  opacity: 0.15;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Scroll progress bar ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: rgba(245, 245, 245, 0.7);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── FAB ── */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #08080b;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.fab.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fab:hover {
  background: #e5e5e5;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.fab svg {
  width: 20px;
  height: 20px;
}

.fab-icon {
  position: absolute;
  transition: opacity 0.25s, transform 0.25s;
}

.fab-up {
  opacity: 1;
  transform: rotate(0);
}

.fab-down {
  opacity: 0;
  transform: rotate(180deg);
}

.fab.down .fab-up {
  opacity: 0;
  transform: rotate(-180deg);
}

.fab.down .fab-down {
  opacity: 1;
  transform: rotate(0);
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 0;
  background: rgba(8, 8, 11, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(245, 245, 245, 0.06);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.3px;
  color: #f5f5f5;
}

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

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: #808080;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #f5f5f5;
}

.nav-links a.active {
  color: #f5f5f5;
}

.nav-cta {
  background: #f5f5f5;
  color: #08080b !important;
  padding: 7px 18px;
  border-radius: 8px;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: #e5e5e5;
  color: #08080b !important;
}

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  background: none;
  border: none;
  color: #808080;
  flex-shrink: 0;
  transition: color 0.2s;
}

.nav-hamburger:hover {
  color: #f5f5f5;
}

.nav-hamburger svg {
  width: 20px;
  height: 20px;
}

/* ── Sidebar ── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 260px;
  z-index: 100;
  background: rgba(13, 13, 18, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(245, 245, 245, 0.06);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(245, 245, 245, 0.04);
}

.sidebar-head .logo {
  font-weight: 800;
  font-size: 1rem;
  color: #f5f5f5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-head .logo img {
  width: 20px;
  height: 20px;
  border-radius: 10px;
}

.sidebar-close {
  background: none;
  border: none;
  color: #808080;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.sidebar-close:hover {
  color: #f5f5f5;
  background: rgba(245, 245, 245, 0.04);
}

.sidebar-close svg {
  width: 18px;
  height: 18px;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-links a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #808080;
  transition: all 0.2s;
}

.sidebar-links a:hover {
  color: #f5f5f5;
  background: rgba(245, 245, 245, 0.04);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  position: relative;
}

.hero-content {
  max-width: 720px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 245, 245, 0.06);
  border: 1px solid rgba(245, 245, 245, 0.1);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #a1a1aa;
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

.hero-tag span {
  color: #f5f5f5;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 20px;
  color: #f5f5f5;
}

.hero h1 .outline {
  color: #08080b;
  -webkit-text-stroke: 1.5px rgba(245, 245, 245, 0.25);
}

.hero p {
  font-size: 1.1rem;
  color: #808080;
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f5f5f5;
  color: #08080b;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-radius 0.3s;
}

.btn-primary:hover {
  border-radius: 14px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(245, 245, 245, 0.15);
  color: #a1a1aa;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-radius 0.3s;
}

.btn-secondary:hover {
  border-radius: 14px;
}

.btn-primary svg,
.btn-secondary svg {
  width: 16px;
  height: 16px;
}

/* ── Section common ── */
section {
  padding: 96px 0;
  position: relative;
  z-index: 1;
}

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

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #808080;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 14px;
  color: #f5f5f5;
}

.section-sub {
  color: #808080;
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.7;
}

/* ── Feature Deep-Dive ── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 100px;
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse>* {
  direction: ltr;
}

.feature-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.feature-visual img {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(245, 245, 245, 0.06);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.feature-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.4px;
  color: #f5f5f5;
}

.feature-info .desc {
  color: #808080;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.feature-highlights {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-highlight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: #a1a1aa;
  line-height: 1.5;
}

.feature-highlight .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f5f5f5;
  margin-top: 8px;
  flex-shrink: 0;
}

.feature-highlight a {
  color: #d4d4d4;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid rgba(245, 245, 245, 0.06);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(245, 245, 245, 0.06);
}

.feature-tile {
  background: #08080b;
  padding: 28px 24px;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: default;
  position: relative;
}

.feature-tile:hover {
  background: #0c0c0f;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.feature-tile h4 {
  transition: color 0.3s;
}

.feature-tile:hover h4 {
  color: #fff;
}

.feature-tile p {
  transition: color 0.3s;
}

.feature-tile:hover p {
  color: #a1a1aa;
}

.feature-tile.soon {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 24px;
  border: 1px dashed rgba(245, 245, 245, 0.08);
  border-radius: 8px;
  margin: 12px;
}

.feature-tile.soon h4 {
  color: #808080;
}

.feature-tile.soon p {
  font-size: 0.75rem;
}

.feature-tile h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f5f5f5;
  margin-bottom: 6px;
}

.feature-tile p {
  font-size: 0.78rem;
  color: #808080;
  line-height: 1.6;
}

/* ── Screenshot Carousel / Grid ── */
.screenshot-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.screenshot-showcase img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(245, 245, 245, 0.06);
  transition: transform 0.3s, border-color 0.3s;
  aspect-ratio: 9/19;
  object-fit: cover;
}

.screenshot-showcase img:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 245, 245, 0.15);
}

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(245, 245, 245, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

.stat-item {
  background: #08080b;
  text-align: center;
  padding: 40px 16px;
}

.stat-item:nth-child(-n+3) {
  border-right: 1px solid rgba(245, 245, 245, 0.06);
}

.stat-number {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: #f5f5f5;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: #808080;
  font-weight: 500;
  margin-top: 6px;
}

/* ── Download ── */
.download-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.download-card {
  flex: 1;
  max-width: 320px;
  padding: 32px;
  background: #08080b;
  border: 1px solid rgba(245, 245, 245, 0.06);
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: all 0.5s ease-in-out;
  will-change: transform, box-shadow;
}

.download-card:hover {
  border-radius: 20px;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  background: #0c0c0f;
  border-color: rgba(245, 245, 245, 0.1);
}

.download-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #f5f5f5;
}

.download-card p {
  font-size: 0.8rem;
  color: #808080;
  margin-bottom: 20px;
}

.download-card .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 10px 20px;
}

.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(245, 245, 245, 0.15);
  color: #a1a1aa;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.github-btn:hover {
  border-color: rgba(245, 245, 245, 0.3);
  color: #f5f5f5;
}

.github-btn svg {
  width: 18px;
  height: 18px;
}

.collaborate-card {
  position: relative;
  border-color: rgba(245, 245, 245, 0.1);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: border-color 0.5s ease-in-out, background 0.5s ease-in-out, border-radius 0.5s ease-in-out, transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
  will-change: transform, box-shadow;
}

.collaborate-card::before {
  content: 'New';
  position: absolute;
  top: -6px;
  right: -6px;
  background: #f5f5f5;
  color: #08080b;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  line-height: 1.5;
}

.collaborate-card:hover {
  border-color: rgba(245, 245, 245, 0.25);
}


/* ── Collaborate hero card ── */
.collab-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 245, 245, 0.03);
  border: 1px solid rgba(245, 245, 245, 0.08);
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.8rem;
  color: #a1a1aa;
  transition: border-color 0.3s, color 0.3s;
}

.collab-card:hover {
  border-color: rgba(245, 245, 245, 0.2);
  color: #d4d4d4;
}

.collab-card svg {
  opacity: 0.6;
}

.collab-card:hover svg {
  opacity: 0.9;
}

/* ── Footer ── */
footer {
  background: #08080b;
  border-top: 1px solid rgba(245, 245, 245, 0.06);
  padding: 56px 0 40px;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  font-size: 0.8rem;
  color: #606060;
  line-height: 1.7;
  margin-top: 8px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: #f5f5f5;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  font-size: 0.8rem;
  color: #606060;
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #a1a1aa;
}

.footer-heart {
  color: #a1a1aa;
  font-size: 0.75rem;
  margin-top: 20px;
}

.footer-heart img {
  vertical-align: middle;
  opacity: 0.7;
}

.footer-heart:hover {
  color: #d4d4d4;
}

/* ── Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.fade-up:nth-child(2) {
  transition-delay: 0.1s;
}

.fade-up:nth-child(3) {
  transition-delay: 0.2s;
}

.fade-up:nth-child(4) {
  transition-delay: 0.3s;
}

@media (max-width: 900px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .feature-row.reverse {
    direction: ltr;
  }

  .feature-visual img {
    max-width: 260px;
  }

  .feature-highlights {
    align-items: center;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
  }

  .screenshot-showcase {
    grid-template-columns: repeat(2, 1fr);
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .made-with {
    display: none;
  }

  .bg-glow-1 {
    width: 260px;
    height: 260px;
    top: -10%;
    left: -30%;
  }

  .bg-glow-2 {
    width: 200px;
    height: 200px;
    bottom: -5%;
    right: -30%;
    opacity: 0.1;
  }

  section {
    padding: 60px 0;
  }

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

  .hero h1 {
    font-size: 2.4rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-tile:nth-child(n+10) {
    display: none;
  }

  .feature-tile.soon {
    display: flex;
    grid-column: span 3;
    padding: 16px 12px;
    border-style: solid;
  }

  .feature-tile {
    padding: 16px 12px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(2) {
    border-right: none;
  }

  .stat-item:nth-child(1),
  .stat-item:nth-child(3) {
    border-right: 1px solid rgba(245, 245, 245, 0.06);
  }

  .stat-item:nth-child(3),
  .stat-item:nth-child(4) {
    border-top: 1px solid rgba(245, 245, 245, 0.06);
  }

  .download-row {
    flex-direction: column;
    align-items: center;
  }

  .download-card {
    max-width: 100%;
    width: 100%;
  }

  .nav-hamburger {
    order: 1;
    display: flex;
  }

  .logo {
    order: 2;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-links {
    order: 3;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .nav-links a.nav-cta {
    padding: 5px 14px;
    font-size: 0.8rem;
  }

  .screenshot-showcase {
    grid-template-columns: repeat(2, 1fr);
  }

  .screenshot-showcase img {
    aspect-ratio: auto;
    max-height: 340px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  .footer-col:first-child {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer-col:first-child>div:first-child {
    justify-content: center;
  }

  .footer-col:first-child .footer-heart {
    justify-content: center;
  }

  footer {
    padding: 40px 0 32px;
  }

  .footer-col h4 {
    margin-bottom: 12px;
  }

  .footer-col a {
    padding: 4px 0;
    font-size: 0.85rem;
  }
}