/* ═════════════════════════════════════════════════════════════════════════
   ВНЕШНИЙ ВИД САЙТА
   1) ЦВЕТА ТЕМ — сразу ниже: у каждой темы свой набор переменных.
   2) Дальше — общие стили блоков (шапка, первый экран, карточки…).
   Свои правки удобнее писать в custom.css — он подключается после этого файла
   и его не затрёт обновление.
   ═════════════════════════════════════════════════════════════════════════ */

@font-face { font-family: "Nunito"; src: url("../fonts/Nunito-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/Exo2-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Comfortaa"; src: url("../fonts/Comfortaa-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Tektur"; src: url("../fonts/Tektur-SemiBold.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }

/* ───────────── 1. ТЕМЫ ───────────── */
:root, [data-theme="normal"] {
  --bg: #fff3f6;              /* цвет под живым фоном */
  --ink: #3a2630;             /* основной текст */
  --sub: #6b5260;             /* второстепенный текст */
  --card: rgba(255, 255, 255, .78);
  --card-border: #f1d3de;
  --chip: rgba(255, 228, 237, .9);
  --field: #fff9fb;
  --accent: #c94f68;          /* кнопки, акценты */
  --accent-ink: #ffffff;      /* текст на кнопке */
  --glow: rgba(255, 140, 175, .45);
  --bubble: #ffffff;
  --bubble-ink: #3a2630;
  --head: rgba(255, 246, 249, .78);
  --font-display: "Nunito", "Segoe UI", system-ui, sans-serif;
  --title-weight: 900;
  --card-shadow: 0 10px 30px rgba(201, 79, 104, .10);
  color-scheme: light;
}
[data-theme="chrome"] {
  --bg: #0a1534;
  --ink: #f2f7ff;
  --sub: #c4d3ef;
  --card: rgba(14, 27, 64, .62);
  --card-border: rgba(127, 240, 255, .30);
  --chip: rgba(127, 240, 255, .10);
  --field: rgba(7, 13, 34, .7);
  --accent: #7ff0ff;
  --accent-ink: #0b1426;
  --glow: rgba(178, 139, 255, .55);
  --bubble: #f2f7ff;
  --bubble-ink: #14295e;
  --head: rgba(10, 21, 52, .72);
  --font-display: "Exo 2", "Segoe UI", sans-serif;
  --title-weight: 900;
  --card-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
[data-theme="lagoon"] {
  --bg: #06242e;
  --ink: #eafcff;
  --sub: #b3dde2;
  --card: rgba(6, 36, 46, .62);
  --card-border: rgba(95, 243, 230, .30);
  --chip: rgba(255, 143, 177, .12);
  --field: rgba(2, 18, 24, .6);
  --accent: #ff8fb1;
  --accent-ink: #2b0f1c;
  --glow: rgba(255, 95, 162, .40);
  --bubble: #eafcff;
  --bubble-ink: #083a46;
  --head: rgba(4, 32, 42, .72);
  --font-display: "Comfortaa", "Segoe UI", sans-serif;
  --title-weight: 700;
  --card-shadow: 0 10px 40px rgba(0, 0, 0, .30);
  color-scheme: dark;
}
[data-theme="aqua"] {
  --bg: #0b5d8c;
  --ink: #ffffff;
  --sub: #e6f6ff;
  --card: rgba(3, 52, 92, .42);
  --card-border: rgba(143, 227, 255, .55);
  --chip: rgba(255, 255, 255, .14);
  --field: rgba(3, 44, 74, .55);
  --accent: #ffd84d;
  --accent-ink: #3a2a00;
  --glow: rgba(127, 227, 255, .55);
  --bubble: #ffffff;
  --bubble-ink: #0b5a8e;
  --head: rgba(8, 80, 128, .70);
  --font-display: "Nunito", "Segoe UI", sans-serif;
  --title-weight: 900;
  --card-shadow: 0 10px 34px rgba(0, 26, 48, .30);
  color-scheme: dark;
}
[data-theme="memory"] {
  --bg: #0a1619;
  --ink: #d4f7ff;
  --sub: #94cbd7;
  --card: rgba(8, 20, 23, .74);
  --card-border: rgba(143, 233, 255, .40);
  --chip: rgba(143, 233, 255, .08);
  --field: rgba(4, 9, 11, .7);
  --accent: #8fe9ff;
  --accent-ink: #061215;
  --glow: rgba(80, 210, 255, .40);
  --bubble: #c8f5ff;
  --bubble-ink: #0a1619;
  --head: rgba(8, 18, 21, .78);
  --font-display: "Tektur", "Segoe UI", sans-serif;
  --title-weight: 700;
  --card-shadow: 0 0 0 1px rgba(143, 233, 255, .10), 0 0 26px rgba(80, 210, 255, .12);
  color-scheme: dark;
}

/* ───────────── 2. ОСНОВА ───────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 17px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: background-color .6s ease, color .4s ease;
  overflow-x: hidden;
}
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
header, main, footer { position: relative; z-index: 1; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; }
h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: var(--title-weight); }
h3 { font-size: 20px; font-weight: 800; }
p { margin: 0; }
.muted { color: var(--sub); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.fill { fill: currentColor; stroke: none; }
.only-normal, .only-chrome, .only-lagoon, .only-aqua, .only-memory { display: none; }
[data-theme="normal"] .only-normal, [data-theme="chrome"] .only-chrome, [data-theme="lagoon"] .only-lagoon,
[data-theme="aqua"] .only-aqua, [data-theme="memory"] .only-memory { display: inline-block; }

/* ───────────── шапка ───────────── */
.top { position: sticky; top: 0; z-index: 20; transition: background-color .3s ease, box-shadow .3s ease; }
.top.scrolled { background: var(--head); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.top-row { display: flex; align-items: center; gap: 20px; min-height: 72px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo-ico { width: 40px; height: 40px; border-radius: 12px; }
.logo span { font-family: var(--font-display); font-weight: var(--title-weight); font-size: 22px; }
.nav { display: flex; gap: 6px 22px; flex-wrap: wrap; font-weight: 700; font-size: 15px; }
.nav a { text-decoration: none; padding: 6px 2px; opacity: .9; }
.nav a:hover { opacity: 1; color: var(--accent); }
.themes { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--card); border: 1px solid var(--card-border); }
.sw { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); padding: 0; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.sw:hover { transform: scale(1.08); }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.sw-normal { background: linear-gradient(135deg, #ffd0de, #f2a7c0); }
.sw-chrome { background: linear-gradient(135deg, #7ff0ff, #b28bff 55%, #ff9be1); }
.sw-lagoon { background: radial-gradient(circle at 35% 40%, #ff9a3d 0 22%, #0b4a55 24%); }
.sw-aqua { background: linear-gradient(160deg, #4fd6f6, #1592cc 55%, #043d66); }
.sw-memory { background: radial-gradient(circle at 50% 50%, #8fe9ff 0 18%, #0a1619 22%); }
.menu-btn { display: none; background: var(--card); border: 1px solid var(--card-border); color: var(--ink); width: 44px; height: 44px; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; order: 2; }
  .themes { order: 3; width: 100%; justify-content: center; }
  .nav { order: 4; display: none; width: 100%; flex-direction: column; gap: 0; padding-bottom: 8px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-top: 1px solid var(--card-border); }
}

/* ───────────── блоки ───────────── */
.block { padding: 64px 0; }
.sec-head { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin-bottom: 32px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lead { font-size: 19px; color: var(--sub); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 14px 24px; border-radius: 16px;
  font: 800 17px/1.2 "Segoe UI", system-ui, sans-serif; text-decoration: none; cursor: pointer; border: 0;
  transition: transform .2s ease, box-shadow .2s ease, background-color .3s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-main { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 28px var(--glow); }
.btn-second { background: transparent; color: var(--ink); border: 2px solid var(--card-border); }
.btn small { display: block; font-size: 13px; font-weight: 700; opacity: .8; margin-top: 2px; }
.center-row { display: flex; justify-content: center; margin-top: 22px; }

/* первый экран */
.hero { padding: 36px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; min-height: min(78vh, 720px); }
.hero.pic-left .hero-pic { order: -1; }
.hero-text { display: flex; flex-direction: column; gap: 22px; }
.badge { align-self: flex-start; padding: 8px 14px; border-radius: 999px; background: var(--chip); border: 1px solid var(--card-border); font-weight: 700; font-size: 14px; }
.hero-title { font-size: clamp(56px, 9vw, 112px); font-weight: var(--title-weight); letter-spacing: -.01em; display: flex; flex-direction: column; }
.hero-sub { font-size: clamp(22px, 2.6vw, 34px); font-weight: var(--title-weight); color: var(--accent); letter-spacing: .01em; margin-top: 6px; }
.hero-lead { font-size: 20px; line-height: 1.6; color: var(--sub); max-width: 32em; }
.hero-pic { position: relative; display: flex; justify-content: center; align-items: flex-end; }
.hero-glow { position: absolute; left: 8%; right: 8%; bottom: 0; height: 70%; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); filter: blur(12px); }
.hero-cat { position: relative; width: min(100%, 540px); }
.say { position: absolute; top: 2%; left: 0; padding: 12px 18px; border-radius: 22px 22px 22px 6px; background: var(--bubble); color: var(--bubble-ink);
  font-weight: 800; box-shadow: 0 10px 26px rgba(0,0,0,.14); animation: pop .6s .4s cubic-bezier(.2,1.4,.4,1) both; }
.breathe { animation: breathe 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012) translateY(-2px); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero.pic-left .hero-pic { order: 0; }
  .hero-pic { max-width: 480px; margin: 0 auto; }
}

/* карточки */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .cards, .cards.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards, .cards.cols-2, .cards.cols-4 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 24px; box-shadow: var(--card-shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; transition: transform .3s ease, background-color .5s ease, border-color .5s ease; }
.cards .card:hover { transform: translateY(-4px); }
.card-pic { height: 220px; display: flex; align-items: flex-end; justify-content: center; background: var(--chip); }
.card-pic img { max-height: 200px; width: auto; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.card-body p { color: var(--sub); }
.chips { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--card-border); font-weight: 700; font-size: 15px; backdrop-filter: blur(8px); }
.chips .ico { width: 16px; height: 16px; color: var(--accent); }

/* стили */
.styles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .styles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .styles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.style-card { display: flex; flex-direction: column; text-align: left; padding: 0 0 16px; border-radius: 22px; cursor: pointer; overflow: hidden;
  border: 2px solid transparent; font: inherit; transition: transform .25s ease, border-color .25s ease; color: #fff; }
.style-card:hover { transform: translateY(-4px); }
.style-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.style-pic { height: 170px; display: flex; align-items: flex-end; justify-content: center; padding-top: 10px; }
.style-pic img { max-height: 160px; width: auto; }
.style-name { padding: 12px 16px 2px; font-weight: 800; font-size: 17px; }
.style-desc { padding: 0 16px; font-size: 14px; line-height: 1.45; opacity: .9; }
.st-normal { background: linear-gradient(180deg, #ffe4ed, #fff7fa); color: #3a2630; }
.st-chrome { background: linear-gradient(180deg, #14295e, #0a1534 60%, #03060f); font-family: "Exo 2", sans-serif; }
.st-lagoon { background: radial-gradient(circle at 10% 100%, rgba(255,95,162,.35), transparent 50%), linear-gradient(180deg, #04202a, #083a46); }
.st-aqua { background: radial-gradient(circle at 50% -10%, #4fd6f6, #1592cc 50%, #043d66); }
.st-memory { background: radial-gradient(circle at 50% 40%, #12292f, #0a1619 65%, #050b0d); color: #c8f5ff; }

/* галерея */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.g-item { margin: 0; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--card-border); }
.g-video { grid-column: span 2; }
@media (max-width: 560px) { .g-video { grid-column: auto; } }
.g-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.g-item img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .5s ease; }
.g-open:hover img { transform: scale(1.04); }
.g-item video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.g-item figcaption { padding: 10px 14px; font-size: 14px; color: var(--sub); }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.86); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(92vw, 1600px); max-height: 88vh; border-radius: 14px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 30px; cursor: pointer; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* отзывы */
.reviews { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .reviews { grid-template-columns: 1fr; } }
.review-form { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.review-form label, .field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; }
.review-form input, .review-form textarea { font: 600 16px/1.4 "Segoe UI", system-ui, sans-serif; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--card-border); background: var(--field); color: var(--ink); resize: vertical; }
.paws { display: flex; gap: 6px; }
.paws button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--card-border); background: var(--field); color: var(--sub); opacity: .45; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.paws button.on { color: var(--accent); opacity: 1; }
.paws .ico { width: 24px; height: 24px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.review-form .btn { align-self: flex-start; }
.form-msg { min-height: 1.4em; font-size: 15px; font-weight: 700; }
.form-msg.err { color: #ff6b8b; }
.review-list { display: flex; flex-direction: column; gap: 14px; }
.review { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.review-top { display: flex; align-items: center; gap: 12px; }
.review-ava { width: 42px; height: 42px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.review-name { font-weight: 800; flex: 1; }
.review-paws { display: flex; gap: 2px; color: var(--accent); }
.review-paws .ico { width: 16px; height: 16px; }
.review p { color: var(--sub); }
.review time { font-size: 13px; color: var(--sub); }

/* текст, картинка+текст, скачать */
.prose { display: flex; flex-direction: column; gap: 14px; font-size: 18px; color: var(--sub); margin-top: 16px; }
.prose a { color: var(--accent); }
.narrow .btns { margin-top: 22px; }
.narrow.center .btns { justify-content: center; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split.pic-left .split-pic { order: -1; }
.split-pic { display: flex; justify-content: center; }
.split-pic img { max-height: 460px; width: auto; }
.split-text .btns { margin-top: 22px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.pic-left .split-pic { order: 0; } }
.download { padding: clamp(24px, 4vw, 48px); display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.dl-main { flex: 1 1 420px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dl-news { flex: 1 1 300px; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 20px; background: var(--chip); }
.notes { margin: 0; padding-left: 20px; color: var(--sub); }
.sha { font-size: 13px; color: var(--sub); word-break: break-all; }

/* подвал */
.foot { border-top: 1px solid var(--card-border); background: var(--head); backdrop-filter: blur(10px); }
.foot-row { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; padding-top: 26px; padding-bottom: 30px; }
.foot-name { font-weight: 800; margin-right: auto; }
.foot-love { display: inline-flex; align-items: center; gap: 6px; color: var(--sub); }
.foot-love .ico { width: 16px; height: 16px; color: var(--accent); fill: currentColor; }
.foot-author { font-weight: 700; }

/* появление блоков при прокрутке */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* особенности тем */
[data-theme="aqua"] h1, [data-theme="aqua"] h2 { text-shadow: 0 2px 14px rgba(0, 40, 80, .35); }
[data-theme="memory"] .card { border-radius: 16px; }
[data-theme="memory"] .hero-sub, [data-theme="memory"] h2 { text-shadow: 0 0 18px rgba(143, 233, 255, .35); }
[data-theme="chrome"] .hero-sub { background: linear-gradient(90deg, #7ff0ff, #b28bff, #ff9be1); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 404 */
.nf { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 40px 20px; }
.nf img { width: min(320px, 70vw); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .breathe, .say { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
