/* Сайт Torii: одна страница на язык, без скриптов и сборки. Цвета — как в самом расширении. */
@font-face { font-family: 'Manrope'; src: url('fonts/manrope-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; src: url('fonts/manrope-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --bg: #0c0d10;
  --surface: rgba(255,255,255,.04);
  --line: rgba(255,255,255,.08);
  --ink: #f4f4f5;
  --ink-2: rgba(244,244,245,.66);
  --ink-3: rgba(244,244,245,.42);
  --accent: #9b8cff;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 500 16px/1.6 'Manrope', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
/* мягкое свечение сверху — как живой фон расширения, но спокойнее */
body::before {
  content: ''; position: fixed; inset: -20vh -10vw auto; height: 90vh; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 25% 30%, rgba(106,61,240,.35), transparent 70%), radial-gradient(35% 45% at 80% 20%, rgba(25,180,196,.28), transparent 70%);
  filter: blur(20px);
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; }

/* шапка */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 14.5px; color: var(--ink-2); }
.nav a { text-decoration: none; transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav .lang { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; font-size: 13px; }
@media (max-width: 640px) { .nav a:not(.lang) { display: none; } }

/* первый экран */
.hero { text-align: center; padding: 56px 0 28px; }
.hero h1 { margin: 0 auto; max-width: 820px; font-size: clamp(28px, 7vw, 64px); overflow-wrap: break-word; line-height: 1.05; font-weight: 800; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #b9adff, #6fe0ea); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 20px auto 0; max-width: 600px; font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.note { margin-top: 14px; font-size: 13.5px; line-height: 1.7; color: var(--ink-3); }
.note a { color: var(--ink-2); text-underline-offset: 3px; }

/* кнопки магазинов */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); transition: background .2s, transform .2s, border-color .2s;
}
.btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); transform: translateY(-1px); }
.btn.primary { background: var(--ink); color: #0c0d10; border-color: transparent; }
.btn.primary:hover { background: #fff; }
.btn svg { width: 20px; height: 20px; flex: none; }
/* узкий телефон: кнопки во всю ширину, текст может переноситься — без горизонтальной прокрутки */
@media (max-width: 420px) { .cta .btn { width: 100%; justify-content: center; white-space: normal; } .support { padding: 24px 20px; } .support .btn, .support-btns { width: 100%; justify-content: center; } }
/* магазин ещё не опубликован: ссылка-заглушка (href="#"), подписываем «скоро» и не даём нажать */
.btn[data-soon] { pointer-events: none; opacity: .55; }
.btn[data-soon]::after { content: attr(data-soon); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--ink-2); }
.btn.primary[data-soon]::after { background: rgba(0,0,0,.1); color: rgba(0,0,0,.55); }

/* главный скриншот */
.shot-main { margin: 48px auto 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 40px 120px -30px rgba(106,61,240,.45), 0 30px 80px -40px rgba(0,0,0,.8); }

/* секции */
section { padding: 72px 0 0; }
.h2 { margin: 0 0 8px; font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.lead { margin: 0 0 32px; color: var(--ink-2); max-width: 640px; }

/* возможности — бенто: карточки разного размера, у каждой маленькая живая демонстрация (только CSS) */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 250px;
  border-radius: 24px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  transition: border-color .3s, transform .3s;
}
.card:hover { border-color: rgba(255,255,255,.16); transform: translateY(-2px); }
.card .txt { position: relative; z-index: 2; padding: 22px 24px 24px; margin-top: auto; }
.card h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; letter-spacing: -.015em; }
.card p { margin: 0; font-size: 14.5px; color: var(--ink-2); max-width: 46ch; }
.card .demo { position: relative; flex: 1; min-height: 120px; }
.c-layout { grid-column: span 4; }
.c-bg, .c-widgets, .c-glass, .c-scenes { grid-column: span 2; }
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .c-layout { grid-column: span 2; }
  .c-bg, .c-widgets, .c-glass, .c-scenes { grid-column: span 1; }
  .c-bg { min-height: 300px; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .bento > * { grid-column: auto !important; }
  .c-layout .mini { aspect-ratio: 16 / 11; }
}

/* свободная раскладка: мини-вкладка с точками сетки, один блок «тащат» курсором */
.c-layout .demo { flex: none; padding: 22px 22px 0; }
.mini {
  position: relative; aspect-ratio: 16 / 7.5; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(60% 80% at 20% 10%, rgba(106,61,240,.45), transparent 70%), radial-gradient(50% 70% at 90% 30%, rgba(25,180,196,.35), transparent 70%), #12131a;
}
.mini::before { content: ''; position: absolute; inset: 0; background: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1.4px) 0 0 / 22px 22px; opacity: .5; }
.blk { position: absolute; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px); padding: 10px 12px; }
.blk i { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.28); margin-top: 7px; }
.blk i:first-child { margin-top: 0; }
.blk .clock { font-size: clamp(26px, 4vw, 44px); font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.b-clock { left: 30%; top: 22%; width: 40%; height: 34%; display: grid; place-items: center; }
.b-wx { left: 4%; top: 7%; width: 22%; height: 30%; }
.b-notes { right: 4%; top: 7%; width: 22%; height: 46%; }
.b-links { left: 30%; top: 64%; width: 40%; height: 24%; display: flex; gap: 8%; align-items: center; justify-content: center; }
.b-links b { width: 12%; aspect-ratio: 1; border-radius: 8px; background: rgba(255,255,255,.22); }
.b-drag { left: 4%; top: 44%; width: 22%; height: 30%; border-color: rgba(185,173,255,.7); box-shadow: 0 18px 40px -12px rgba(0,0,0,.6), 0 0 0 3px rgba(155,140,255,.18); animation: drag 7s cubic-bezier(.6,0,.3,1) infinite; }
.b-drag::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 9px; height: 9px; border-right: 2px solid #b9adff; border-bottom: 2px solid #b9adff; border-radius: 0 0 3px 0; }
.cursor { position: absolute; left: 55%; top: 50%; width: 22px; height: 22px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
@keyframes drag {
  0%, 12% { transform: translate(0, 0); }
  40%, 58% { transform: translate(318%, 53%) scale(1.02); } /* в пустой угол справа внизу, мимо других блоков */
  86%, 100% { transform: translate(0, 0); }
}

/* живые фоны: вся карточка — плывущий градиент */
.c-bg .demo { position: absolute; inset: 0; }
.c-bg .demo::before {
  content: ''; position: absolute; inset: -40%; filter: blur(30px);
  background: radial-gradient(30% 30% at 30% 30%, #6a3df0, transparent 70%), radial-gradient(28% 28% at 70% 40%, #19b4c4, transparent 70%), radial-gradient(30% 30% at 45% 75%, #d946ef, transparent 70%), radial-gradient(25% 25% at 80% 80%, #f59e0b, transparent 70%), #14111f;
  animation: swirl 18s linear infinite;
}
.c-bg .demo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(12,13,16,.85)); }
@keyframes swirl { to { transform: rotate(360deg); } }

/* виджеты: крупная цифра и облако названий */
.c-widgets .demo { padding: 22px 24px 0; }
.big { font-size: 64px; font-weight: 800; letter-spacing: -.05em; line-height: 1; background: linear-gradient(90deg, #b9adff, #6fe0ea); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chips span { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); background: rgba(255,255,255,.06); border: 1px solid var(--line); }

/* стекло: матовая плашка ползёт по цветным полосам */
.c-glass .demo { margin: 22px 22px 0; border-radius: 16px; overflow: hidden; min-height: 130px;
  background: repeating-linear-gradient(115deg, #6a3df0 0 18px, #19b4c4 18px 36px, #f4f4f5 36px 54px, #d946ef 54px 72px, #0c0d10 72px 90px); }
.pane { position: absolute; top: 18%; bottom: 18%; left: 8%; width: 46%; border-radius: 14px; display: grid; place-items: center;
  font-size: 30px; font-weight: 800; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.3);
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 16px 30px -12px rgba(0,0,0,.5); animation: slide 8s ease-in-out infinite alternate; }
@keyframes slide { to { left: 46%; } }

/* раскладки: Alt+1…3, подсвечиваются по очереди */
.c-scenes .demo { padding: 26px 24px 0; display: flex; flex-direction: column; gap: 16px; }
.keys { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-weight: 700; }
.keys kbd { min-width: 34px; padding: 6px 9px; border-radius: 9px; text-align: center; font: 700 14px 'Manrope', sans-serif; color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05)); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 2px 0 rgba(0,0,0,.4); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs span { padding: 7px 13px; border-radius: 10px; font-size: 13.5px; font-weight: 700; color: var(--ink-3); border: 1px solid var(--line); animation: pick 6s infinite; }
.tabs span:nth-child(2) { animation-delay: 2s; }
.tabs span:nth-child(3) { animation-delay: 4s; }
@keyframes pick { 0%, 30% { color: var(--ink); background: rgba(155,140,255,.18); border-color: rgba(155,140,255,.5); } 34%, 100% { color: var(--ink-3); background: transparent; border-color: var(--line); } }


@media (prefers-reduced-motion: reduce) {
  .b-drag, .c-bg .demo::before, .pane, .tabs span { animation: none; }
}

/* скриншоты */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); transition: transform .25s, border-color .25s; }
.gallery a:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.18); }
.gallery figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.gallery figcaption b { color: var(--ink); }

/* главный скриншот — тоже вход в галерею */
.shot-link { display: block; cursor: zoom-in; }
.gallery a { cursor: zoom-in; }

/* галерея на весь экран (gallery.js) */
html.lb-open { overflow: hidden; }
.lb {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 56px 72px;
  background: rgba(8, 8, 11, .92); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .2s;
}
.lb.show { opacity: 1; }
.lb[hidden] { display: none; }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; }
.lb-img {
  max-width: min(1280px, 100%); max-height: calc(100vh - 150px); width: auto; height: auto;
  border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 30px 90px -20px rgba(0,0,0,.8);
  opacity: 0; transform: scale(.985); transition: opacity .2s, transform .25s;
}
.lb-img.on { opacity: 1; transform: none; }
.lb-cap { font-size: 14.5px; color: var(--ink-2); text-align: center; }
.lb-count { position: absolute; top: 20px; left: 24px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.lb-btn {
  position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,255,255,.06); color: var(--ink); display: grid; place-items: center; cursor: pointer;
  transition: background .2s, transform .2s;
}
.lb-btn:hover { background: rgba(255,255,255,.14); }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: 12px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-prev:active, .lb-next:active { transform: translateY(-50%) scale(.94); }
/* телефон: стрелки внизу, картинка во всю ширину */
@media (max-width: 640px) {
  .lb { padding: 56px 12px 84px; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
  .lb-prev { left: calc(50% - 58px); }
  .lb-next { right: calc(50% - 58px); }
  .lb-prev:active, .lb-next:active { transform: scale(.94); }
}

/* где установить */
.stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.store { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: background .2s, border-color .2s; }
.store:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }
.store svg { width: 32px; height: 32px; flex: none; }
.store b { display: block; font-size: 15.5px; }
.store span { display: block; font-size: 13px; color: var(--ink-3); }
.store[data-soon] { pointer-events: none; }
/* ещё не опубликован: пометка под названием магазина (attr() у ::after берёт атрибут своего элемента, а data-soon висит на ссылке, поэтому пометка — в разметке) */
.store .soon { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(155,140,255,.14); color: var(--accent); font-size: 11.5px; font-weight: 700; font-style: normal; }
.also { margin-top: 14px; font-size: 14px; color: var(--ink-3); }

/* поддержка */
.support { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 30px 32px; border-radius: 22px; background: linear-gradient(120deg, rgba(242,69,63,.16), rgba(155,140,255,.14)); border: 1px solid var(--line); }
.support h2 { margin: 0 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.support p { margin: 0; color: var(--ink-2); max-width: 560px; }
.btn.boosty { background: #f15f2c; color: #fff; border-color: transparent; }
.btn.boosty:hover { background: #ff6d39; }
.btn.tribute { background: #2aabee; color: #fff; border-color: transparent; }
.btn.tribute:hover { background: #3cb9f7; }
.support.tg { background: linear-gradient(120deg, rgba(42,171,238,.16), rgba(155,140,255,.14)); }
.support-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* подвал */
footer { margin-top: 88px; padding: 28px 0 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 14px; color: var(--ink-3); }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* страница политики */
.doc { max-width: 720px; padding: 40px 0 0; }
.doc h1 { font-size: clamp(30px, 4.5vw, 44px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 8px; }
.doc h2 { font-size: 20px; margin: 36px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc strong { color: var(--ink); }
.doc .date { color: var(--ink-3); font-size: 14px; }
