/* Lingently website. Night studio: black covers meet white pages with a
   straight edge; the only colour comes from the cast. */

@font-face { font-family: Gabarito; src: url(/fonts/gabarito-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: Gabarito; src: url(/fonts/gabarito-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/inter-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/inter-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/inter-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
/* Metric-matched fallbacks so the font swap doesn't shift the layout. */
@font-face { font-family: "Gabarito Fallback"; src: local("Arial Black"), local("Arial"); size-adjust: 88%; ascent-override: 98%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"); size-adjust: 107%; ascent-override: 90%; }

:root {
  --black: #000;
  --white: #fff;
  --ink: #0b0b0d;
  --ink2: #5a5a63;
  --ink3: #9a9aa3;
  --mist: #f4f4f6;
  --line: #e4e4e9;
  --night-ink2: #a1a1aa;
  --night-line: #24242b;
  --display: Gabarito, "Gabarito Fallback", system-ui, sans-serif;
  --text: Inter, "Inter Fallback", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 17px/1.55 var(--text); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; margin: 0; text-wrap: balance; hyphens: none; }
p { margin: 0; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--white); color: var(--ink); padding: 8px 14px; border-radius: 99px; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Nav ---------- */
.nav { background: var(--black); color: var(--white); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px var(--gutter); max-width: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 22px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.logo { flex: none; width: 28px; height: 28px; border-radius: 7px; }
.nav nav { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.nav nav a { text-decoration: none; color: var(--night-ink2); }
.nav nav a:hover { color: var(--white); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 30px; border-radius: 99px; background: var(--ink); color: var(--white); font: 600 17px/1 var(--text); text-decoration: none; transition: transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn--light { background: var(--white); color: var(--ink); }
.play img { height: 56px; width: auto; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 32px; }
.cta-row--center { justify-content: center; flex-direction: column; }
.cta-note { font-size: 15px; color: var(--ink2); }

/* ---------- Hero ---------- */
.hero { background: var(--black); color: var(--white); overflow: hidden; }
.hero-copy { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; padding: clamp(40px, 8vw, 96px) var(--gutter) 0; }
.hero h1 { font-size: clamp(52px, 10vw, 132px); line-height: .9; letter-spacing: -0.04em; }
.lede { margin-top: 28px; max-width: 34ch; font-size: clamp(18px, 1.9vw, 21px); color: var(--night-ink2); }
.hero .cta-note { color: var(--night-ink2); }
.hero-stage { position: relative; z-index: 1; max-width: 1400px; margin: clamp(-160px, -10vw, -20px) auto 0; }
.hero-cast { width: 100%; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }

/* The signature: a chat message that corrects itself, styled like the app's
   result (grey strikethrough, bold fix, no red or green). */
.bubble { position: absolute; right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); top: 26%; max-width: 360px; padding: 16px 20px; border-radius: 22px 22px 6px 22px; background: var(--white); color: var(--ink); font-size: 18px; line-height: 1.45; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.bubble s { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 58% / 0 2px no-repeat; animation: strike .35s ease-out forwards; animation-delay: 1.1s; }
.bubble s + b { display: inline-block; max-width: 0; overflow: hidden; vertical-align: bottom; white-space: nowrap; font-weight: 700; animation: fix .5s ease-out forwards; animation-delay: 1.5s; }
.bubble s:nth-of-type(2) { animation-delay: 1.9s; }
.bubble s:nth-of-type(2) + b { animation-delay: 2.3s; }
@keyframes strike { to { background-size: 100% 2px; color: var(--ink3); margin-right: .25em; } }
@keyframes fix { to { max-width: 6em; } }

/* ---------- Sections ---------- */
section h2 { font-size: clamp(36px, 5.4vw, 68px); line-height: .98; letter-spacing: -0.035em; max-width: 16ch; }
.sub { margin-top: 18px; max-width: 52ch; font-size: clamp(17px, 1.6vw, 19px); color: var(--ink2); }
.steps, .cast, .pricing, .faq { padding: clamp(72px, 10vw, 140px) 0; }
.pricing + .faq { padding-top: 0; }

.phone { margin: 0; border: 7px solid var(--ink); border-radius: 34px; overflow: hidden; background: var(--ink); aspect-ratio: 600 / 1300; box-shadow: 0 30px 60px -30px rgba(11, 11, 13, .35); }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone--dark { border-color: #2a2a31; box-shadow: none; }

.step-list { list-style: none; padding: 0; margin: clamp(48px, 6vw, 80px) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.step-list .phone { max-width: 300px; }
.step-list h3 { display: flex; align-items: center; gap: 12px; margin-top: 32px; font-size: 28px; letter-spacing: -0.02em; }
.step-list p { margin-top: 10px; max-width: 32ch; color: var(--ink2); }
.n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--white); font: 700 17px/1 var(--display); }

.learn { background: var(--black); color: var(--white); padding: clamp(72px, 10vw, 140px) 0; }
.learn .sub { color: var(--night-ink2); }
.learn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: clamp(48px, 6vw, 80px); }
.learn-grid figure { margin: 0; }
.learn-grid .phone { max-width: 300px; }
.learn figcaption { margin-top: 24px; max-width: 30ch; color: var(--night-ink2); }
.learn figcaption b { color: var(--white); font-weight: 600; }

.cast-grid { list-style: none; padding: 0; margin: clamp(40px, 5vw, 64px) 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cast-grid li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 8px 16px; border-radius: 24px; background: var(--mist); font: 700 17px/1.2 var(--display); white-space: nowrap; }
.cast-grid img { width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: contain; }
.cast-grid li { justify-content: space-between; }

.privacy { background: var(--mist); padding: clamp(72px, 10vw, 140px) 0; }
.privacy-in { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { padding: 22px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font: 700 22px/1.2 var(--display); letter-spacing: -0.01em; }
.facts dd { margin: 6px 0 0; color: var(--ink2); }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(40px, 5vw, 64px); }
.plan { padding: clamp(28px, 3.5vw, 44px); border-radius: 30px; border: 1px solid var(--line); }
.plan h3 { font-size: 30px; letter-spacing: -0.02em; }
.price { margin-top: 18px; font-size: 17px; color: var(--ink2); }
.price span { font: 800 clamp(44px, 5vw, 60px)/1 var(--display); letter-spacing: -0.03em; color: var(--ink); margin-right: 6px; }
.price-alt { margin-top: 8px; font-size: 15px; color: var(--ink2); }
.plan ul { list-style: none; padding: 0; margin: 28px 0 0; }
.plan li { padding: 12px 0 12px 30px; border-top: 1px solid var(--line); position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 12px; height: 7px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.plan--pro { background: var(--black); color: var(--white); border-color: var(--black); }
.plan--pro .price, .plan--pro .price-alt { color: var(--night-ink2); }
.plan--pro .price span { color: var(--white); }
.plan--pro li { border-color: var(--night-line); }
.pricing .cta-row { margin-top: 48px; }
.fine { margin-top: 20px; text-align: center; font-size: 14px; color: var(--ink2); }

.faq-in { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(32px, 6vw, 96px); }
.qs details { border-top: 1px solid var(--line); }
.qs details:last-child { border-bottom: 1px solid var(--line); }
.qs summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font: 700 21px/1.25 var(--display); letter-spacing: -0.01em; }
.qs summary::-webkit-details-marker { display: none; }
.qs summary::after { content: "+"; font: 400 28px/0.9 var(--text); color: var(--ink2); transition: transform .2s ease; }
.qs details[open] summary::after { transform: rotate(45deg); }
.qs details p { padding: 0 0 24px; max-width: 60ch; color: var(--ink2); }

.final { background: var(--black); color: var(--white); padding: clamp(64px, 9vw, 120px) 0; text-align: center; }
.final-in { display: flex; flex-direction: column; align-items: center; }
.final-star { width: clamp(140px, 16vw, 200px); animation: bob 3.2s ease-in-out infinite; }
.final h2 { margin: 20px auto 0; max-width: 14ch; }
.final .cta-row { margin-top: 36px; }
.final .cta-note { color: var(--night-ink2); }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 48px var(--gutter); display: grid; grid-template-columns: auto 1fr; gap: 20px 40px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 28px; font-size: 15px; }
.foot nav a { text-decoration: none; color: var(--ink2); }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-copy, .foot-legal { grid-column: 1 / -1; font-size: 14px; color: var(--ink3); }

/* ---------- Legal pages ---------- */
.legal { padding: clamp(48px, 7vw, 96px) var(--gutter); }
.prose { max-width: 70ch; margin: 0 auto; }
.prose h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: -0.035em; margin-bottom: 24px; }
.prose h2 { font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; margin: 48px 0 12px; max-width: none; }
.prose h3 { font: 600 19px/1.3 var(--text); margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose a { text-underline-offset: 3px; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 18px; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .nav nav { display: none; }
  .hero-stage { margin-top: 36px; display: flex; flex-direction: column; }
  .hero-cast { width: 150%; max-width: none; margin: -22% 0 0 -25%; }
  .bubble { position: relative; right: auto; top: auto; align-self: flex-end; order: -1; margin: 0 var(--gutter); z-index: 1; font-size: 16px; max-width: 300px; }
  .step-list, .learn-grid { grid-template-columns: 1fr; gap: 64px; }
  .step-list .phone, .learn-grid .phone { max-width: 260px; }
  .cast-grid { grid-template-columns: repeat(3, 1fr); }
  .privacy-in, .faq-in, .plans { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; }
  .foot nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; }
  .final-star { animation: none; }
}
