/* ChatFlag website. One stylesheet for every page; no build step, no external requests. */

:root {
  --bg: #07080f;
  --bg-2: #0c0e1a;
  --surface: #12152a;
  --surface-2: #181c35;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --fg: #f4f5fb;
  --fg-2: #c3c6d9;
  --muted: #8a8ea8;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --green: #22c55e;
  --amber: #f59e0b;
  --grad: linear-gradient(135deg, var(--blue), var(--violet));
  --grad-text: linear-gradient(90deg, #7cb3ff, #b9a2ff 55%, #f0a5d8);
  --radius: 18px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --max: 1160px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: rgba(139, 92, 246, 0.45); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 600; color: var(--fg-2);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent;
  font: 700 15.5px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(139, 92, 246, 0.7); outline-offset: 2px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 30px rgba(99, 102, 241, 0.45); }
.btn-primary:hover { box-shadow: 0 16px 40px rgba(99, 102, 241, 0.6); }
.btn-ghost { background: rgba(255, 255, 255, 0.05); border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }
.btn-lg { padding: 16px 26px; font-size: 16.5px; border-radius: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 8, 15, 0.72); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.4px; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 26px; margin-left: 12px; }
.nav-links a { color: var(--fg-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--fg); }
.nav .btn { margin-left: auto; padding: 10px 16px; font-size: 14.5px; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ---- Hero ---- */
.hero { position: relative; padding: 84px 0 40px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto; height: 900px; pointer-events: none;
  background:
    radial-gradient(closest-side at 22% 30%, rgba(59, 130, 246, 0.35), transparent),
    radial-gradient(closest-side at 80% 20%, rgba(139, 92, 246, 0.35), transparent),
    radial-gradient(closest-side at 60% 70%, rgba(236, 72, 153, 0.12), transparent);
}
.hero::after { /* faint grid */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 70%);
}
.hero .wrap { position: relative; z-index: 1; text-align: center; }
.hero h1 {
  margin: 22px auto 0; max-width: 900px;
  font-size: clamp(40px, 6.4vw, 76px); line-height: 1.03; letter-spacing: -0.045em; font-weight: 850;
}
.hero .lead { margin: 22px auto 0; max-width: 640px; font-size: clamp(17px, 2vw, 20px); color: var(--fg-2); }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 34px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin-top: 26px; color: var(--muted); font-size: 14px; }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { width: 16px; height: 16px; color: var(--green); }

/* Browser frame around a screenshot. */
.frame {
  position: relative; border-radius: 16px; overflow: hidden; background: #1b1d29;
  border: 1px solid var(--line-2); box-shadow: var(--shadow), 0 0 0 8px rgba(255, 255, 255, 0.025);
}
.frame-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: #23253a; border-bottom: 1px solid var(--line); }
.frame-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; flex: none; }
.frame-bar i:nth-child(1) { background: #ff5f57; } .frame-bar i:nth-child(2) { background: #febc2e; } .frame-bar i:nth-child(3) { background: #28c840; }
.frame-url { margin-left: 12px; flex: 1; max-width: 340px; height: 22px; border-radius: 6px; background: #15161f; color: #9a9db2; font-size: 12px; display: flex; align-items: center; padding: 0 10px; overflow: hidden; white-space: nowrap; }
.frame img { width: 100%; height: auto; }

.hero-shot { position: relative; max-width: 1040px; margin: 64px auto 0; }
.hero-shot .glow { position: absolute; inset: 10% 8% -6%; background: var(--grad); filter: blur(90px); opacity: 0.35; z-index: -1; border-radius: 50%; }
.chip {
  position: absolute; z-index: 2; padding: 10px 15px; border-radius: 12px; font-weight: 800; font-size: 15px; color: #fff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5); white-space: nowrap;
  animation: bob 5s ease-in-out infinite;
}
.chip.c1 { left: -26px; top: 26%; background: var(--green); transform: rotate(-5deg); }
.chip.c2 { right: -22px; top: 54%; background: var(--violet); transform: rotate(4deg); animation-delay: -1.6s; }
.chip.c3 { left: 6%; bottom: -18px; background: var(--amber); transform: rotate(3deg); animation-delay: -3.1s; }
@keyframes bob { 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .chip { animation: none; } }
@media (max-width: 720px) {
  .chip { font-size: 12px; padding: 7px 10px; }
  .chip.c1 { left: -6px; } .chip.c2 { right: -6px; } .chip.c3 { display: none; }
}

/* ---- Sections ---- */
section { position: relative; }
.section { padding: 110px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #a5b4fc; }
.section-head h2 { margin: 12px 0 0; font-size: clamp(32px, 4.4vw, 50px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 800; }
.section-head p { margin: 16px 0 0; color: var(--fg-2); font-size: 18px; }
@media (max-width: 600px) { .section { padding: 76px 0; } }

/* Problem → solution strip */
.problem { padding: 70px 0 10px; }
.problem-card {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: center;
  padding: 34px; border-radius: 24px; background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line);
}
.problem-card h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -0.3px; }
.problem-card p { margin: 0; color: var(--fg-2); }
.problem-card .before h3 { color: #fca5a5; }
.problem-card .after h3 { color: #86efac; }
.problem-card .arrow { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); box-shadow: 0 10px 26px rgba(99, 102, 241, 0.5); }
.problem-card .arrow svg { width: 24px; height: 24px; color: #fff; }
@media (max-width: 760px) { .problem-card { grid-template-columns: 1fr; text-align: center; } .problem-card .arrow { margin: 0 auto; transform: rotate(90deg); } }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }
.feature {
  position: relative; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line); transition: border-color 0.25s ease, transform 0.25s ease;
}
.feature:hover { border-color: rgba(139, 92, 246, 0.45); transform: translateY(-3px); }
.feature .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px; background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(139, 92, 246, 0.3); }
.feature .ic svg { width: 23px; height: 23px; color: #c4b5fd; }
.feature h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -0.3px; }
.feature p { margin: 0; color: var(--fg-2); font-size: 15.5px; }
.pro-tag { position: absolute; top: 22px; right: 22px; padding: 3px 10px; border-radius: 999px; background: var(--grad); font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em; }

/* Showcase rows */
.showcase { display: grid; gap: 110px; }
.row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.row.flip { grid-template-columns: 1fr 1.15fr; }
.row.flip .row-media { order: 2; }
.row-text .kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #a5b4fc; }
.row-text h3 { margin: 10px 0 14px; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.12; letter-spacing: -0.03em; }
.row-text p { margin: 0 0 18px; color: var(--fg-2); font-size: 17px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--fg-2); }
.ticks svg { width: 20px; height: 20px; flex: none; color: var(--green); margin-top: 2px; }
@media (max-width: 900px) {
  .row, .row.flip { grid-template-columns: 1fr; gap: 32px; }
  .row.flip .row-media { order: 0; }
  .showcase { gap: 80px; }
}

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 30px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step .num {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--grad); font-weight: 900; font-size: 19px; box-shadow: 0 8px 22px rgba(99, 102, 241, 0.45);
}
.step h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.3px; }
.step p { margin: 0; color: var(--fg-2); }
.kbd-row { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; margin-top: 34px; color: var(--muted); font-size: 14.5px; }
kbd {
  display: inline-block; min-width: 26px; padding: 3px 8px; border-radius: 7px; text-align: center;
  font: 700 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--fg);
  background: linear-gradient(#2a2d44, #1d1f31); border: 1px solid #3c3f5a; box-shadow: 0 2px 0 #0b0c15;
}

/* Privacy band */
.privacy-band {
  display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center;
  padding: 48px; border-radius: 28px; overflow: hidden; position: relative;
  background: radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.16), transparent 50%), linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
}
.shield { width: 120px; height: 120px; border-radius: 32px; display: grid; place-items: center; background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.3); }
.shield svg { width: 60px; height: 60px; color: #4ade80; }
.privacy-band h2 { margin: 0 0 12px; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.03em; line-height: 1.1; }
.privacy-band p { margin: 0 0 16px; color: var(--fg-2); font-size: 17px; }
.privacy-points { display: flex; flex-wrap: wrap; gap: 10px; }
.privacy-points span { padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; }
@media (max-width: 760px) { .privacy-band { grid-template-columns: 1fr; padding: 32px 24px; text-align: center; } .shield { margin: 0 auto; } .privacy-points { justify-content: center; } }

/* Pricing */
.pricing { display: grid; grid-template-columns: 1fr 1.08fr; gap: 22px; max-width: 920px; margin: 0 auto; align-items: stretch; }
@media (max-width: 820px) { .pricing { grid-template-columns: 1fr; max-width: 480px; } }
.plan { position: relative; display: flex; flex-direction: column; padding: 34px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.plan h3 { margin: 0; font-size: 20px; }
.plan .tagline { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.price { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 4px; }
.price .amount { font-size: 58px; font-weight: 850; letter-spacing: -0.04em; line-height: 1; }
.price .per { color: var(--fg-2); font-weight: 600; }
.price-note { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 12px; }
.plan li { display: flex; gap: 11px; align-items: flex-start; color: var(--fg-2); font-size: 15.5px; }
.plan li svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--green); }
.plan li.off { color: var(--muted); }
.plan li.off svg { color: #5b5f78; }
.plan li b { color: var(--fg); }
.plan .btn { margin-top: auto; width: 100%; }
.plan.pro {
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.28), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(59, 130, 246, 0.2), transparent 50%),
    var(--surface-2);
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 30px 70px rgba(80, 70, 220, 0.25);
}
.plan.pro::before { /* gradient border */
  content: ''; position: absolute; inset: -1px; border-radius: 25px; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.badge-pop { position: absolute; top: -13px; left: 34px; padding: 5px 13px; border-radius: 999px; background: var(--grad); font-size: 12.5px; font-weight: 800; letter-spacing: 0.03em; box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5); }
.value { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 920px; margin: 28px auto 0; }
@media (max-width: 820px) { .value { grid-template-columns: 1fr; max-width: 480px; } }
.value div { padding: 20px 22px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.value b { display: block; font-size: 16px; margin-bottom: 4px; }
.value span { color: var(--muted); font-size: 14.5px; }
.guarantee { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; color: var(--fg-2); font-size: 15px; text-align: center; }
.guarantee svg { width: 20px; height: 20px; color: var(--green); flex: none; }

/* Use cases */
.uses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .uses { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .uses { grid-template-columns: 1fr; } }
.use { padding: 24px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.use .emoji { font-size: 30px; }
.use h3 { margin: 12px 0 6px; font-size: 17.5px; }
.use p { margin: 0; color: var(--fg-2); font-size: 15px; }
.use .flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.use .flags span { padding: 3px 9px; border-radius: 7px; font-size: 12px; font-weight: 700; color: #fff; }

/* FAQ */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.faq details[open] { border-color: rgba(139, 92, 246, 0.4); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; font-weight: 700; font-size: 16.5px; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; font-weight: 400; color: var(--muted); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 24px 22px; color: var(--fg-2); }
.faq .answer p { margin: 0 0 10px; }
.faq .answer p:last-child { margin: 0; }

/* Final CTA */
.final {
  text-align: center; padding: 72px 32px; border-radius: 32px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.45), transparent 50%), radial-gradient(circle at 90% 100%, rgba(139, 92, 246, 0.5), transparent 50%), #0d0f20;
  border: 1px solid var(--line-2);
}
.final img { width: 76px; height: 76px; margin: 0 auto 22px; filter: drop-shadow(0 14px 30px rgba(99, 102, 241, 0.6)); }
.final h2 { margin: 0; font-size: clamp(32px, 4.6vw, 54px); letter-spacing: -0.04em; line-height: 1.06; }
.final p { margin: 16px auto 30px; max-width: 560px; color: var(--fg-2); font-size: 18px; }
.final .ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* Footer */
footer { margin-top: 110px; padding: 48px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.foot { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.foot .brand { color: var(--fg); margin-bottom: 10px; }
.foot p { margin: 0; max-width: 340px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.foot nav a { text-decoration: none; color: var(--fg-2); }
.foot nav a:hover { color: var(--fg); }
.legal-line { margin-top: 32px; font-size: 13px; }

/* Reveal on scroll (only when JS is on; see script at the end of each page). */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Legal pages ---- */
.doc { max-width: 780px; margin: 0 auto; padding: 64px 0 20px; }
.doc .kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #a5b4fc; }
.doc h1 { margin: 10px 0 8px; font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.035em; line-height: 1.1; }
.doc .updated { color: var(--muted); margin: 0 0 34px; }
.doc .summary { padding: 22px 24px; border-radius: 16px; background: rgba(34, 197, 94, 0.07); border: 1px solid rgba(34, 197, 94, 0.25); margin-bottom: 40px; }
.doc .summary h2 { margin: 0 0 10px; font-size: 18px; }
.doc .summary ul { margin: 0; padding-left: 20px; color: var(--fg-2); }
.doc h2 { margin: 42px 0 12px; font-size: 23px; letter-spacing: -0.3px; }
.doc h3 { margin: 26px 0 8px; font-size: 18px; }
.doc p, .doc li { color: var(--fg-2); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: #a5b4fc; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--fg-2); }
.doc th { color: var(--fg); font-weight: 700; }
.doc .table-wrap { overflow-x: auto; }
.doc code { font: 13.5px ui-monospace, Menlo, monospace; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); }
