/* LangLens landing page
   Identity-preserved tokens: brand blue on near-black, system font.
   Committed color strategy: near-black drench, blue is the only accent. */

:root {
  --bg: #0a0a0f;
  --bg-raise: #101017;
  --surface: #15151d;
  --hair: rgba(255, 255, 255, 0.08);
  --hair-strong: rgba(255, 255, 255, 0.14);

  --ink: #ffffff;
  --text: #c2c3cf;        /* body ~9:1 on bg */
  --muted: #8e8e9c;       /* captions/meta ~5.9:1 on bg */

  --accent: #4a7cff;      /* brand blue */
  --accent-soft: #7ca4ff;
  --accent-strong: #2563eb; /* button fill, white text ~5:1 */

  --maxw: 1140px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --r: 16px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", system-ui, Roboto, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* one faint optical pool of brand light, top-center, not a gradient-text trick */
  background-image: radial-gradient(
    120% 80% at 50% -10%,
    rgba(74, 124, 255, 0.1),
    transparent 60%
  );
  background-repeat: no-repeat;
}

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

kbd {
  font: inherit;
  font-size: 0.8em;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-raise);
  border: 1px solid var(--hair-strong);
  border-bottom-width: 2px;
  border-radius: 7px;
  padding: 0.25em 0.5em;
  line-height: 1;
}

/* ---------- header ---------- */
.site {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
}
.brand-mark { color: var(--accent); display: block; }
.brand-word {
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.brand.small .brand-word { font-size: 1rem; }
.brand.home-link { text-decoration: none; color: inherit; }
.brand.home-link:hover .brand-word { color: var(--ink); }

/* ---------- legal pages ---------- */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--pad) clamp(3rem, 8vw, 6rem);
}
.legal h1 {
  font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.legal .updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.legal h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin: 2.25rem 0 0.65rem;
  letter-spacing: -0.02em;
}
.legal p {
  color: var(--text);
  margin: 0 0 1rem;
  max-width: 68ch;
}
.legal ul {
  color: var(--muted);
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  max-width: 68ch;
}
.legal li { margin-bottom: 0.35rem; }
.legal a {
  color: var(--accent);
  text-decoration: none;
}
.legal a:hover { color: var(--accent-soft); text-decoration: underline; }
.legal .lead {
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}
.legal .release {
  padding-top: 2rem;
  border-top: 1px solid var(--hair);
}
.legal .release:first-of-type { border-top: 0; padding-top: 0.5rem; }
.legal .release h2 {
  margin-top: 0;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 6rem) var(--pad) clamp(3rem, 7vw, 7rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.kicker {
  color: var(--accent-soft);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
}

h1 {
  font-size: clamp(2.6rem, 1.5rem + 5vw, 5rem);
  font-weight: 600;
}

.lede {
  color: var(--text);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.55;
  max-width: 34ch;
  margin: 1.5rem 0 2.25rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.btn-primary {
  --b: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.0625rem;
  color: #fff;
  background: var(--b);
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 10px 30px -12px rgba(74, 124, 255, 0.7);
  transition: transform 0.18s var(--ease-out), background 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}
.btn-primary:hover {
  background: var(--accent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 14px 38px -12px rgba(74, 124, 255, 0.85);
}
.btn-primary:active { transform: translateY(1px) scale(0.99); }

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1.75rem;
}

/* ---------- hero visual: the real bubble ---------- */
.hero-visual { display: grid; place-items: center; }

.bubble-shot {
  display: block;
  width: min(100%, 420px);
  height: auto;
}

/* ---------- how it works ---------- */
.how {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--pad);
  border-top: 1px solid var(--hair);
}
.how h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 600;
  max-width: 18ch;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.steps li { display: flex; flex-direction: column; gap: 0.6rem; }
.steps h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.steps p { color: var(--muted); max-width: 30ch; }

.step-key {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
  color: var(--accent);
}
.marquee {
  width: 58px;
  height: 34px;
  border: 1.5px dashed var(--accent);
  border-radius: 7px;
  background: rgba(74, 124, 255, 0.08);
}
.dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 4px solid var(--accent);
}

/* ---------- privacy ---------- */
.privacy {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 7rem) var(--pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
  border-top: 1px solid var(--hair);
}
.privacy h2 {
  font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4rem);
  font-weight: 600;
}
.privacy p { color: var(--text); max-width: 46ch; font-size: 1.0625rem; }

/* ---------- footer ---------- */
.site-foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem var(--pad) 3.5rem;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
}
.site-foot .brand { color: var(--muted); }
.site-foot .brand .brand-mark { color: var(--muted); }
.foot-download {
  margin-left: auto;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.18s var(--ease-out);
}
.foot-download:hover { color: var(--ink); }
.copy {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.85rem;
}
.foot-legal {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.85rem;
}
.foot-legal a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.18s var(--ease-out);
}
.foot-legal a:hover { color: var(--accent); }
.foot-legal a[aria-current="page"] { color: var(--ink); }
.foot-legal span { color: var(--hair-strong); user-select: none; }

/* ---------- entrance motion ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* Baseline (no .anim / no JS) is fully visible. Motion only plays when JS opts in. */
.anim .hero-copy > * { animation: rise 0.7s var(--ease-out) both; }
.anim .hero-copy .kicker { animation-delay: 0.02s; }
.anim .hero-copy h1 { animation-delay: 0.08s; }
.anim .hero-copy .lede { animation-delay: 0.16s; }
.anim .hero-copy .cta-row { animation-delay: 0.24s; }
.anim .hero-copy .meta { animation-delay: 0.3s; }
.anim .bubble-shot { animation: bubble-in 0.85s 0.2s var(--ease-out) both; }

@media (prefers-reduced-motion: reduce) {
  .anim .hero-copy > *,
  .anim .bubble-shot { animation: none; }
  * { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: clamp(1.5rem, 5vw, 3rem);
  }
  .hero-visual { order: -1; }
  .bubble-shot { width: min(100%, 460px); }
  .privacy { grid-template-columns: 1fr; align-items: start; }
  .lede { max-width: 46ch; }
}

@media (max-width: 520px) {
  .cta-row { gap: 0.5rem; }
  .btn-primary { width: 100%; text-align: center; }
}
