/* UZARO — uzaromessenger.uz. Palette comes from the logo: deep blue, teal and the gold ribbon. */
:root {
  --ink: #0e1b33;
  --ink-soft: #4a5873;
  --paper: #ffffff;
  --mist: #f2f6fc;
  --line: #dde5f1;
  --blue: #0b57d0;
  --blue-deep: #0a3f9c;
  --teal: #0fa89a;
  --gold: #e2ae2c;
  --on-blue: #ffffff;
  --phone-edge: #0e1b33;
  --shadow: 0 30px 60px -30px rgba(14, 27, 51, 0.45);
  --elev: 0 16px 36px -16px rgba(14, 27, 51, 0.4);
  --radius: 14px;
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --body: "Onest", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eef8;
    --ink-soft: #a3b1c9;
    --paper: #0a1426;
    --mist: #101e36;
    --line: #20314f;
    --blue: #4d8cf5;
    --blue-deep: #6a9ef7; /* hover in dark mode goes lighter: dark text on it stays above 4.5:1 */
    --teal: #2cc8b8;
    --gold: #f0c24f;
    --on-blue: #06101f;
    --phone-edge: #24375a;
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
    --elev: 0 16px 32px -14px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 16px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: 0.01em; }
.brand img { width: 36px; height: 36px; }
.menu { display: flex; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.menu a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.menu a:hover { color: var(--ink); background: var(--mist); }
.menu-btn { display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: none; color: var(--ink); cursor: pointer; }
.menu-btn svg { margin: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 22px; border-radius: var(--radius); border: 1px solid transparent; font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.btn svg { flex: none; }
.btn-main { background: var(--blue); color: var(--on-blue); }
.btn-main:hover { background: var(--blue-deep); }
.btn-main:active { transform: translateY(1px); }
.btn-main small { display: block; font-weight: 400; font-size: 0.8125rem; opacity: 0.85; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--mist); }
.btn-quiet[aria-disabled="true"] { color: var(--ink-soft); cursor: default; }
.btn-quiet[aria-disabled="true"]:hover { background: transparent; }
.btn-quiet small { display: block; font-weight: 400; font-size: 0.8125rem; color: var(--ink-soft); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; letter-spacing: -0.035em; }
.lead { margin-top: 24px; max-width: 34em; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--ink-soft); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, max-content)); gap: 16px 32px; margin: 40px 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.4; }
.facts li { max-width: 10.5em; }
.facts strong { display: block; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 1.25rem; }
.hero-art { position: relative; justify-self: center; width: min(320px, 78vw); }
.ribbon { position: absolute; z-index: 0; left: -42%; top: 38%; width: 184%; height: auto; pointer-events: none; }
.ribbon path { fill: none; stroke: var(--gold); stroke-linecap: round; stroke-width: 44; stroke-dasharray: 1400; stroke-dashoffset: 0; }
.ribbon .ribbon-teal { stroke: var(--teal); stroke-width: 22; opacity: 0.9; }

/* Phone frame: screenshots are 9:20 */
.phone { position: relative; z-index: 1; margin: 0; padding: 9px; border-radius: 42px; background: var(--phone-edge); box-shadow: var(--shadow); }
.phone img { width: 100%; aspect-ratio: 9 / 20; object-fit: cover; border-radius: 34px; background: var(--mist); }

@media (prefers-reduced-motion: no-preference) {
  .hero-art .phone { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .ribbon path { animation: draw 1.4s 0.25s cubic-bezier(0.6, 0, 0.2, 1) both; }
  .ribbon .ribbon-teal { animation-delay: 0.45s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }
@keyframes draw { from { stroke-dashoffset: 1400; } }

/* Sections */
.band { padding: clamp(64px, 9vw, 120px) 0; }
.band-mist { background: var(--mist); }
.head { max-width: 40rem; margin-bottom: clamp(36px, 5vw, 56px); }
.head h2, .story h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); }
.head p, .story-text > p { margin-top: 16px; font-size: 1.125rem; color: var(--ink-soft); }

.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.story-flip .story-text { order: 2; }
.story-art { display: flex; justify-content: center; gap: 20px; }
.story-art .phone { width: min(300px, 72vw); }
.story-art .phone + .phone { margin-top: 64px; }
.story-art.pair .phone { width: min(260px, 40vw); }

.points { display: grid; gap: 28px; margin: 36px 0 0; padding: 0; list-style: none; }
.points li { display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; }
.points .ico { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }
.points .ico.teal { background: color-mix(in srgb, var(--teal) 14%, transparent); color: var(--teal); }
.points p { color: var(--ink-soft); }
.note { margin-top: 28px; font-size: 0.9375rem; color: var(--ink-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 0; padding: 0; list-style: none; }
.chips li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9375rem; background: var(--paper); }

/* Screens strip */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(230px, 62vw); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; --edge: max(16px, (100% - 1160px) / 2); padding: 8px var(--edge) 28px; scroll-padding-inline: var(--edge); scrollbar-width: thin; }
.strip figure { margin: 0; scroll-snap-align: start; }
.strip .phone { padding: 7px; border-radius: 34px; box-shadow: none; }
.strip .phone img { border-radius: 28px; }
.strip figcaption { margin-top: 14px; font-weight: 600; }
.strip figcaption span { display: block; font-weight: 400; color: var(--ink-soft); font-size: 0.9375rem; }

/* Steps: a real sequence, so numbered */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 24px; border-top: 2px solid var(--ink); }
.steps li::before { content: counter(step); display: block; margin-bottom: 18px; font: 600 2.25rem/1 var(--display); color: var(--blue); }
.steps p { margin-top: 10px; color: var(--ink-soft); }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; font-weight: 600; font-size: 1.0625rem; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: 12px; height: 12px; margin-top: 6px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg); transition: transform 0.2s; }
.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: 10px; }
.faq-list details p { padding: 0 0 22px; max-width: 40em; color: var(--ink-soft); }

/* Final call */
.final { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(40px, 6vw, 72px); background: #0a3f9c; color: #fff; } /* fixed in both themes: white text keeps AA contrast */
.final h2 { max-width: 16em; font-size: clamp(1.875rem, 3.6vw, 2.75rem); color: #fff; }
.final p { margin-top: 14px; max-width: 34em; color: rgba(255, 255, 255, 0.82); font-size: 1.125rem; }
.final .cta { position: relative; z-index: 1; }
.final .btn-main { background: #fff; color: #0a3f9c; }
.final .btn-main:hover { background: #eaf1ff; }
.final .btn-quiet { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.final .btn-quiet small { color: rgba(255, 255, 255, 0.7); }
.final .btn-quiet:hover { background: rgba(255, 255, 255, 0.08); }
.final .btn-quiet[aria-disabled="true"]:hover { background: transparent; }
.final-ribbon { position: absolute; right: -80px; bottom: -70px; width: 520px; height: auto; pointer-events: none; }
.final-ribbon path { fill: none; stroke: #e2ae2c; stroke-width: 36; stroke-linecap: round; }

/* Footer */
.foot { padding: 56px 0 40px; border-top: 1px solid var(--line); }
.doc + .foot { margin-top: clamp(64px, 9vw, 120px); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.foot p { max-width: 28em; margin-top: 12px; color: var(--ink-soft); font-size: 0.9375rem; }
.foot ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.foot ul a { color: var(--ink); text-decoration: none; font-weight: 500; }
.foot ul a:hover { color: var(--blue); }
.legal { margin-top: 40px; font-size: 0.8125rem; color: var(--ink-soft); }

/* Guide page */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); padding: clamp(40px, 6vw, 72px) 0 0; }
.doc-nav { position: sticky; top: 92px; align-self: start; display: grid; gap: 2px; }
.doc-nav a { padding: 8px 12px; border-radius: 10px; color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.doc-nav a:hover { background: var(--mist); color: var(--ink); }
.doc h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
.doc-body > p { margin-top: 16px; font-size: 1.125rem; color: var(--ink-soft); max-width: 38em; }
.doc-body section { padding-top: 48px; scroll-margin-top: 80px; }
.doc-body h2 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); }
.doc-body ol, .doc-body ul { margin: 16px 0 0; padding-left: 1.25em; max-width: 40em; }
.doc-body li { margin-top: 8px; color: var(--ink-soft); }
.doc-body li::marker { color: var(--blue); font-weight: 600; }
.doc-body .tip { margin-top: 18px; max-width: 40em; padding: 14px 18px; border: 1px solid var(--line); background: var(--mist); border-radius: 12px; color: var(--ink); }

/* Narrow screens */
@media (max-width: 960px) {
  .menu { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 12px 16px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .menu.open { display: flex; }
  .menu a { padding: 12px; font-size: 1.0625rem; }
  .menu-btn { display: grid; }
  .top-row > .btn { display: none; }
  .hero-grid, .story, .faq { grid-template-columns: 1fr; }
  .story-flip .story-text { order: 0; }
  .hero-art { margin-top: 24px; }
  .steps { grid-template-columns: 1fr; }
  .doc { grid-template-columns: 1fr; }
  .doc-nav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .doc-nav a { white-space: nowrap; }
}
@media (max-width: 520px) {
  .cta .btn { width: 100%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-art.pair .phone + .phone { display: none; }
  .story-art.pair .phone { width: min(280px, 76vw); }
  .final { border-radius: 20px; }
  .final-ribbon { width: 360px; right: -120px; bottom: -90px; }
}

/* Language picker: a globe that opens a menu of real per-language pages */
.lang { position: relative; }
.lang summary { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 9px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 0.875rem; cursor: pointer; list-style: none; user-select: none; transition: background 0.15s, border-color 0.15s; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: var(--mist); }
.lang summary > svg:first-child { color: var(--blue); transition: transform 0.6s cubic-bezier(0.3, 1.4, 0.5, 1); }
.lang[open] summary { border-color: var(--blue); background: var(--mist); }
.lang[open] summary > svg:first-child { transform: rotate(200deg); }
.lang .chev { color: var(--ink-soft); transition: transform 0.2s; }
.lang[open] .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 184px; margin: 0; padding: 6px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--elev); transform-origin: top right; }
.lang[open] .lang-menu { animation: pop 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.lang-menu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.lang-menu a:hover { background: var(--mist); }
.lang-menu a[aria-current="true"] { color: var(--blue); font-weight: 600; }
.lang-menu a[aria-current="true"]::after { content: ""; width: 12px; height: 7px; margin-top: -3px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }

/* Hero notifications: what Ghost mode and the archive actually do, shown beside the phone */
.toast { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--elev); white-space: nowrap; font-size: 0.875rem; line-height: 1.3; }
.toast b { display: block; font-weight: 600; color: var(--ink); }
.toast small { display: block; color: var(--ink-soft); font-size: 0.8125rem; }
.toast-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
.toast-ico.teal { background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--teal); }
.toast-a { top: 18%; left: -38%; }
.toast-b { bottom: 16%; right: -30%; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lead, .hero .cta, .hero .facts { animation: lift 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .lead { animation-delay: 0.08s; }
  .hero .cta { animation-delay: 0.16s; }
  .hero .facts { animation-delay: 0.24s; }
  .toast-a { animation: toast-in 0.6s 1.1s cubic-bezier(0.2, 0.9, 0.3, 1.3) both, float 6s 1.7s ease-in-out infinite; }
  .toast-b { animation: toast-in 0.6s 1.7s cubic-bezier(0.2, 0.9, 0.3, 1.3) both, float 7s 2.3s ease-in-out infinite reverse; }
  .btn-main { position: relative; overflow: hidden; }
  .btn-main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%); transform: translateX(-120%); }
  .btn-main:hover::after { transform: translateX(120%); transition: transform 0.7s ease; }

  /* Scroll reveal: only once site.js has marked the page, so nothing hides without JavaScript */
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0s); }
  .js .reveal-art { transform: translateY(48px) rotate(-2deg); }
  .js .story-flip .reveal-art { transform: translateY(48px) rotate(2deg); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal .points li { opacity: 0; transform: translateX(-14px); transition: opacity 0.5s ease, transform 0.6s ease; }
  .js .reveal.in .points li { opacity: 1; transform: none; }
  .js .reveal.in .points li:nth-child(2) { transition-delay: 0.12s; }
  .js .reveal.in .points li:nth-child(3) { transition-delay: 0.24s; }
  .js .reveal.in .points li:nth-child(4) { transition-delay: 0.36s; }
  .js .reveal-art .phone + .phone { transition: transform 1s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .reveal-art:not(.in) .phone + .phone { transform: translateY(40px); }
  .js .steps li.reveal { border-top-color: transparent; background: linear-gradient(var(--ink), var(--ink)) top left / 0 2px no-repeat; transition: opacity 0.6s ease, transform 0.7s ease, background-size 0.9s 0.2s ease; }
  .js .steps li.reveal.in { background-size: 100% 2px; }
  .js .final.reveal .final-ribbon path { stroke-dasharray: 700; stroke-dashoffset: 700; transition: stroke-dashoffset 1.4s 0.3s cubic-bezier(0.6, 0, 0.2, 1); }
  .js .final.reveal.in .final-ribbon path { stroke-dashoffset: 0; }
  .phone img { transition: transform 0.5s ease; }
  .strip figure:hover .phone img { transform: scale(1.03); }
}
@keyframes lift { from { opacity: 0; transform: translateY(22px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.9); } }
@keyframes float { 50% { transform: translateY(-8px); } }

@media (max-width: 960px) {
  .lang { margin-left: auto; }
  .menu-btn { margin-left: 0; }
  .toast-a { left: -18%; }
  .toast-b { right: -14%; }
}
@media (max-width: 520px) {
  .toast { font-size: 0.8125rem; padding: 8px 10px 8px 8px; }
  .toast small { display: none; }
  .toast-a { left: -10%; top: 12%; }
  .toast-b { right: -8%; bottom: 12%; }
}

/* 404 */
.nf { min-height: 70vh; display: grid; align-content: center; gap: 18px; padding: 64px 0; }
.nf h1 { font-size: clamp(2.25rem, 6vw, 4rem); }
.nf p { color: var(--ink-soft); font-size: 1.125rem; }
.nf ul { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }

/* Long-form pages (privacy policy) */
.doc-body section p { margin-top: 12px; max-width: 42em; color: var(--ink-soft); }
.doc-body .updated { margin-top: 10px; font-size: 0.9375rem; color: var(--ink-soft); }
.doc-body .mail a { font-weight: 600; font-size: 1.125rem; }
.doc-body .hash { display: block; margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); font: 0.8125rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.doc-body .verify { margin-top: 16px; max-width: 40em; }
.doc-body .verify summary { cursor: pointer; color: var(--ink-soft); font-size: 0.9375rem; font-weight: 500; }
.doc-body .verify summary:hover { color: var(--ink); }
.doc-body .verify p { margin-top: 10px; font-size: 0.9375rem; }
