/* ============================================================
   fAIrewall D25 Landing — Shared Styles
   Source-of-truth palette from desktop + extension code
   ============================================================ */

/* === Design Tokens === */
:root {
  /* Brand (from product --fw-primary-* / --color-primary-*) */
  --brand-900: #0f1d2f;
  --brand-800: #162a42;
  --brand-700: #1e3a5f;
  --brand-600: #2d5a87;
  --brand-500: #3d7ab0;
  --brand-400: #5a9ad4;
  --brand-200: #b8d9f4;
  --brand-100: #e0f0fc;
  --brand-50:  #f0f7ff;

  /* Success (from product --fw-success-* / --color-success-*) */
  --success-700: #166534;
  --success-600: #16a34a;
  --success-500: #22c55e;
  --success-100: #dcfce7;
  --success-50:  #f0fdf4;

  /* Warning */
  --warning-500: #f59e0b;

  /* Danger */
  --danger-500: #ef4444;

  /* Neutrals (from product neutral scale) */
  --neutral-900: #111111;
  --neutral-800: #1a1a1a;
  --neutral-700: #333333;
  --neutral-600: #4d4d4d;
  --neutral-500: #666666;
  --neutral-400: #888888;
  --neutral-300: #b3b3b3;
  --neutral-200: #d4d4d4;
  --neutral-150: #e0e0e0;
  --neutral-100: #ededed;
  --neutral-50:  #f5f5f5;
  --neutral-25:  #f8f9fa;
  --neutral-0:   #ffffff;

  /* Semantic mappings */
  --bg:            var(--neutral-0);
  --bg-alt:        var(--neutral-25);
  --card-bg:       var(--neutral-0);
  --text:          var(--neutral-900);
  --text-secondary: var(--neutral-600);
  --text-muted:    var(--neutral-500);
  --text-light:    var(--neutral-400);
  --border:        var(--neutral-150);
  --border-light:  var(--neutral-100);

  /* Typography */
  --font-main: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-width:   1120px;
  --header-h:    72px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.1);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.03);

  /* Transition */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}


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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-weight: 400;
}

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

a {
  color: var(--brand-600);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--brand-500); }

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 600;
  color: var(--text);
}


/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}


/* === Header / Nav === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--brand-700);
  font-weight: 700;
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
}
.site-logo svg { flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--brand-700); }

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--text);
  position: relative;
  width: 40px;
  height: 40px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: absolute;
  left: 9px;
  transition: all 0.3s var(--ease);
  border-radius: 1px;
}
.menu-toggle span:nth-child(1) { top: 12px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 26px; }
.menu-toggle.open span:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  top: 19px;
  transform: rotate(-45deg);
}


/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.6rem;
  font-family: var(--font-main);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-700);
  color: var(--neutral-0);
  box-shadow: 0 1px 3px rgba(30,58,95,0.25);
}
.btn-primary:hover {
  background: var(--brand-600);
  color: var(--neutral-0);
  box-shadow: 0 2px 8px rgba(30,58,95,0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-700);
  border: 1.5px solid var(--brand-200);
}
.btn-secondary:hover {
  background: var(--brand-50);
  border-color: var(--brand-500);
  color: var(--brand-700);
}

.btn-ghost {
  background: transparent;
  color: var(--brand-700);
  padding: 0.5rem 1rem;
}
.btn-ghost:hover {
  background: var(--brand-50);
}

/* Light variant for dark backgrounds */
.btn-light {
  background: rgba(255,255,255,0.15);
  color: var(--neutral-0);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-light:hover {
  background: rgba(255,255,255,0.25);
  color: var(--neutral-0);
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: var(--text-xs);
}


/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 100%);
  color: var(--neutral-0);
  padding: var(--space-24) 0 var(--space-20);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(93,154,212,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-6);
  letter-spacing: 0.03em;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  background: var(--success-500);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(34,197,94,0.4);
}

.hero h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--neutral-0);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

.hero-sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin-bottom: var(--space-3);
  max-width: 600px;
}

.hero-support {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-10);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.hero-note {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.45);
}


/* === Sections === */
.section {
  padding: var(--space-20) 0;
}
.section-alt {
  background: var(--bg-alt);
}

.section-header {
  max-width: 640px;
  margin-bottom: var(--space-12);
}
.section-header.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.section-intro {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}


/* === Cards === */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-5);
}
.card-icon svg { width: 22px; height: 22px; }

.card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.card p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
}


/* === Grid layouts === */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}


/* === Steps (How it works) === */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: var(--space-12);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-700);
  color: var(--neutral-0);
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: 50%;
}
.step h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.step p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
}


/* === Capabilities === */
.capabilities {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4) var(--space-8);
}
.capability {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease);
}
.capability:hover { background: var(--neutral-25); }
.capability-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--brand-600);
  margin-top: 2px;
}
.capability h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.capability p {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.6;
}


/* === Pricing === */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 880px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  text-align: center;
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.pricing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.pricing-card.featured {
  border-color: var(--brand-200);
  background: var(--brand-50);
  position: relative;
}
.pricing-card.featured::before {
  content: 'Most popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-700);
  color: var(--neutral-0);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.pricing-card .price {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--brand-700);
  margin-bottom: var(--space-1);
}
.pricing-card .price-period {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 400;
}
.pricing-card .price-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.pricing-note {
  text-align: center;
  margin-top: var(--space-8);
  font-size: var(--text-base);
  color: var(--text-muted);
}


/* === FAQ === */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-6) 0;
}
.faq-item:last-child { border-bottom: none; }

.faq-q {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-main);
  padding: 0;
}
.faq-q::after {
  content: '+';
  font-size: var(--text-xl);
  font-weight: 300;
  color: var(--text-light);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease);
}
.faq-item.open .faq-q::after {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease), padding 0.3s var(--ease);
}
.faq-item.open .faq-a {
  max-height: 200px;
  padding-top: var(--space-4);
}
.faq-a p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
}


/* === Final CTA === */
.final-cta {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 100%);
  color: var(--neutral-0);
  padding: var(--space-20) 0;
  text-align: center;
}
.final-cta h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--neutral-0);
  margin-bottom: var(--space-4);
}
.final-cta p {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-8);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.final-cta .micro {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.45);
  margin-top: var(--space-6);
}


/* === Footer === */
.site-footer {
  background: var(--brand-900);
  color: rgba(255,255,255,0.6);
  padding: var(--space-12) 0;
  font-size: var(--text-sm);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.footer-brand {
  color: var(--neutral-0);
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}
.footer-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}
.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
}
.footer-links a:hover { color: var(--neutral-0); }

.footer-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}
.footer-status .dot {
  width: 6px;
  height: 6px;
  background: var(--success-500);
  border-radius: 50%;
}
.footer-disclosure {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
  max-width: 480px;
}
.footer-contact {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}
.footer-contact a {
  color: rgba(255,255,255,0.6);
}


/* === Page (Security / Privacy / Support) === */
.page-hero {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 100%);
  color: var(--neutral-0);
  padding: var(--space-20) 0 var(--space-16);
}
.page-hero h1 {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--neutral-0);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}
.page-hero p {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  max-width: 640px;
  line-height: 1.7;
}

.page-content {
  padding: var(--space-16) 0;
}
.page-content .container {
  max-width: 740px;
}
.page-section {
  margin-bottom: var(--space-12);
}
.page-section:last-child { margin-bottom: 0; }
.page-section h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}
.page-section p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.8;
}
.page-section + .page-section {
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-light);
}

/* Updated date on privacy */
.page-updated {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  margin-top: var(--space-3);
}


/* === Support contact blocks === */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}
.contact-block {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: border-color 0.2s var(--ease);
}
.contact-block:hover {
  border-color: var(--brand-200);
}
.contact-block h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.contact-block a {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--brand-700);
}


/* === Scroll animations === */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}


/* === Responsive === */
@media (max-width: 900px) {
  .grid-3, .pricing-grid, .steps { grid-template-columns: 1fr; }
  .grid-2, .capabilities { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .hero h1 { font-size: var(--text-4xl); }
  .hero { padding: var(--space-16) 0 var(--space-12); }
  .section { padding: var(--space-12) 0; }
  .section-title { font-size: var(--text-2xl); }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--neutral-0);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-6);
    gap: var(--space-4);
    box-shadow: var(--shadow-md);
  }
  .menu-toggle { display: block; }

  .footer-inner { flex-direction: column; }
  .footer-meta { flex-direction: column; align-items: flex-start; }

  .page-hero h1 { font-size: var(--text-3xl); }
}

@media (max-width: 600px) {
  .hero h1 { font-size: var(--text-3xl); }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .pricing-card { padding: var(--space-6); }
}


/* === D25 Fixes === */

/* Fix: nav CTA button must have white text */
.nav-links .btn-primary,
.nav-links .btn-primary:hover {
  color: var(--neutral-0);
}

/* Hero: two-column layout with visual on right */
.hero-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}

/* Hero: "Works with" line more visible */
.hero-providers {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Hero: animated shield */
.hero-visual {
  flex-shrink: 0;
}

.hero-shield {
  width: 260px;
  height: 260px;
  animation: shield-spin 11s linear infinite;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.25));
}

@keyframes shield-spin {
  0%    { transform: rotateY(0deg); }
  49.9% { transform: rotateY(90deg); }
  50%   { transform: rotateY(-90deg); }
  100%  { transform: rotateY(0deg); }
}

/* Green dot glow pulse on the hero shield */
.hero-shield .shield-dot {
  animation: dot-glow 3s ease-in-out infinite;
}
@keyframes dot-glow {
  0%, 100% { opacity: 0.9; }
  50%      { opacity: 0.5; }
}

@media (max-width: 900px) {
  .hero-grid { flex-direction: column; text-align: left; }
  .hero-visual { display: none; }
}
