/* ═══════════════════════════════════════════════════════════════════════
   Grahachara — Legal & Support Pages Shared Styles
   Matches main site cosmic indigo + gold accent theme
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Legal Page Layout ─────────────────────────────────────────────── */
.legal-page {
  min-height: 100vh;
  padding-top: 120px;
  padding-bottom: 80px;
  position: relative;
  z-index: 1;
}

.legal-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Back Link ─────────────────────────────────────────────────────── */
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 32px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  transition: all var(--dur) var(--ease);
}
.legal-back:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  background: rgba(255,184,0,0.06);
}
.legal-back svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur) var(--ease);
}
.legal-back:hover svg {
  transform: translateX(-3px);
}

/* ── Page Header ───────────────────────────────────────────────────── */
.legal-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.legal-header__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(147,51,234,0.2), rgba(255,184,0,0.15));
  border: 1px solid rgba(147,51,234,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
}
.legal-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #FFF 0%, var(--primary-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.legal-header__meta {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Content Sections ──────────────────────────────────────────────── */
.legal-section {
  margin-bottom: 40px;
}
.legal-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.legal-section h2 .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--primary), rgba(147,51,234,0.5));
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.legal-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 10px;
}
.legal-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}
.legal-section ul,
.legal-section ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.legal-section li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 6px;
}
.legal-section li::marker {
  color: var(--primary-light);
}
.legal-section a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.legal-section a:hover {
  border-bottom-color: var(--accent);
}
.legal-section strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Info Cards (used in contact/support) ──────────────────────────── */
.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 16px;
  transition: all var(--dur) var(--ease);
}
.legal-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}
.legal-card__icon {
  font-size: 28px;
  margin-bottom: 12px;
}
.legal-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.legal-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0;
}
.legal-card a {
  color: var(--accent);
  text-decoration: none;
}
.legal-card a:hover {
  text-decoration: underline;
}

.legal-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

/* ── Contact Form ──────────────────────────────────────────────────── */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  margin-top: 24px;
}
.contact-form h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
  border-bottom: none;
  padding-bottom: 0;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: rgba(10,6,30,0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: 12px 16px;
  outline: none;
  transition: all var(--dur) var(--ease);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-group textarea {
  resize: vertical;
  min-height: 140px;
}
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23B47AFF'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-group select option {
  background: var(--bg-mid);
  color: var(--text);
}
.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #04030C;
  background: linear-gradient(135deg, var(--accent), #FFD666);
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
.form-submit svg {
  width: 16px;
  height: 16px;
}

/* ── FAQ Accordion (Support Page) ──────────────────────────────────── */
.support-faq {
  margin-bottom: 32px;
}
.support-faq__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  overflow: hidden;
}
.support-faq__q {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--dur) var(--ease);
}
.support-faq__q:hover {
  background: rgba(255,255,255,0.03);
}
.support-faq__q svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform var(--dur) var(--ease);
  flex-shrink: 0;
}
.support-faq__q.active svg {
  transform: rotate(180deg);
  color: var(--accent);
}
.support-faq__a {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease), padding 0.35s var(--ease);
}
.support-faq__a.open {
  max-height: 400px;
  padding: 0 20px 18px;
}
.support-faq__a p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Highlight Box ─────────────────────────────────────────────────── */
.legal-highlight {
  background: linear-gradient(135deg, rgba(147,51,234,0.1), rgba(255,184,0,0.08));
  border: 1px solid rgba(147,51,234,0.2);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin: 20px 0;
}
.legal-highlight p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 0;
}
.legal-highlight strong {
  color: var(--accent-light);
}

/* ── Simple Nav for Legal Pages ────────────────────────────────────── */
.legal-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(4,3,12,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.legal-nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.legal-nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 18px;
}
.legal-nav__logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}
.legal-nav__home {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  transition: all var(--dur) var(--ease);
}
.legal-nav__home:hover {
  color: var(--accent);
  border-color: var(--border-accent);
}

/* ── Footer (simple for legal pages) ───────────────────────────────── */
.legal-footer {
  position: relative;
  z-index: 1;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.legal-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}
.legal-footer__links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.legal-footer__links a:hover {
  color: var(--accent);
}
.legal-footer__copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Cosmic Background (simple star dots) ──────────────────────────── */
.legal-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 90% 40%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 15% 85%, rgba(180,122,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 85% 15%, rgba(255,184,0,0.3), transparent),
    radial-gradient(1px 1px at 45% 45%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 65% 25%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 80% 70%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 5% 55%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.2px 1.2px at 55% 90%, rgba(147,51,234,0.4), transparent),
    radial-gradient(1px 1px at 35% 5%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 75% 55%, rgba(255,255,255,0.3), transparent);
}
.legal-stars::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 20%, rgba(147,51,234,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(255,184,0,0.05) 0%, transparent 50%);
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .legal-page {
    padding-top: 100px;
    padding-bottom: 60px;
  }
  .legal-header h1 {
    font-size: 26px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .contact-form {
    padding: 24px 20px;
  }
  .legal-cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .legal-container {
    padding: 0 16px;
  }
  .legal-header h1 {
    font-size: 22px;
  }
  .contact-form {
    padding: 20px 16px;
  }
}
