/*
Theme Name: JuicyChat Theme
Theme URI: https://juicychat.example
Author: JuicyChat
Author URI: https://juicychat.example
Description: Информационный сайт-обзор о сервисе AI-компаньонов JuicyChat
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jc-theme
*/

/* ============================================
   1. CSS RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-amber); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-coral); }

ul, ol { list-style: none; }

button, input, textarea, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ============================================
   2. CSS VARIABLES
   ============================================ */
:root {
  /* Colors — тёплая палитра: янтарь/коралл на тёмно-сливовом фоне */
  --bg-primary:       #170D14;
  --bg-secondary:     #1F1119;
  --bg-card:          #271521;
  --bg-card-hover:    #321A2A;
  --bg-input:         #20121B;

  --accent-amber:     #FFB347;
  --accent-coral:     #FF5E62;
  --accent-violet:    #8B5CF6;
  --accent-grad:      linear-gradient(135deg, #FFB347 0%, #FF5E62 100%);
  --accent-grad-rev:  linear-gradient(135deg, #FF5E62 0%, #FFB347 100%);
  --accent-glow:      0 0 40px rgba(255, 94, 98, 0.25);
  --accent-glow-sm:   0 0 20px rgba(255, 94, 98, 0.18);

  --text-primary:     #FBF3EE;
  --text-secondary:   #C9AEB8;
  --text-muted:       #8A6F79;
  --text-on-accent:   #1A0E12;

  --border-color:     rgba(255, 255, 255, 0.07);
  --border-accent:    rgba(255, 179, 71, 0.35);

  /* Fonts */
  --font-body:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --section-pad:  90px 0;
  --container-w:  1200px;
  --container-px: 24px;

  /* Radius */
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    22px;
  --radius-xl:    32px;
  --radius-pill:  999px;

  /* Shadows */
  --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition:   all 0.25s ease;
  --transition-s: all 0.18s ease;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
.jc-h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
.jc-h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); font-weight: 700; }
.jc-h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
.jc-lead { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-secondary); line-height: 1.8; }
.jc-small { font-size: 0.85rem; color: var(--text-muted); }

.jc-gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================
   4. LAYOUT
   ============================================ */
.jc-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.jc-section { padding: var(--section-pad); }
.jc-section--alt { background: var(--bg-secondary); }

.jc-grid {
  display: grid;
  gap: 24px;
}
.jc-grid--2 { grid-template-columns: repeat(2, 1fr); }
.jc-grid--3 { grid-template-columns: repeat(3, 1fr); }
.jc-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .jc-grid--3, .jc-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .jc-grid--2, .jc-grid--3, .jc-grid--4 { grid-template-columns: 1fr; }
  :root { --section-pad: 56px 0; }
}

/* ============================================
   5. BUTTONS
   ============================================ */
.jc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.98rem;
  transition: var(--transition);
  white-space: nowrap;
}

.jc-btn--primary {
  background: var(--accent-grad);
  color: var(--text-on-accent);
  box-shadow: var(--accent-glow-sm);
}
.jc-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--accent-glow);
  color: var(--text-on-accent);
}

.jc-btn--ghost {
  background: transparent;
  border: 1.5px solid var(--border-accent);
  color: var(--text-primary);
}
.jc-btn--ghost:hover {
  background: rgba(255, 179, 71, 0.08);
  color: var(--text-primary);
}

.jc-btn--block { width: 100%; }
.jc-btn--lg { padding: 17px 36px; font-size: 1.05rem; }

/* ============================================
   6. CARDS
   ============================================ */
.jc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.jc-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-hover);
}

.jc-tldr {
  background: rgba(255, 179, 71, 0.07);
  border: 1px solid var(--border-accent);
  border-left: 3px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 20px 0 8px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.jc-tldr strong { color: var(--accent-amber); }

.jc-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 179, 71, 0.12);
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.jc-card__icon svg { width: 24px; height: 24px; }

/* ── Contacts list (страница контактов) ── */
.contacts-list { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.contacts-list li { display: flex; align-items: center; gap: 10px; }
.contacts-list svg { width: 18px; height: 18px; color: var(--accent-amber); flex-shrink: 0; }

/* ── Companion card (архетипы — фото персонажа вместо иконки) ── */
.companion-card__img-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: -28px -28px 16px;
  background: linear-gradient(155deg, rgba(255,179,71,0.18), rgba(255,94,98,0.18));
}
.companion-card__img-wrap .companion-card__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-amber);
}
.companion-card__img-wrap .companion-card__fallback svg { width: 40px; height: 40px; }
.companion-card__img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.companion-card:hover .companion-card__img-wrap img { transform: scale(1.06); }

/* ============================================
   7. HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(23, 13, 20, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-s);
}
.site-header.scrolled {
  background: rgba(23, 13, 20, 0.96);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
}
.site-logo img { width: 34px; height: 34px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-nav a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text-primary); }

.header-cta { display: flex; align-items: center; gap: 16px; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-s);
}
.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); }

.mobile-nav {
  display: none;
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  padding: 32px 24px;
  overflow-y: auto;
  z-index: 99;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 16px 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.header-cta__text-short { display: none; }

@media (max-width: 860px) {
  .site-nav { display: none; }
  .header-cta .jc-btn--ghost { display: none; }
  .burger { display: flex; }
}

/* Узкие экраны: логотип + реферальная кнопка + бургер не помещаются в одну
   строку с полным текстом — сжимаем кнопку (короче текст, меньше паддинг),
   а не прячем её, реферальная кнопка должна оставаться на главном экране. */
@media (max-width: 480px) {
  .site-header__inner { height: 64px; }
  .header-cta { gap: 8px; }
  .header-cta__primary {
    padding: 9px 14px;
    font-size: 0.85rem;
  }
  .header-cta__text-full { display: none; }
  .header-cta__text-short { display: inline; }
  .burger { width: 24px; }
}

/* Совсем маленькие экраны (старые iPhone SE, узкие Android) — оставляем
   только иконку логотипа, чтобы кнопка и бургер не вылезали за вьюпорт. */
@media (max-width: 360px) {
  .site-logo__text { display: none; }
}

/* ============================================
   8. FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.footer-col a {
  display: block;
  color: var(--text-secondary);
  padding: 6px 0;
  font-size: 0.93rem;
}
.footer-col a:hover { color: var(--accent-amber); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-disclaimer {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   9. BREADCRUMB
   ============================================ */
.jc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 20px 0;
}
.jc-breadcrumb__link { color: var(--text-secondary); }
.jc-breadcrumb__link:hover { color: var(--accent-amber); }
.jc-breadcrumb__current { color: var(--text-muted); }
.jc-breadcrumb__sep { color: var(--text-muted); opacity: 0.5; }

/* ============================================
   10. HERO
   ============================================ */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,94,98,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.14) 0%, transparent 70%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 179, 71, 0.1);
  border: 1px solid var(--border-accent);
  color: var(--accent-amber);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero__actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero__stat-num { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; color: var(--accent-amber); }
.hero__stat-label { font-size: 0.82rem; color: var(--text-muted); }
.hero__visual {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.hero__visual--companion {
  padding: 0;
  position: relative;
  overflow: hidden;
  min-height: 480px;
  background: linear-gradient(160deg, rgba(255,179,71,0.2), rgba(255,94,98,0.2));
}
.hero__visual--companion img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero__visual-badges {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero__visual-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(23, 13, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.hero__visual-badge svg { width: 16px; height: 16px; color: var(--accent-amber); flex-shrink: 0; }
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; text-align: center; }
  .hero__actions, .hero__stats { justify-content: center; }
}

/* ============================================
   11. AGE GATE
   ============================================ */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 6, 9, 0.96);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.age-gate.hidden { display: none; }
.age-gate__box {
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
}
.age-gate__actions { display: flex; gap: 12px; margin-top: 24px; }

/* ============================================
   12. FAQ
   ============================================ */
.faq__item {
  border-bottom: 1px solid var(--border-color);
}
.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.faq__question svg { flex-shrink: 0; transition: transform 0.25s ease; color: var(--accent-amber); }
.faq__item.open .faq__question svg { transform: rotate(180deg); }
.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--text-secondary);
}
.faq__item.open .faq__answer { max-height: 600px; }
.faq__answer-inner { padding-bottom: 22px; }

/* ============================================
   13. TABS
   ============================================ */
.tabs__nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
}
.tab-btn.active { background: var(--accent-grad); color: var(--text-on-accent); border-color: transparent; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================
   14. TABLE
   ============================================ */
.jc-table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: var(--radius-lg); }
.jc-table th, .jc-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.jc-table th { background: var(--bg-card); font-family: var(--font-heading); color: var(--text-primary); }
.jc-table td { background: var(--bg-secondary); color: var(--text-secondary); }
.jc-table tr:last-child td { border-bottom: none; }

/* ============================================
   15. PRICING
   ============================================ */
.pricing-card {
  position: relative;
  text-align: center;
}
.pricing-card--featured {
  border-color: var(--border-accent);
  box-shadow: var(--accent-glow-sm);
}
.pricing-card__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-grad);
  color: var(--text-on-accent);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.pricing-card__price { font-family: var(--font-heading); font-size: 2.4rem; font-weight: 800; margin: 16px 0 4px; }
.pricing-card__period { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 24px; }
.pricing-card__list { text-align: left; margin: 24px 0; }
.pricing-card__list li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; color: var(--text-secondary); font-size: 0.92rem; }
.pricing-card__list svg { flex-shrink: 0; color: var(--accent-amber); margin-top: 2px; }

/* ============================================
   16. RATING / STARS
   ============================================ */
.jc-rating { display: flex; align-items: center; gap: 10px; }
.jc-rating__num { font-family: var(--font-heading); font-weight: 800; font-size: 1.4rem; }
.star-rating { position: relative; display: inline-flex; line-height: 0; vertical-align: middle; }
.star-rating__bg, .star-rating__fg { display: flex; gap: 2px; }
.star-rating__bg { color: var(--text-muted); opacity: 0.35; }
.star-rating__fg { position: absolute; inset: 0; overflow: hidden; white-space: nowrap; color: var(--accent-amber); }
.star-rating svg { width: var(--star-size, 20px); height: var(--star-size, 20px); flex-shrink: 0; }

.testimonial__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.testimonial__name { font-family: var(--font-heading); font-weight: 700; color: var(--text-primary); }
.testimonial__date { margin-top: 4px; opacity: 0.7; }
.testimonial__text { margin-top: 10px; }
.rating-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rating-bar__label { width: 140px; flex-shrink: 0; font-size: 0.9rem; color: var(--text-secondary); }
.rating-bar__track { flex: 1; height: 8px; background: var(--bg-card); border-radius: var(--radius-pill); overflow: hidden; }
.rating-bar__fill { height: 100%; background: var(--accent-grad); border-radius: var(--radius-pill); }
.rating-bar__val { width: 32px; text-align: right; font-weight: 700; font-size: 0.9rem; }

/* ============================================
   17. QUIZ
   ============================================ */
.quiz {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 720px;
  margin: 0 auto;
}
.quiz__progress { height: 6px; background: var(--bg-input); border-radius: var(--radius-pill); overflow: hidden; margin-bottom: 32px; }
.quiz__progress-fill { height: 100%; background: var(--accent-grad); transition: width 0.3s ease; width: 0%; }
.quiz__step-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.quiz__question { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; margin-bottom: 28px; }
.quiz__options { display: grid; gap: 12px; }
.quiz__option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  transition: var(--transition-s);
}
.quiz__option:hover { border-color: var(--border-accent); background: var(--bg-card-hover); }
.quiz__result { text-align: center; }
.quiz__result-icon { width: 120px; height: 120px; border-radius: 50%; background: var(--accent-grad); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; position: relative; overflow: hidden; }
.quiz__result-icon svg { width: 44px; height: 44px; color: var(--text-on-accent); }
.quiz__result-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quiz__result-title { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; }
.quiz[hidden], .quiz__screen[hidden] { display: none; }

/* ============================================
   18. STEPS
   ============================================ */
.step { display: flex; gap: 20px; }
.step__num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: var(--text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
}

/* ============================================
   19. UPDATED BADGE / TOC
   ============================================ */
.jc-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ============================================
   20. UTILITIES
   ============================================ */
.jc-mt-0 { margin-top: 0; }
.jc-text-center { text-align: center; }
.jc-max-w { max-width: 720px; margin-left: auto; margin-right: auto; }
.is-inner-page main { padding-top: 8px; }
.jc-card, .step, .jc-rating, .pricing-card { opacity: 1; }
