/* MARK: - System Design Tokens */
:root {
  --bg: #07090e;
  --surface: rgba(16, 21, 33, 0.55);
  --surface-hover: rgba(22, 28, 44, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-focus: rgba(127, 112, 255, 0.4);
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;
  --accent-purple: #7f70ff;
  --accent-amber: #e7a44b;
  --accent-cyan: #38bdf8;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* MARK: - Background Ambiance */
.ambient-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(127, 112, 255, 0.12), transparent),
    radial-gradient(circle 600px at 80% 60%, rgba(56, 189, 248, 0.05), transparent),
    radial-gradient(circle 500px at 15% 70%, rgba(231, 164, 75, 0.04), transparent);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 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: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

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

/* MARK: - Floating Pill Navbar */
.navbar-wrapper {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.navbar {
  pointer-events: auto;
  width: 100%;
  max-width: 860px;
  height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 9999px;
  background: rgba(13, 17, 26, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}

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

.nav-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-github:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
}

/* MARK: - Hero */
.hero {
  padding: 130px 0 60px;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #a5b4fc;
  background: rgba(127, 112, 255, 0.1);
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(127, 112, 255, 0.2);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: #ffffff;
}

.hero-subtitle {
  color: var(--text-sub);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto;
}

/* MARK: - Products */
.products-section {
  padding: 30px 0 80px;
}

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

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.section-header p {
  color: var(--text-sub);
  font-size: 1rem;
}

/* Featured Card: Mewra for Mac */
.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  margin-bottom: 24px;
}

.featured-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.featured-text {
  max-width: 620px;
}

.product-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  margin-bottom: 12px;
}

.pill-mac {
  background: rgba(127, 112, 255, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(127, 112, 255, 0.25);
}

.pill-vscode {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.pill-moondi {
  background: rgba(231, 164, 75, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(231, 164, 75, 0.25);
}

.featured-title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.featured-tagline {
  font-size: 1.05rem;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.featured-desc {
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.6;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-cta.primary {
  background: var(--accent-purple);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(127, 112, 255, 0.35);
}

.btn-cta.primary:hover {
  background: #6c5ce7;
  transform: translateY(-1px);
}

.btn-cta.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-cta.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* Uncropped Showcase Media Frame */
.featured-media-frame {
  width: 100%;
  aspect-ratio: 16 / 7;
  max-height: 360px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #090c14;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  line-height: 0;
}

.featured-media-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

/* Product Grid */
.sub-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 980px) {
  .sub-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.product-subcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.product-subcard:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.subcard-media {
  height: 184px;
  background: #090c14;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.subcard-media img.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.moondi-visual {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(231, 164, 75, 0.12) 0%, #090d14 75%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.moondi-visual img {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.subcard-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.subcard-body h3 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.subcard-tagline {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.subcard-desc {
  color: var(--text-sub);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 24px;
}

.pill-preflight {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.24);
}

.preflight-media {
  padding: 18px;
  background:
    radial-gradient(circle at 80% 10%, rgba(52, 211, 153, 0.14), transparent 45%),
    #090c14;
}

.preflight-preview {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  background: rgba(12, 17, 27, 0.88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-sub);
}

.preflight-preview__header,
.preflight-preview__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.preflight-preview__header {
  padding-bottom: 10px;
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.preflight-preview__mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  color: #06291d;
  background: #6ee7b7;
  font-weight: 700;
}

.preflight-preview__state {
  color: #6ee7b7;
  font-size: 0.56rem;
}

.preflight-preview__row {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.preflight-preview__row > :last-child {
  color: var(--text-muted);
  font-size: 0.58rem;
}

.check-dot {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 0.58rem;
  font-weight: 700;
}

.check-dot--pass {
  color: #06291d;
  background: #6ee7b7;
}

.check-dot--warning {
  color: #3d2704;
  background: #fcd34d;
}

.subcard-footer {
  margin-top: auto;
}

/* MARK: - Philosophy */
.philosophy-section {
  padding: 60px 0 80px;
  border-top: 1px solid var(--border);
}

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

@media (max-width: 820px) {
  .philosophy-grid {
    grid-template-columns: 1fr;
  }
}

.philosophy-card {
  background: rgba(14, 18, 28, 0.4);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.philosophy-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.philosophy-card p {
  color: var(--text-sub);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* MARK: - Footer */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(7, 9, 14, 0.95);
  padding: 36px 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-sub);
  font-size: 0.9rem;
}

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

.footer-links a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

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

  .navbar-wrapper {
    top: 10px;
    padding: 0 10px;
  }

  .navbar {
    padding: 0 14px;
  }

  .nav-links {
    gap: 14px;
  }

  .btn-github {
    padding: 6px 10px;
  }

  .btn-github svg,
  .nav-link {
    display: none;
  }

  .hero {
    padding: 112px 0 42px;
  }

  .products-section {
    padding: 20px 0 60px;
  }

  .featured-card {
    padding: 22px;
    border-radius: 16px;
  }

  .featured-header {
    gap: 18px;
  }

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

  .featured-media-frame {
    aspect-ratio: 16 / 9;
  }

  .sub-products-grid {
    grid-template-columns: 1fr;
  }

  .subcard-media {
    height: 172px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px 18px;
  }
}
