/* DoubleQ home page.
   Structure in the spirit of Ask Ozi: a dark, centred opening; a light sheet that rises over it;
   proof first, then the value, trust and a single closing call. Brand colours from css/style.css.
   The only scroll-driven part is the demo phone (js/motion.js sets --p and .on). */

:root { --eyebrow: #8A6200; --sec-pad: 104px; }
.dark { --eyebrow: var(--accent); }

/* ---------- Shared pieces ---------- */
.eyebrow { font: 700 14px var(--f-ui); color: var(--eyebrow); margin-bottom: 14px; }
.eyebrow:lang(en) { font: 600 14px var(--f-brand); letter-spacing: .06em; }
.sec-head { max-width: 740px; margin-bottom: 56px; }
.sec-head.centered { margin-inline: auto; text-align: center; }
.sec-head h2 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; }
.sec-head > p:not(.eyebrow) { font-size: 18px; color: var(--muted); margin-top: 16px; }
.sec-head.centered > p:not(.eyebrow) { margin-inline: auto; max-width: 58ch; }
.ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; background: #FFF4D2; color: #6E4D00; flex-shrink: 0; }
.chips-row { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips-row li { font-size: 14px; font-weight: 600; padding: 7px 13px; border-radius: 999px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Opening ---------- */
.opening {
  display: grid; align-items: center; min-height: min(100svh, 880px);
  padding: calc(var(--nav-h) + 72px) 0 128px; text-align: center;
  background: radial-gradient(860px 480px at 50% 6%, rgba(255, 201, 60, .13), transparent 66%), linear-gradient(#0B0D13, var(--bg) 52%, #0B0D13);
}
.opening .eyes { font-size: 72px; justify-content: center; margin: 0 auto 30px; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .35)); }
.opening h1 { font-size: clamp(44px, 6vw, 78px); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; }
.opening .lead { margin: 24px auto 36px; max-width: 46ch; font-size: 19px; color: var(--muted); }
.opening .ctas { justify-content: center; }

/* ---------- The sheet rising over the opening ---------- */
.sheet {
  position: relative; z-index: 2; margin-top: -36px; padding: 32px 24px 0; text-align: center;
  background: var(--bg); border-radius: 32px 32px 0 0; box-shadow: 0 -26px 50px -30px rgba(0, 0, 0, .6);
}
.sheet-line { font-size: 14px; font-weight: 600; color: var(--muted); }

/* ---------- Demo ---------- */
.demo { padding: 64px 0 24px; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 72px; align-items: center; }
.demo-copy h2 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; }
.demo-lead { font-size: 18px; color: var(--muted); margin-top: 16px; max-width: 44ch; }
.demo-list { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 6px; }
.demo-list li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; font-weight: 700; font-size: 16.5px; transition: background-color .35s, opacity .35s; }
.demo-list .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font: 800 13px var(--f-brand); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .35s, box-shadow .35s; }
.demo-device { display: flex; justify-content: center; }
/* The phone keeps its width (so its text stays readable) and gives up height on short screens;
   the chat keeps its latest messages in view, like a real conversation */
.demo .phone { width: 310px; height: min(560px, max(400px, calc(100svh - var(--nav-h) - 96px))); }
.demo .pchat { overflow: hidden; }
.demo-intro { display: none; }

/* Scroll-driven: the list follows the conversation on the phone */
.motion .demo .stage { display: grid; align-content: center; padding-top: var(--nav-h); }
.motion .demo-list li { opacity: .45; }
.motion .demo-list li.on { opacity: 1; background: var(--bg-2); }
.motion .demo-list li.on .n { background: var(--accent); box-shadow: none; }
/* One conversation leaves before the next arrives, so the two never overlap */
.motion .demo .scene { transition: opacity .2s ease-out, transform .25s ease-out, visibility 0s .2s; }
.motion .demo .scene.on { transition: opacity .4s var(--ease) .22s, transform .5s var(--ease) .22s, visibility 0s .22s; }
.motion .demo .pchat [data-at]:not(.on) { opacity: 0; transform: translateY(14px) scale(.97); }
.motion .demo .pchat .typing.on { display: flex; }
.motion .demo .pchat .m.b:not(.on), .motion .demo .pchat .acts:not(.on) { display: none; }
.motion .demo .pchat .src:not(.on) { opacity: 0; }

/* ---------- Try it ---------- */
.try { padding: 16px 0 var(--sec-pad); }
.try-card { display: flex; align-items: center; gap: 32px; max-width: 760px; margin: 0 auto; padding: 28px 32px; border-radius: 28px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.try .bigqr { width: 132px; padding: 12px; gap: 5%; border-radius: 20px; box-shadow: 0 0 0 1px var(--line); }
.try-copy h3 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.try-copy p:not(.eyebrow) { color: var(--muted); }
.try-copy .eyebrow { margin-bottom: 6px; }
.try-copy .placeholder-tag { margin: 12px 0 0; }

/* ---------- Problem ---------- */
.problem { padding: var(--sec-pad) 0; background: var(--bg-2); }
/* Today vs. with ScanItTalk: the same journey, broken in one panel and closed into a loop in the other */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 72px; }
.cmp { display: flex; flex-direction: column; padding: 28px; border-radius: 28px; background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.cmp.with { background: radial-gradient(520px 320px at 20% 0%, rgba(255, 201, 60, .14), transparent 70%), var(--bg); box-shadow: none; }
.cmp-label { align-self: flex-start; font-size: 13.5px; font-weight: 700; padding: 5px 13px; border-radius: 999px; margin-bottom: 22px; background: var(--bg-2); color: var(--muted); }
.cmp.with .cmp-label { background: var(--accent); color: var(--accent-ink); }
.cmp-flow { list-style: none; margin: 0; padding: 0; }
.cmp .node { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cmp.today .node { background: var(--bg-2); box-shadow: none; }
.cmp .node .ic { width: 40px; height: 40px; font-size: 19px; }
.cmp.with .node .ic { background: rgba(255, 201, 60, .14); color: var(--accent); }
.cmp .node b { display: block; font-size: 16.5px; line-height: 1.3; }
.cmp .node div > span { font-size: 13.5px; color: var(--muted); }
/* the line between two stops runs under the icons */
.cmp .edge { position: relative; height: 44px; }
.cmp .edge i { position: absolute; top: 0; bottom: 0; inset-inline-start: 35px; width: 2px; background: var(--text); opacity: .8; }
.cmp .edge.broken, .cmp .edge.live { height: 58px; }
.cmp .edge.broken i { background: repeating-linear-gradient(180deg, var(--muted) 0 6px, transparent 6px 12px); opacity: 1; }
.cmp .edge.live i { width: 3px; background: var(--accent); opacity: 1; }
.cmp .edge em { position: absolute; top: 50%; inset-inline-start: 56px; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 7px; font-style: normal; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.cmp .edge.broken em { color: #A3392F; }
.cmp .edge.live em { color: var(--accent); }
.cmp .edge.live em svg { font-size: 16px; }
/* what comes back: a bracket from the home up to you, with an arrow into "you" */
.cmp-body { position: relative; padding-inline-end: 150px; }
.return { position: absolute; top: 34px; bottom: 34px; inset-inline-end: 0; width: 150px; }
.return::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 34px; border: 2px solid var(--accent); border-inline-start: 0; border-start-end-radius: 16px; border-end-end-radius: 16px; }
.return-head { position: absolute; top: -9px; inset-inline-start: -5px; width: 18px; height: 18px; color: var(--accent); stroke-width: 3; }
html[dir="rtl"] .return-head { transform: scaleX(-1); }
.return p { position: absolute; top: 50%; inset-inline: 46px 0; transform: translateY(-50%); font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.return p b { display: block; font-size: 14.5px; color: var(--accent); }
.cmp-note { margin-top: auto; padding-top: 22px; font-size: 15.5px; color: var(--muted); }.problem .stat .num { font-size: clamp(48px, 5vw, 76px); }

/* ---------- Four engines ---------- */
.engines { padding: var(--sec-pad) 0; }
.engine { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); }
.engine:nth-of-type(even) .engine-visual { order: -1; }
.engine .tag { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; color: var(--muted); margin-bottom: 14px; }
.engine .tag span { font: 800 12px/1 var(--f-brand); padding: 5px 9px; border-radius: 999px; background: var(--accent-ink); color: var(--accent); }
.engine h3 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 14px; }
.engine-copy > p { color: var(--muted); font-size: 17.5px; max-width: 46ch; }
.engine .check-list { margin-top: 22px; }
.engine-visual { display: grid; place-items: center; min-height: 320px; padding: 36px; border-radius: 28px; background: radial-gradient(70% 70% at 50% 40%, var(--glow), transparent 72%), var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.engine-visual .src { display: inline-flex; }

/* Engine 1: a short conversation */
.mini-phone { width: min(100%, 360px); display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 22px; background: #fff; color: var(--ink-ui); font-size: 14.5px; line-height: 1.5; box-shadow: 0 26px 46px -30px rgba(17, 20, 28, .45); }
.mini-phone .m { max-width: 90%; }

/* Engine 2: scan → ask → get → return */
.flow { list-style: none; margin: 0; padding: 0; width: min(100%, 380px); display: grid; gap: 12px; position: relative; }
.flow::before { content: ''; position: absolute; top: 24px; bottom: 24px; inset-inline-start: 31px; width: 2px; background: var(--line); }
.flow li { position: relative; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; background: #fff; color: var(--ink-ui); box-shadow: 0 0 0 1px var(--line); }
.flow .n { grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--f-brand); background: var(--bg-2); }
.flow li:last-child .n { background: var(--accent); }
.flow b { font-size: 15.5px; }
.flow li > span:last-child { font-size: 13.5px; color: var(--muted); }

/* Engine 3: what the customer sees → what reaches you */
.escalate { width: min(100%, 380px); display: grid; gap: 12px; }
.esc-card { padding: 18px; border-radius: 18px; background: #FFF8E3; color: var(--ink-ui); box-shadow: 0 0 0 1px #F2DFA6; }
.esc-card b { font-size: 15.5px; }
.esc-card p { font-size: 14px; color: #5B6170; margin: 2px 0 12px; }
.esc-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.esc-btns span { font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px #E8D9AE; }
.esc-btns .primary { background: var(--ink-ui); color: #fff; box-shadow: none; }
.ticket { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: #fff; color: var(--ink-ui); box-shadow: 0 0 0 1px var(--line), 0 20px 36px -28px rgba(17, 20, 28, .4); }
.ticket .ok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 14px; background: #E2F4EA; color: #1D6E46; }
.ticket b { display: block; font-size: 15px; }
.ticket div > span { font-size: 13.5px; color: #5B6170; }
.esc-cap { text-align: center; font-size: 13px; color: var(--muted); }

/* Engine 4: the knowledge board */
.board { --board-label: 112px; width: min(100%, 400px); padding: 22px; border-radius: 22px; background: #fff; color: var(--ink-ui); box-shadow: 0 26px 46px -30px rgba(17, 20, 28, .45); }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.board-head b { font-size: 15.5px; }
.board-head span { font-size: 12px; color: #626674; white-space: nowrap; }
.board-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.board-filters span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); }
.board-row { display: grid; grid-template-columns: var(--board-label) 1fr; gap: 12px; align-items: center; padding: 7px 0; font-size: 13.5px; }
.board-row i { height: 8px; width: var(--w); border-radius: 8px; background: #DDE0E7; }
.board-row.hot i { background: var(--accent); }
.board-gap { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #FFF8E3; box-shadow: 0 0 0 1px #F2DFA6; font-size: 13.5px; }
.board-gap b { display: block; font-size: 13px; color: #6E4D00; }

/* ---------- Why now + trust ---------- */
.now { padding: var(--sec-pad) 0; background: var(--bg-2); }
.now-grid, .trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.now-card, .trust-card { padding: 28px; border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.now-card .ic, .trust-card .ic { margin-bottom: 18px; }
.now-card h3, .trust-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.now-card p, .trust-card p { color: var(--muted); font-size: 16px; }
.trust { padding: var(--sec-pad) 0; }

/* ---------- Solutions (shared switcher, quieter frame) ---------- */
.solutions { padding: var(--sec-pad) 0; }

/* ---------- Getting started ---------- */
.start { padding: var(--sec-pad) 0; }
.start-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.start-steps li { padding: 28px; border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.start-steps .n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; font: 800 16px var(--f-brand); background: var(--accent); color: var(--accent-ink); }
.start-steps h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.start-steps p { color: var(--muted); font-size: 16px; }

/* ---------- Pilot: the closing dark box ---------- */
.pilot-wrap { padding: 0 0 var(--sec-pad); }
.pilot-box { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 64px; border-radius: 32px; color: var(--text); background: radial-gradient(700px 420px at 85% 0%, rgba(255, 201, 60, .14), transparent 65%), var(--bg); }
.pilot-box .eyes { font-size: 56px; margin-bottom: 24px; }
.pilot-box h2 { font-size: clamp(34px, 4vw, 54px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 18px; }
.pilot-box .pilot-copy > p { font-size: 18px; color: var(--muted); max-width: 42ch; margin-bottom: 22px; }
.pilot-box .pilot-points li::before { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311141C' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/13px no-repeat; }

/* ---------- Latin scripts (English, Spanish) ---------- */
/* Section labels in small spaced capitals, as is usual in English and Spanish; the product name keeps its own spelling */
html[dir="ltr"] .eyebrow { font: 600 12.5px var(--f-brand); letter-spacing: .12em; text-transform: uppercase; }
html[dir="ltr"] .opening .eyebrow { font-size: 14px; letter-spacing: .06em; text-transform: none; }
html[dir="ltr"] .opening h1 { font-size: clamp(40px, 5.6vw, 72px); letter-spacing: -0.035em; }
html[dir="ltr"] .sec-head h2, html[dir="ltr"] .demo-copy h2, html[dir="ltr"] .engine h3 { letter-spacing: -0.025em; }
html[lang="en"] .board { --board-label: 150px; }
html[lang="es"] .board { --board-label: 196px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  :root { --sec-pad: 88px; }
  .demo-grid { grid-template-columns: 1fr; gap: 36px; justify-items: center; text-align: center; }
  .demo-lead { margin-inline: auto; }
  .demo-list { justify-items: center; }
  .demo .phone { width: min(300px, 84vw); height: 540px; text-align: start; }
  /* Phones: the heading moves above the pinned stage; inside it, a one-line caption follows the phone */
  .motion .demo-intro { display: block; padding-top: 44px; text-align: center; }
  .motion .demo-intro h2 { font-size: clamp(28px, 6.4vw, 38px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
  .motion .demo .demo-copy > .eyebrow, .motion .demo .demo-copy > h2, .motion .demo-lead { display: none; }
  .motion .demo .stage { align-content: center; padding-top: calc(var(--nav-h) + 8px); }
  .motion .demo-grid { gap: 6px; }
  .motion .demo-copy { width: 100%; }
  .motion .demo-list { position: relative; height: 56px; width: 100%; margin-top: 0; }
  .motion .demo-list li { position: absolute; inset: 0; justify-content: center; align-items: center; line-height: 1.3; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .35s; }
  .motion .demo-list li.on { opacity: 1; transform: none; background: none; }
  .motion .demo .phone { height: min(560px, max(380px, calc(100svh - var(--nav-h) - 98px))); }
  .compare { grid-template-columns: 1fr; }
  .engine { grid-template-columns: 1fr; gap: 32px; padding: 44px 0; }
  .engine:nth-of-type(even) .engine-visual { order: 0; }
  .now-grid, .trust-grid { grid-template-columns: 1fr 1fr; }
  .start-steps { grid-template-columns: 1fr; }
  .pilot-box { grid-template-columns: 1fr; padding: 40px; }
}
@media (max-width: 640px) {
  :root { --sec-pad: 72px; }
  .opening { padding: calc(var(--nav-h) + 48px) 0 104px; }
  .opening .eyes { font-size: 56px; }
  .opening h1 { font-size: 42px; }
  .opening .lead { font-size: 17px; }
  .sheet { padding: 26px 18px 0; }
  .demo { padding-top: 40px; }
  .demo-copy h2 { font-size: 28px; }
  .try-card { flex-direction: column; text-align: center; padding: 26px 22px; }
  .try .bigqr { width: 120px; }
  .sec-head { margin-bottom: 40px; }
  .sec-head h2 { font-size: 30px; }
  .engine-visual { padding: 22px; min-height: 0; }
  .board { --board-label: 100px; }
  html[lang="en"] .board { --board-label: 132px; }
  html[lang="es"] .board { --board-label: 172px; }
  .cmp { padding: 22px 18px; }
  .cmp-body { padding-inline-end: 0; }
  .return { position: static; width: auto; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 201, 60, .1); }
  .return::before { display: none; }
  .return-head, html[dir="rtl"] .return-head { position: static; flex-shrink: 0; transform: rotate(90deg); }
  .return p { position: static; transform: none; }
  .now-grid, .trust-grid { grid-template-columns: 1fr; }
  .pilot-box { padding: 28px 20px; border-radius: 26px; }
}
