/* ============================================================
   Приз_КитБот — стили (один статический файл, мимо CSS-бандла Vite).
   Тема «Цифровой океан»: тёмная глубина, неоновая бирюза, код-цифры,
   плавающие кит и медузы. Анимации в духе craft (Emil Kowalski).
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* неоновая морская палитра на тёмном */
  --brand: #2dd4bf;          /* яркая бирюза — ссылки, акценты, кнопки */
  --brand-dark: #5eead4;     /* светлее (hover) */
  --brand-deep: #38bdf8;     /* голубой акцент */
  --brand-sh: rgba(45,212,191,.4);
  --grad: linear-gradient(120deg, #5eead4 0%, #38bdf8 100%);     /* текст-акцент (читаемый на тёмном) */
  --grad-cta: linear-gradient(135deg, #2dd4bf 0%, #0369A1 100%); /* фон CTA, текст белый */

  --ink: #eaf4ff;            /* заголовки */
  --fg: #c7d8ec;             /* основной текст */
  --muted: #8aa2bb;          /* приглушённый */
  --bg: #04101e;             /* база */
  --surface: rgba(14,38,60,.5);    /* тёмное стекло — карточки */
  --surface2: rgba(20,48,74,.62);  /* стекло поярче (hover/thead) */
  --border: rgba(94,234,212,.16);
  --border-hi: rgba(94,234,212,.42);

  --radius: 16px;
  --maxw: 1080px;
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  --spring: cubic-bezier(.22,.68,.32,1.2);
  --ease: cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--fg); line-height: 1.6;
  overflow-x: hidden;
  background:
    radial-gradient(120% 80% at 80% -10%, rgba(56,189,248,.10), transparent 55%),
    radial-gradient(100% 70% at 10% 0%, rgba(45,212,191,.10), transparent 50%),
    linear-gradient(180deg, #06182b 0%, #04101e 32%, #020a13 100%);
  background-attachment: fixed;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
section { position: relative; z-index: 1; padding: 64px 0; }
.band { background: rgba(6,18,32,.45); }
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.02em; color: var(--ink); }
.sec-h2 { text-align: center; font-size: 28px; margin: 0 0 36px; font-weight: 800; }
@media (min-width: 720px) { .sec-h2 { font-size: 34px; } }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* поля ввода — тёмное стекло (рандомайзер, поиск) */
textarea, input, select {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); border-radius: 12px;
  font-family: var(--font);
}
textarea::placeholder, input::placeholder { color: var(--muted); }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45,212,191,.16); }

/* ---------- Кнопки ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-block;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand) 55%, var(--brand-deep));
  color: #04141a;
  text-decoration: none;
  font-weight: 700; font-size: 16px;
  padding: 14px 28px; border-radius: 13px; border: none; cursor: pointer;
  box-shadow: 0 10px 26px -10px var(--brand-sh);
  transition: transform .18s var(--spring), box-shadow .18s var(--ease);
}
.btn::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 70%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-18deg); transition: left .6s var(--ease); pointer-events: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -12px var(--brand-sh); }
.btn:hover::after { left: 130%; }
.btn:active { transform: translateY(0) scale(.985); }
.btn-lg { padding: 17px 38px; font-size: 17px; border-radius: 16px; }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--border); box-shadow: none; }
.btn-secondary::after { display: none; }
.btn-secondary:hover { background: var(--surface2); border-color: var(--border-hi); }

.muted { color: var(--muted); }

/* ---------- Карточки (тёмное стекло со свечением по краю) ---------- */
.grid { display: grid; gap: 22px; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 26px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(94,234,212,.32), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .6; transition: opacity .22s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-hi); box-shadow: 0 22px 50px -24px rgba(2,12,24,.7), 0 0 36px rgba(45,212,191,.08); }
.card:hover::before { opacity: 1; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { color: var(--muted); }
.card:hover .icon-tile { transform: scale(1.08) rotate(-3deg); }

/* светящиеся плитки-иконки */
.icon-tile {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; color: var(--brand-dark);
  background: radial-gradient(120% 120% at 30% 20%, rgba(94,234,212,.28), rgba(56,189,248,.12));
  border: 1px solid var(--border-hi); box-shadow: 0 0 24px rgba(45,212,191,.2);
  transition: transform .25s var(--spring);
}
.icon-tile svg { width: 26px; height: 26px; }

/* ---------- Header (тёмное стекло) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(4,16,30,.6);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.hdr { display: flex; align-items: center; gap: 14px; padding: 12px 16px; max-width: var(--maxw); margin: 0 auto; }
.logo { flex: none; display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 17px; }
.logo img { border-radius: 50%; box-shadow: 0 0 0 1px var(--border), 0 0 16px rgba(45,212,191,.3); }

/* Навигация: мобилка — выпадающее меню по бургеру (тёмное стекло, плавно).
   Десктоп (≥880px) — inline-ряд справа, бургер скрыт. */
.nav { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; gap: 2px;
  background: rgba(4,16,30,.98); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); box-shadow: 0 18px 40px -20px #000; padding: 8px 14px 14px;
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease); }
.nav.open { opacity: 1; transform: none; pointer-events: auto; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 600; font-size: 16px; padding: 13px 10px; border-radius: 10px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.nav a.active { color: var(--brand-dark); background: rgba(45,212,191,.1); }
.site-header .btn { margin-left: auto; padding: 9px 15px; font-size: 14px; white-space: nowrap; flex: none; }

/* Узкие телефоны: ужимаем логотип/кнопку/отступы, чтобы шапка влезла в одну
   строку и кнопка «Открыть бот» не переносилась на две строки. */
@media (max-width: 400px) {
  .hdr { gap: 9px; padding: 11px 12px; }
  .logo { font-size: 15px; gap: 8px; }
  .logo img { width: 28px; height: 28px; }
  .site-header .btn { padding: 8px 12px; font-size: 13px; }
  .burger { width: 40px; height: 38px; }
}

.burger { flex: none; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 40px; padding: 0 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; cursor: pointer; transition: border-color .15s; }
.burger:hover { border-color: var(--border-hi); }
.burger span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px;
  transition: transform .25s var(--spring), opacity .2s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 880px) {
  .nav { position: static; flex-direction: row; gap: 24px; align-items: center;
    background: none; box-shadow: none; border: none; padding: 0; margin-left: auto;
    opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 0; font-size: 15px; border-radius: 0; }
  .nav a:hover, .nav a.active { background: none; }
  .nav a.active { color: var(--brand); }
  .site-header .btn { margin-left: 22px; }
  .burger { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: rgba(4,14,26,.6); padding: 44px 0 28px; margin-top: 0; }
.cols { display: grid; gap: 24px; }
.ft-brand { font-weight: 800; margin-bottom: 6px; color: var(--ink); }
.site-footer nav { display: flex; flex-direction: column; gap: 9px; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .15s, transform .15s var(--ease); }
.site-footer nav a:hover { color: var(--brand); transform: translateX(3px); }
.copyright { margin-top: 24px; font-size: 13px; color: var(--muted); }
@media (min-width: 720px) { .cols { grid-template-columns: 2fr 1fr 1fr; } }

/* ---------- Hero (текст над цифровым океаном; кит плавает в фоне глобально) ---------- */
.hero { position: relative; display: flex; align-items: center; min-height: clamp(560px, 84vh, 760px); padding: 0; text-align: left; }
.hero .container { position: relative; z-index: 2; }
.hero .copy { max-width: 540px; position: relative; }
/* мягкая подложка под текст — без жёстких краёв, тает в океан */
.hero .copy::before { content: ''; position: absolute; inset: -36px -70px -36px -50px; z-index: -1;
  background: radial-gradient(120% 100% at 30% 50%, rgba(4,16,30,.74), rgba(4,16,30,.36) 46%, transparent 74%); }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(45,212,191,.12); color: #7de8d6; border: 1px solid rgba(45,212,191,.3); font-weight: 600; font-size: 14px; padding: 8px 15px; border-radius: 999px; margin-bottom: 22px; }
.hero-badge .float { display: inline-block; animation: float 3.2s ease-in-out infinite; }
.hero h1 { font-size: 34px; line-height: 1.07; margin: 0 0 18px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
@media (min-width: 720px) { .hero h1 { font-size: 56px; } }
.accent { background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradient-pan 7s ease infinite; }
.lead { font-size: 19px; color: var(--fg); max-width: 620px; margin: 0 auto 30px; }
.hero .accent { -webkit-text-fill-color: #5eead4; }
.hero .lead { font-size: 19px; line-height: 1.55; color: #bcd0e6; max-width: 540px; margin: 0 0 28px; }
.hero-cta { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; text-decoration: none; padding: 15px 30px; border-radius: 14px; color: #04141a; background: linear-gradient(135deg, #2dd4bf, #22a8c9); box-shadow: 0 12px 34px rgba(45,212,191,.35); transition: transform .18s var(--ease); }
.hero-cta:hover { transform: translateY(-2px); }
.hero-note { font-size: 14px; color: #6f86a8; margin-top: 16px; }
@media (max-width: 820px) { .hero { min-height: 70vh; text-align: center; } .hero .copy { margin: 0 auto; } }

/* ---------- Шаги ---------- */
.steps-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 980px; margin: 0 auto; }
.step-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 20px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .22s var(--ease), border-color .22s var(--ease); }
.step-card:hover { transform: translateY(-3px); border-color: var(--border-hi); }
.step-card h3 { margin: 0 0 6px; font-size: 17px; }
.step-card p { margin: 0; font-size: 15px; color: var(--muted); }
.step-ic { position: relative; width: 58px; height: 58px; border-radius: 16px; background: radial-gradient(120% 120% at 30% 20%, rgba(94,234,212,.26), rgba(56,189,248,.12)); border: 1px solid var(--border-hi); box-shadow: 0 0 22px rgba(45,212,191,.18); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; transition: transform .25s var(--spring); }
.step-card:hover .step-ic { transform: translateY(-3px) scale(1.05); }
.step-emoji { font-size: 28px; line-height: 1; }
.step-no { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-dark), var(--brand-deep)); color: #04141a; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 14px rgba(45,212,191,.4); }

/* ---------- Возможности ---------- */
.feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 720px) { .feats { grid-template-columns: 1fr 1fr; } }
.feats li { display: flex; align-items: center; gap: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 15px 18px; font-weight: 600; color: var(--fg); transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s var(--ease); }
.feats li:hover { border-color: var(--border-hi); transform: translateX(3px); background: var(--surface2); }
.feat-emoji { flex: none; width: 30px; text-align: center; font-size: 22px; line-height: 1; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 4px 24px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
details { border-bottom: 1px solid var(--border); }
details:last-child { border-bottom: none; }
summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 18px 28px 18px 0; list-style: none; position: relative; transition: color .15s; }
summary:hover { color: var(--brand); }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 2px; top: 15px; font-size: 22px; color: var(--brand); transition: transform .25s var(--spring); }
details[open] summary::after { transform: rotate(135deg); }
.ans { padding: 0 0 18px; color: var(--muted); animation: answer-in .28s var(--ease); }

/* ---------- CTA (яркая панель-акцент) ---------- */
.cta { text-align: center; }
.cta .container { background: var(--grad-cta); border-radius: 26px; padding: 54px 28px; box-shadow: 0 26px 60px -26px rgba(3,105,161,.6), 0 0 50px rgba(45,212,191,.12); }
.cta h2 { margin: 0 0 22px; color: #fff; font-size: 28px; }
@media (min-width: 720px) { .cta h2 { font-size: 32px; } }
.cta .btn { background: #fff; color: #0b5d56; box-shadow: 0 10px 22px -8px rgba(0,0,0,.3); }
.cta .btn:hover { background: #fff; color: #0369A1; }

/* ---------- Блог ---------- */
.post-list { list-style: none; padding: 0; }
.post-list li { padding: 18px 0; border-bottom: 1px solid var(--border); }
.post-list a { font-weight: 700; font-size: 18px; text-decoration: none; color: var(--ink); transition: color .15s; }
.post-list a:hover { color: var(--brand); }

/* ---------- Статьи ---------- */
.art-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 28px; }
.art-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; color: var(--fg); }
.art-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: rgba(8,22,38,.6); }
.art-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s var(--ease); }
.art-card:hover .art-thumb img { transform: scale(1.05); }
.art-body { padding: 18px 20px 22px; }
.art-date { font-size: 13px; color: var(--muted); }
.art-card h3 { margin: 6px 0 8px; font-size: 18px; }
.art-card p { margin: 0; font-size: 14px; color: var(--muted); }
.art-hero { width: 100%; border-radius: 14px; margin: 0 0 8px; }
.art-source { font-size: 14px; margin-top: 28px; color: var(--muted); }

/* ---------- Кит_Биржа ---------- */
.birzha-meta { margin: 4px 0 14px; font-size: 14px; color: var(--muted); }
.birzha-search { width: 100%; box-sizing: border-box; font-size: 15px; padding: 12px 16px; margin: 0 0 16px; }
.birzha-empty { margin: 0 0 16px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
table.birzha { width: 100%; border-collapse: collapse; font-size: 15px; }
table.birzha th, table.birzha td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
table.birzha tbody tr:last-child td { border-bottom: none; }
table.birzha thead th { background: var(--surface2); font-weight: 700; color: var(--ink); white-space: nowrap; }
table.birzha th.num, table.birzha td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.birzha th.sortable { cursor: pointer; user-select: none; transition: color .15s; }
table.birzha th.sortable:hover { color: var(--brand); }
table.birzha th .arr { color: var(--brand); font-size: 12px; }
table.birzha tbody tr { transition: background .12s var(--ease); }
table.birzha tbody tr:hover { background: var(--surface2); }
table.birzha td a { font-weight: 600; text-decoration: none; }
table.birzha td a:hover { text-decoration: underline; }

/* ============================================================
   Цифровой океан — амбиентный фон на всех страницах (за контентом).
   ============================================================ */
.ocean-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ocean-bg #ocean { position: absolute; inset: 0; }
.creature { position: absolute; pointer-events: none; }
.creature img { width: 100%; height: auto; display: block; }
.c-orca img, .c-orca2 img { filter: url(#swim-warp) drop-shadow(0 0 18px rgba(45,212,191,.2)); }
.c-jelly1 img, .c-jelly2 img { filter: drop-shadow(0 0 16px rgba(45,212,191,.18)); }
.c-orca  { width: 600px; top: 9%;  right: 1%; opacity: .5;  animation: glide 24s ease-in-out infinite; }
.c-orca2 { width: 300px; top: 62%; left: 1%;  opacity: .24; animation: glide 30s ease-in-out infinite reverse; }
.c-jelly1{ width: 180px; top: 14%; left: 2%;  opacity: .5;  animation: jellyDrift 17s ease-in-out infinite; }
.c-jelly2{ width: 120px; top: 72%; right: 3%; opacity: .38; animation: jellyDrift 23s ease-in-out infinite reverse; }
@media (max-width: 820px) { .c-orca { width: 360px; opacity: .35; } .c-orca2 { display: none; } .c-jelly1 { width: 130px; } }

/* ---------- Появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: var(--d, 0ms); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Мобильная подгонка (узкие экраны) ---------- */
@media (max-width: 600px) {
  section { padding: 44px 0; }
  .container { padding: 0 16px; }
  .hero h1 { font-size: 30px; }
  .hero .lead, .lead { font-size: 17px; }
  .hero-cta { padding: 14px 24px; font-size: 16px; }
  .sec-h2 { font-size: 25px; margin: 0 0 26px; }
  .cta .container { padding: 38px 20px; border-radius: 20px; }
  .cta h2 { font-size: 24px; }
  .card { padding: 22px; }
  table.birzha { font-size: 14px; }
  table.birzha th, table.birzha td { padding: 11px 12px; }
}

/* ---------- Keyframes ---------- */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes gradient-pan { 0% { background-position: 0% center; } 50% { background-position: 100% center; } 100% { background-position: 0% center; } }
@keyframes answer-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes glide { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-34px,14px); } }
@keyframes jellyDrift { 0%,100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-22px) scaleY(.93); } }

/* ---------- reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
  .btn:hover, .card:hover, .feats li:hover { transform: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
