:root {
  --bg: #f6f5f9; --surface: #fff; --text: #1a192e; --muted: #5d5b73;
  --primary: #392ed1; --primary-fg: #fff; --border: #e3e1ee; --accent: #34c5bd;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a192e; --surface: #25243d; --text: #f2f1fa; --muted: #aaa8c4;
    --primary: #7b72ff; --primary-fg: #12111f; --border: #3a3958;
  }
  .logo-light { display: none; }
  .logo-dark { display: inline; }
}
.logo-dark { display: none; }
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.6;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Links inside running text stay underlined so they are recognizable. */
.doc a, details a, #contact a { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
header.site {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
header.site .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
header.site img { height: 28px; width: auto; }
nav.main { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
nav.main a { color: var(--text); text-decoration: none; font-size: .95rem; }
nav.main a:hover { color: var(--primary); }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 10px; font-weight: 600;
  text-decoration: none; background: var(--primary); color: var(--primary-fg) !important;
}
nav.main a.btn { color: var(--primary-fg); }
.btn.secondary { background: transparent; color: var(--text) !important; border: 1px solid var(--border); }
.btn.disabled { opacity: .6; pointer-events: none; }
.hero { padding: 72px 0 56px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0 0 16px; }
.hero p { max-width: 640px; margin: 0 auto 28px; color: var(--muted); font-size: 1.15rem; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
section { padding: 56px 0; }
section h2 { font-size: 1.8rem; margin: 0 0 24px; text-align: center; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }
ol.steps { max-width: 640px; margin: 0 auto; padding-left: 1.4rem; }
ol.steps li { margin-bottom: 12px; }
details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; margin: 0 auto 12px; max-width: 720px;
}
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }
.center { text-align: center; }
footer.site { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: .9rem; }
footer.site .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
footer.site a { color: var(--muted); margin-right: 14px; }
footer.site .wrap div:last-child a { margin-right: 0; }
.doc { max-width: 760px; margin: 0 auto; padding: 40px 20px 72px; }
.doc h1 { font-size: 2rem; margin: 0 0 4px; }
.doc h2 { text-align: left; font-size: 1.3rem; margin: 32px 0 8px; }
.doc .meta { color: var(--muted); margin-bottom: 24px; }
@media (max-width: 640px) {
  .hero { padding-top: 40px; }
}
@media print {
  header.site, footer.site { display: none; }
  body { background: #fff; color: #000; }
}
.embedded header.site, .embedded footer.site { display: none; }
.embedded .doc { padding-top: 16px; }
.embedded .hero { padding-top: 24px; }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
[id] { scroll-margin-top: 80px; }
header.site { transition: box-shadow .2s; }
header.site.scrolled { box-shadow: 0 2px 16px rgba(26, 25, 46, .12); }
.js [data-reveal] { opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease; transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Sections */
section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.hero { text-align: left; padding: 56px 0 72px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero p { margin-left: 0; }
.hero .cta { justify-content: flex-start; }
.hero-visual { position: relative; display: flex; justify-content: center; }
.blob { position: absolute; width: 360px; height: 360px; border-radius: 50%; top: 50%; left: 50%;
  transform: translate(-50%, -50%); background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: .22; filter: blur(20px); }
.chip { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 14px; font-weight: 600; font-size: .85rem; box-shadow: 0 8px 24px rgba(26, 25, 46, .15); }
.chip1 { top: 14%; left: 2%; animation: float 5s ease-in-out infinite; }
.chip2 { bottom: 16%; right: 0; animation: float 6s ease-in-out infinite .8s; }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .chip { animation: none; } }
.ico-wrap { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); margin-bottom: 12px; }
.ico { width: 22px; height: 22px; }
.card { transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(26, 25, 46, .12); }
ol.steps { list-style: none; padding: 0; max-width: 1040px; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
ol.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin: 0; }
ol.steps .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: var(--primary-fg); font-weight: 700; margin-bottom: 10px; }
ol.steps p { margin: 0; }
.cta-band { text-align: center; }
.cta-band .wrap { background: linear-gradient(135deg, var(--primary), #5b50ff); color: #fff; border-radius: 24px; padding: 48px 20px; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { margin: 0 0 20px; opacity: .9; }
.cta-band .btn { background: #fff; color: #392ed1 !important; }
.cta-band .btn.secondary { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .6); }

/* Showcase phones */
.shots { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); justify-items: center; }
figure { margin: 0; text-align: center; }
figcaption b { display: block; margin-top: 16px; }
figcaption span { color: var(--muted); font-size: .92rem; display: block; max-width: 240px; margin: 4px auto 0; }
.phone { width: 210px; aspect-ratio: 9 / 18.5; border: 8px solid #1a192e; border-radius: 34px; background: var(--bg);
  overflow: hidden; box-shadow: 0 24px 48px rgba(26, 25, 46, .25); position: relative; text-align: left; }
.phone .screen { padding: 14px 12px; height: 100%; display: flex; flex-direction: column; gap: 10px; }
.bar-title { font-weight: 700; font-size: .85rem; }
.stats { display: flex; gap: 8px; }
.stats div { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px 8px; }
.stats b { display: block; font-size: 1.1rem; color: var(--primary); }
.stats span { font-size: .62rem; color: var(--muted); }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.heat i { aspect-ratio: 1; border-radius: 2px; background: var(--border); }
.heat .l1 { background: color-mix(in srgb, var(--primary) 25%, var(--border)); }
.heat .l2 { background: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.heat .l3 { background: color-mix(in srgb, var(--primary) 75%, var(--border)); }
.heat .l4 { background: var(--primary); }
.row-card { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px; align-items: center; }
.row-card > div { flex: 1; display: grid; gap: 5px; }
.cover { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 4px; background: var(--primary); }
.row-card .cover { width: 28px; flex: none; }
.c1 { background: linear-gradient(160deg, #392ed1, #7b72ff); } .c2 { background: linear-gradient(160deg, #0f9d8f, #34c5bd); }
.c3 { background: linear-gradient(160deg, #e0663f, #f2a65a); } .c4 { background: linear-gradient(160deg, #7a3fb5, #c28cf0); }
.c5 { background: linear-gradient(160deg, #2a6fdb, #6cb4ff); } .c6 { background: linear-gradient(160deg, #c2415d, #f28aa0); }
u { display: block; height: 6px; border-radius: 3px; background: var(--border); text-decoration: none; }
u.s { width: 60%; }
em { display: block; height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; }
em s { display: block; height: 100%; background: var(--primary); text-decoration: none; }
.books { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.book { display: grid; gap: 5px; }
.phone.sepia { background: #f4ecd8; }
.reader .page { flex: 1; display: grid; align-content: start; gap: 7px; padding: 6px 2px; }
.reader u { background: #cdbf9f; }
.reader-bar { display: flex; justify-content: space-between; align-items: center; height: 24px; }
.reader-bar span { width: 40%; height: 4px; border-radius: 2px; background: #cdbf9f; }
.reader-bar .bm { width: 10px; height: 14px; border-radius: 2px; background: var(--primary); }

/* Floating buttons */
.to-top { position: fixed; right: 20px; bottom: 88px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--surface); color: var(--text); cursor: pointer; box-shadow: 0 6px 18px rgba(26, 25, 46, .22);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; z-index: 20; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.to-top-track { fill: none; stroke: var(--border); stroke-width: 3; }
.to-top-bar { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; }
.to-top-icon { position: absolute; inset: 12px; width: 20px; height: 20px; }
.chat-fab { position: fixed; right: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 16px; border-radius: 999px; background: #0a7cff; color: #fff; text-decoration: none;
  font-weight: 600; box-shadow: 0 8px 24px rgba(10, 124, 255, .4); z-index: 20; transition: transform .2s; }
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab svg { width: 24px; height: 24px; }
@media (max-width: 640px) { .chat-fab-label { display: none; } .chat-fab { width: 52px; padding: 0; justify-content: center; } }
.embedded .to-top, .embedded .chat-fab { display: none; }
@media print { .to-top, .chat-fab { display: none; } }
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .cta { justify-content: center; }
  .hero p { margin-left: auto; }
}

/* Header: language dropdown + mobile menu */
header.site .wrap { position: relative; }
.lang-menu { position: relative; background: none; border: 0; padding: 0; margin: 0; max-width: none; }
.lang-menu summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: 10px; font-weight: 400; }
.lang-menu summary::-webkit-details-marker { display: none; }
header.site .lang-menu img { display: block; width: auto; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.chev { width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.lang-menu[open] .chev { transform: rotate(-135deg) translateY(-2px); }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; margin: 0; padding: 6px; list-style: none;
  min-width: 168px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 28px rgba(26, 25, 46, .18); }
.lang-menu li a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: .95rem; }
.lang-menu li a:hover { background: var(--bg); }
.lang-menu li a[aria-current="true"] { font-weight: 700; color: var(--primary); }
.menu-btn { display: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 10px;
  background: transparent; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 22px; height: 22px; }
.menu-btn path { transform-origin: center; transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] .l1 { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .l2 { opacity: 0; }
.menu-btn[aria-expanded="true"] .l3 { transform: translateY(-5px) rotate(-45deg); }
@media (max-width: 800px) {
  header.site .wrap { gap: 10px; }
  .lang-menu { margin-left: auto; }
  .js .menu-btn { display: inline-flex; }
  .js nav.main { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 12px 20px 16px;
    flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 24px rgba(26, 25, 46, .14); }
  .js nav.main.open { display: flex; }
  .js nav.main a { padding: 12px 4px; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .js nav.main a.btn { margin-top: 14px; border: 0; text-align: center; padding: 12px 20px; }
  :root:not(.js) nav.main { order: 3; width: 100%; margin-left: 0; gap: 12px; }
  :root:not(.js) header.site .wrap { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
}
.btn:hover, .chat-fab:hover, nav.main a:hover, .lang-menu a:hover { text-decoration: none; }
.lang-menu .flag { display: flex; justify-content: center; width: 32px; flex: none; }
