/* ============================================================
   RESPONSIVE STYLES
   ============================================================ */

/* ── Large Desktop ──────────────────────────────────────────── */
@media (max-width: 1400px) {
  :root { --section-gap: 100px; }
}

/* ── Desktop ────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Tablet Landscape ───────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --section-gap: 80px; }

  .section,
  header,
  main,
  footer {
    overflow-x: hidden;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 52px;
  }
  .two-col.reverse { direction: ltr; }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .hero-visual,
  .chat-preview,
  .hero-preview,
  .mockup-screen,
  .phone-mockup {
    max-width: 100% !important;
  }

  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }

  .cta-section { padding: 60px 36px; }
}

/* ── Tablet Portrait ────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-gap: 64px;
    --content-max: 100%;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
  }

  .container { padding: 0 20px; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }

  .section,
  #hero.section,
  .blog-hero,
  .about-hero,
  .faq-page-hero,
  .legal-hero {
    padding-top: 96px !important;
    padding-bottom: 56px !important;
    min-height: auto !important;
  }

  .section-heading {
    font-size: 28px !important;
    letter-spacing: 0;
  }
  .section-subheading { font-size: 16px; }

  .hero-preview { aspect-ratio: 4/5; }
  .hero-preview-caption { padding: 76px 20px 24px; }

  .two-col { gap: 40px; }

  #hero .two-col > div:first-child {
    text-align: center;
  }

  #hero .two-col > div:first-child .section-subheading {
    margin-left: auto;
    margin-right: auto;
  }

  #hero .btn-group {
    justify-content: center;
  }

  #hero h1 br {
    display: none;
  }

  .two-col[style],
  .grid-2[style],
  .grid-3[style],
  .grid-4[style],
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:repeat(3"],
  div[style*="grid-template-columns: repeat(3"],
  div[style*="grid-template-columns:repeat(4"],
  div[style*="grid-template-columns: repeat(4"],
  div[style*="grid-template-columns:repeat(auto-fit"],
  div[style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }

  div[style*="gap:80px"],
  div[style*="gap: 80px"],
  div[style*="gap:72px"],
  div[style*="gap: 72px"],
  div[style*="gap:64px"],
  div[style*="gap: 64px"],
  div[style*="gap:60px"],
  div[style*="gap: 60px"] {
    gap: 36px !important;
  }

  .cta-section {
    padding: 48px 28px;
    border-radius: var(--radius-lg);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .stats-grid { grid-template-columns: 1fr 1fr; }

  .trust-bar {
    gap: 16px;
    justify-content: center;
  }

  .trust-item,
  .post-meta-item {
    min-width: 0;
  }

  .phone-mockup {
    width: min(220px, 72vw);
    height: min(440px, 144vw);
  }

  .age-gate-card {
    width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 40px 28px;
  }

  .age-gate-buttons { flex-direction: column; }

  .btn-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-group .btn { width: 100%; justify-content: center; }

  .floating-card {
    display: none;
  }

  .chat-preview {
    border-radius: var(--radius-lg);
  }

  .chat-preview-header {
    padding: 14px 16px;
    gap: 10px;
  }

  .chat-preview-header > div:last-child {
    gap: 6px !important;
  }

  .chat-messages {
    padding: 16px;
  }

  .chat-msg {
    max-width: 100%;
  }

  .chat-msg-bubble {
    font-size: 13px;
  }

  .comparison-row {
    grid-template-columns: 1fr !important;
  }

  .comparison-row.header-row {
    display: none !important;
  }

  .comparison-cell,
  .comparison-cell.col-header {
    padding: 14px 16px !important;
    text-align: left !important;
    border-left: 0 !important;
  }

  .comparison-cell.col-us,
  .comparison-cell.col-them {
    border-top: 1px solid var(--border-subtle) !important;
  }

  .legal-content,
  .faq-container,
  .faq-list {
    width: 100%;
    max-width: 100% !important;
  }

  .legal-section,
  .legal-toc,
  .featured-post-body,
  .glass-card,
  .feature-card,
  .testimonial-card {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .section-label,
  .badge,
  .tag,
  .btn,
  .filter-btn {
    white-space: normal;
  }

  .btn {
    min-width: 0;
    text-align: center;
  }

  h1,
  h2,
  h3,
  h4,
  p,
  li,
  a,
  span {
    overflow-wrap: break-word;
  }
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-cta {
    display: none;
  }

  .grid-4 {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .filter-tabs,
  div[role="group"][aria-label*="Filter"] {
    justify-content: flex-start !important;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar,
  .filter-tabs::-webkit-scrollbar,
  div[role="group"][aria-label*="Filter"]::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex: 0 0 auto;
  }

  div[style*="left:-20px"] {
    left: 0 !important;
  }
}

@media (max-width: 480px) {
  :root { --section-gap: 52px; }

  .container { padding: 0 16px; }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; gap: 16px; }

  .section,
  #hero.section,
  .blog-hero,
  .about-hero,
  .faq-page-hero,
  .legal-hero {
    padding-top: 88px !important;
    padding-bottom: 48px !important;
  }

  .section-heading { font-size: 26px !important; }
  .section-subheading { margin-bottom: 32px; }

  .nav-inner {
    gap: 10px;
  }

  .nav-logo {
    min-width: 0;
    gap: 8px;
  }

  .nav-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    flex: 0 0 auto;
  }

  .nav-logo-text {
    font-size: 15px;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-cta {
    display: none;
  }

  .nav-mobile-toggle {
    flex: 0 0 auto;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .stat-value { font-size: 28px; }
  .stat-item { padding: 24px 16px; }

  .filter-bar { gap: 6px; }
  .filter-btn { padding: 7px 14px; font-size: 12.5px; }

  .character-card-image { aspect-ratio: 3/4; }
  .character-card-body { padding: 16px; }

  .chat-messages { min-height: 220px; }
  .chat-avatar { width: 36px; height: 36px; }
  .chat-msg-avatar { width: 28px; height: 28px; }

  .chat-preview-header .btn {
    padding: 8px 10px;
    min-width: 38px;
  }

  .chat-input-bar {
    padding: 12px 14px;
  }

  .chat-input-bar input {
    min-width: 0;
    padding: 9px 12px;
  }

  .cta-section { padding: 40px 20px; }
  .cta-section p { font-size: 16px; }

  .testimonial-card { padding: 20px; }

  .feature-card { padding: 22px; }

  .blog-card-body { padding: 18px; }

  .section-header { margin-bottom: 44px; }

  .footer-col { min-width: unset; }

  .floating-card { display: none; }

  .nav-cta .btn-secondary { display: none; }

  .footer-bottom-links {
    flex-direction: column;
    gap: 10px;
  }

  .mobile-nav {
    padding: 72px 16px 28px;
    justify-content: flex-start;
    overflow-y: auto;
  }

  .mobile-nav a,
  .mobile-nav .btn-primary {
    width: 100%;
    max-width: 320px;
    font-size: 18px;
  }
}

@media (max-width: 360px) {
  .container { padding: 0 14px; }

  .section-heading { font-size: 24px !important; }

  .btn-lg {
    padding: 15px 20px;
  }

  .nav-logo-text {
    max-width: 150px;
  }

  .legal-section,
  .legal-toc,
  .featured-post-body,
  .glass-card,
  .feature-card,
  .testimonial-card,
  .cta-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ── Mobile Navigation Overlay ──────────────────────────────── */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(7,3,17,0.98);
  backdrop-filter: blur(24px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav a {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-soft);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  width: 280px;
  text-align: center;
}

.mobile-nav a:hover {
  color: var(--white);
  background: rgba(124,58,237,0.15);
}

.mobile-nav-close {
  position: fixed;
  top: 16px;
  right: 16px;
  top: calc(env(safe-area-inset-top) + 16px);
  right: calc(env(safe-area-inset-right) + 16px);
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--white);
  font-size: 26px;
  cursor: pointer;
  width: 52px;
  height: 52px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  z-index: 100;
  touch-action: manipulation;
}

.mobile-nav .btn-primary {
  margin-top: 16px;
  width: 280px;
  justify-content: center;
}

@media (max-width: 480px) {
  .mobile-nav {
    padding: 72px 16px 28px;
    justify-content: flex-start;
    overflow-y: auto;
  }

  .mobile-nav a,
  .mobile-nav .btn-primary {
    width: 100%;
    max-width: 320px;
    font-size: 18px;
  }
}

@media (max-width: 360px) {
  .mobile-nav a,
  .mobile-nav .btn-primary {
    max-width: 100%;
  }
}

/* ── Print Styles ───────────────────────────────────────────── */
@media print {
  .site-nav, footer, .age-gate-overlay { display: none; }
  body { background: white; color: black; }
}
