/* Landing in the design board's look (Leadem Screens › Main, Leadem Design System).
   Tokens mirror the board's project/leadem.css (light only: the site is light-only for now);
   components mirror ds/leadem/components/bundle.css. Only the landing loads this file.

   Kept from earlier passes, rebuilt for this markup:
   - motion: new chat bubbles grow in, typing dots, FAQ answers open, the lead check draws;
   - mobile: hover gated to mouse/trackpad, no tap flash, no tap delay, safe areas,
     svh for the first screen, scroll containment in the chat;
   - reduced motion stops everything except the typing dots' opacity (.keep-motion);
   - reduced transparency / more contrast make the glass nav solid. */

:root {
  --paper: #f7f3ec; --paper-raised: #ffffff; --paper-sunken: #efe9df; --line: #e3dccd; --line-strong: #cfc6b3;
  --ink: #1f1b16; --ink-soft: #4a443c; --ink-faint: #6f675c;
  --accent: #9c4f1d; --accent-hover: #86421a; --accent-mid: #c2682b; --accent-soft: #f3e3d3; --accent-ink: #3c2410; --on-accent: #ffffff;
  --deep: #221d15; --deep-raised: #2e2718; --deep-line: #3a3224; --on-deep: #f2ece1; --on-deep-soft: #b9ae9c;
  --focus: #9c4f1d; --focus-deep: #e3a473;
  --ok: #46704f; --ok-soft: #e2eae3; --bad: #a3402a; --bad-soft: #f5ddd6;
  --telegram: #2f8fcc; --whatsapp: #2c9f45; --instagram: #d1406b;
  --font-display: Lora, "Noto Serif", Georgia, serif;
  --font-body: Onest, "Noto Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius-xs: 4px; --radius-sm: 8px; --radius: 14px; --radius-lg: 22px; --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(31,27,22,.05), 0 8px 24px -12px rgba(31,27,22,.12);
  --shadow-pop: 0 2px 6px rgba(31,27,22,.08), 0 24px 48px -16px rgba(31,27,22,.22);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --nav-h: 68px;
}

/* ── Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/23px var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.on-deep :focus-visible { outline-color: var(--focus-deep); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
a, button, [role="button"], label, summary, select { touch-action: manipulation; }
button, .ld-btn, summary, .qr, .seg { -webkit-user-select: none; user-select: none; }

/* ── Layout helpers (board) ─────────────────────────── */
.lp-in { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) { .lp-in { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.lp-sec { padding-block: 72px; }
@media (max-width: 720px) { .lp-sec { padding-block: 56px; } }
.lp-head { display: flex; flex-direction: column; gap: 12px; }
.lp-h2 { font: 600 clamp(28px, 2vw + 18px, 36px)/1.17 var(--font-display); letter-spacing: -0.01em; max-width: 22ch; }
.lp-lead { color: var(--ink-soft); font-size: 17px; line-height: 26px; max-width: 58ch; }
.lp-stack { display: flex; flex-direction: column; gap: 32px; }
.sunken { background: var(--paper-sunken); }
.dots { background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.between { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sub { color: var(--ink-soft); font-size: 14px; line-height: 21px; }
.faint { color: var(--ink-faint); font-size: 13px; line-height: 18px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font: 500 14px/20px var(--font-body); color: var(--ink-faint); }
.tag { display: inline-block; width: fit-content; font: 600 12px/16px var(--font-body); padding: 3px 9px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-ink); }
.av { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font: 600 13px/1 var(--font-body); }
.wordmark { font: 600 22px/1 var(--font-display); letter-spacing: -.01em; text-decoration: none; color: inherit; }
.wordmark em { font-style: normal; color: var(--accent-mid); }

/* ── Components (Leadem DS) ─────────────────────────── */
.ld-btn { font: 600 14px/20px var(--font-body); border-radius: var(--radius); padding: 10px 18px; min-height: 44px; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.ld-btn:active:not(:disabled) { transform: scale(0.97); }
.ld-btn:disabled { opacity: .55; cursor: not-allowed; }
.ld-btn-primary { background: var(--accent); color: var(--on-accent); }
.ld-btn-secondary { background: var(--paper-raised); color: var(--ink); border-color: var(--line-strong); }
.ld-btn-lg { padding: 14px 24px; font-size: 16px; min-height: 52px; }
.ld-chip { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/18px var(--font-body); padding: 4px 10px 4px 8px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--paper-raised); color: var(--ink); white-space: nowrap; }
.ld-chip i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.ld-chip-telegram i { background: var(--telegram); } .ld-chip-whatsapp i { background: var(--whatsapp); } .ld-chip-instagram i { background: var(--instagram); }
.thread { display: flex; flex-direction: column; gap: 8px; background: var(--paper-sunken); padding: 16px; border-radius: var(--radius); }
.ld-bubble { font: 400 15px/21px var(--font-body); padding: 8px 12px; border-radius: var(--radius); max-width: 82%; width: fit-content; white-space: pre-wrap; overflow-wrap: anywhere; }
/* The visitor writes on the right in amber; the bot answers on the left (as in the board). */
.ld-bubble-client { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-top-right-radius: var(--radius-xs); }
.ld-bubble-bot { align-self: flex-start; background: var(--paper-raised); border: 1px solid var(--line); color: var(--ink); border-top-left-radius: var(--radius-xs); }
.input { width: 100%; font: 400 16px/22px var(--font-body); color: var(--ink); background: var(--paper-raised); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 11px 14px; min-height: 46px; transition: border-color 160ms ease; }
.input::placeholder { color: var(--ink-faint); }
.input:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.input:user-invalid { border-color: var(--bad); }
textarea.input { min-height: 84px; resize: vertical; }
.lb { display: block; font: 600 13px/16px var(--font-body); margin-bottom: 6px; color: var(--ink); }
.notice { padding: 12px 16px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ink); font-size: 14px; line-height: 20px; margin-top: 12px; }
.notice-bad { background: var(--bad-soft); color: var(--bad); }

/* ── Header: nav + hero on the deep field ───────────── */
.on-deep { background: var(--deep); color: var(--on-deep); }
.lp-nav { position: sticky; top: 0; z-index: 30; background: var(--deep); color: var(--on-deep); border-bottom: 1px solid transparent; }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .lp-nav { background: color-mix(in srgb, var(--deep) 86%, transparent); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%); border-bottom-color: rgba(242,236,225,.06); }
}
.lp-nav .lp-in { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; min-height: var(--nav-h); }
.lp-links { display: flex; flex-wrap: wrap; gap: 4px 20px; flex-grow: 1; }
.lp-links a, .lp-login { color: var(--on-deep); text-decoration: none; font-size: 14px; line-height: 20px; padding-block: 12px; }
.lp-end { display: flex; gap: 10px; align-items: center; }
.lang { display: flex; align-items: center; margin: 0; font-size: 13px; color: var(--on-deep-soft); }
.lang button { background: none; border: 0; padding: 12px 4px; color: var(--on-deep-soft); cursor: pointer; font: 500 13px/1 var(--font-body); }
.lang button + button::before { content: "·"; margin-right: 8px; color: var(--on-deep-soft); }
.lang button[aria-pressed="true"] { color: var(--on-deep); font-weight: 600; }
.lp-login { padding-inline: 6px; }
@media (max-width: 900px) { .lp-links { display: none; } .lp-end { margin-left: auto; } }
@media (max-width: 520px) { .lp-nav .lang, .lp-login { display: none; } }

/* The hero runs up under the glass nav, so the nav is deep-on-deep at the top of the page
   (otherwise the light page background shows through it). */
.hero { margin-top: calc(-1 * var(--nav-h)); padding-top: var(--nav-h); }
.hero-notices { padding-top: 16px; }
.hero .lp-in:not(.hero-notices) { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-block: 56px 72px; min-height: calc(100svh - var(--nav-h)); }
.hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero .eyebrow { color: var(--on-deep-soft); }
.hero h1 { font: 600 clamp(34px, 3.4vw + 14px, 52px)/1.08 var(--font-display); letter-spacing: -0.01em; max-width: 18ch; }
.hero-lead { font-size: 18px; line-height: 27px; color: var(--on-deep-soft); max-width: 50ch; }
.hero-terms { font-size: 14px; line-height: 20px; color: var(--on-deep-soft); }
@media (max-width: 720px) { .hero .lp-in:not(.hero-notices) { padding-block: 32px 48px; gap: 32px; min-height: 0; } .hero-lead { font-size: 17px; line-height: 26px; } }

/* The live demo, in the board's chat card */
.demo { flex: 1 1 360px; max-width: 440px; min-width: 0; background: var(--paper); color: var(--ink); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; }
@media (max-width: 860px) { .demo { max-width: none; } }
.demo-head { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--paper-raised); }
.demo-head .av { background: var(--accent); color: var(--on-accent); font-family: var(--font-display); }
.demo-name { font-weight: 600; }
.demo-status { color: var(--ok); font-size: 13px; line-height: 18px; }
.demo-status span { color: var(--ink-faint); }
.demo .thread { border-radius: 0; height: clamp(280px, 42svh, 380px); overflow-y: auto; overscroll-behavior: contain; }
.demo-foot { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; background: var(--paper-raised); border-top: 1px solid var(--line); }
.qrs { display: flex; flex-wrap: wrap; gap: 8px; }
.qr { font: 500 13px/18px var(--font-body); padding: 7px 12px; min-height: 36px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--paper-raised); color: var(--ink); cursor: pointer; transition: border-color 160ms ease, transform 160ms var(--ease-out); }
.qr:active { transform: scale(0.97); }
.demo form { display: flex; gap: 8px; }
.demo form .input { flex: 1; min-width: 0; }

/* ── Clients strip (board) ──────────────────────────── */
.clients { padding-block: 32px; border-bottom: 1px solid var(--line); }
.clients .sub { text-align: center; }
.logos { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.logo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 72px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper-raised); text-align: center; }
.logo b { font: 600 16px/20px var(--font-display); color: var(--ink); overflow-wrap: anywhere; }
.logo span { font-size: 12px; line-height: 16px; color: var(--ink-faint); }

/* ── Promises, pains, fit ───────────────────────────── */
.promise { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius); background: var(--paper-raised); border: 1px solid var(--line); }
.promise h3, .pain h3 { font: 600 17px/24px var(--font-body); }
.pain h3 { quotes: none; }

/* ── Cases (board) ──────────────────────────────────── */
.case { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--radius); background: var(--paper-raised); border: 1px solid var(--line); min-width: 0; }
.case-big { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 24px 40px; align-items: center; background: var(--accent-soft); border-color: transparent; }
.case-big > div { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.case-big .sub, .case-big b { color: var(--accent-ink); }
.case-fig { font: 500 40px/44px var(--font-mono); color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.case blockquote { margin: 0; flex: 1; }
.case blockquote p { font-size: 15px; line-height: 23px; color: var(--ink); }
.case blockquote p::before { content: open-quote; } .case blockquote p::after { content: close-quote; }
.case-who { display: flex; gap: 10px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); margin-top: auto; }
.case-big .case-who { border-top-color: rgba(156,79,29,.25); }
.case-big .av { background: var(--paper-raised); }
.case-who > div { flex: 1; min-width: 0; }
.case-who b { font-size: 14px; display: block; }

/* ── Languages ──────────────────────────────────────── */
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split > * { flex: 1 1 380px; min-width: 0; }
.lang-demo { background: var(--paper); }

/* ── Steps ──────────────────────────────────────────── */
.step { display: flex; flex-direction: column; gap: 8px; }
.step-n { font: 500 28px/32px var(--font-mono); color: var(--accent-mid); }
.step h3 { font: 600 15px/22px var(--font-body); }

/* ── Pricing (board) ────────────────────────────────── */
.pricing { border-top: 1px solid var(--line); }
.seg { display: inline-flex; background: var(--paper-sunken); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.seg button { padding: 8px 14px; min-height: 40px; border: 0; border-radius: var(--radius-pill); background: none; font: 600 13px/18px var(--font-body); color: var(--ink-soft); cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.seg button.on { background: var(--paper-raised); color: var(--ink); box-shadow: var(--shadow-card); }
.seg button:active { transform: scale(0.97); }
.price { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--radius); background: var(--paper-raised); border: 1px solid var(--line); }
.price-best { border: 2px solid var(--accent); padding: 27px; box-shadow: var(--shadow-pop); }
.price-name { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 600 18px/24px var(--font-body); }
.price-amt { font: 500 32px/38px var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; flex: 1; }
.price li { display: flex; gap: 8px; }
.price li::before { content: "✓"; color: var(--ok); font-weight: 600; }

/* ── FAQ (board details) ────────────────────────────── */
.faq-in { max-width: 820px; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.details { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; background: var(--paper); }
.details summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; font: 600 15px/22px var(--font-body); cursor: pointer; color: var(--ink); }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: "+"; flex: none; font: 400 22px/1 var(--font-body); color: var(--accent); transition: transform 220ms var(--ease-out); }
.details[open] summary::after { transform: rotate(45deg); }
.details p { color: var(--ink-soft); font-size: 14px; line-height: 21px; padding-bottom: 16px; max-width: 64ch; }

/* ── Closing: deep, with the lead form card ─────────── */
.close .lp-in { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.close-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.close h2 { color: var(--on-deep); }
.close .lp-lead { color: var(--on-deep-soft); }
.lead-card { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; background: var(--paper); color: var(--ink); padding: 24px; border-radius: var(--radius-lg); }
.lead-card h3 { font: 600 20px/26px var(--font-display); }
#lead-form { display: flex; flex-direction: column; gap: 14px; }
.phone { display: flex; gap: 8px; }
.phone span { display: grid; place-items: center; padding-inline: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper-sunken); font: 500 15px/1 var(--font-mono); }
.consent { font-size: 12px; line-height: 17px; color: var(--ink-faint); }
.lead-ok { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 17px; }
.lead-ok + p { color: var(--ink-soft); margin-top: 4px; }
.lead-check { flex: none; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Footer ─────────────────────────────────────────── */
.site-foot { background: var(--deep); color: var(--on-deep-soft); border-top: 1px solid var(--deep-raised); font-size: 13px; line-height: 18px; }
.site-foot .lp-in { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; padding-top: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); }
.site-foot a { color: var(--on-deep-soft); }
.foot-grow { flex-grow: 1; }
.site-foot .lang { color: var(--on-deep-soft); }

/* ── Hover: mouse and trackpad only (a tapped control must not stay "hovered") ── */
@media (hover: hover) and (pointer: fine) {
  .ld-btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
  .ld-btn-secondary:hover:not(:disabled) { border-color: var(--ink-faint); }
  .lp-links a:hover, .lp-login:hover, .lang button:hover { color: var(--on-deep); }
  .qr:hover { border-color: var(--accent); }
  .seg button:hover:not(.on) { color: var(--ink); }
  .details summary:hover { color: var(--accent); }
  .input:hover:not(:disabled):not(:focus-visible) { border-color: var(--ink-faint); }
  a:hover { color: var(--accent-hover); }
  .site-foot a:hover { color: var(--on-deep); }
}

/* ── Motion ─────────────────────────────────────────── */
/* New chat bubbles grow from their tail corner; the greeting rendered with the page does not move. */
.demo .ld-bubble.is-new { transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
.demo .ld-bubble-bot.is-new { transform-origin: top left; }
.demo .ld-bubble-client.is-new { transform-origin: top right; }
@starting-style { .demo .ld-bubble.is-new { opacity: 0; transform: translateY(6px) scale(0.97); } }
/* Typing dots while the bot thinks: the wait is seconds long, a static «…» looks frozen. */
.ld-typing { display: inline-flex; gap: 5px; align-items: center; min-height: 39px; }
.ld-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); animation: ld-dot 1.2s ease-in-out infinite; }
.ld-typing i:nth-of-type(2) { animation-delay: 150ms; }
.ld-typing i:nth-of-type(3) { animation-delay: 300ms; }
@keyframes ld-dot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
@keyframes ld-dot-still { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
/* FAQ answers open with the «+» (browsers without ::details-content keep the snap). */
.faq { interpolate-size: allow-keywords; }
.details::details-content { block-size: 0; overflow: clip; transition: block-size 220ms var(--ease-out), content-visibility 220ms allow-discrete; }
.details[open]::details-content { block-size: auto; }
/* Lead form: the success note settles in and its check draws. */
#lead-success:not([hidden]) { transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out); }
@starting-style { #lead-success:not([hidden]) { opacity: 0; transform: translateY(4px); } }
.lead-check path { stroke-dasharray: 16; stroke-dashoffset: 0; transition: stroke-dashoffset 400ms var(--ease-out) 100ms; }
@starting-style { #lead-success:not([hidden]) .lead-check path { stroke-dashoffset: 16; } }

@media (prefers-reduced-motion: reduce) {
  *:not(.keep-motion), *:not(.keep-motion)::before, *:not(.keep-motion)::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .ld-typing i.keep-motion { animation-name: ld-dot-still !important; animation-duration: 1.6s !important; }
}
@media (prefers-reduced-transparency: reduce) { .lp-nav { background: var(--deep); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-contrast: more) {
  .lp-nav { background: var(--deep); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--on-deep-soft); }
  .lang button, .hero-terms, .hero-lead { color: var(--on-deep); }
}
