/* VisualGram landing — editorial monochrome. Light paper by default, ink when the system is dark. */
:root {
    --paper: #f4f4f1;
    --paper-2: #ebebe7;
    --card: #ffffff;
    --ink: #111111;
    --ink-2: #3b3b3b;
    --muted: #6d6d6a;
    --rule: #d6d6d1;
    --rule-soft: #e4e4df;
    --serif: "Source Serif 4", "Georgia", "Times New Roman", serif;
    --sans: "Golos Text", "Segoe UI", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
    --wrap: 1180px;
    --pad: clamp(20px, 4vw, 40px);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --paper: #0b0b0b; --paper-2: #141414; --card: #161616;
        --ink: #ededed; --ink-2: #c4c4c4; --muted: #8d8d8d;
        --rule: #2a2a2a; --rule-soft: #1d1d1d;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--pad)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .2s; }
.bar.scrolled { border-bottom-color: var(--rule); }
.bar-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.mark svg { width: 30px; height: 30px; }
.mark rect { fill: var(--ink); }
.mark path { fill: none; stroke: var(--paper); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.links { display: flex; gap: 26px; margin-inline-start: 18px; }
.links a, .quiet { text-decoration: none; color: var(--ink-2); font-size: 15px; }
.links a:hover, .quiet:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.nav-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 18px; }
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--rule); border-radius: 10px; background: transparent; cursor: pointer; padding: 0; }
.burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 5px auto; transition: transform .2s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.drawer { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 12px; font: 500 16px/1 var(--sans); text-decoration: none; border: 1px solid var(--ink); transition: background-color .15s, color .15s; cursor: pointer; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 10px 16px; font-size: 14px; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding-block: clamp(48px, 9vw, 112px) clamp(56px, 8vw, 96px); }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 500 12.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: #2fa866; box-shadow: 0 0 0 4px color-mix(in srgb, #2fa866 18%, transparent); }
h1 { margin-top: 26px; font-family: var(--serif); font-size: clamp(52px, 8.6vw, 116px); line-height: .96; letter-spacing: -0.035em; font-variation-settings: "opsz" 60; }
.h-line { display: block; }
.h-italic { font-style: italic; color: var(--ink-2); }
.lede { margin-top: 28px; max-width: 34em; font-size: clamp(17px, 1.6vw, 19.5px); color: var(--ink-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.fine { margin-top: 16px; font-size: 13.5px; color: var(--muted); }

/* ---------- Phone mock (mirrors the app's monochrome chat) ---------- */
.phone { --b-in: #ffffff; --b-in-fg: #111; --b-out: #e3e3e3; --b-out-fg: #111; --wall: #ededed; --dot: rgba(0,0,0,.07);
    margin: 0; justify-self: center; width: min(340px, 100%); aspect-ratio: 9 / 18.5; display: flex; flex-direction: column; border: 10px solid #121212; border-radius: 46px; background: var(--wall); overflow: hidden; box-shadow: 0 1px 0 var(--rule), 0 30px 60px -30px rgba(0,0,0,.35); transform: rotate(1.4deg); }
@media (prefers-color-scheme: dark) { .phone { --b-in: #1a1a1a; --b-in-fg: #ededed; --b-out: #2f2f2f; --b-out-fg: #f2f2f2; --wall: #070707; --dot: rgba(255,255,255,.06); border-color: #262626; } }
.phone-top { display: flex; align-items: center; gap: 10px; padding: 26px 16px 12px; background: var(--card); border-bottom: 1px solid var(--rule-soft); }
.phone-top b { display: block; font-size: 15px; line-height: 1.2; }
.phone-top small { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #2fa866; }
.online { width: 6px; height: 6px; border-radius: 50%; background: #2fa866; }
.phone-icons { margin-inline-start: auto; display: flex; gap: 12px; color: var(--muted); font-style: normal; }
.phone-icons svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.ava { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: #2b2b2b; color: #fff; font: 600 14px/1 var(--sans); }
.ava-2 { background: #4a4a4a; } .ava-3 { background: #111; } .ava-4 { background: #6a6a6a; }
.phone-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; background-image: radial-gradient(var(--dot) 1px, transparent 1.3px); background-size: 18px 18px; overflow: hidden; justify-content: flex-end; }
.day { align-self: center; font: 500 11px/1 var(--sans); padding: 5px 10px; border-radius: 99px; background: var(--card); color: var(--muted); margin-bottom: 4px; }
.b { position: relative; max-width: 82%; padding: 8px 12px 18px; font-size: 13.5px; line-height: 1.38; border-radius: 16px; }
.b time { position: absolute; right: 10px; bottom: 4px; font: 400 10px/1 var(--sans); color: var(--muted); }
.b.in { align-self: flex-start; background: var(--b-in); color: var(--b-in-fg); border: 1px solid var(--rule-soft); border-bottom-left-radius: 4px; }
.b.out { align-self: flex-end; background: var(--b-out); color: var(--b-out-fg); border-bottom-right-radius: 4px; }
.quote-b { display: flex; flex-direction: column; gap: 6px; }
.quote { display: flex; flex-direction: column; padding: 4px 8px; border-left: 2px solid currentColor; border-radius: 4px; background: rgba(127,127,127,.1); font-size: 12px; }
.quote span { opacity: .75; }
.voice { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; width: 74%; }
.voice time { position: static; }
.play { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(127,127,127,.22); font-size: 10px; }
.wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 22px; }
.wave i { flex: 1; height: 40%; border-radius: 2px; background: currentColor; opacity: .5; }
.wave i:nth-child(3n) { height: 85%; } .wave i:nth-child(4n+1) { height: 60%; } .wave i:nth-child(5n) { height: 30%; }
.typing { display: inline-flex; gap: 4px; padding: 11px 14px; width: auto; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.b.appear { animation: rise .35s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.phone-input { display: flex; align-items: center; justify-content: space-between; margin: 10px; padding: 10px 14px; border-radius: 22px; background: var(--card); color: var(--muted); font-size: 13px; }
.phone-input i { font-style: normal; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); margin: -6px -8px -6px 0; }
.phone-input svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Strip ---------- */
.strip { border-block: 1px solid var(--rule); }
.strip-inner { display: flex; flex-wrap: wrap; gap: 6px 0; padding-block: 18px; font: 500 13px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.strip-inner span:not(:last-child)::after { content: "/"; margin-inline: 14px; color: var(--rule); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 10vw, 128px); }
.section-head { display: grid; grid-template-columns: 90px 1fr auto; align-items: baseline; gap: 12px 24px; margin-bottom: clamp(36px, 5vw, 64px); }
.num { font: 500 13px/1 var(--mono); color: var(--muted); padding-top: 10px; border-top: 1px solid var(--ink); width: 60px; }
h2 { font-family: var(--serif); font-size: clamp(34px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -0.025em; max-width: 16em; }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); counter-reset: f; }
.features li { counter-increment: f; padding: 28px 28px 34px 0; border-bottom: 1px solid var(--rule); }
.features li:not(:nth-child(3n+1)) { padding-inline-start: 28px; border-inline-start: 1px solid var(--rule); }
.features li::before { content: counter(f, decimal-leading-zero); display: block; font: 500 12px/1 var(--mono); color: var(--muted); margin-bottom: 22px; }
.features h3 { font: 600 21px/1.25 var(--sans); letter-spacing: -0.01em; }
.features p { margin-top: 10px; color: var(--ink-2); font-size: 15.5px; }

/* ---------- Screens ---------- */
.screens { background: var(--paper-2); border-block: 1px solid var(--rule); }
.theme-switch { display: inline-flex; padding: 4px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
.theme-switch button { font: 500 14px/1 var(--sans); padding: 9px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.stage { --s-bg: #0b0b0b; --s-side: #121212; --s-card: #1a1a1a; --s-line: #262626; --s-fg: #ededed; --s-mute: #8d8d8d; --s-in: #1a1a1a; --s-out: #2f2f2f; --s-wall: #070707; --s-dot: rgba(255,255,255,.06); --s-pill: #ededed; --s-pill-fg: #111;
    display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: end; color: var(--s-fg); transition: color .25s; }
.stage[data-theme="light"] { --s-bg: #fafafa; --s-side: #fff; --s-card: #f2f2f2; --s-line: #e4e4e4; --s-fg: #111; --s-mute: #6b6b6b; --s-in: #fff; --s-out: #e3e3e3; --s-wall: #ededed; --s-dot: rgba(0,0,0,.07); --s-pill: #111; --s-pill-fg: #fff; }
.window { border: 1px solid var(--s-line); border-radius: 16px; overflow: hidden; background: var(--s-bg); box-shadow: 0 30px 60px -40px rgba(0,0,0,.5); transition: background-color .25s; }
.window-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--s-line); background: var(--s-side); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--s-line); }
.window-bar span { margin-inline: auto; font: 400 12px/1 var(--mono); color: var(--s-mute); padding: 6px 40px; border-radius: 7px; background: var(--s-card); }
.window-body { display: grid; grid-template-columns: 270px 1fr; height: 400px; }
.list { border-inline-end: 1px solid var(--s-line); background: var(--s-side); padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.search { padding: 9px 12px; border-radius: 10px; background: var(--s-card); color: var(--s-mute); font-size: 13px; margin-bottom: 8px; }
.tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.tabs span { font-size: 12px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--s-line); color: var(--s-mute); }
.tabs span.on { background: var(--s-pill); color: var(--s-pill-fg); border-color: var(--s-pill); }
.row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; font-size: 13px; position: relative; }
.row.on { background: var(--s-card); }
.row div { min-width: 0; flex: 1; }
.row b { display: block; font-weight: 600; }
.row small { display: block; color: var(--s-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row time { align-self: flex-start; font-size: 11px; color: var(--s-mute); }
.unread { width: 9px; height: 9px; border-radius: 50%; background: var(--s-fg); }
.conv { display: flex; flex-direction: column; min-width: 0; }
.conv-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--s-line); background: var(--s-side); font-size: 14px; }
.conv-head small { display: block; font-size: 12px; color: #2fa866; }
.conv-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 14px 18px; background: var(--s-wall) radial-gradient(var(--s-dot) 1px, transparent 1.3px) 0 0 / 20px 20px; }
.conv-body .b, .mini .b { padding-bottom: 8px; }
.stage .b.in { background: var(--s-in); color: var(--s-fg); border-color: var(--s-line); }
.stage .b.out { background: var(--s-out); color: var(--s-fg); }
.stage .day { background: var(--s-side); color: var(--s-mute); }
.conv-input { margin: 10px 14px; padding: 10px 14px; border-radius: 12px; background: var(--s-card); color: var(--s-mute); font-size: 13px; }
.mini { position: relative; height: 470px; padding: 34px 12px 12px; border: 9px solid #121212; border-radius: 38px; background: var(--s-bg); display: flex; flex-direction: column; gap: 4px; transition: background-color .25s; }
.mini-head { display: flex; align-items: center; gap: 8px; padding: 0 6px 12px; font-size: 15px; }
.mini-head svg { width: 24px; height: 24px; }
.mini-head rect { fill: var(--s-fg); } .mini-head path { fill: none; stroke: var(--s-bg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.mini .tabs { padding-inline: 4px; }
.fab { position: absolute; right: 14px; bottom: 16px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--s-pill); color: var(--s-pill-fg); }
.caption { margin-top: 22px; font-size: 14px; color: var(--muted); max-width: 46em; }

/* ---------- Principles ---------- */
.nots { display: grid; gap: 6px; }
.nots p { font-family: var(--serif); font-size: clamp(40px, 7vw, 92px); line-height: 1.04; letter-spacing: -0.03em; }
.nots s { text-decoration-thickness: .06em; text-decoration-color: var(--ink); color: var(--muted); }
.aside { margin-top: 36px; margin-inline-start: auto; max-width: 30em; font-size: 18px; color: var(--ink-2); border-top: 1px solid var(--ink); padding-top: 16px; }

/* ---------- Android ---------- */
.android { background: var(--ink); color: var(--paper); --rule: rgba(127,127,127,.35); }
.android .num { border-color: var(--paper); color: color-mix(in srgb, var(--paper) 60%, transparent); }
.android .lede, .android .fine { color: color-mix(in srgb, var(--paper) 72%, transparent); }
.android .btn-ink { background: var(--paper); color: var(--ink); border-color: var(--paper); margin-top: 30px; }
.android .btn-ink:hover { opacity: .88; }
.android-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.android .section-head { grid-template-columns: 90px 1fr; }
.spec { margin: 0; border-top: 1px solid var(--rule); }
.spec div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.spec dt { font: 500 12.5px/1.8 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: color-mix(in srgb, var(--paper) 55%, transparent); }
.spec dd { margin: 0; font-size: 16.5px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--rule); max-width: 860px; margin-inline-start: 114px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font: 500 19px/1.35 var(--sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 26px/1 var(--sans); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 48px 24px 0; color: var(--ink-2); max-width: 44em; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--rule); padding-block: 44px; }
.foot-inner { display: grid; grid-template-columns: 1fr auto; gap: 28px 40px; align-items: start; }
.foot-brand p { margin-top: 10px; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 17px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: flex-end; font-size: 14.5px; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.copy { grid-column: 1 / -1; font: 400 12.5px/1 var(--mono); color: var(--muted); }

/* ---------- Language control (built by i18n.js) ---------- */
.language-control { position: relative; font-size: 14px; }
.language-control summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 10px; color: var(--ink-2); font: 500 13px/1 var(--mono); }
.language-control summary::-webkit-details-marker { display: none; }
.language-panel { position: absolute; inset-inline-end: 0; top: 46px; width: min(300px, calc(100vw - 32px)); padding: 16px; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 24px 48px -24px rgba(0,0,0,.35); z-index: 40; color: var(--ink); }
.language-panel label, .language-panel small { display: block; }
.language-panel select, .language-panel button { width: 100%; padding: 10px; margin-top: 10px; border: 1px solid var(--rule); border-radius: 9px; background: var(--paper); color: var(--ink); font: inherit; }
.language-panel button { cursor: pointer; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.language-panel button:disabled { opacity: .5; }
.language-panel small { margin-top: 10px; line-height: 1.5; color: var(--muted); font-size: 12px; }
.language-panel p { font-size: 13px; line-height: 1.5; margin: 10px 0 0; }
.language-panel [hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
    .links, .nav-actions .quiet { display: none; }
    .burger { display: block; }
    .drawer { display: grid; max-height: 0; overflow: hidden; transition: max-height .25s ease; border-top: 1px solid transparent; }
    .drawer.open { max-height: 360px; border-top-color: var(--rule); }
    .drawer a { padding: 14px var(--pad); text-decoration: none; border-bottom: 1px solid var(--rule-soft); font-size: 17px; }
    .hero { grid-template-columns: 1fr; }
    .phone { transform: none; width: min(320px, 100%); }
    .features { grid-template-columns: 1fr 1fr; }
    .features li, .features li:not(:nth-child(3n+1)) { padding-inline: 0 24px; border-inline-start: 0; }
    .features li:nth-child(2n) { padding-inline: 24px 0; border-inline-start: 1px solid var(--rule); }
    .stage { grid-template-columns: 1fr; }
    .mini { display: none; }
    .android-inner { grid-template-columns: 1fr; }
    .faq { margin-inline-start: 0; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .nav-actions .btn-sm { display: none; }
    .section-head { grid-template-columns: 1fr; }
    .theme-switch { justify-self: start; }
    .features { grid-template-columns: 1fr; }
    .features li, .features li:nth-child(2n), .features li:not(:nth-child(3n+1)) { padding-inline: 0; border-inline-start: 0; }
    .window-body { grid-template-columns: 1fr; height: auto; }
    .conv { display: none; }
    .spec div { grid-template-columns: 1fr; gap: 2px; }
    .foot-inner { grid-template-columns: 1fr; }
    .foot-links { justify-content: flex-start; }
    .cta .btn { width: 100%; justify-content: center; }
    .language-control { position: static; }
    .language-panel { position: fixed; top: 76px; left: 16px; right: 16px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
