/* Chatterling landing page. Dark aurora look shared with the app; no external fonts or scripts. */
:root {
  --ink: #090b1c;
  --ink-2: #0f1230;
  --accent: #7a9eff;
  --mint: #6bf0c7;
  --coral: #ff858f;
  --gold: #ffcc6b;
  --violet: #9e73ff;
  --text: #f4f5ff;
  --muted: rgba(244, 245, 255, 0.68);
  --faint: rgba(244, 245, 255, 0.42);
  --glass: rgba(255, 255, 255, 0.065);
  --glass-strong: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.13);
  --radius: 28px;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--ink);
  line-height: 1.5; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.015em; font-weight: 800; text-wrap: balance; }
:lang(ja) h1, :lang(zh-Hans) h1, :lang(ko) h1, :lang(th) h1 { letter-spacing: 0; line-height: 1.2; }
:lang(ja) .hero h1, :lang(zh-Hans) .hero h1, :lang(ko) .hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
p { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Aurora: three blurred blobs drifting behind everything, plus a dark wash towards the bottom. */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--ink); }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.75; will-change: transform;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora .a { width: 60vmax; height: 60vmax; left: -15vmax; top: -22vmax; background: var(--violet); animation-delay: -4s; }
.aurora .b { width: 55vmax; height: 55vmax; right: -18vmax; top: 10vmax; background: var(--accent); opacity: 0.55; animation-delay: -12s; }
.aurora .c { width: 50vmax; height: 50vmax; right: 10vmax; bottom: -25vmax; background: var(--mint); opacity: 0.42; animation-delay: -20s; }
.aurora::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 11, 28, 0) 0%, rgba(9, 11, 28, 0.55) 60%, rgba(9, 11, 28, 0.9) 100%); }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(8vmax, 6vmax, 0) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .aurora span { animation: none; } html { scroll-behavior: auto; } }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: rgba(9, 11, 28, 0.55); border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--glass); }
.nav-simple { margin-inline-start: auto; display: flex; gap: 4px; }
.nav-simple a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.nav-simple a:hover { color: var(--text); background: var(--glass); }
.lang { position: relative; }
.lang select {
  appearance: none; -webkit-appearance: none; background: var(--glass); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 34px 8px 14px; font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer;
}
.lang::after { content: ""; position: absolute; inset-inline-end: 14px; top: 50%; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
[dir="rtl"] .lang select { padding: 8px 14px 8px 34px; }
.menu-btn { display: none; margin-inline-start: auto; background: var(--glass); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; }
@media (max-width: 480px) { .brand span { display: none; } .lang select { max-width: 150px; text-overflow: ellipsis; } }
@media (max-width: 1100px) {
  .nav { display: none; position: absolute; top: 64px; inset-inline: 0; flex-direction: column; padding: 10px var(--gutter) 16px; background: rgba(9, 11, 28, 0.92); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .menu-btn { display: inline-block; }
  .lang { margin-inline-start: 0; }
}

/* Sections */
section { padding: clamp(64px, 10vw, 120px) 0; }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--mint); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px var(--mint); }
.h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin: 14px 0 16px; }
.sub { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 62ch; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }

/* Hero */
.hero { padding-top: clamp(48px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
.hero h1 .alt { display: block; color: var(--mint); }
.hero .lead { color: var(--muted); font-size: clamp(1.1rem, 1.8vw, 1.35rem); margin: 22px 0 30px; max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cta-note { color: var(--faint); font-size: 0.95rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; }
.stat { padding: 16px 18px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); }
.stat b { display: block; font-size: 1.7rem; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* App Store badge: a plain, self-drawn badge; swap for Apple's official artwork before launch. */
.badge {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none; background: #000; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 14px; padding: 10px 20px 10px 16px; line-height: 1.05;
  transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.badge:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(122, 158, 255, 0.25); }
.badge svg { width: 28px; height: 28px; flex: none; }
.badge small { display: block; font-size: 0.7rem; font-weight: 500; opacity: 0.85; }
.badge strong { display: block; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }

/* Phone frame: a dark bezel around the screen, Dynamic Island, side buttons; the screenshot sits inside with its own radius. */
.phone {
  position: relative; width: min(100%, 290px); border-radius: 52px; padding: 16px;
  background: linear-gradient(160deg, #262a3f 0%, #0d0f1c 45%, #05060f 100%);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 0 1.5px rgba(255, 255, 255, 0.14), inset 0 0 0 2px rgba(0, 0, 0, 0.9), inset 0 0 0 3px rgba(255, 255, 255, 0.05);
  margin-inline: auto;
}
.phone img { width: 100%; height: auto; display: block; border-radius: 38px; background: #05060f; }
.phone::after { /* side buttons */
  content: ""; position: absolute; top: 20%; inset-inline-end: -4px; width: 4px; height: 13%; border-radius: 2px;
  background: linear-gradient(#2a2e44, #0a0c18);
  box-shadow: 0 -42% 0 0 transparent, 0 -34px 0 0 #1c1f31, 0 -56px 0 0 #1c1f31;
}
.phone.tilt { transform: rotate(-4deg); }
.phone.sm { width: min(100%, 240px); }
.phone.sm { padding: 13px; border-radius: 44px; }
.phone.sm img { border-radius: 32px; }
.hero .phone { width: min(100%, 310px); }
.glow { position: relative; }
.glow::before { content: ""; position: absolute; inset: 10% -10%; background: radial-gradient(closest-side, rgba(122, 158, 255, 0.35), transparent 70%); filter: blur(30px); z-index: -1; }

/* Cards */
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.four, .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; } }
.card {
  padding: 26px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card h3 { font-size: 1.3rem; margin: 14px 0 10px; }
.card p { color: var(--muted); }
.icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(122, 158, 255, 0.35), rgba(107, 240, 199, 0.25)); border: 1px solid var(--line); }
.icon svg { width: 24px; height: 24px; stroke: var(--text); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.coral { background: linear-gradient(135deg, rgba(255, 133, 143, 0.4), rgba(255, 204, 107, 0.25)); }
.icon.mint { background: linear-gradient(135deg, rgba(107, 240, 199, 0.4), rgba(122, 158, 255, 0.2)); }
.icon.violet { background: linear-gradient(135deg, rgba(158, 115, 255, 0.45), rgba(255, 133, 143, 0.2)); }

/* Strengths: text + phone */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 72px); align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 900px) { .split, .split.flip { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }

/* Method steps */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 36px; }
.step { padding: 20px 18px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); position: relative; }
.step i { font-style: normal; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--mint)); color: var(--ink); font-weight: 800; }
.step h3 { font-size: 1.05rem; margin: 12px 0 6px; }
.step p { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr 1fr; } }
.method-more { margin-top: 18px; }

/* Languages */
.langs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: background 0.15s ease, transform 0.15s ease;
}
.chip:hover { background: var(--glass-strong); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: linear-gradient(135deg, rgba(122, 158, 255, 0.5), rgba(107, 240, 199, 0.35)); border-color: transparent; }
.chip .flag { font-size: 1.15rem; line-height: 1; }
.lang-show { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(24px, 5vw, 64px); align-items: start; margin-top: 10px; }
@media (max-width: 900px) { .lang-show { grid-template-columns: 1fr; } }
.lang-caption { text-align: center; color: var(--faint); margin-top: 14px; font-size: 0.95rem; }

/* Pricing */
.plan { position: relative; overflow: hidden; }
.plan.plus { border-color: rgba(107, 240, 199, 0.45); background: linear-gradient(160deg, rgba(107, 240, 199, 0.12), rgba(122, 158, 255, 0.08)); }
.plan h3 { font-size: 1.6rem; margin: 0 0 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
.plan li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--mint); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.plan .note { color: var(--faint); font-size: 0.92rem; }

/* Download */
.download .card { text-align: center; padding: clamp(32px, 6vw, 64px); background: linear-gradient(160deg, rgba(158, 115, 255, 0.22), rgba(107, 240, 199, 0.12)); }
.download .mascot { width: 120px; margin: 0 auto 18px; filter: drop-shadow(0 12px 30px rgba(158, 115, 255, 0.5)); }
.download .sub { margin: 10px auto 26px; }

/* Footer */
footer { padding: 40px 0 60px; color: var(--faint); font-size: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }
footer .wrap { display: grid; gap: 14px; }
footer .links { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Privacy page */
.prose { max-width: 72ch; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 10px; }
.prose .updated { color: var(--faint); margin-bottom: 28px; }
.prose h2 { font-size: 1.4rem; margin: 34px 0 10px; }
.prose p { color: var(--muted); margin-bottom: 12px; font-size: 1.05rem; }
.prose p b { color: var(--text); }
.prose a { color: var(--mint); }
