/* Avisto marketing site — shares its palette with the app (src/theme/tokens.ts). */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e3e6ea;
  --text: #14181f;
  --muted: #5b6472;
  --primary: #0b5fff;
  --primary-soft: rgba(11, 95, 255, 0.1);
  --danger: #d33a2c;
  --danger-soft: rgba(211, 58, 44, 0.1);
  --green: #c9edd9;
  --peach: #f6d3c9;
  --amber: #fbebc5;
  --star: #f5a623;
  --radius: 12px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
a:focus-visible, summary:focus-visible, .btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
img, svg { max-width: 100%; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 10; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(247, 248, 250, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; }
.brand-mark { width: 32px; height: 32px; display: block; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--text); }
.nav .lang { border: 1px solid var(--border); border-radius: 20px; padding: 2px 12px; background: var(--surface); }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }

/* Buttons — tinted pills, like the app */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 20px; border-radius: 22px; font-weight: 700; font-size: 15px; text-decoration: none; background: var(--primary-soft); color: var(--primary); }
.btn:hover { background: rgba(11, 95, 255, 0.16); }
.btn.solid { background: var(--primary); color: #fff; }
.btn.solid:hover { background: #0952e0; }

/* Hero */
.hero { padding: 64px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }
.eyebrow { display: inline-block; background: var(--blue-pill, #d6e4f7); color: var(--text); font-size: 13px; font-weight: 600; padding: 2px 12px; border-radius: 8px; margin-bottom: 16px; }
h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3.6vw, 34px); line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 18px; margin: 0 0 6px; }
.lead { font-size: 19px; color: var(--muted); max-width: 34em; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* App preview card (drawn in CSS, mirrors the in-app review card) */
.preview { display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: 0 8px 30px rgba(20, 24, 31, 0.06); }
.card .top { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.card .name { font-weight: 600; font-size: 17px; line-height: 1.2; }
.card .sub { color: var(--muted); font-size: 13px; }
.card .rating { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-top: 2px; }
.stars { color: var(--star); letter-spacing: 1px; }
.card p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 8px; }
.pill.green { background: var(--green); }
.pill.peach { background: var(--peach); }
.pill.amber { background: var(--amber); }
.pill.blue { background: #d6e4f7; }
.mini-actions { display: flex; gap: 8px; margin-top: 12px; }
.mini { flex: 1; height: 36px; border-radius: 18px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.mini.danger { background: var(--danger-soft); color: var(--danger); }

/* Sections */
section { padding: 56px 0; }
.section-head { max-width: 40em; margin-bottom: 32px; }
.section-head p { color: var(--muted); margin: 0; font-size: 18px; }
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; }
.step-arrow { align-self: center; }
.step-art { display: block; margin-bottom: 12px; }
@media (max-width: 860px) { .grid.three { grid-template-columns: 1fr; } .step-arrow { justify-self: center; transform: rotate(90deg); margin: -4px 0; } }
.grid.features { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid.features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid.features { grid-template-columns: 1fr; } }
.step { position: relative; }
.step .num { position: absolute; top: 20px; left: 72px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; border: 2px solid var(--surface, #fff); }
.card.plain { box-shadow: none; }
.card.plain p { margin-top: 4px; font-size: 15px; }
code, .tag { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--primary-soft); color: var(--primary); border-radius: 6px; padding: 1px 6px; }

.privacy-band { background: var(--surface); border-block: 1px solid var(--border); }
.privacy-band ul { margin: 16px 0 24px; padding: 0; list-style: none; display: grid; gap: 10px; }
.privacy-band li { display: flex; gap: 10px; align-items: flex-start; }
.privacy-band li::before { content: "✓"; color: #1e8e5a; font-weight: 700; }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

/* Footer */
.site-footer { padding: 40px 0 56px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.legal-note { margin-top: 20px; font-size: 12px; max-width: 60em; }

/* Long-form pages (privacy, terms, support) */
.doc { padding: 48px 0 24px; max-width: 760px; }
.doc h1 { font-size: clamp(30px, 4.5vw, 40px); }
.doc h2 { font-size: 22px; margin-top: 36px; }
.doc p, .doc li { color: #2b3340; }
.doc .updated { color: var(--muted); font-size: 14px; }
.doc ul { padding-left: 20px; }

/* iPhone-style frame around the app preview */
.phone { justify-self: center; width: min(320px, 100%); background: #14181f; border-radius: 46px; padding: 10px; box-shadow: 0 30px 60px rgba(20, 24, 31, 0.25); }
.screen { background: var(--bg, #f7f8fa); border-radius: 36px; overflow: hidden; display: flex; flex-direction: column; }
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px 6px; font-size: 13px; font-weight: 600; }
.statusbar .island { width: 84px; height: 22px; border-radius: 12px; background: #14181f; }
.phone .preview { padding: 8px 14px 16px; gap: 10px; }
.phone .card { padding: 12px; box-shadow: none; }
.phone .card p { font-size: 13px; }
.app-title { font-size: 26px; font-weight: 700; padding: 4px 2px; }
.tabbar { display: flex; justify-content: space-around; border-top: 1px solid var(--border); background: #fff; padding: 10px 0 18px; font-size: 11px; color: var(--muted); }
.tabbar .on { color: var(--primary); font-weight: 700; }

/* Swipeable strip of phone screens */
.phones { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 24px; min-width: 0; -webkit-overflow-scrolling: touch; }
.phones .phone { flex: none; width: 300px; scroll-snap-align: center; }
.app-title.row { display: flex; justify-content: space-between; align-items: center; font-size: 20px; }
.plus { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 22px; font-weight: 500; }
.tagpanel { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px; border: 1px solid var(--primary); border-radius: 12px; background: #0b5fff15; }
.chip { font-size: 10px; color: var(--muted); background: #fff; border: 1px solid var(--primary); border-radius: 14px; padding: 3px 8px; }
.chip b { color: var(--primary); }
.phones .avatar { font-size: 13px; }

/* Side by side, same size; swipe only on narrow screens */
.phones { overflow: visible; justify-content: center; align-items: stretch; padding: 8px 0 24px; }
.phones .phone { width: 270px; display: flex; flex-direction: column; }
.phones .screen { flex: 1; }
.phones .preview { flex: 1; align-content: start; }
@media (max-width: 640px) { .phones { overflow-x: auto; justify-content: flex-start; } .phones .phone { width: 280px; } }

/* Shorter phones */
.phones .phone { border-radius: 38px; padding: 8px; }
.phones .screen { border-radius: 30px; }
.phones .preview { min-height: 400px; flex: none; gap: 8px; }
.phones .statusbar { padding-top: 8px; }
.phones .app-title { font-size: 22px; padding: 0 2px; }
.phones .card { padding: 10px; }
.phones .card p { margin-top: 6px; }
.phones .divider { margin: 8px 0; }
.phones .mini-actions { margin-top: 8px; }
.phones .mini { height: 32px; }
.phones .tabbar { padding-bottom: 12px; }

/* One phone at a time, dots below */
.showcase { min-width: 0; justify-self: center; width: min(300px, 100%); }
.phones { overflow-x: auto; overflow-y: hidden; justify-content: flex-start; gap: 0; padding: 8px 0 12px; scrollbar-width: none; }
.phones::-webkit-scrollbar { display: none; }
.phones .phone { width: 100%; flex: none; scroll-snap-align: center; }
.dots { display: flex; justify-content: center; gap: 8px; }
.dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; background: var(--border); cursor: pointer; transition: background .2s, width .2s; }
.dots button.on { background: var(--primary); width: 22px; border-radius: 5px; }

/* One background for the whole screen; more breathing room */
.screen, .statusbar, .tabbar { background: var(--bg); }
.tabbar { border-top-color: var(--border); }
.phones .preview { padding: 12px 20px 20px; gap: 12px; min-height: 420px; }
.phones .statusbar { padding: 10px 26px 4px; }
.phones .tabbar { padding: 12px 20px 16px; }
.phones .card { padding: 14px; }
.tagpanel { margin: 0; padding: 12px; }
.phones .phone { padding: 10px; }
.showcase { width: min(320px, 100%); }

/* Keep the phone's shadow inside the scroll area so it is not clipped into a grey box */
.showcase { width: min(360px, 100%); }
.phones { padding: 0; }
.phones .phone { flex: 0 0 calc(100% - 56px); width: auto; margin: 12px 28px 40px; box-shadow: 0 14px 30px rgba(20, 24, 31, 0.16); }

.feat-art { display: block; margin-bottom: 14px; }

h2 .sec-icon { display: inline-block; vertical-align: -12px; margin-right: 12px; }
@media (max-width: 480px) { h2 .sec-icon { width: 32px; height: 32px; vertical-align: -8px; margin-right: 10px; } }

/* Let long section titles (English) stay on one line on wide screens */
.section-head { max-width: 56em; }
.section-head h2 { text-wrap: balance; }
