/* 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: 36px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  margin-bottom: 28px;
}

.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: 28px;
  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%;
  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: auto;
  display: block;
  object-fit: contain;
}

/* Sub-Products Grid */
.sub-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 820px) {
  .sub-products-grid {
    grid-template-columns: 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: 220px;
  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: 28px;
  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;
}

.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);
}
