@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --bg: #0b0d14;
  --bg-warm: #111420;
  --surface: #181c28;
  --surface-hover: #1e2333;
  --text: #e8e6e3;
  --text-secondary: #8b8fa3;
  --text-faint: #555a6e;
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.12);
  --divider: rgba(255, 255, 255, 0.06);
  --divider-hover: rgba(255, 255, 255, 0.12);

  /* App accent colors */
  --mochipet: #ff6b6b;
  --mochipet-glow: rgba(255, 107, 107, 0.12);
  --caelus: #818cf8;
  --caelus-glow: rgba(129, 140, 248, 0.12);
  --cylla: #f9a8d4;
  --cylla-glow: rgba(249, 168, 212, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* Divider line */
.divider-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 0 auto;
  position: relative;
}

.divider-line::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: glowPulse 8s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse, var(--cylla-glow) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: glowPulse 10s ease-in-out infinite alternate-reverse;
}

@keyframes glowPulse {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.1); }
}

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

.brand-mark {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 1s ease 0.2s forwards;
}

.hero-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 1s ease 0.4s forwards;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--caelus) 50%, var(--cylla) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 48px;
  letter-spacing: 0.01em;
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp 1s ease 0.6s forwards;
}

.scroll-hint {
  opacity: 0;
  animation: fadeUp 1s ease 1s forwards;
}

.scroll-hint span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: 0 auto;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.3); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ PHILOSOPHY ============ */
.philosophy {
  padding: 80px 24px;
  text-align: center;
  position: relative;
}

.philosophy-text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 32px auto 0;
  letter-spacing: 0.01em;
  line-height: 2;
}

/* ============ APP CARDS ============ */
.apps-section {
  padding: 80px 24px 100px;
  max-width: 900px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: var(--text-faint);
  text-align: center;
  margin-bottom: 48px;
  text-transform: uppercase;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.app-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  padding: 36px 40px;
  background: var(--bg-warm);
  border: 1px solid var(--divider);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.app-card--mochipet::before { background: linear-gradient(135deg, var(--mochipet-glow) 0%, transparent 60%); }
.app-card--caelus::before { background: linear-gradient(135deg, var(--caelus-glow) 0%, transparent 60%); }
.app-card--cylla::before { background: linear-gradient(135deg, var(--cylla-glow) 0%, transparent 60%); }

.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--divider-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.app-card:hover::before { opacity: 1; }

.app-icon {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.app-icon--mochipet { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.app-icon--caelus { background: linear-gradient(135deg, #818cf8, #6366f1); }
.app-icon--cylla { background: linear-gradient(135deg, #f9a8d4, #ec4899); }

.app-info {
  position: relative;
  z-index: 1;
}

.app-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.app-name-sub {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 10px;
}

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

.app-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 4px 14px;
  border-radius: 20px;
}

.app-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.app-status--live {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.2);
}
.app-status--live::before { background: #4ade80; }

.app-status--dev {
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--divider);
}
.app-status--dev::before { background: var(--text-faint); }

.app-card .arrow {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  font-size: 1.1rem;
  color: var(--text-faint);
  transition: all 0.3s ease;
  z-index: 1;
}

.app-card:hover .arrow { color: var(--text-secondary); transform: translateY(-50%) translateX(0); }

/* ============ APP LANDING PAGE ============ */
.app-hero-page {
  padding: 120px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.app-hero-page::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.app-hero-page--mochipet::before { background: radial-gradient(ellipse, var(--mochipet-glow) 0%, transparent 65%); }
.app-hero-page--caelus::before { background: radial-gradient(ellipse, var(--caelus-glow) 0%, transparent 65%); }
.app-hero-page--cylla::before { background: radial-gradient(ellipse, var(--cylla-glow) 0%, transparent 65%); }

.app-hero-icon {
  position: relative;
  z-index: 1;
  width: 100px;
  height: 100px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  margin-bottom: 28px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.app-hero-title {
  position: relative;
  z-index: 1;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.35s forwards;
}

.app-hero-tagline {
  position: relative;
  z-index: 1;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.9;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.5s forwards;
}

.app-store-badge {
  display: inline-block;
  margin-top: 32px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.65s forwards;
  position: relative;
  z-index: 1;
}

.app-store-badge a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.app-store-badge a:hover {
  border-color: var(--divider-hover);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

/* Feature cards */
.features {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature {
  padding: 28px 32px;
  background: var(--bg-warm);
  border: 1px solid var(--divider);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  align-items: start;
  transition: border-color 0.3s;
}

.feature:hover { border-color: var(--divider-hover); }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.feature-icon--mochipet { background: var(--mochipet-glow); }
.feature-icon--caelus { background: var(--caelus-glow); }
.feature-icon--cylla { background: var(--cylla-glow); }

.feature h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.feature p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============ LEGAL PAGES ============ */
.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 24px 100px;
}

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

.legal-header h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.legal-header .updated {
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

.legal h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 10px;
}

.legal p, .legal ul {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.9;
}

.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 4px; }

.legal a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-glow);
  transition: border-color 0.2s;
}

.legal a:hover { border-color: var(--accent); }

.legal hr {
  margin: 48px 0 36px;
  border: none;
  border-top: 1px solid var(--divider);
}

.legal strong { color: var(--text); font-weight: 500; }

/* ============ FOOTER ============ */
footer {
  padding: 48px 24px 64px;
  text-align: center;
  border-top: 1px solid var(--divider);
}

.footer-brand {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.65rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .app-card { padding: 28px 24px; gap: 20px; }
  .app-card .arrow { display: none; }
  .app-icon { width: 60px; height: 60px; font-size: 1.5rem; border-radius: 15px; }
  .hero { min-height: 90vh; padding: 48px 20px; }
  .features { padding: 40px 20px 60px; }
  .feature { padding: 22px 20px; grid-template-columns: 38px 1fr; gap: 14px; }
  .feature-icon { width: 38px; height: 38px; font-size: 1rem; }
  .legal { padding: 60px 20px 80px; }
  .app-hero-page { padding: 80px 20px 40px; }
}
