/* ==========================================
   AudiPals — Shared Stylesheet
   Brand: #6c47ff (purple)
   ========================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fff;
}

a { color: #6c47ff; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* --- Layout --- */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1rem;
}

.page-body {
  padding: 2rem 0 4rem;
}

/* --- Site Header --- */
.site-header {
  border-bottom: 1px solid #eee;
  padding: 0 1rem;
}

.site-header .header-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-header .logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1a1a1a;
  text-decoration: none;
}

.site-header .logo span {
  color: #6c47ff;
}

.site-header .logo:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  color: #6c47ff;
  text-decoration: none;
}

/* Hamburger toggle (CSS-only) */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: #1a1a1a;
  height: 2px;
  width: 22px;
  border-radius: 2px;
  position: relative;
  transition: all 0.3s;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  position: absolute;
}
.nav-toggle-label span::before { top: -7px; }
.nav-toggle-label span::after { top: 7px; }

/* --- Site Footer --- */
.site-footer {
  border-top: 1px solid #eee;
  padding: 0 1rem;
  margin-top: 3rem;
}

.site-footer .footer-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: #666;
}

.footer-links a:hover {
  color: #6c47ff;
}

.footer-contact {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1rem;
}

.footer-contact a {
  color: #6c47ff;
}

.footer-copyright {
  font-size: 0.8rem;
  color: #999;
  line-height: 1.6;
}

/* --- Typography --- */
h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
h2 { font-size: 1.2rem; font-weight: 700; margin: 2.5rem 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 1px solid #eee; }
h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
p { margin-bottom: 0.9rem; }
ul, ol { margin: 0.5rem 0 0.9rem 1.4rem; }
li { margin-bottom: 0.4rem; }

.meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 2.5rem;
}

/* --- Tables --- */
table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.25rem; font-size: 0.9rem; }
th { background: #f7f5ff; font-weight: 600; text-align: left; padding: 0.6rem 0.75rem; border: 1px solid #ddd; }
td { padding: 0.55rem 0.75rem; border: 1px solid #ddd; vertical-align: top; }
tr:nth-child(even) td { background: #fafafa; }

/* --- Component: Boxes --- */
.intro-box {
  background: #f4f1ff;
  border-left: 4px solid #6c47ff;
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}

.contact-box {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.contact-box strong { display: block; margin-bottom: 0.25rem; }

.review-notice {
  background: #fff8e1;
  border-left: 4px solid #f59e0b;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 2.5rem;
  color: #78350f;
}

.notice-box {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.highlight-box {
  background: #f9f5ff;
  border: 1px solid #ddd3ff;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.tip-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.tip-box strong { color: #16a34a; }

.warning-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.warning-box strong { color: #d97706; }

/* --- Component: Step Cards --- */
.step-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.step-card .num {
  background: #6c47ff;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.step-card h3 { margin: 0 0 0.25rem; }
.step-card p { margin: 0; font-size: 0.95rem; color: #555; }

/* --- Component: Service Sections (Getting Started) --- */
.service-section {
  border: 1px solid #eee;
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.service-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #fafafa;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
}
.service-header .emoji { font-size: 1.4rem; }
.service-body { padding: 0.5rem 1.25rem 1.25rem; }
.service-body ol { margin-left: 1.5rem; }
.service-body li { margin-bottom: 0.6rem; line-height: 1.6; }

/* --- Component: FAQ --- */
.faq-item { margin-bottom: 1.5rem; }
.faq-item h3 { color: #6c47ff; margin-bottom: 0.3rem; }

/* --- Component: TOC --- */
.toc {
  background: #f9f9fb;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.toc h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 0.3rem; }
.toc a { font-size: 0.95rem; }

/* --- Component: Back Link --- */
.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 500;
}

/* --- Homepage --- */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.hero h1 span {
  color: #6c47ff;
}

.hero .tagline {
  font-size: 1.15rem;
  color: #555;
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero .cta-btn {
  display: inline-block;
  background: #6c47ff;
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s;
}

.hero .cta-btn:hover {
  background: #5a38e0;
  text-decoration: none;
}

.cta-btn {
  display: inline-block;
  background: #6c47ff;
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.cta-btn:hover {
  background: #5a38e0;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.cta-btn-discord {
  background: #5865f2;
  color: #fff;
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.28);
}

.cta-btn-discord:hover {
  background: #4752c4;
  color: #fff;
}

.community-card {
  margin: 1.25rem auto 0;
  max-width: 640px;
  text-align: center;
  background: linear-gradient(180deg, #f6f3ff 0%, #f9f9ff 100%);
  border: 1px solid #e2dcff;
  border-radius: 14px;
  padding: 1.75rem 1.25rem 1.9rem;
}

.community-card-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ece7ff;
  color: #5b44d8;
}

.community-card-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.community-card h2 {
  margin: 0 0 0.45rem;
  border: 0;
  padding: 0;
  font-size: 1.15rem;
  color: #1f1f2f;
}

.community-card p {
  margin: 0 0 1.1rem;
  color: #5a5a70;
}

.how-it-works {
  padding: 2rem 0;
}

.how-it-works h2 {
  text-align: center;
  border-bottom: none;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding: 2rem 0 3rem;
}

.feature-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
}

.feature-card .feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: #1a1a1a;
}

.feature-card p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.cta-section {
  text-align: center;
  padding: 2.5rem 0 1rem;
}

.cta-section p {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1.25rem;
}

.app-stores {
  text-align: center;
  padding: 1.5rem 0;
  color: #999;
  font-size: 0.9rem;
}

/* --- Support Page --- */
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}

.support-card {
  padding: 1.5rem;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
}

.support-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.support-card p {
  font-size: 0.9rem;
  color: #555;
  margin: 0 0 0.75rem;
}

.support-card a.card-link {
  font-size: 0.9rem;
  font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 2rem; }
  .hero .tagline { font-size: 1rem; }
  .step-card { flex-direction: row; padding: 1rem; }
  .features-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }

  /* Mobile nav */
  .nav-toggle-label { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    gap: 0.75rem;
    z-index: 100;
  }
  .site-header .header-inner {
    position: relative;
  }
  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .footer-links { flex-direction: column; gap: 0.5rem; }
}

/* Getting started h2 override */
.page-getting-started h2 {
  font-size: 1.35rem;
}
.page-getting-started h3 {
  font-size: 1.05rem;
}

/* --- Skip link and accessibility controls --- */
:focus-visible {
  outline: 3px solid #4f46e5;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: #111827;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 10000;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.a11y-controls {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9999;
}

body.cookie-notice-visible .a11y-controls {
  bottom: 96px;
}

.a11y-toggle {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.a11y-panel {
  position: absolute;
  right: 0;
  bottom: 52px;
  width: min(320px, calc(100vw - 28px));
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.a11y-panel[hidden] {
  display: none;
}

.a11y-panel h2 {
  border: 0;
  margin: 0 0 0.6rem;
  padding: 0;
  font-size: 1rem;
}

.a11y-option {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0.5rem 0;
  font-size: 0.92rem;
}

.a11y-option input {
  margin-top: 0.15rem;
}

.a11y-actions {
  margin-top: 0.75rem;
}

.a11y-reset {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #111827;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
}

.cookie-notice {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9998;
  background: #111827;
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: center;
}

.cookie-notice p {
  margin: 0;
  font-size: 0.9rem;
}

.cookie-notice a {
  color: #c7d2fe;
  text-decoration: underline;
}

.cookie-close {
  border: 1px solid #6b7280;
  background: #1f2937;
  color: #ffffff;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
}

html.a11y-large-text {
  font-size: 112.5%;
}

html.a11y-extra-large-text {
  font-size: 125%;
}

.a11y-high-contrast body {
  background: #ffffff;
  color: #000000;
}

.a11y-high-contrast a {
  color: #0033aa;
}

.a11y-high-contrast .site-header,
.a11y-high-contrast .site-footer,
.a11y-high-contrast .feature-card,
.a11y-high-contrast .step-card,
.a11y-high-contrast .support-card,
.a11y-high-contrast .intro-box,
.a11y-high-contrast .contact-box,
.a11y-high-contrast .notice-box,
.a11y-high-contrast .tip-box,
.a11y-high-contrast .warning-box,
.a11y-high-contrast .toc {
  border-color: #111827;
  background: #ffffff;
  color: #000000;
}

.a11y-underline-links a {
  text-decoration: underline;
}

.a11y-reduced-motion *,
.a11y-reduced-motion *::before,
.a11y-reduced-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

@media (max-width: 600px) {
  .a11y-controls {
    right: 10px;
    bottom: 10px;
  }

  body.cookie-notice-visible .a11y-controls {
    bottom: 120px;
  }

  .cookie-notice {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
}

/* Content updates */
.hero-note {
  max-width: 680px;
  margin: 0 auto 1.35rem;
  color: #555;
  font-size: 0.98rem;
}

.small-note {
  color: #4b5563;
  font-size: 0.92rem;
  margin-top: 0.35rem;
}

.compatibility-table td,
.compatibility-table th {
  font-size: 0.88rem;
}
