/* SMSGuard Website Styles */

:root {
  /* App Colors - matching iOS app */
  --color-primary: #0076FF;
  --color-primary-light: #409CFF;
  --color-primary-dark: #0056CC;
  --color-accent: #00C7FF;

  /* Light mode */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F7FA;
  --bg-card: rgba(255, 255, 255, 0.8);
  --text-primary: #1A1A2E;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border-color: rgba(0, 118, 255, 0.1);

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #0076FF 0%, #00C7FF 100%);
  --gradient-card: linear-gradient(135deg, rgba(0, 118, 255, 0.05) 0%, rgba(0, 199, 255, 0.05) 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 118, 255, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 118, 255, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 118, 255, 0.16);

  /* Spacing */
  --nav-height: 72px;
  --section-padding: 80px;
  --container-max: 1200px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

/* Dark mode */
[data-theme="dark"] {
  --bg-primary: #0D1117;
  --bg-secondary: #161B22;
  --bg-card: rgba(22, 27, 34, 0.9);
  --text-primary: #F0F6FC;
  --text-secondary: #8B949E;
  --text-muted: #6E7681;
  --border-color: rgba(0, 118, 255, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
}

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

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

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-hero);
  transition: width var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--bg-secondary);
  color: var(--color-primary);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-hero);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  background: var(--gradient-card);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 150%;
  background: radial-gradient(circle, rgba(0, 118, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.hero-content {
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 118, 255, 0.1);
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-phone {
  max-width: 320px;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 118, 255, 0.25);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

.hero-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 118, 255, 0.3) 0%, transparent 70%);
  filter: blur(60px);
  z-index: -1;
}

/* Features Section */
.features {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Download Section */
.download {
  padding: var(--section-padding) 0;
  background: var(--gradient-hero);
  color: white;
  text-align: center;
}

.download .section-title {
  color: white;
}

.download .section-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: white;
  transition: all var(--transition-fast);
}

.app-store-btn:hover {
  background: white;
  color: var(--color-primary);
  transform: translateY(-4px);
}

.app-store-btn svg {
  width: 28px;
  height: 28px;
}

.app-store-btn .text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.app-store-btn .text small {
  font-size: 0.75rem;
  opacity: 0.85;
}

.app-store-btn .text strong {
  font-size: 1.1rem;
}

/* Footer */
.footer {
  padding: 60px 0 30px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-column h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Page Header (for sub pages) */
.page-header {
  padding: 120px 0 60px;
  background: var(--gradient-card);
  text-align: center;
  margin-top: var(--nav-height);
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Content Section */
.content-section {
  padding: var(--section-padding) 0;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.content-wrapper h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 48px 0 20px;
}

.content-wrapper h2:first-child {
  margin-top: 0;
}

.content-wrapper h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 16px;
}

.content-wrapper p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.content-wrapper ul,
.content-wrapper ol {
  color: var(--text-secondary);
  margin: 16px 0;
  padding-left: 24px;
}

.content-wrapper li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.content-wrapper strong {
  color: var(--text-primary);
}

/* FAQ Section */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  background: var(--bg-card);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.faq-item:hover {
  border-color: var(--color-primary);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* SDK List */
.sdk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.sdk-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-normal);
}

.sdk-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.sdk-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.sdk-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-card);
  border-radius: var(--radius-sm);
}

.sdk-icon img {
  width: 28px;
  height: 28px;
}

.sdk-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sdk-version {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sdk-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.sdk-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.sdk-link svg {
  width: 16px;
  height: 16px;
}

/* Docs Sidebar */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding: var(--section-padding) 0;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--nav-height) - 48px);
  overflow-y: auto;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.docs-nav-item:hover {
  background: var(--bg-secondary);
  color: var(--color-primary);
}

.docs-nav-item.active {
  background: rgba(0, 118, 255, 0.1);
  color: var(--color-primary);
}

.docs-content {
  min-width: 0;
}

.docs-content h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.docs-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 40px 0 16px;
}

.docs-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.docs-content code {
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.9em;
  color: var(--color-primary);
}

.docs-content pre {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
}

.docs-content pre code {
  background: transparent;
  padding: 0;
}

.tip-box {
  background: rgba(0, 118, 255, 0.08);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.tip-box strong {
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tip-box p {
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: relative;
    top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
  }

  .docs-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-phone {
    max-width: 260px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-card);
    padding: 20px;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link {
    padding: 12px 16px;
    width: 100%;
  }

  .nav-actions .btn-primary {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

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

  .footer-brand {
    grid-column: auto;
  }

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

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

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

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

  .download-buttons {
    flex-direction: column;
    align-items: center;
  }

  .app-store-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}