/* ============================================
   Authenticator – App Store Support Site
   Colors derived from the app's theme system
   ============================================ */

:root {
  --primary: #1565C0;
  --primary-dark: #0D47A1;
  --primary-light: #1E88E5;

  --bg: #0F1117;
  --surface: #171B24;
  --surface-high: #1E2330;
  --border: #2A3042;
  --text: #E5E7ED;
  --text-muted: #A4ABBE;

  --success: #16A34A;
  --error: #DC2626;
  --info: #0EA5E9;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --max-width: 960px;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #42A5F5;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---- Container ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Header / Nav
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(160deg, #0F1420, #12192E, #162038);
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  box-shadow: 0 8px 40px rgba(21, 101, 192, 0.3);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.tagline {
  font-size: 1.2rem;
  color: var(--primary-light);
  font-weight: 500;
  margin-bottom: 12px;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 460px;
  margin-bottom: 32px;
}

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-appstore:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  color: var(--bg);
}

/* ============================================
   Features
   ============================================ */
.features {
  padding: 80px 0;
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.01em;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(21, 101, 192, 0.12);
  border-radius: var(--radius-sm);
  color: var(--primary-light);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ============================================
   Page (Support / Terms)
   ============================================ */
.page {
  flex: 1;
  padding: 60px 0 80px;
}

.page-container {
  max-width: 720px;
}

.page-container h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* ---- FAQ ---- */
.faq {
  margin-bottom: 56px;
}

.faq h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: rgba(30, 136, 229, 0.4);
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background 0.2s;
}

.faq-item summary:hover {
  background: var(--surface);
}

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 20px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---- Contact ---- */
.contact h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.contact > p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.contact-method {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  color: var(--primary-light);
}

.contact-method svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-method h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.contact-method a {
  font-size: 0.95rem;
}

.contact-method p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- Legal ---- */
.legal h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 20px;
  padding-top: 8px;
}

.legal h2:first-of-type {
  margin-top: 0;
}

.legal h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
}

.legal h4 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.legal p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
  line-height: 1.65;
}

.legal ul {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
  padding-left: 24px;
  line-height: 1.65;
}

.legal ul li {
  margin-bottom: 6px;
}

.legal hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

.legal-contact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 12px 0;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.82rem;
  opacity: 0.7;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .hero {
    padding: 56px 0 48px;
  }

  .hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .tagline {
    font-size: 1.05rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .features {
    padding: 56px 0;
  }

  .features h2 {
    font-size: 1.6rem;
    margin-bottom: 32px;
  }

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

  .page-container h1 {
    font-size: 1.7rem;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 0.88rem;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .btn-appstore {
    padding: 12px 22px;
    font-size: 0.92rem;
  }

  .container {
    padding: 0 16px;
  }
}

/* ---- Selection ---- */
::selection {
  background: rgba(21, 101, 192, 0.3);
  color: var(--text);
}

/* ---- Scrollbar (webkit) ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
