/* ===== Design Tokens ===== */
:root {
  --bg-primary: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-card: rgba(255, 255, 255, 0.08);
  --text-primary: #f5f5f5;
  --text-secondary: rgba(255, 255, 255, 0.62);
  --accent: #a78bfa;
  --accent-dim: rgba(167, 139, 250, 0.15);
  --radius: 16px;
  --radius-pill: 999px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-primary);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(circle at 50% 25%, rgba(167, 139, 250, 0.14), transparent 62%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size:
    1800px 1800px,
    64px 64px,
    64px 64px;
  background-position:
    50% 0%,
    0 1px,
    1px 0;
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: var(--accent);
  color: #0a0a0a;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
  z-index: 999;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Subtle Grid + Glow ===== */


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

img {
  max-width: 100%;
  display: block;
}

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
}

.section {
  padding: 120px 0;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

.nav-toggle-bar {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav.is-open .nav-toggle-bar:nth-child(2) {
  transform: translateY(8px) rotate(45deg);
}

.nav.is-open .nav-toggle-bar:nth-child(3) {
  opacity: 0;
}

.nav.is-open .nav-toggle-bar:nth-child(4) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav.is-scrolled {
  background: rgba(10, 10, 10, 0.95);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

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

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  animation: bounce 2s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.btn:focus-visible,
.nav-links a:focus-visible,
.nav-logo:focus-visible,
.nav-toggle:focus-visible,
.app-card:focus-visible,
.tweet-follow-btn:focus-visible,
.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-pill);
}

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

.btn-primary:hover {
  background: #b89dfc;
  border-color: #b89dfc;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

/* ===== Apps Grid ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.app-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.3s, transform 0.2s;
}

a.app-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
}

.app-card-coming {
  border-style: dashed;
}

.app-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 24px;
  overflow: hidden;
}

.app-card-icon--img {
  background: none;
}

.app-card-icon--img img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
}

.app-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.app-card-name {
  font-size: 20px;
  font-weight: 600;
}

.app-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.badge-live {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.badge-dev {
  background: rgba(250, 204, 21, 0.12);
  color: #facc15;
}

.app-card-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.app-card-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-card);
}

.app-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

a.app-card:hover .app-card-link {
  color: var(--accent);
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: 20px;
}

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

.stat {
  text-align: center;
  padding: 28px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
}

.stat-value {
  display: block;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== Follow the Journey ===== */
.follow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.follow-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: 20px;
}

.tweet-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tweet-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.tweet-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  object-fit: cover;
}

.tweet-author {
  flex: 1;
  min-width: 0;
}

.tweet-author-top {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tweet-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.tweet-verified {
  flex-shrink: 0;
}

.tweet-handle {
  font-size: 14px;
  color: var(--text-secondary);
}

.tweet-x-logo {
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 2px;
}

.tweet-body {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.tweet-actions {
  display: flex;
  gap: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-card);
  margin-bottom: 16px;
}

.tweet-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.tweet-follow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 0;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

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

/* ===== Contact ===== */
.section-contact {
  text-align: center;
  position: relative;
}

.section-contact::before {
  display: none;
}

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

.contact-content .section-subtitle {
  margin-bottom: 32px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 0;
  position: relative;
  background: #050505;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ===== Scroll Animations ===== */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger children in hero */
.hero .animate-in:nth-child(1) { transition-delay: 0.1s; }
.hero .animate-in:nth-child(2) { transition-delay: 0.2s; }
.hero .animate-in:nth-child(3) { transition-delay: 0.3s; }
.hero .animate-in:nth-child(4) { transition-delay: 0.4s; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .about-grid,
  .follow-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  .section {
    padding: 80px 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    right: 24px;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav.is-open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

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

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stat {
    padding: 20px 12px;
  }

  .nav-links {
    gap: 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-scroll-indicator {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 16px;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-scroll-indicator,
  .animate-in {
    transition: none;
    animation: none;
  }
}
