/* MalluChat landing page styles */

:root {
  --primary: #4f46e5;
  --primary-dark: #2b3ac8;
  --accent: #7c5cf6;
  --gold: #f2b035;
  --ink: #171b34;
  --muted: #565d80;
  --bg: #f9faff;
  --surface: #ffffff;
  --surface-2: #eef0fc;
  --border: #dee2f2;
  --shadow: 0 12px 32px rgba(28, 34, 100, 0.12);
  --radius: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaf6;
    --muted: #9ba3c9;
    --bg: #0d1226;
    --surface: #151b38;
    --surface-2: #1b2348;
    --border: #2a3462;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

:root[data-theme="light"] {
  --ink: #171b34;
  --muted: #565d80;
  --bg: #f9faff;
  --surface: #ffffff;
  --surface-2: #eef0fc;
  --border: #dee2f2;
  --shadow: 0 12px 32px rgba(28, 34, 100, 0.12);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink: #e8eaf6;
  --muted: #9ba3c9;
  --bg: #0d1226;
  --surface: #151b38;
  --surface-2: #1b2348;
  --border: #2a3462;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; }

a { color: var(--accent); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

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

@media (max-width: 640px) {
  .site-nav a.nav-link { display: none; }
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Hero ---------- */

.hero {
  overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 110% -10%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 60%),
    radial-gradient(50rem 28rem at -20% 110%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2rem;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

@media (max-width: 820px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
}

.eyebrow {
  display: inline-block;
  background: var(--surface-2);
  color: var(--primary);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.12;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero h1 .accent { color: var(--primary); }

.hero p.sub {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 32rem;
  margin: 0 0 1.75rem;
}

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.6rem 1.25rem 0.6rem 1rem;
  transition: transform 0.15s ease;
}

.play-badge:hover { transform: translateY(-2px); }

.play-badge svg { width: 28px; height: 28px; }

.play-badge .lines { line-height: 1.15; text-align: left; }
.play-badge .lines small { display: block; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.play-badge .lines strong { font-size: 1.15rem; }

/* ---------- Phone mockup ---------- */

.phone {
  width: min(290px, 78vw);
  margin: 0 auto;
  aspect-ratio: 9 / 19;
  border-radius: 38px;
  border: 10px solid #14162b;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero .phone { transform: rotate(6deg); }

.phone-top {
  background: var(--primary);
  color: #fff;
  padding: 0.9rem 1rem 0.7rem;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.phone-top .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }

.phone-chat {
  flex: 1;
  padding: 0.9rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--surface);
}

.bubble {
  max-width: 75%;
  padding: 0.5rem 0.8rem;
  border-radius: 16px;
  font-size: 0.8rem;
}

.bubble.them { background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.me { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }

.phone-input {
  margin: 0.5rem 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- Sections ---------- */

section { padding: 4.5rem 0; }

.section-head { text-align: center; max-width: 40rem; margin: 0 auto 2.75rem; }

.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}

.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

/* Features */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  box-shadow: 0 4px 14px rgba(28, 34, 100, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: var(--surface-2);
  color: var(--primary);
}

.feature-icon svg { width: 24px; height: 24px; }

.feature-card:nth-child(3n+2) .feature-icon { color: var(--accent); }
.feature-card:nth-child(3n) .feature-icon { color: var(--gold); }

.feature-card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  text-align: center;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.step-num {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.step h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Screenshots carousel */

.carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0.25rem 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.carousel .shot {
  flex: 0 0 auto;
  width: min(260px, 70vw);
  height: auto;
  aspect-ratio: 1 / 2;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  scroll-snap-align: center;
}

/* Safety strip */

.safety {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  color: #fff;
}

.safety .section-head h2, .safety .section-head p { color: #fff; }
.safety .section-head p { opacity: 0.9; }

.safety-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.safety-item h3 { margin: 0.6rem 0 0.3rem; font-size: 1.05rem; }
.safety-item p { margin: 0; opacity: 0.9; font-size: 0.95rem; }
.safety-item svg { width: 34px; height: 34px; }

/* Download CTA */

.download-cta .banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  text-align: center;
  padding: 3.25rem 1.5rem;
  background-image:
    radial-gradient(24rem 12rem at 90% 0%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 65%),
    radial-gradient(24rem 12rem at 5% 100%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 65%);
}

.download-cta h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 0.5rem; }
.download-cta p { color: var(--muted); margin: 0 0 1.5rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.site-footer .brand { font-size: 1rem; }
.site-footer .brand img { width: 32px; height: 32px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-left: auto; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }

.footer-copy { width: 100%; font-size: 0.85rem; }

/* ---------- Legal pages ---------- */

.legal { padding: 3rem 0 4rem; }

.legal-body {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.legal-body h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-top: 0; letter-spacing: -0.01em; }
.legal-body h2 { font-size: 1.25rem; margin-top: 2.2rem; }
.legal-body h3 { font-size: 1.05rem; margin-top: 1.6rem; }
.legal-body p, .legal-body li { color: var(--muted); }
.legal-body strong { color: var(--ink); }
.legal-body .updated { font-weight: 700; color: var(--ink); }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .feature-card, .play-badge { transition: none; }
}
