/* ============================================
   Serin — Design System & Styles
   ============================================ */

:root {
  --bg: #0A0A0A;
  --bg-elevated: #111111;
  --accent: #00FF9F;
  --accent-dim: rgba(0, 255, 159, 0.15);
  --secondary: #7B68EE;
  --secondary-dim: rgba(123, 104, 238, 0.15);
  --warning: #FFD700;
  --alert: #FF0055;
  --text: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1140px;
  --nav-height: 72px;
}

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

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

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

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

a:hover {
  opacity: 0.8;
}

img {
  max-width: 100%;
  display: block;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.section-label {
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

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

section {
  padding: 100px 0;
}

/* ---- Glass Card ---- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass:hover {
  background: var(--glass-hover);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-logo-img {
  height: 32px;
  width: 32px;
  display: block;
}

.nav-logo span {
  color: var(--accent);
}

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

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

.nav-links a:hover {
  color: var(--text);
  opacity: 1;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

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

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 255, 159, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 80px;
}

.hero-content {
  flex: 1;
  max-width: 560px;
}

.hero-brand {
  color: var(--accent);
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.hero-tagline {
  color: var(--text-secondary);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 24px;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-desc {
  font-size: 1.15rem;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-mockup {
  position: relative;
  width: 280px;
  height: 560px;
  border-radius: 40px;
  border: 2px solid var(--glass-border);
  background: var(--glass-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 38px;
}

.hero-mockup-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 20px;
}

/* Canary orb animation inside mockup */
.orb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.canary-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--accent), rgba(0, 255, 159, 0.3));
  box-shadow: 0 0 40px rgba(0, 255, 159, 0.3), 0 0 80px rgba(0, 255, 159, 0.1);
  animation: orbPulse 3s ease-in-out infinite;
  margin-bottom: 8px;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(0, 255, 159, 0.3), 0 0 80px rgba(0, 255, 159, 0.1); }
  50% { transform: scale(1.08); box-shadow: 0 0 60px rgba(0, 255, 159, 0.4), 0 0 120px rgba(0, 255, 159, 0.15); }
}

.orb-score {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.orb-status {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(0, 255, 159, 0.9);
}

.orb-caption {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(0, 255, 159, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--glass-border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Apple download badge */
.app-store-badge {
  height: 54px;
  transition: transform 0.2s;
}

.app-store-badge:hover {
  transform: translateY(-2px);
}

/* ---- How It Works ---- */
.how-it-works {
  text-align: center;
}

.how-it-works h2 {
  margin-bottom: 16px;
}

.how-it-works > .container > p {
  max-width: 600px;
  margin: 0 auto 60px;
}

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

.method-card {
  padding: 36px 28px;
  text-align: center;
  transition: transform 0.3s, background 0.3s;
}

.method-card:hover {
  transform: translateY(-4px);
}

.method-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
}

.method-icon.ble {
  background: var(--accent-dim);
}

.method-icon.wifi {
  background: var(--secondary-dim);
}

.method-icon.ir {
  background: rgba(255, 0, 85, 0.15);
}

.method-card h3 {
  margin-bottom: 12px;
}

.method-card p {
  font-size: 0.95rem;
}

/* ---- Features ---- */
.features {
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(123, 104, 238, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.features h2 {
  text-align: center;
  margin-bottom: 16px;
}

.features > .container > p {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

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

.feature-card {
  padding: 32px 28px;
  transition: transform 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-card .badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.badge-free {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-pro {
  background: var(--secondary-dim);
  color: var(--secondary);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ---- Pro Section ---- */
.pro-section {
  position: relative;
}

.pro-banner {
  padding: 60px;
  border: 1px solid rgba(123, 104, 238, 0.2);
  background: linear-gradient(135deg, rgba(123, 104, 238, 0.08), rgba(0, 255, 159, 0.04));
  border-radius: var(--radius);
  text-align: center;
}

.pro-banner h2 {
  margin-bottom: 8px;
}

.pro-banner h2 span {
  color: var(--secondary);
}

.pro-price {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.pro-price strong {
  color: var(--text);
  font-size: 1.4rem;
}

.pro-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  text-align: left;
}

.pro-feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pro-feature-item .check {
  color: var(--secondary);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.pro-feature-item h4 {
  margin-bottom: 4px;
}

.pro-feature-item p {
  font-size: 0.88rem;
  line-height: 1.4;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 48px 0;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

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

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

.footer-copy {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}

/* ---- Legal Pages ---- */
.legal-page {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 80px;
  min-height: 100vh;
}

.legal-page h1 {
  margin-bottom: 8px;
}

.legal-page .last-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 48px;
}

.legal-content {
  max-width: 760px;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--accent);
}

.legal-content h3 {
  margin-top: 28px;
  margin-bottom: 12px;
}

.legal-content p {
  margin-bottom: 16px;
  font-size: 0.98rem;
  line-height: 1.7;
}

.legal-content ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-content li {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.legal-content a {
  color: var(--accent);
}

/* ---- Support Page ---- */
.support-page {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 80px;
  min-height: 100vh;
}

.support-page h1 {
  margin-bottom: 8px;
}

.support-page .support-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 48px;
  max-width: 500px;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.contact-card {
  padding: 36px;
}

.contact-card h3 {
  margin-bottom: 12px;
}

.contact-card p {
  margin-bottom: 20px;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

.response-card {
  padding: 36px;
}

.response-card h3 {
  margin-bottom: 12px;
}

.response-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.response-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.response-item .icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.response-item p {
  font-size: 0.92rem;
}

.faq-section h2 {
  margin-bottom: 32px;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.faq-card {
  padding: 28px;
}

.faq-card h4 {
  margin-bottom: 10px;
  color: var(--text);
}

.faq-card p {
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---- Scroll Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .methods-grid,
  .features-grid,
  .pro-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero .container {
    flex-direction: column;
    text-align: center;
    gap: 48px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

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

  .support-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .pro-banner {
    padding: 40px 28px;
  }
}

@media (max-width: 640px) {
  section {
    padding: 64px 0;
  }

  .methods-grid,
  .features-grid,
  .pro-features {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--glass-border);
  }

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

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-mockup {
    width: 220px;
    height: 440px;
    border-radius: 32px;
  }

  .hero-mockup img {
    border-radius: 30px;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }

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