/* ============================================
   Mosaiarah Landing Page — Styles
   CDN-ready, no build step required
   ============================================ */

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

:root {
  /* Brand */
  --primary: #00D4AA;
  --primary-light: #00B894;
  --primary-muted: rgba(0, 212, 170, 0.12);
  --primary-glow: rgba(0, 212, 170, 0.25);

  /* Backgrounds */
  --bg: #0A0A0A;
  --bg-card: #1A1A1A;
  --bg-card-elevated: #242424;
  --bg-input: #2A2A2A;

  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: #888888;
  --text-tertiary: #555555;

  /* Borders */
  --border: #2A2A2A;

  /* Domain colors */
  --protein: #FF6B6B;
  --carbs: #4ECDC4;
  --fat: #FFE66D;
  --water: #4A90D9;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s;
}
a:hover {
  opacity: 0.8;
}

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

/* --- Layout --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--space-4xl) 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
}

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

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

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--space-4xl);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-tagline {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-lg);
  background: var(--primary-muted);
  padding: var(--space-sm) var(--space-md);
  border-radius: 100px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary), var(--carbs));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto var(--space-xl);
}

/* --- Mosaic Philosophy --- */
.philosophy {
  text-align: center;
}

.philosophy-header {
  max-width: 640px;
  margin: 0 auto var(--space-3xl);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}

.mosaic-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: left;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.mosaic-tile:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.mosaic-tile .tile-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  background: var(--primary-muted);
}

.mosaic-tile h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.mosaic-tile p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- App Showcase (Shamsher) --- */
.app-showcase {
  position: relative;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
}

.app-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.app-info {
  padding: var(--space-3xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  background: var(--primary-muted);
  padding: var(--space-xs) var(--space-md);
  border-radius: 100px;
  width: fit-content;
  margin-bottom: var(--space-lg);
}

.app-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.app-info h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.app-info .app-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.app-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.app-features li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.app-features li .check {
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
}

.app-visual {
  background: var(--bg-card-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  min-height: 480px;
  position: relative;
  overflow: hidden;
}

/* Mockup phone frame */
.phone-frame {
  width: 240px;
  height: 480px;
  background: var(--bg);
  border-radius: 32px;
  border: 2px solid var(--border);
  padding: var(--space-md);
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.phone-notch {
  width: 100px;
  height: 24px;
  background: var(--bg);
  border-radius: 0 0 16px 16px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-sm) var(--space-sm);
}

.phone-screen .mock-greeting {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.phone-screen .mock-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

/* Mini dashboard cards inside phone */
.mock-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.mock-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  border: 1px solid var(--border);
}

.mock-card-label {
  font-size: 0.55rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
}

.mock-card-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.mock-progress-track {
  height: 4px;
  background: var(--bg-card-elevated);
  border-radius: 2px;
  margin-top: var(--space-xs);
  overflow: hidden;
}

.mock-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}

.mock-macros {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.mock-macro-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  opacity: 0.7;
}

/* Chat mockup */
.mock-chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

.mock-bubble {
  font-size: 0.5rem;
  line-height: 1.4;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  max-width: 85%;
}

.mock-bubble.user {
  background: var(--primary);
  color: var(--bg);
  align-self: flex-end;
  font-weight: 500;
}

.mock-bubble.agent {
  background: var(--bg-card-elevated);
  color: var(--text-primary);
  align-self: flex-start;
}

/* --- How It Works --- */
.how-it-works .steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
}

.step {
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 auto var(--space-md);
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Coming Soon / CTA --- */
.cta {
  text-align: center;
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

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

.cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.cta p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--primary);
  color: var(--bg);
  font-size: 1rem;
  font-weight: 600;
  padding: var(--space-md) var(--space-xl);
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--primary-glow);
  opacity: 1;
  color: var(--bg);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .mosaic-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .app-card-inner {
    grid-template-columns: 1fr;
  }

  .app-visual {
    min-height: 360px;
  }

  .app-info {
    padding: var(--space-xl);
  }

  .how-it-works .steps {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .nav-links {
    display: none;
  }

  .phone-frame {
    width: 200px;
    height: 400px;
  }
}

@media (max-width: 480px) {
  section {
    padding: var(--space-3xl) 0;
  }

  .hero {
    min-height: 90vh;
  }
}
