/* ============================================================
   PhysicalGuard – Marketing Website Styles
   Dark & Premium Design System
   ============================================================ */

/* ----- CSS Custom Properties ----- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f2e;
  --bg-card-hover: #222840;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #3b82f6, #06b6d4);
  --accent-gradient-hover: linear-gradient(135deg, #2563eb, #0891b2);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.16);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1280px;
  --nav-height: 72px;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

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

a:hover {
  color: var(--accent-cyan);
}

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

ul {
  list-style: none;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.25rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  max-width: 65ch;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

.section-sm {
  padding: 4rem 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

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

.nav.scrolled {
  background: rgba(10, 14, 26, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

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

.nav-logo svg {
  width: 36px;
  height: 36px;
}

.nav-logo:hover {
  color: var(--text-primary);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

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

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
}

.nav-cta {
  display: none;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  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-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

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

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

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

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  padding: 2rem 1.5rem;
  z-index: 999;
  flex-direction: column;
  gap: 1rem;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  color: var(--text-secondary);
  font-size: 1.125rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.nav-mobile a:hover {
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .nav-cta {
    display: inline-flex;
  }

  .nav-toggle {
    display: none;
  }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

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

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ----- Hero Sections ----- */
.hero {
  position: relative;
  padding: 10rem 0 6rem;
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    var(--bg-primary);
  z-index: 0;
}

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

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Page hero (smaller, for inner pages) */
.page-hero {
  position: relative;
  padding: 8rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.page-hero .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.page-hero p {
  margin: 0 auto;
  font-size: 1.15rem;
}

/* ----- Cards ----- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  color: var(--accent-blue);
}

.card h3 {
  margin-bottom: 0.75rem;
}

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

/* Icon circle */
.icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.icon-circle svg {
  width: 28px;
  height: 28px;
  color: var(--accent-blue);
}

/* ----- Stats Strip ----- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  text-align: center;
  padding: 1.5rem 1rem;
}

.stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ----- Trusted By / Logo Bar ----- */
.logo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
  padding: 2rem 0;
  opacity: 0.4;
}

.logo-bar span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ----- Feature Sections (alternating) ----- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0;
}

.feature-row:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
  .feature-row {
    grid-template-columns: 1fr 1fr;
  }

  .feature-row.reverse .feature-text {
    order: 2;
  }

  .feature-row.reverse .feature-visual {
    order: 1;
  }
}

.feature-text h3 {
  margin-bottom: 1rem;
}

.feature-text p {
  margin-bottom: 1.5rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-list li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--accent-cyan);
  margin-top: 2px;
}

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

.feature-visual svg {
  width: 100%;
  max-width: 400px;
  height: auto;
}

/* ----- Steps / How it works ----- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  position: relative;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.step h4 {
  margin-bottom: 0.75rem;
}

.step p {
  margin: 0 auto;
  font-size: 0.95rem;
}

/* Step connector arrows (desktop only) */
@media (min-width: 768px) {
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 3.5rem;
    right: -1rem;
    width: 2rem;
    height: 2px;
    background: var(--accent-gradient);
  }
}

/* ----- Integrations bar ----- */
.integrations-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.integration-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  min-width: 120px;
  transition: all 0.3s;
}

.integration-item:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}

.integration-item svg {
  width: 36px;
  height: 36px;
  color: var(--accent-cyan);
}

.integration-item span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ----- CTA Section ----- */
.cta-section {
  position: relative;
  padding: 5rem 0;
  text-align: center;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  margin: 0 auto 2rem;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand p {
  font-size: 0.9rem;
  margin-top: 1rem;
}

.footer h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--accent-blue);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

/* ----- Forms ----- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
  }
}

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

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
}

.faq-question svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.3s;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding-bottom: 1.25rem;
  font-size: 0.95rem;
}

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

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

/* Stagger children */
.stagger > .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger > .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger > .fade-in:nth-child(3) { transition-delay: 0.2s; }
.stagger > .fade-in:nth-child(4) { transition-delay: 0.3s; }
.stagger > .fade-in:nth-child(5) { transition-delay: 0.4s; }
.stagger > .fade-in:nth-child(6) { transition-delay: 0.5s; }
.stagger > .fade-in:nth-child(7) { transition-delay: 0.6s; }

/* ----- Dividers ----- */
.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 0;
}

/* ----- Section Headers ----- */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header .overline {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ----- Badges / Tags ----- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

/* ----- Architecture Diagram Styles ----- */
.arch-layer {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  transition: all 0.3s;
}

.arch-layer:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-glow);
}

.arch-arrow {
  text-align: center;
  color: var(--accent-cyan);
  font-size: 1.5rem;
  padding: 0.5rem 0;
}

/* ----- Deployment Options ----- */
.deploy-card {
  text-align: center;
  padding: 2.5rem 2rem;
}

.deploy-card .card-icon {
  margin: 0 auto 1.25rem;
}

/* ----- Contact Info Cards ----- */
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
}

.contact-card svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--accent-blue);
}

.contact-card h4 {
  margin-bottom: 0.25rem;
}

.contact-card p {
  font-size: 0.9rem;
}

/* ----- Toast / Success Message ----- */
.form-success {
  display: none;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  font-weight: 500;
  text-align: center;
  margin-top: 1rem;
}

.form-success.show {
  display: block;
}

/* ----- Compliance Grid (flex-wrap centered) ----- */
.grid-compliance {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .grid-compliance {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-compliance {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ----- Utility ----- */
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.pt-nav { padding-top: var(--nav-height); }
.gap-1 { gap: 0.5rem; }
.gap-3 { gap: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
