/*
Theme Name: My Theme
Author: Ваше имя
Description: Кастомная тема «Вектор ЧЗ».
Version: 1.0
Text Domain: mytheme
*/

/* ============================================================
   BASE
   ============================================================ */

/* ============================================================
   BASE — OVERFLOW GUARD (фикс горизонтального скролла на мобилке)
   ============================================================ */
html {
  overflow-x: clip;
}
body {
  overflow-x: clip;
  max-width: 100%;
}
@supports not (overflow: clip) {
  html, body {
    overflow-x: hidden;
  }
}

html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { font-feature-settings: 'ss01', 'cv11'; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #F7F8FA; }
::-webkit-scrollbar-thumb {
  background: #D5DAE2;
  border-radius: 10px;
  border: 2px solid #F7F8FA;
}
::-webkit-scrollbar-thumb:hover { background: #FF7A00; }
::selection { background: #EBFF00; color: #393185; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ============================================================
   COMPONENTS
   ============================================================ */

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s cubic-bezier(.2,.8,.25,1), transform 1.1s cubic-bezier(.2,.8,.25,1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Navbar blur ---------- */
#navbar.scrolled {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(11, 18, 32, .06);
  box-shadow: 0 4px 24px -8px rgba(11, 18, 32, .06);
}

/* ---------- Orbs ---------- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: .55;
}

/* ---------- Button shine ---------- */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::before {
  content: '';
  position: absolute; top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg);
  transition: left .8s cubic-bezier(.2,.8,.25,1);
}
.btn-shine:hover::before { left: 130%; }

/* ---------- Section dash ---------- */
.section-dash {
  display: inline-block;
  width: 32px; height: 1px;
  background: #393185;
  flex-shrink: 0;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 500; color: #9CA3AF;
  margin-bottom: 18px;
}
.breadcrumbs a { color: #6B7280; transition: color .25s ease; }
.breadcrumbs a:hover { color: #FF7A00; }
.breadcrumbs svg { color: #D5DAE2; flex-shrink: 0; }
.breadcrumbs span { color: #4B5563; font-weight: 600; }

/* ---------- Category tags ---------- */
.cat-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 100px;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.cat-tag--news  { background: rgba(0,160,227,.12); color: #0080B8; }
.cat-tag--guide { background: rgba(57,49,133,.12); color: #393185; }
.cat-tag--case  { background: rgba(255,122,0,.14); color: #E06B00; }
.cat-tag--law   { background: rgba(235,255,0,.6); color: #6B7A00; }
.cat-tag--on-cover {
  background: rgba(255,255,255,.15);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
}

/* ---------- Cover patterns ---------- */
.cover-pattern {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255,122,0,.55), transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(57,49,133,.75), transparent 60%),
    linear-gradient(135deg, #131A2C 0%, #0B1220 100%);
  position: relative;
  overflow: hidden;
}
.cover-pattern::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 90% 80% at 40% 40%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 40% 40%, #000 20%, transparent 85%);
}
.cover-pattern--blue {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(0,160,227,.65), transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(57,49,133,.75), transparent 60%),
    linear-gradient(135deg, #131A2C 0%, #0B1220 100%);
}
.cover-pattern--chz {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(235,255,0,.55), transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(255,122,0,.65), transparent 60%),
    linear-gradient(135deg, #131A2C 0%, #0B1220 100%);
}

/* ---------- Form field (используется в нескольких формах) ---------- */
.hero-field { display: flex; flex-direction: column; gap: 6px; }
.hero-field label {
  font-size: .78rem; font-weight: 600; color: #374151;
  letter-spacing: -.005em;
}
.hero-field input,
.hero-field select {
  width: 100%; padding: 11px 13px;
  background: #F7F8FA;
  border: 1px solid rgba(11,18,32,.08);
  border-radius: 6px;
  font-size: .92rem;
  color: #0B1220;
  transition: border-color .2s, background .2s, box-shadow .2s;
  outline: none;
}
.hero-field input:focus,
.hero-field select:focus {
  border-color: #FF7A00;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255,122,0,.12);
}
.hero-legal {
  font-size: .72rem; color: #9CA3AF;
  line-height: 1.5; margin-top: 12px; text-align: center;
}
.hero-legal a {
  color: #4B5563;
  text-decoration: underline;
  text-decoration-color: rgba(11,18,32,.15);
}

/* ============================================================
   PROSE — типографика редакторского контента
   Используется в single.php (статья) и page-document.php (документы)
   ============================================================ */
.prose {
  font-size: 1.0625rem; line-height: 1.75; color: #374151;
  margin-left: auto;
  margin-right: auto;
}
.prose > * + * { margin-top: 1.4em; }

.prose h2 {
  font-size: 1.65rem; font-weight: 800; letter-spacing: -.026em; line-height: 1.22;
  color: #0B1220; margin-top: 2.6em; margin-bottom: .7em;
  scroll-margin-top: 100px;
}
.prose h2::before {
  content: ''; display: block;
  width: 36px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg,#FF7A00,#393185);
  margin-bottom: 14px;
}
.prose h3 {
  font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.35;
  color: #0B1220; margin-top: 2em; margin-bottom: .5em;
  scroll-margin-top: 100px;
}
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1em; }

.prose a {
  color: #FF7A00; font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,122,0,.35);
  transition: all .2s ease;
}
.prose a:hover { color: #E06B00; text-decoration-color: #E06B00; }

.prose strong { color: #0B1220; font-weight: 700; }
.prose em { font-style: italic; color: #4B5563; }

.prose ul, .prose ol { padding-left: 0; }
.prose ul li, .prose ol li {
  position: relative; padding-left: 32px; margin-bottom: .55em; list-style: none;
}
.prose ul li::before {
  content: ''; position: absolute; left: 8px; top: .72em;
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg,#FF7A00,#393185);
  box-shadow: 0 0 0 4px rgba(255,122,0,.10);
}
.prose ol { counter-reset: olc; }
.prose ol li { counter-increment: olc; padding-left: 40px; }
.prose ol li::before {
  content: counter(olc);
  position: absolute; left: 0; top: .12em;
  width: 26px; height: 26px; border-radius: 8px;
  background: #FFF1E8; color: #FF7A00;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
}

.prose blockquote {
  position: relative; margin: 1.8em 0; padding: 22px 26px 22px 28px;
  background: linear-gradient(135deg,#FFF9F5,#FFFFFF);
  border: 1px solid rgba(255,122,0,.14);
  border-left: 4px solid #FF7A00; border-radius: 12px;
  font-size: 1.04rem; line-height: 1.65; color: #1F2937;
  font-weight: 500; font-style: italic;
}
.prose blockquote::before {
  content: '"'; position: absolute; top: -6px; left: 18px;
  font-size: 3.5rem; line-height: 1; color: rgba(255,122,0,.22);
  font-family: Georgia, serif; font-weight: 900;
}
.prose blockquote cite {
  display: block; margin-top: 12px;
  font-size: .82rem; font-weight: 600; font-style: normal;
  color: #6B7280;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em; padding: 2px 6px; border-radius: 5px;
  background: rgba(57,49,133,.08); color: #393185;
  font-weight: 500; border: 1px solid rgba(57,49,133,.10);
}
.prose pre {
  background: #0B1220; color: #E5E7EB;
  border-radius: 14px; padding: 20px 22px;
  overflow-x: auto; font-size: .88rem; line-height: 1.6;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 20px 40px -24px rgba(11,18,32,.4);
  margin: 1.8em 0; position: relative;
}
.prose pre code {
  background: transparent; color: inherit; padding: 0; border: 0;
  font-size: inherit; font-weight: 400;
}

.prose figure {
  margin: 2em 0; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(11,18,32,.08); background: #fff;
  box-shadow: 0 12px 32px -20px rgba(11,18,32,.12);
}
.prose figure img { display: block; width: 100%; height: auto; }
.prose figcaption {
  padding: 14px 20px; font-size: .82rem; color: #6B7280; line-height: 1.5;
  border-top: 1px solid rgba(11,18,32,.06); background: #FAFBFC;
}
.prose img { max-width: 100%; height: auto; border-radius: 12px; }

.prose hr {
  border: 0; height: 1px; margin: 2.4em 0;
  background: linear-gradient(90deg, transparent, rgba(11,18,32,.12), transparent);
}

/* WP-выравнивания из Gutenberg */
.prose .alignleft { float: left; margin: 0 1.5em 1em 0; }
.prose .alignright { float: right; margin: 0 0 1em 1.5em; }
.prose .aligncenter { display: block; margin: 1.5em auto; }
.prose .wp-block-image figcaption { text-align: center; }

.prose .wp-block-table { overflow-x: auto; }
.prose table {
  width: 100%; border-collapse: collapse; font-size: .92rem; background: #fff;
}
.prose th {
  text-align: left; padding: 14px 18px;
  font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #6B7280;
  background: #F7F8FA;
  border-bottom: 1px solid rgba(11,18,32,.08);
}
.prose td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(11,18,32,.06);
  color: #374151; vertical-align: top;
}
.prose tr:last-child td { border-bottom: 0; }

.h-logo { height: 4.25rem; width: auto; }


/* ============================================================
   LOGO SIZE OVERRIDES (HEADER + FOOTER)
   Увеличиваем лого и текст, синхронно поднимаем высоту шапки
   ============================================================ */

/* ---------- Desktop (базово) ---------- */
.site-header .header-inner {
  height: 6.5rem;                     /* было h-20 = 5rem */
}

.site-header .logo-mark,
.site-footer .logo-mark {
  height: 6rem;                       /* было 4.25rem / h-9 */
  width: auto;
}

.site-header .logo-mark {
  max-height: calc(6.5rem - 1rem);    /* ограничение по высоте шапки */
}

.site-header .logo-text,
.site-footer .logo-text {
  font-size: 1.75rem;                 /* было text-lg = 1.125rem */
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Цвет «Вектор» в подвале: #fcfeff. Внутренний «ЧЗ» остаётся text-accent */
.site-footer .logo-text {
  color: #fcfeff;
}

.site-header .mobile-menu {
  top: 6.5rem;                        /* было top-20 = 5rem */
}

/* ---------- Планшет (641px – 1024px) ---------- */
@media (min-width: 641px) and (max-width: 1024px) {
  .site-header .header-inner { height: 6rem; }

  .site-header .logo-mark,
  .site-footer .logo-mark { height: 5.25rem; }

  .site-header .logo-mark { max-height: calc(6rem - 1rem); }

  .site-header .logo-text,
  .site-footer .logo-text { font-size: 1.6rem; }

  .site-header .mobile-menu { top: 6rem; }
}

/* ---------- Мобильный (до 640px) ---------- */
@media (max-width: 640px) {
  .site-header .header-inner { height: 5.5rem; }

  .site-header .logo-mark,
  .site-footer .logo-mark { height: 4.5rem; }

  .site-header .logo-mark { max-height: calc(5.5rem - 0.75rem); }

  .site-header .logo-text,
  .site-footer .logo-text { font-size: 1.35rem; }

  .site-header .mobile-menu { top: 5.5rem; }
}