/* ==========================================================================
   Avrile Mail — Design System Glassmorphism & High-Contrast Typography
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Brand Palette */
  --accent: #bb152c;
  --accent-light: #e11d48;
  --accent-glow: rgba(187, 21, 44, 0.35);
  --accent-gradient: linear-gradient(135deg, #bb152c 0%, #e11d48 100%);
  
  /* High-Contrast Colors (Dark Theme as Primary for Rich Glass Contrast) */
  --bg-primary: #0a0e17;
  --bg-secondary: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #0f172a;

  /* Glassmorphism Variables */
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-bg-hover: rgba(30, 41, 59, 0.75);
  --glass-border: 1px solid rgba(255, 255, 255, 0.12);
  --glass-border-hover: 1px solid rgba(255, 255, 255, 0.28);
  --glass-blur: blur(20px);
  --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --glass-highlight: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);

  /* Radius & Transitions */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables (Switchable via data-theme="light") */
[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --text-inverse: #ffffff;

  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-bg-hover: rgba(255, 255, 255, 0.92);
  --glass-border: 1px solid rgba(255, 255, 255, 0.8);
  --glass-border-hover: 1px solid rgba(187, 21, 44, 0.3);
  --glass-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  --glass-highlight: inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Gradient Meshes (Orbs) */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.glow-orb-1 {
  top: -10%;
  left: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #bb152c 0%, transparent 70%);
}

.glow-orb-2 {
  top: 35%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  animation-duration: 22s;
}

.glow-orb-3 {
  bottom: -15%;
  left: 20%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  animation-duration: 25s;
}

@keyframes floatOrb {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(40px) scale(1.08); }
  100% { transform: translateY(-30px) scale(0.95); }
}

/* Layout Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Glassmorphism Base Component */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

/* Header & Navigation */
header.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin: 16px 24px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-xl);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.brand-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(187, 21, 44, 0.2);
  color: #ff4d6d;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(187, 21, 44, 0.4);
}

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

.nav-menu a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--text-main);
}

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

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

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Theme Toggle Button */
.theme-btn {
  background: rgba(255, 255, 255, 0.08);
  border: var(--glass-border);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: rotate(15deg);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ff4d6d;
  background: rgba(187, 21, 44, 0.12);
  border: 1px solid rgba(187, 21, 44, 0.3);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text-main);
}

.hero-highlight {
  background: linear-gradient(135deg, #ffffff 30%, #ff4d6d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-highlight {
  background: linear-gradient(135deg, #0f172a 30%, #bb152c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 36px;
  font-weight: 400;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.trust-chip span.dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Hero Showcase Frame (Screenshot with Glassmorphic Window) */
.hero-mockup {
  margin: 0 auto;
  max-width: 1100px;
  padding: 16px;
  border-radius: var(--radius-xl);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  border-bottom: var(--glass-border);
  margin-bottom: 12px;
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.window-address {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 20px;
  border-radius: 999px;
  border: var(--glass-border);
}

.screenshot-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  background: #0b0f19;
}

.screenshot-container img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.screenshot-container:hover img {
  transform: scale(1.01);
}

/* Explicit Placeholder Caption */
.screenshot-placeholder-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.95);
  padding: 10px 20px;
  border-top: var(--glass-border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.screenshot-tag {
  background: rgba(187, 21, 44, 0.2);
  color: #ff4d6d;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  border: 1px solid rgba(187, 21, 44, 0.4);
}

/* Metrics Section */
.metrics-section {
  padding: 60px 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.metric-card {
  padding: 30px 24px;
  text-align: center;
}

.metric-number {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Features Grid */
.section {
  padding: 80px 0;
}

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

.section-pill {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ff4d6d;
  margin-bottom: 12px;
  display: inline-block;
}

.section-header h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

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

.feature-card {
  padding: 36px 30px;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-6px);
  border: var(--glass-border-hover);
  background: var(--glass-bg-hover);
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(187, 21, 44, 0.12);
  border: 1px solid rgba(187, 21, 44, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 24px;
}

.feature-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

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

/* Showcase Rows (Side-by-side with Explicit Screenshots) */
.showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 70px;
}

.showcase-row.reverse {
  direction: rtl;
}

.showcase-row.reverse > * {
  direction: ltr;
}

.showcase-content h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.showcase-content p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.showcase-checklist {
  list-style: none;
  margin-bottom: 28px;
}

.showcase-checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.98rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text-main);
}

.showcase-checklist li span.check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
}

.showcase-image-card {
  padding: 14px;
  border-radius: var(--radius-lg);
}

/* Security Highlight Banner */
.security-banner {
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  margin: 40px 0;
  border: 1px solid rgba(187, 21, 44, 0.3);
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 36px;
}

.sec-item {
  display: flex;
  gap: 16px;
}

.sec-item-icon {
  font-size: 1.8rem;
}

.sec-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.sec-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.pricing-card {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-card.featured {
  border: 2px solid var(--accent);
  box-shadow: 0 20px 60px var(--accent-glow);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  right: 24px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  text-transform: uppercase;
}

.pricing-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.price-box {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 30px;
}

.price-box .amount {
  font-size: 3rem;
  font-weight: 900;
  color: var(--text-main);
}

.price-box .period {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 36px;
  flex-grow: 1;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  margin-bottom: 14px;
  color: var(--text-muted);
}

.pricing-features li strong {
  color: var(--text-main);
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  padding: 22px 28px;
  cursor: pointer;
}

.faq-item summary {
  list-style: none;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
  color: var(--accent);
}

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

/* CTA Bottom Banner */
.cta-banner {
  margin: 80px 0;
  padding: 60px 40px;
  text-align: center;
  background: linear-gradient(135deg, rgba(187, 21, 44, 0.25) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(187, 21, 44, 0.4);
}

.cta-banner h2 {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-banner p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

/* Footer */
footer.site-footer {
  border-top: var(--glass-border);
  background: rgba(10, 14, 23, 0.8);
  padding: 60px 0 30px;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 14px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--text-main);
}

.footer-bottom {
  padding-top: 24px;
  border-top: var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 16px;
}

/* Legal Pages Styling (privacy.html & terms.html) */
.legal-header {
  padding: 60px 0 40px;
  text-align: center;
}

.legal-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.legal-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.legal-content-card {
  max-width: 900px;
  margin: 0 auto 80px;
  padding: 48px;
}

.legal-content-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

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

.legal-content-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 20px 0 10px;
  color: var(--text-main);
}

.legal-content-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 16px;
  line-height: 1.7;
}

.legal-content-card ul, .legal-content-card ol {
  margin: 12px 0 20px 24px;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.legal-content-card li {
  margin-bottom: 8px;
}

.legal-content-card strong {
  color: var(--text-main);
}

.legal-highlight-box {
  background: rgba(187, 21, 44, 0.08);
  border-left: 4px solid var(--accent);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: var(--transition);
}

.btn-back:hover {
  color: var(--accent-light);
  transform: translateX(-4px);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .showcase-row, .showcase-row.reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .nav-menu {
    display: none; /* simple mobile nav */
  }
}

@media (max-width: 640px) {
  .legal-content-card {
    padding: 24px 18px;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  header.site-header {
    margin: 10px 12px 0;
  }
  .nav-container {
    padding: 10px 16px;
  }
}
