/* =========================================================================
   Smart Book — landing (redesign)
   Ported from the "Smart Book Redesign" Claude Design prototype.
   Single stylesheet: tokens + nav + hero + capabilities + SEO + footer + modals.
   ========================================================================= */

/* Self-hosted Onest (variable, weights 400–800) — removes the render-blocking
   Google Fonts request. Subsets: latin, latin-ext, cyrillic, cyrillic-ext. */
@font-face{font-family:'Onest';font-style:normal;font-weight:400 800;font-display:swap;
  src:url(/static/fonts/onest-cyrillic-ext.woff2) format('woff2');
  unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'Onest';font-style:normal;font-weight:400 800;font-display:swap;
  src:url(/static/fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Onest';font-style:normal;font-weight:400 800;font-display:swap;
  src:url(/static/fonts/onest-latin-ext.woff2) format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Onest';font-style:normal;font-weight:400 800;font-display:swap;
  src:url(/static/fonts/onest-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* Geo suggestion banner — dismissible, shown only when the visitor's region differs (see landing.js) */
.geo-banner{display:flex;align-items:center;justify-content:center;gap:8px 16px;flex-wrap:wrap;
  padding:10px 20px;background:var(--brand-tint);color:var(--ink);font-size:14px;line-height:1.4;text-align:center}
.geo-banner[hidden]{display:none}
.geo-banner__go{font-weight:700;color:var(--brand-strong);text-decoration:none;white-space:nowrap}
.geo-banner__go:hover{text-decoration:underline}
.geo-banner__x{background:none;border:0;color:var(--muted-3);font:inherit;cursor:pointer;padding:2px 6px;white-space:nowrap}
.geo-banner__x:hover{color:var(--ink)}

:root {
  --brand:        #2E8DF0;
  --brand-strong: #1F6FD1;
  --brand-hover:  #1F7FE0;
  --brand-tint:   #E7F1FD;
  --brand-tint-2: #EAF3FE;

  --ink:      #141417;
  --ink-2:    #17171A;
  --nav-ink:  #4A4B52;
  --muted:    #54555C;
  --muted-2:  #5B5C63;
  --muted-3:  #6B6C73;
  --subtle:   #8A8B91;
  --subtle-2: #9A9BA1;

  --surface:       #FFFFFF;
  --surface-alt:   #F7F9FC;
  --surface-input: #FAFBFC;

  --dark:   #2C2C31;
  --dark-2: #1C1C20;

  --border:   #EDEEF1;
  --border-2: #EAEBEE;
  --border-3: #E2E3E7;

  --footer-sub:   #B7B8BD;
  --footer-muted: #9A9BA1;

  --radius-card: 18px;
  --radius-btn:  14px;
  --gutter: clamp(20px, 4vw, 48px);
  --maxw: 1200px;

  --shadow-hero: 0 44px 84px -36px rgba(0, 110, 210, .55);
  --shadow-card-hover: 0 18px 40px -24px rgba(46, 141, 240, .55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Onest', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink-2);
  background: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand-strong); text-decoration: none; }
a:hover { opacity: .85; }
img { max-width: 100%; }
::selection { background: #C7E0FB; color: var(--ink-2); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Offset anchor targets so the sticky nav doesn't cover them */
#features, #about, #faq, #download { scroll-margin-top: 80px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============================ NAV ============================ */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink-2); }
.brand__mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--dark);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.brand__mark span { display: flex; flex-direction: column; gap: 2.5px; width: 16px; }
.brand__mark span i { height: 2.5px; border-radius: 2px; background: var(--brand); display: block; }
.brand__mark span i:nth-child(1) { width: 100%; }
.brand__mark span i:nth-child(2) { width: 80%; }
.brand__mark span i:nth-child(3) { width: 92%; }
.brand__mark span i:nth-child(4) { width: 66%; }
.brand__name { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }

.nav__menu { display: flex; align-items: center; gap: 32px; }
.nav__link {
  font-size: 15px; font-weight: 500; color: var(--nav-ink);
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav__link:hover { color: var(--brand-strong); opacity: 1; }
.nav__link--active { color: var(--brand-strong); font-weight: 700; }
.nav__cta {
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px 20px; border-radius: 11px;
}
.nav__cta:hover { background: var(--brand-hover); opacity: 1; }

.nav__burger {
  display: none; width: 42px; height: 42px; border: 1px solid var(--border-3);
  border-radius: 11px; background: #fff; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav__burger i { width: 18px; height: 2px; border-radius: 2px; background: var(--dark); transition: transform .2s, opacity .2s; }

/* ============================ HERO ============================ */
.hero {
  position: relative;
  background: radial-gradient(900px 480px at 88% -10%, var(--brand-tint-2) 0%, rgba(234, 243, 254, 0) 62%);
}
.hero__inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(20px, 3vw, 36px) var(--gutter) clamp(44px, 6vw, 64px);
}
.hero__text { display: flex; flex-direction: column; gap: 26px; }
.badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-tint); color: var(--brand-strong);
  font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
}
.hero__title {
  font-size: clamp(38px, 6vw, 60px); line-height: 1.03; font-weight: 800;
  letter-spacing: -.03em; color: var(--ink);
}
.hero__sub { font-size: clamp(16px, 2.4vw, 19px); line-height: 1.6; color: var(--muted); max-width: 520px; }

.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font-size: 16px; font-weight: 700; border-radius: var(--radius-btn);
  padding: 15px 26px; cursor: pointer; font-family: inherit; border: 1.5px solid transparent;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn svg { display: block; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); opacity: 1; transform: translateY(-1px); }
.btn--ghost { background: #fff; color: var(--dark); border-color: var(--border-3); padding: 15px 24px; }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-strong); opacity: 1; }
.btn--ghost svg { color: var(--brand); }

.hero__media { justify-self: center; width: 100%; }
.poster {
  position: relative; border-radius: 26px; overflow: hidden; cursor: pointer;
  border: 0; padding: 0; width: 100%; display: block; background: var(--brand-tint-2);
  box-shadow: var(--shadow-hero);
}
.poster img { width: 100%; height: auto; display: block; }
.poster__overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 15px;
  background: radial-gradient(120% 90% at 50% 42%, rgba(4, 22, 48, .34) 0%, rgba(4, 22, 48, .05) 55%, rgba(4, 22, 48, 0) 78%);
  transition: background .2s ease;
}
.poster:hover .poster__overlay { background: radial-gradient(120% 90% at 50% 42%, rgba(4, 22, 48, .44) 0%, rgba(4, 22, 48, .08) 55%, rgba(4, 22, 48, 0) 78%); }
.poster__play {
  width: 82px; height: 82px; border-radius: 50%; background: rgba(255, 255, 255, .94);
  display: flex; align-items: center; justify-content: center; color: var(--brand);
  padding-left: 4px; box-shadow: 0 20px 44px -14px rgba(0, 0, 0, .45); transition: transform .18s ease;
}
.poster:hover .poster__play { transform: scale(1.07); }
.poster__label { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .01em; text-shadow: 0 2px 14px rgba(0, 20, 50, .5); }

/* ======================= CAPABILITIES ======================= */
.caps { background: var(--surface-alt); padding: clamp(48px, 7vw, 74px) 0 clamp(52px, 7vw, 82px); }
.caps__head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: var(--maxw); padding: 0 var(--gutter); margin: 0 auto clamp(28px, 4vw, 36px); }
.caps__inner { max-width: var(--maxw); margin: 0 auto; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-strong); }
.caps__title { font-size: clamp(28px, 4.4vw, 38px); font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.1; max-width: 640px; }
.caps__sub { font-size: clamp(15px, 2.2vw, 17px); line-height: 1.6; color: var(--muted); max-width: 640px; }

.caps__scroll {
  display: flex; gap: 20px; overflow-x: auto;
  /* Full-bleed: the row spans the whole viewport so cards run off the right
     edge, while the first card stays aligned under the header. Extra vertical
     padding leaves room for the hover shadow (overflow-x:auto also clips Y). */
  padding: 14px var(--gutter) 42px;
  padding-inline-start: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  scrollbar-width: thin;
}
.caps__scroll::-webkit-scrollbar { height: 8px; }
.caps__scroll::-webkit-scrollbar-thumb { background: #D3D6DD; border-radius: 8px; }
.caps__scroll::-webkit-scrollbar-track { background: transparent; }

.cap {
  flex: none; width: 322px; scroll-snap-align: start;
  border: 1px solid var(--border-2); border-radius: var(--radius-card);
  padding: 26px; display: flex; flex-direction: column; gap: 14px; background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.cap:hover { border-color: var(--brand); box-shadow: var(--shadow-card-hover); }
.cap__icon {
  width: 48px; height: 48px; border-radius: 13px; background: var(--brand-tint);
  color: var(--brand-strong); display: flex; align-items: center; justify-content: center; flex: none;
}
.cap__title { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.cap__desc { font-size: 15px; line-height: 1.6; color: var(--muted-2); }
.cap__shot {
  margin-top: auto; padding-top: 12px; align-self: flex-start;
  position: relative; cursor: zoom-in; border: 0; background: none;
}
.cap__frame {
  display: block; width: 150px; border-radius: 24px; padding: 7px; background: var(--dark);
  box-shadow: 0 16px 34px -20px rgba(0, 0, 0, .5); transition: transform .18s ease;
}
.cap__shot:hover .cap__frame { transform: translateY(-3px); }
.cap__frame img { width: 100%; display: block; border-radius: 17px; aspect-ratio: 1155 / 2294; object-fit: cover; background: var(--border); }
.cap__zoom {
  position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, .95); color: var(--brand);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px -3px rgba(0, 0, 0, .4);
}
.cap--more {
  width: 300px; border: 1.5px dashed #D8D9DE; background: transparent;
  justify-content: center; gap: 10px;
}
.cap--more:hover { border-color: var(--border-3); box-shadow: none; }
.cap--more .plus { font-size: 26px; color: #C3C4CA; font-weight: 300; line-height: 1; }
.cap--more h3 { font-size: 16px; font-weight: 700; color: var(--subtle); }
.cap--more p { font-size: 13.5px; line-height: 1.55; color: #A6A7AC; }

/* ======================= SEO SECTIONS ======================= */
.seo { padding: clamp(48px, 7vw, 76px) 0; }
.seo--faq { background: var(--surface-alt); }
.seo__inner { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.seo__title { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.12; max-width: 820px; }
.seo__text { font-size: 16px; line-height: 1.7; color: var(--muted); max-width: 820px; }

/* ========================= FAQ PAGE ========================= */
.faq { padding: clamp(44px, 6vw, 64px) 0 clamp(64px, 9vw, 96px); }
.faq__inner { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.faq__head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: clamp(24px, 4vw, 34px); }
.faq__title { font-size: clamp(32px, 5vw, 46px); font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.08; }
.faq__sub { font-size: clamp(16px, 2.4vw, 18px); line-height: 1.6; color: var(--muted); }

.faq__search { position: relative; max-width: 560px; margin-bottom: clamp(28px, 4vw, 44px); }
.faq__search input {
  width: 100%; padding: 15px 18px 15px 44px; border: 1.5px solid var(--border-3);
  border-radius: 14px; font-size: 16px; font-family: inherit; color: var(--ink);
  outline: none; background: var(--surface-input);
}
.faq__search input:focus { border-color: var(--brand); }
.faq__search input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.faq__search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--subtle-2); font-size: 18px; pointer-events: none; }

.faq__groups { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 38px); max-width: 880px; }
.faq__group { display: flex; flex-direction: column; gap: 12px; }
.faq__group[hidden] { display: none; }
.faq__cat { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); }
.faq__list { display: flex; flex-direction: column; gap: 10px; }

.faq__item { border: 1px solid var(--border-2); border-radius: 14px; background: #fff; overflow: hidden; transition: border-color .18s ease; }
.faq__item[hidden] { display: none; }
.faq__item.is-open { border-color: var(--brand); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; cursor: pointer; background: none; border: 0; font-family: inherit; text-align: left;
}
.faq__q-text { font-size: 16.5px; font-weight: 600; color: var(--ink); }
.faq__chev { font-size: 24px; line-height: 1; color: #C3C4CA; font-weight: 300; flex: none; transition: transform .2s ease, color .2s ease; }
.faq__item.is-open .faq__chev { transform: rotate(45deg); color: var(--brand); }

.faq__answer { padding: 0 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.faq__answer[hidden] { display: none; }
.faq__more { font-size: 13px; color: var(--subtle); font-weight: 600; }
.faq__links { display: flex; flex-wrap: wrap; gap: 10px; }
.faq__link {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  color: var(--brand-strong); border: 1px solid #D6E4F5; border-radius: 999px; padding: 6px 13px;
  transition: background .15s ease, border-color .15s ease;
}
.faq__link:hover { background: var(--brand-tint); border-color: var(--brand); opacity: 1; }
.faq__link svg { display: block; }
.faq__link--icon { padding-inline: 10px; }

.faq__empty { max-width: 880px; font-size: 16px; color: var(--subtle); }
.faq__empty[hidden] { display: none; }

/* ========================= FOOTER ========================= */
.foot { background: var(--dark); color: #fff; padding: clamp(48px, 6vw, 66px) 0 34px; }
.foot__inner { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.foot__head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 30px; }
.foot__title { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -.02em; }
.foot__sub { font-size: 16px; color: var(--footer-sub); max-width: 560px; }

.stores { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.store {
  display: inline-flex; align-items: center; gap: 11px; color: #fff; font-weight: 600; font-size: 15px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 13px; padding: 13px 20px; transition: background .15s ease;
}
.store:hover { background: rgba(255, 255, 255, .14); opacity: 1; }
.store svg { display: block; }

.foot__rule { height: 1px; background: rgba(255, 255, 255, .1); margin-bottom: 34px; }

.socials { display: flex; flex-direction: column; gap: 16px; margin-bottom: 44px; }
.socials__title { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); }
.socials__row { display: flex; gap: 12px; flex-wrap: wrap; }
.social {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center; color: #fff; transition: background .15s ease, border-color .15s ease;
}
.social:hover { background: var(--brand); border-color: var(--brand); opacity: 1; }

.foot__meta { display: flex; align-items: center; gap: 22px; font-size: 13px; color: var(--footer-muted); flex-wrap: wrap; margin-bottom: 20px; }
.foot__meta a { color: var(--footer-muted); }
.foot__meta a:hover { color: #fff; opacity: 1; }

.langs { padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); }
.langs__row { display: flex; gap: 18px; flex-wrap: wrap; }
.lang { font-size: 12.5px; color: var(--subtle); transition: color .15s ease; }
.lang:hover { color: #fff; opacity: 1; }
.lang--active { color: #fff; font-weight: 600; pointer-events: none; }

/* ========================= MODALS ========================= */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 32px; }
.modal[data-open="true"] { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(12, 16, 24, .75); }
.modal__close {
  position: absolute; top: -46px; right: 0; background: none; border: 0; color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer; font-family: inherit;
}
.modal__video { position: relative; width: 100%; max-width: 960px; aspect-ratio: 16 / 9; background: #000; border-radius: 18px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7); }
.modal__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal__shot { position: relative; }
.modal__shot img { display: block; border-radius: 24px; height: 78vh; max-height: 760px; width: auto; max-width: 88vw; }

/* ========================= RESPONSIVE ========================= */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 30px; }
  .hero__media { order: -1; max-width: 520px; }
  .hero__title { font-size: clamp(34px, 9vw, 46px); }
}

@media (max-width: 720px) {
  .nav__menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 8px;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 14px var(--gutter) 20px; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .2);
    display: none;
  }
  .nav[data-open="true"] .nav__menu { display: flex; }
  .nav__link { padding: 8px 0; font-size: 16px; text-align: left; }
  .nav__cta { text-align: center; margin-top: 6px; }
  .nav__burger { display: flex; }
  .nav[data-open="true"] .nav__burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav[data-open="true"] .nav__burger i:nth-child(2) { opacity: 0; }
  .nav[data-open="true"] .nav__burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
