/* DocPolish Brand Stylesheet
   Version: 1.0
   Brand: Doc Polish - Document Health Specialists
*/

/* ============================================
   CSS Variables - Brand Tokens
   ============================================ */
:root {
  /* Primary Colors - Trust Certificate Authority Palette */
  --navy-900: #1a2744;
  --navy-800: #243352;
  --navy-700: #2d4066;
  --navy-600: #36497a;

  /* Gold Accent - Trust Certificate Palette */
  --gold-500: #D4AF37;
  --gold-400: #E8D48B;
  --gold-600: #B8952E;

  /* Background - Trust Certificate Cream */
  --cream: #FDFBF5;
  
  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  
  /* Semantic Colors */
  --success: #38a169;
  --success-light: #c6f6d5;
  --error: #e53e3e;
  --error-light: #fed7d7;
  --warning: #dd6b20;
  --info: #3182ce;
  
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  
  /* Typography */
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
  
  /* Border Radius - Square corners for precision/compliance aesthetic */
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-full: 0;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--gray-700);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--navy-900);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--navy-900);
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }

p {
  margin-bottom: var(--space-4);
}

.text-muted { color: var(--gray-500); }
.text-small { font-size: 0.875rem; }
.text-center { text-align: center; }

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

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-16) 0;
}

.section-alt {
  background: var(--gray-50);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

/* ============================================
   Header / Navigation
   ============================================ */
.header {
  background: var(--navy-900);
  color: var(--white);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px;
  width: auto;
  border: 2px solid #D4AF37;
  border-radius: 4px;
  padding: 2px;
}

.logo span {
  color: #D4AF37;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.logo-text span {
  font-weight: 300;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  transition: color var(--transition-fast), transform 0.2s ease;
}

.nav a:hover {
  color: var(--white);
  transform: scale(1.08);
}

.nav a.active {
  color: var(--white);
}

.nav-cta {
  background: var(--gold-500);
  color: var(--navy-900) !important;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--gold-400);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-900);
    flex-direction: column;
    padding: var(--space-4);
    gap: var(--space-4);
  }
  
  .nav.active {
    display: flex;
  }
  
  .nav-toggle {
    display: block;
  }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: var(--white);
  min-height: 28vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

.hero h1 {
  color: #D4AF37;
  font-size: 2.2rem;
  font-weight: 300;
  margin-bottom: var(--space-4);
}

.hero h1 strong {
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto var(--space-8);
}

.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  text-align: left;
}

.hero-content {
  flex: 1;
}

.hero-content h1 {
  margin-bottom: var(--space-2);
}

.hero-content .lead {
  margin: 0 0 var(--space-4) 0;
  max-width: none;
}

.hero-mantra {
  font-style: italic;
  font-size: 0.8rem;
  opacity: 0.4;
  letter-spacing: 1.5px;
  text-transform: lowercase;
  border-left: 2px solid rgba(212, 175, 55, 0.35);
  padding-left: 14px;
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
}

@media (max-width: 600px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .hero-mantra {
    border-left: none;
    padding-left: 0;
    text-align: center;
  }
}

.hero-logo {
  display: block;
  margin: 0 auto 20px auto;
  height: 138px;
  width: auto;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.hero-logo:hover {
  transform: scale(1.08);
}

.hero .lead {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-8);
}

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

.btn-primary {
  background: var(--gold-500);
  color: var(--navy-900);
}

.btn-primary:hover {
  background: var(--gold-400);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy-900);
}

.btn-secondary:hover {
  background: var(--gray-100);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: 1.125rem;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-featured {
  border: 2px solid var(--gold-500);
  position: relative;
}

.card-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold-500);
  color: var(--navy-900);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.card h3 {
  margin-bottom: var(--space-2);
}

.card .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: var(--space-4);
}

.card .price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gray-500);
}

/* Feature List */
.feature-list {
  list-style: none;
  margin: var(--space-6) 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--gray-100);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list .icon {
  color: var(--success);
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ============================================
   Polisher Tool Interface
   ============================================ */
.polisher {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.polisher-header {
  background: var(--navy-900);
  color: var(--white);
  padding: var(--space-4) var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.polisher-body {
  padding: var(--space-6);
}

.polisher-input {
  width: 100%;
  min-height: 200px;
  padding: var(--space-4);
  border: 2px solid var(--navy-900);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  resize: vertical;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.polisher-input:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.polisher-controls {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.select-wrapper {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.select-wrapper select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--navy-900);
  border-radius: var(--radius-md);
  font-size: 1rem;
  appearance: none;
  background: var(--white);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.select-wrapper::after {
  content: '▼';
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--navy-900);
  pointer-events: none;
}

.polisher-result {
  margin-top: var(--space-6);
  padding: var(--space-6);
  background: var(--cream);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--gold-500);
  border-top: 1px solid var(--navy-900);
}

.polisher-result h4 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--navy-900);
}

.polisher-result .output {
  background: var(--white);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  white-space: pre-wrap;
  font-family: var(--font-sans);
  border: 1px solid var(--navy-900);
}

.polisher-meta {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 2px solid var(--gold-500);
  font-size: 0.875rem;
  color: var(--gray-500);
}

.trust-id {
  font-family: var(--font-mono);
  background: var(--navy-900);
  color: var(--gold-500);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  border: 1px solid var(--gold-500);
}

/* Polisher Page Shadows */
.polisher-input,
.polisher-result,
.polisher-controls,
.polisher-meta,
.trust-id,
.how-it-works-step,
.systems-panel,
.anon-preview {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Polisher Page Hover Effects */
.polisher-result,
.systems-panel,
.anon-preview,
.how-it-works-step {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.polisher-result:hover,
.systems-panel:hover,
.anon-preview:hover,
.how-it-works-step:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* ============================================
   Testimonials
   ============================================ */
.testimonial {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  position: relative;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: var(--space-4);
  left: var(--space-6);
  font-size: 4rem;
  color: var(--gold-500);
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial p {
  font-size: 1.125rem;
  font-style: italic;
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: var(--gray-200);
}

.testimonial-name {
  font-weight: 600;
  color: var(--navy-900);
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ============================================
   Articles / Resources
   ============================================ */
.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.article-card-body {
  padding: var(--space-6);
}

.article-card .category {
  display: inline-block;
  background: var(--gray-100);
  color: var(--navy-800);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.article-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

.article-card p {
  color: var(--gray-500);
  font-size: 0.9375rem;
}

.article-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--navy-700);
  font-weight: 600;
  margin-top: var(--space-4);
}

/* ============================================
   Trust Badges / Authority
   ============================================ */
.trust-section {
  background: var(--gray-50);
  padding: var(--space-12) 0;
}

.trust-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-12);
  flex-wrap: wrap;
  opacity: 0.7;
}

.trust-badges img {
  height: 40px;
  filter: grayscale(100%);
  transition: all var(--transition-normal);
}

.trust-badges img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--navy-900);
  color: var(--white);
  padding: var(--space-12) 0 var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.footer-brand img {
  height: 46px;
  width: auto;
}

.footer-brand::after {
  content: "An EZai23 product";
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 1px;
  margin-top: 12px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  margin-top: var(--space-4);
}

.footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Global Card/Box Shadows & Hover Effects
   ============================================ */
.feature-card,
.capability-card,
.capability,
.detection-category,
.detection-item,
.type-card,
.usecase-card,
.contact-card,
.contact-block,
.trust-point,
.faq-item,
.badge,
.enterprise-feature,
.feature,
.workflow-step,
.methodology-step,
.principle-card,
.regulatory-card,
.security-badge,
.testimonial,
.case-study,
.article-card,
.doctype-item,
.privacy-item,
.panel {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover,
.capability-card:hover,
.capability:hover,
.detection-category:hover,
.detection-item:hover,
.type-card:hover,
.usecase-card:hover,
.contact-card:hover,
.contact-block:hover,
.trust-point:hover,
.faq-item:hover,
.badge:hover,
.enterprise-feature:hover,
.feature:hover,
.workflow-step:hover,
.methodology-step:hover,
.principle-card:hover,
.regulatory-card:hover,
.security-badge:hover,
.testimonial:hover,
.case-study:hover,
.article-card:hover,
.doctype-item:hover,
.privacy-item:hover,
.panel:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* ============================================
   Utility Classes
   ============================================ */
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }

.hidden { display: none !important; }
.visible { display: block !important; }

/* ============================================
   Global Transition Baseline
   ============================================ */
.btn,
.card,
.polisher-input,
.select-wrapper select,
.sector-pill,
details,
.toast {
  transition: all var(--transition-fast);
}

/* Smooth panel transitions */
.polisher-result,
.anon-preview,
.quick-tips {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Badge transitions */
.entity-badge,
.sector-badge,
.tier-badge,
.trust-id {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ============================================
   Loading States
   ============================================ */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--navy-700);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Pulse animation for status indicators */
.status-pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ==================== Scroll to Top Button ==================== */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: #1a2744;
  color: #D4AF37;
  border: 2px solid #D4AF37;
  border-radius: 0;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: #D4AF37;
  color: #1a2744;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.scroll-to-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
}
