/* ==========================================================================
   Home page
   The page reads like a conversation with a client: every section heading is
   a question a business owner would ask, and the section answers it.
   The one bold piece is the live demo bot. Everything around it stays calm.
   Shared tokens (colours, buttons, nav, hero) live in style.css.
   ========================================================================== */

:root {
  --ok: #1C6B49;                       /* "online / done" green, used only for success states (5:1 on cream) */
  --ok-soft: rgba(28, 107, 73, .12);
  --shadow-deep: 0 50px 90px -50px rgba(10, 26, 49, .55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ok: #5CC795; --ok-soft: rgba(92, 199, 149, .14); --shadow-deep: 0 50px 90px -40px rgba(0, 0, 0, .7); }
}
:root[data-theme="dark"] { --ok: #5CC795; --ok-soft: rgba(92, 199, 149, .14); --shadow-deep: 0 50px 90px -40px rgba(0, 0, 0, .7); }

html { scroll-padding-top: 16px; }
@media (min-width: 760px) { html { scroll-padding-top: 88px; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Icons from the sprite at the top of the page */
svg:has(> use) {
  width: 1.2em; height: 1.2em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* Keyboard focus, everywhere */
.home :is(a, button, input, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}

.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--btn-bg); color: var(--btn-text); font-weight: 700; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 24px; } }

/* ============ Header: sticks on tablets and desktops ============ */
.site-head { position: relative; z-index: 40; }
.nav-links a.is-active { opacity: 1; }
.nav-links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  border-radius: 2px; background: var(--accent);
}
/* Phones: a compact two-row header (logo and actions, then the menu), so the cover gets the screen */
@media (max-width: 759px) {
  .site-head .nav { padding: 12px 16px 6px; row-gap: 4px; }
  .site-head .nav-links { padding-top: 0; }
  .site-head .nav-links a { padding: 8px 0; }
}
/* Tablets: a little less space between menu items so everything stays on one row */
@media (min-width: 760px) and (max-width: 979px) {
  .site-head .nav-links { gap: 18px; }
  .site-head .nav-links a { font-size: .9rem; }
}
@media (min-width: 760px) {
  .site-head {
    position: sticky; top: 0;
    transition: background-color .3s, box-shadow .3s;
  }
  .site-head .nav { transition: padding .3s var(--ease-out); }
  .site-head.is-stuck {
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
            backdrop-filter: blur(14px) saturate(1.3);
    box-shadow: 0 1px 0 var(--hairline);
  }
  .site-head.is-stuck .nav { padding-top: 12px; padding-bottom: 12px; }
}

/* ============ Hero: the "magazine cover" ============
   Fits the first screen exactly: hero height = screen height minus the header.
   Every vertical size is tied to the screen height (vh), so at 90–110% browser zoom
   (or on a short laptop) the name shrinks a little instead of text being cut off at the fold.

   Type scale (one ratio, about 1 : 1/3):
     name  N   ............ the only loud thing
     cover line  ~0.34 N .. "Knows Something", italic, tight under the name
     sentence  1.0–1.2rem . body size, two lines on desktop
     facts row  .82rem .... small print along the bottom, like a magazine cover */
/* --nav-h is the header's height; JS measures the real value, these are close first guesses.
   The name gets whatever height is left once the header and the rest of the cover are placed:
   about 320px of other content on desktop, about 395px on phones (stacked buttons, 3-line sentence). */
:root { --nav-h: 90px; }
@media (max-width: 759px) { :root { --nav-h: 102px; } }

.home .hero {
  --hero-h: calc(100vh - var(--nav-h));
  --name: clamp(3.25rem, min(21vw, (100vh - var(--nav-h) - 320px) / 1.3), 11.5rem);
  display: grid; grid-template-rows: 1fr auto;
  min-height: var(--hero-h);
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  text-align: center;
}
@supports (height: 100svh) {
  .home .hero {
    --hero-h: calc(100svh - var(--nav-h));
    --name: clamp(3.25rem, min(21vw, (100svh - var(--nav-h) - 320px) / 1.3), 11.5rem);
  }
}
@media (max-width: 759px) {
  .home .hero { padding: 0 16px; --name: clamp(3rem, min(25vw, (100vh - var(--nav-h) - 395px) / 1.31), 7rem); }
  @supports (height: 100svh) { .home .hero { --name: clamp(3rem, min(25vw, (100svh - var(--nav-h) - 395px) / 1.31), 7rem); } }
}

.hero-main {
  align-self: center;
  display: flex; flex-direction: column; align-items: center;
  padding-block: clamp(10px, 3vh, 36px);
}

.badge { margin: 0 0 clamp(12px, 2.6vh, 30px); padding: 6px 13px; font-size: .82rem; }

.hero-title { margin: 0; font-weight: inherit; line-height: 1; display: flex; flex-direction: column; align-items: center; }

/* AMAN: Bodoni Moda caps. A touch of tracking at display size, cancelled after the last letter
   so the word is optically centred. A mid optical size keeps the hairlines fine but visible. */
.name {
  display: block;
  font-family: 'Bodoni Moda', 'Didot', 'Bodoni 72', serif; font-weight: 600;
  font-size: var(--name); line-height: .9;
  letter-spacing: .02em; margin-right: -.02em;
  font-optical-sizing: none; font-variation-settings: "opsz" 24;
  font-kerning: normal; text-rendering: optimizeLegibility;
  cursor: default; user-select: none;
}
.name .ch { display: inline-block; }

/* "Knows ___" — the word slot is exactly as wide as the final word ("Something"), so the finished
   line is perfectly centred and "Knows" never moves, sideways or up and down, while the word changes. */
.knows-line {
  display: flex; justify-content: center; align-items: baseline; gap: .26em;
  margin-top: clamp(0px, .5vh, 6px);
  font-family: 'Bodoni Moda', 'Didot', serif; font-style: italic; font-weight: 500;
  font-size: calc(var(--name) * .34); line-height: 1.2;
  font-optical-sizing: none; font-variation-settings: "opsz" 18;
  white-space: nowrap;
}
.slot { position: relative; display: inline-block; text-align: left; }
.ghost { visibility: hidden; }
/* The animated word sits on top of the ghost. Same font and line height as the ghost, so its baseline
   is the ghost's baseline. Each letter has line-height 0, so a font with taller or deeper letters
   can never push the line up or down. */
.layer { position: absolute; left: 0; top: 0; white-space: nowrap; }
.layer .grp { display: inline-block; position: relative; }
.layer .l { line-height: 0; display: inline; }
.layer .pen {
  position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible;
  color: var(--accent);
}

.hero-sub {
  max-width: 34em; margin: clamp(8px, 1.8vh, 20px) auto 0;
  font-size: clamp(1rem, .55rem + .85vw, 1.2rem); line-height: 1.55;
  color: var(--muted); text-wrap: balance;
}
.hero-sub strong { color: var(--text); font-weight: 700; }
.js-hero .hero-sub { opacity: 0; transform: translateY(8px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js-hero .hero-sub.show { opacity: 1; transform: none; }
/* Hidden until the animation starts, so the name never flashes in a fallback font.
   Safety net: if the script never runs, everything appears anyway after 5 seconds. */
.js-hero .name, .js-hero .knows-line { opacity: 0; }
.js-hero .name, .js-hero .knows-line, .js-hero .hero-sub { animation: hero-safety 0s linear 5s forwards; }
@keyframes hero-safety { to { opacity: 1; transform: none; } }

.home .hero-ctas { margin-top: clamp(16px, 3.4vh, 36px); }
@media (max-width: 520px) {
  .home .hero-ctas { width: 100%; max-width: 360px; gap: 10px; }
  .home .hero-ctas .btn { flex: 1 1 100%; }
}

/* The facts row along the bottom of the cover */
.hero-rail {
  display: grid; grid-template-columns: repeat(3, max-content) 1fr; align-items: end;
  column-gap: clamp(28px, 4.5vw, 72px);
  padding: 14px 0 clamp(14px, 2.6vh, 26px);
  border-top: 1px solid var(--hairline);
  text-align: left; font-size: .84rem; line-height: 1.4;
}
.rail-item { margin: 0; display: flex; flex-direction: column; }
.rail-item b { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.rail-item span { color: var(--muted); }
.scroll-cue {
  justify-self: end; align-self: center;
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-weight: 600; text-decoration: none;
  transition: color .2s;
}
.scroll-cue:hover { color: var(--text); }
.scroll-cue i { position: relative; width: 1px; height: 34px; overflow: hidden; background: var(--hairline); }
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
  background: currentColor; animation: cue 2.4s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes cue { 0% { top: -40%; } 60%, 100% { top: 100%; } }
@media (max-width: 759px) {
  .hero-rail { grid-template-columns: max-content max-content minmax(0, max-content); justify-content: space-between; column-gap: 10px; font-size: .74rem; }
  .scroll-cue { display: none; }
}
/* Short phones: tighter spacing so the whole cover still fits on one screen */
@media (max-width: 759px) and (max-height: 700px) {
  .hero-main { padding-block: 8px; }
  .badge { margin-bottom: 10px; }
  .home .hero-ctas { gap: 8px; margin-top: 14px; }
  .home .hero-ctas .btn { min-height: 46px; padding-block: 12px; }
  .hero-rail { padding-top: 10px; }
}
/* Very short phones (iPhone SE and similar): the availability pill gives its room to the name */
@media (max-width: 759px) and (max-height: 600px) {
  .badge { display: none; }
  .home .hero { --name: clamp(3rem, min(25vw, (100svh - var(--nav-h) - 330px) / 1.31), 7rem); }
}

/* ============ Sections ============ */
.block { position: relative; padding: clamp(76px, 10vw, 132px) 0; }
.block + .block:not(.demo-band):not(.contact-block) { padding-top: clamp(20px, 4vw, 48px); }

.q {
  margin: 0;
  font-family: 'Bodoni Moda', 'Didot', 'Bodoni 72', serif; font-weight: 600;
  font-size: clamp(2.15rem, 5.2vw, 3.6rem); line-height: 1.06; letter-spacing: -.012em;
  text-wrap: balance;
}
.block .lead { margin-top: 18px; max-width: 38rem; }
.block-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 60px); }

.text-link {
  font-weight: 700; color: var(--text);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
  transition: text-decoration-color .2s;
}
.text-link:hover { text-decoration-color: currentColor; }

.btn svg { width: 1.15em; height: 1.15em; }
.btn { justify-content: center; min-height: 48px; }
.btn.btn-small { min-height: 42px; }

/* ============ Live demo ============ */
.demo-band {
  background: var(--surface);
  border-block: 1px solid var(--hairline);
}
.demo-grid { display: grid; gap: 36px; }
/* Phones and tablets: heading, then the chat, then the list of what the bot did */
.demo-stage { order: 2; }
.demo-bts { order: 3; }
@media (max-width: 979px) {
  .demo-grid { gap: 28px; }
  .demo-stage, .demo-bts { width: 100%; max-width: 620px; }   /* keeps chat lines a readable length on tablets */
  .demo-bts .bts small { display: none; }
  .demo-bts .bts li { padding: 7px 10px; }
}
@media (min-width: 980px) {
  .demo-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: "copy stage" "bts stage";
    grid-template-rows: auto 1fr;
    column-gap: clamp(48px, 6vw, 88px); row-gap: 36px;
  }
  .demo-copy { grid-area: copy; align-self: end; }
  .demo-bts { grid-area: bts; align-self: start; }
  .demo-stage { grid-area: stage; align-self: center; }
}

.bts-title { margin: 0 0 10px; font-weight: 800; font-size: .95rem; }
.bts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bts li {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 14px; border: 1px solid transparent;
  color: var(--muted);
  transition: background-color .4s, border-color .4s, color .4s;
}
.bts li > span:last-child { min-width: 0; }
.bts b { display: block; font-weight: 700; font-size: .97rem; line-height: 1.35; }
.bts small { display: block; font-size: .86rem; margin-top: 1px; }
.bts-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  border: 1.5px dashed var(--hairline);
  transition: background-color .4s, border-color .4s, color .4s;
}
.bts-icon svg { width: 19px; height: 19px; }
.bts li.on { background: var(--bg); border-color: var(--hairline); color: var(--text); }
.bts li.on small { color: var(--muted); }
.bts li.on .bts-icon { background: var(--btn-bg); color: var(--btn-text); border: 1.5px solid var(--btn-bg); }
.bts li.on::after {
  content: "Done"; margin-left: auto; padding: 3px 9px; border-radius: 999px;
  background: var(--ok-soft); color: var(--ok); font-size: .74rem; font-weight: 800;
}
.bts li.flash { animation: bts-flash 1.1s var(--ease-out); }
@keyframes bts-flash {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}

.demo-stage { min-width: 0; }
.channel-switch {
  display: flex; gap: 4px; padding: 4px; margin: 0 0 14px;
  width: fit-content; max-width: 100%;
  border-radius: 999px; border: 1px solid var(--hairline); background: var(--bg);
}
.channel-switch button, .seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 8px 15px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  font: 700 .88rem/1 'Manrope', system-ui, sans-serif; cursor: pointer;
  transition: background-color .25s, color .25s;
}
.channel-switch button:hover, .seg button:hover { color: var(--text); }
.channel-switch button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-text); }
.channel-switch svg { width: 17px; height: 17px; }
@media (max-width: 520px) {
  .channel-switch { width: 100%; }
  .channel-switch button { flex: 1; padding: 8px 6px; }
}

/* --- The chat window. Each channel is a "skin" made of these variables --- */
.chat {
  --c-bg: var(--bg);
  --c-wall: var(--bg);
  --c-head: var(--btn-bg);  --c-head-text: var(--btn-text);
  --c-in: var(--surface);   --c-in-text: var(--text);   --c-in-line: var(--hairline);
  --c-out: var(--btn-bg);   --c-out-text: var(--btn-text);
  --c-chip: var(--surface);
  display: flex; flex-direction: column;
  height: clamp(520px, 72vh, 620px);
  border-radius: 26px; overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--c-bg);
  box-shadow: var(--shadow-deep);
}
.chat[data-skin="wa"] {
  --c-head: #1E5B4F; --c-head-text: #F4FBF8;
  --c-wall: #EDE5D8 radial-gradient(rgba(30, 91, 79, .09) 1.2px, transparent 1.4px) 0 0 / 18px 18px;
  --c-in: #FFFFFF; --c-in-text: #13231D; --c-in-line: transparent;
  --c-out: #D5F1C8; --c-out-text: #13231D;
  --c-bg: #F4EFE7; --c-chip: #FFFFFF;
}
.chat[data-skin="tg"] {
  --c-head: #2D6597; --c-head-text: #F3F8FD;
  --c-wall: #D7E5EF linear-gradient(160deg, #DCE9F2, #CADCE8);
  --c-in: #FFFFFF; --c-in-text: #122233; --c-in-line: transparent;
  --c-out: #E2F4D6; --c-out-text: #122233;
  --c-bg: #F1F6FA; --c-chip: #FFFFFF;
}
:root[data-theme="dark"] .chat[data-skin="wa"] {
  --c-head: #1B3D36; --c-head-text: #E9F3EF;
  --c-wall: #0D1A1D radial-gradient(rgba(233, 243, 239, .05) 1.2px, transparent 1.4px) 0 0 / 18px 18px;
  --c-in: #1C2B31; --c-in-text: #E6ECEE;
  --c-out: #1F4D3B; --c-out-text: #E9F5EE;
  --c-bg: #111E22; --c-chip: #1C2B31;
}
:root[data-theme="dark"] .chat[data-skin="tg"] {
  --c-head: #1F3A55; --c-head-text: #EEF4FA;
  --c-wall: #0F1B27 linear-gradient(160deg, #102030, #0D1823);
  --c-in: #1A2A3A; --c-in-text: #E6EDF4;
  --c-out: #2B5278; --c-out-text: #EEF5FC;
  --c-bg: #13202D; --c-chip: #1A2A3A;
}
.chat[data-skin="wa"], .chat[data-skin="tg"] { color-scheme: light; }
:root[data-theme="dark"] .chat[data-skin="wa"], :root[data-theme="dark"] .chat[data-skin="tg"] { color-scheme: dark; }

.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px 13px 16px;
  background: var(--c-head); color: var(--c-head-text);
  transition: background-color .35s;
}
.chat-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--c-head-text); color: var(--c-head);
  font-family: 'Bodoni Moda', serif; font-weight: 600; font-size: 1.35rem;
}
.chat-id { min-width: 0; flex: 1; }
.chat-name { margin: 0; font-weight: 800; font-size: 1rem; line-height: 1.2; }
.chat-status { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; font-size: .8rem; opacity: .82; }
.chat-dot { width: 7px; height: 7px; border-radius: 50%; background: #48C78E; }
.chat-reset {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  transition: background-color .2s, transform .3s var(--ease-out);
}
.chat-reset:hover { background: color-mix(in srgb, currentColor 12%, transparent); transform: rotate(-40deg); }
.chat-reset svg { width: 18px; height: 18px; }

.chat-log {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 14px;
  background: var(--c-wall);
  scrollbar-width: thin;
}
.chat-log > :first-child { margin-top: auto; }
.chat-log:focus-visible { outline-offset: -3px; }

.msg {
  position: relative; max-width: 84%;
  padding: 9px 12px 6px; border-radius: 18px;
  font-size: .95rem; line-height: 1.45;
  animation: msg-in .38s var(--ease-out) both;
}
.msg p { margin: 0; overflow-wrap: anywhere; }
.msg.bot {
  align-self: flex-start; border-bottom-left-radius: 6px;
  background: var(--c-in); color: var(--c-in-text);
  box-shadow: 0 0 0 1px var(--c-in-line), 0 1px 1px rgba(10, 26, 49, .06);
}
.msg.me {
  align-self: flex-end; border-bottom-right-radius: 6px;
  background: var(--c-out); color: var(--c-out-text);
}
.msg.sys {
  align-self: center; max-width: 92%; text-align: center;
  padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-in) 75%, transparent);
  color: var(--c-in-text); font-size: .8rem; font-weight: 700;
}
.msg-meta {
  display: flex; justify-content: flex-end; align-items: center; gap: 4px;
  margin-top: 2px; font-size: .7rem; opacity: .62;
}
.msg-meta svg { width: 15px; height: 15px; stroke-width: 2.2; }
.chat[data-skin="wa"] .msg.me .msg-meta svg, .chat[data-skin="tg"] .msg.me .msg-meta svg { color: #2E8BCF; opacity: 1; }
.chat:not([data-skin="wa"]):not([data-skin="tg"]) .msg.me .msg-meta svg { display: none; }
.msg-src {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; padding-top: 7px;
  border-top: 1px dashed color-mix(in srgb, currentColor 28%, transparent);
  font-size: .78rem; font-weight: 700; opacity: .78;
}
.msg-src svg { width: 15px; height: 15px; }
.msg.typing { display: flex; gap: 4px; padding: 13px 14px; }
.msg.typing span {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .35;
  animation: dot 1s infinite ease-in-out;
}
.msg.typing span:nth-child(2) { animation-delay: .15s; }
.msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: .85; transform: translateY(-3px); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.chat-suggest {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 10px 12px 4px; background: var(--c-bg);
  border-top: 1px solid var(--hairline);
}
.sugg {
  min-height: 38px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--hairline); background: var(--c-chip); color: var(--text);
  font: 600 .86rem/1.2 'Manrope', system-ui, sans-serif; cursor: pointer; text-align: left;
  transition: border-color .2s, transform .2s var(--ease-out), opacity .2s;
}
.chat[data-skin="wa"] .sugg, .chat[data-skin="tg"] .sugg { color: var(--c-in-text); }
.sugg:hover { border-color: currentColor; transform: translateY(-1px); }
.sugg:disabled { opacity: .45; cursor: default; transform: none; }
.chat-suggest.nudge .sugg:first-child { animation: nudge 1.6s ease-in-out 2; }
@keyframes nudge { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); border-color: var(--accent); } }
@media (max-width: 640px) {
  /* Phones: one swipeable row so the chat keeps its height */
  .chat-suggest {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
            mask-image: linear-gradient(90deg, #000 85%, transparent);
    padding-right: 32px;
  }
  .chat-suggest::-webkit-scrollbar { display: none; }
  .sugg { flex: none; white-space: nowrap; }
}

.chat-input {
  display: flex; gap: 8px; padding: 8px 12px 12px; background: var(--c-bg);
}
.chat-input input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--hairline);
  background: var(--c-chip); color: var(--text);
  font: 500 16px/1 'Manrope', system-ui, sans-serif;  /* 16px stops iPhones zooming in */
}
.chat[data-skin="wa"] .chat-input input, .chat[data-skin="tg"] .chat-input input { color: var(--c-in-text); }
.chat-input input::placeholder { color: inherit; opacity: .55; }
.chat-input input:focus { outline: none; border-color: var(--c-head); }
.chat-input input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.chat-input button {
  width: 46px; height: 46px; border-radius: 50%; flex: none; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--c-head); color: var(--c-head-text);
  transition: transform .2s var(--ease-out), opacity .2s;
}
.chat-input button:hover { transform: scale(1.06); }
.chat-input button:disabled { opacity: .5; transform: none; cursor: default; }
.chat-input button svg { width: 20px; height: 20px; }

.demo-note { margin: 14px 4px 0; font-size: .85rem; color: var(--muted); }

@media (max-width: 640px) {
  .chat { height: min(560px, 78svh); border-radius: 22px; }
}

/* ============ Why: the overnight inbox ============ */
.why-grid { display: grid; gap: 44px; }
@media (min-width: 980px) {
  .why-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(48px, 6vw, 88px); align-items: center; }
}
.ticks { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; font-size: 1.02rem; }
.ticks svg { width: 22px; height: 22px; margin-top: 1px; color: var(--ok); stroke-width: 2.4; }

.inbox {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 26px;
  padding: 8px; box-shadow: var(--shadow-deep);
}
.inbox-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 10px 12px 12px;
}
.inbox-title { margin: 0; font-weight: 800; font-size: 1rem; }
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--bg); }
.seg button { min-height: 36px; padding: 7px 13px; font-size: .84rem; }
@media (max-width: 420px) { .seg { width: 100%; } .seg button { flex: 1; } }

.inbox-list { list-style: none; margin: 0; padding: 0; background: var(--bg); border-radius: 20px; overflow: hidden; }
.inbox-list li {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 14px 14px 14px 12px; border-bottom: 1px solid var(--hairline);
}
.inbox-list li:last-child { border-bottom: 0; }
.ib-av {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--hairline); font-weight: 800;
}
.ib-name { margin: 0; font-weight: 800; font-size: .95rem; }
.ib-msg { margin: 1px 0 0; font-size: .94rem; color: var(--muted); }
[data-mode="without"] .ib-msg { color: var(--text); font-weight: 600; }
.ib-reply { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.ib-reply > p {
  margin: 0; overflow: hidden; min-height: 0;
  font-size: .9rem; color: var(--text);
}
.ib-reply svg { width: 17px; height: 17px; margin-right: 6px; vertical-align: -3px; color: #2E8BCF; stroke-width: 2.2; }
[data-mode="with"] .ib-reply { grid-template-rows: 1fr; }
[data-mode="with"] .ib-reply > p { padding-top: 7px; }
.ib-tag {
  display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px;
  background: var(--ok-soft); color: var(--ok); font-style: normal; font-weight: 800; font-size: .74rem;
}
.ib-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.ib-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.ib-fast { display: none; font-weight: 800; color: var(--ok); }
[data-mode="with"] .ib-dot { display: none; }
[data-mode="with"] .ib-fast { display: inline; }
.ib-lost { max-height: 140px; transition: max-height .5s var(--ease-out), opacity .3s, padding .5s var(--ease-out); }
.inbox .ib-lost .ib-msg { color: var(--accent); }
[data-mode="with"] .ib-lost { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
.inbox-list li:nth-last-child(2) { border-bottom: 1px solid var(--hairline); }
[data-mode="with"] .inbox-list li:nth-last-child(2) { border-bottom: 0; }
.inbox-foot { margin: 0; padding: 14px 12px 8px; font-size: .92rem; font-weight: 700; }
.if-without { color: var(--accent); }
.if-with { color: var(--ok); display: none; }
[data-mode="with"] .if-without { display: none; }
[data-mode="with"] .if-with { display: inline; }

/* ============ Services ============ */
.services { display: grid; gap: 16px; }
@media (min-width: 760px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-wide { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
.svc {
  display: flex; flex-direction: column;
  padding: clamp(22px, 3vw, 34px);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 24px;
}
.svc h3 {
  margin: 0 0 10px;
  font-family: 'Bodoni Moda', 'Didot', serif; font-weight: 600;
  font-size: clamp(1.4rem, 2.3vw, 1.7rem); line-height: 1.18;
}
.svc p { margin: 0; color: var(--muted); }
.svc-visual { margin-top: auto; padding-top: 26px; }
@media (min-width: 1024px) {
  .svc-wide { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 40px; }
  .svc-wide .svc-visual { margin-top: 0; padding-top: 0; }
}

/* Channel bubbles */
.channels { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 0; }
.channels span {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 18px; border-radius: 20px 20px 20px 6px;
  background: var(--bg); border: 1px solid var(--hairline);
  font-weight: 700;
}
.channels span:nth-child(1) { transform: rotate(-2deg); }
.channels span:nth-child(2) { transform: rotate(1.5deg) translateY(6px); }
.channels span:nth-child(3) { transform: rotate(-1deg); background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); border-radius: 20px 20px 6px 20px; }

/* Tiny conversation */
.mini-chat { display: grid; gap: 8px; }
.mini-chat p { margin: 0; padding: 9px 13px; border-radius: 16px; font-size: .9rem; line-height: 1.4; max-width: 90%; }
.svc .mc-in { justify-self: end; background: var(--btn-bg); color: var(--btn-text); border-bottom-right-radius: 5px; }
.svc .mc-out { justify-self: start; background: var(--bg); border: 1px solid var(--hairline); border-bottom-left-radius: 5px; color: var(--text); }
.mc-out small { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: .76rem; font-weight: 700; color: var(--muted); }
.mc-out svg { width: 14px; height: 14px; }

/* Tiny spreadsheet */
.sheet { border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; font-size: .86rem; background: var(--bg); }
.sheet-row { display: grid; grid-template-columns: 1fr 1.2fr .7fr; }
.sheet-row span { padding: 8px 10px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-row span:last-child { border-right: 0; }
.sheet-row:last-child span { border-bottom: 0; }
.sheet-h span { font-weight: 800; color: var(--muted); font-size: .78rem; }
.sheet-new { background: var(--ok-soft); font-weight: 700; }
.sheet-new span:first-child::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--ok); vertical-align: 1px; }

/* Tiny workflow: steps step down and to the right, like a pipeline */
.flow { display: flex; flex-direction: column; align-items: flex-start; }
.flow span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 15px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--hairline); font-weight: 700; font-size: .92rem;
}
.flow span:last-child { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
.flow span:nth-of-type(2) { margin-left: 28px; }
.flow span:nth-of-type(3) { margin-left: 56px; }
.flow i { display: block; height: 16px; width: 0; border-left: 2px dashed var(--hairline); }
.flow i:nth-of-type(1) { margin-left: 24px; }
.flow i:nth-of-type(2) { margin-left: 52px; }

/* ============ Process ============ */
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { position: relative; padding: 0 0 36px 64px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: ""; position: absolute; left: 21px; top: 50px; bottom: 6px; width: 2px; background: var(--hairline);
}
.steps li:last-child::before { display: none; }
.step-n {
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--text); background: var(--bg);
  font-family: 'Bodoni Moda', serif; font-weight: 600; font-size: 1.3rem; line-height: 1;
}
.steps h3 { margin: 8px 0 6px; font-size: 1.12rem; line-height: 1.3; }
.steps p { margin: 0; color: var(--muted); font-size: .97rem; max-width: 30rem; }
.step-tag {
  display: inline-block; margin-top: 12px; padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--hairline); font-size: .8rem; font-weight: 800; color: var(--muted);
}
.step-tag.free { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .steps li { padding: 64px 0 0; }
  .steps li::before { left: 56px; right: -20px; top: 21px; bottom: auto; width: auto; height: 2px; }
  .steps h3 { margin-top: 0; }
}

/* ============ About teaser ============ */
.me-grid { display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) { .me-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(48px, 7vw, 96px); } }
.me-card { position: relative; margin: 0; width: 100%; max-width: 380px; justify-self: center; }
@media (max-width: 899px) { .me-card { max-width: 240px; } }
.me-photo {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5; border-radius: 30px;
  display: grid; place-items: center;
  background: var(--btn-bg); color: var(--btn-text);
}
.me-initial { font-family: 'Bodoni Moda', serif; font-weight: 600; font-size: clamp(7rem, 22vw, 12rem); line-height: 1; font-variation-settings: "opsz" 11; }
.me-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.me-bubble {
  position: absolute; right: -14px; bottom: 30px;
  padding: 12px 18px; border-radius: 20px 20px 6px 20px;
  background: var(--surface); color: var(--text); border: 1px solid var(--hairline);
  font-weight: 800; box-shadow: 0 18px 40px -20px rgba(10, 26, 49, .5);
}
@media (max-width: 520px) { .me-bubble { right: 12px; } }
.me-copy > p:not(.lead) { margin: 16px 0 0; color: var(--muted); max-width: 38rem; font-size: 1.04rem; }
.me-copy .lead strong { color: var(--text); }
.me-facts { margin: 30px 0 28px; display: grid; gap: 14px; }
@media (min-width: 560px) { .me-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.me-facts div { padding-top: 14px; border-top: 1px solid var(--hairline); }
.me-facts dt { font-family: 'Bodoni Moda', serif; font-weight: 600; font-size: 1.6rem; line-height: 1.1; }
.me-facts dd { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }

/* ============ FAQ ============ */
.faq-grid { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .faq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(48px, 7vw, 96px); align-items: start; }
  .faq-head { position: sticky; top: 120px; }
}
.faq-list details { border-bottom: 1px solid var(--hairline); }
.faq-list details:first-child { border-top: 1px solid var(--hairline); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px;
  padding: 20px 2px; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 1.07rem; line-height: 1.4;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 14px; height: 14px; margin-top: 5px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform .3s var(--ease-out);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--accent); }
.faq-list details p { margin: 0; padding: 0 30px 22px 2px; color: var(--muted); max-width: 42rem; }
@supports (interpolate-size: allow-keywords) {
  .faq-list { interpolate-size: allow-keywords; }
  .faq-list details::details-content {
    height: 0; overflow: clip;
    transition: height .35s var(--ease-out), content-visibility .35s allow-discrete;
  }
  .faq-list details[open]::details-content { height: auto; }
}

/* ============ Contact ============ */
.contact-block { padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(48px, 7vw, 88px); }
.contact-band {
  display: grid; gap: 36px;
  padding: clamp(26px, 5vw, 64px);
  border-radius: 32px;
  background: var(--btn-bg); color: var(--btn-text);
}
@media (min-width: 980px) { .contact-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: start; } }
.contact-band .q { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.contact-copy > p:first-of-type { margin: 18px 0 0; max-width: 32rem; font-size: 1.08rem; opacity: .86; }
.direct-label { margin: 36px 0 12px; font-weight: 800; }
.direct { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 30rem; }
.direct a {
  display: flex; align-items: center; gap: 14px; min-height: 56px;
  padding: 12px 16px; border-radius: 16px; text-decoration: none;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  transition: background-color .2s, border-color .2s;
}
.direct a:hover { background: color-mix(in srgb, currentColor 8%, transparent); border-color: currentColor; }
.direct svg { width: 24px; height: 24px; }
.direct b { display: block; line-height: 1.3; }
.direct small { display: block; font-size: .85rem; opacity: .78; overflow-wrap: anywhere; }

.lead-form {
  display: grid; gap: 16px;
  padding: clamp(20px, 3vw, 32px); border-radius: 24px;
  background: var(--bg); color: var(--text);
}
.field label { display: block; margin-bottom: 7px; font-weight: 700; font-size: .93rem; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px;
  border-radius: 12px; border: 1.5px solid var(--hairline);
  background: var(--surface); color: var(--text);
  font: 500 16px/1.45 'Manrope', system-ui, sans-serif;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 116px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.field [aria-invalid="true"] { border-color: var(--accent); }
.field-err { margin: 6px 0 0; color: var(--accent); font-size: .86rem; font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.form-actions .btn { flex: 1 1 190px; }
.form-status { margin: 0; font-weight: 700; font-size: .93rem; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--ok); }
.form-fine { margin: 0; font-size: .84rem; color: var(--muted); }

/* ============ Footer ============ */
.footer-home {
  max-width: 1160px; display: grid; gap: 22px; align-items: start;
  border-top: 1px solid var(--hairline);
}
.footer-home .logo { color: var(--text); font-size: 1.25rem; }
.foot-brand p { margin: 8px 0 0; max-width: 24rem; }
.footer-home nav { flex-wrap: wrap; gap: 10px 22px; }
.foot-copy { margin: 0; }
@media (min-width: 760px) {
  .footer-home { grid-template-columns: minmax(0, 1fr) auto; }
  .footer-home nav { padding-top: 6px; }
  .foot-copy { grid-column: 1 / -1; }
}
@media (max-width: 759px) { .footer-home { padding-bottom: 110px; } }

/* ============ Phone action bar ============ */
.mobile-cta {
  position: fixed; left: 12px; right: 12px; z-index: 60;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 8px; padding: 7px;
  border-radius: 999px; border: 1px solid var(--hairline);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 20px 44px -18px rgba(10, 26, 49, .5);
  transform: translateY(150%); visibility: hidden;
  transition: transform .45s var(--ease-out), visibility 0s linear .45s;
}
.mobile-cta.show { transform: none; visibility: visible; transition: transform .45s var(--ease-out), visibility 0s; }
.mobile-cta .btn { flex: 1; padding: 12px 18px; }
.mobile-cta-tg {
  width: 48px; height: 48px; flex: none; border-radius: 50%;
  display: grid; place-items: center; color: var(--text);
  border: 1px solid var(--hairline); background: var(--bg);
}
.mobile-cta-tg svg { width: 22px; height: 22px; }
@media (min-width: 760px) { .mobile-cta { display: none; } }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .msg, .msg.typing span, .bts li.flash, .chat-suggest.nudge .sugg:first-child, .scroll-cue i::after { animation: none; }
  .js-hero .hero-sub { transition: none; }
  .ib-reply, .ib-lost, .mobile-cta, .site-head, .site-head .nav, .faq-list summary::after { transition: none; }
  .faq-list details::details-content { transition: none; }
}
