/* ============================================
   Fix My Compliance — Premium Light Theme
   ============================================ */

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

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Core Palette */
  --white: #ffffff;
  --off-white: #f8f9fc;
  --gray-50: #f1f3f8;
  --gray-100: #e4e8f0;
  --gray-200: #c9d0de;
  --gray-300: #a0aabf;
  --gray-500: #64708a;
  --gray-700: #374155;
  --gray-900: #111827;
  
  /* Brand */
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-lighter: #e0e7ff;
  --primary-ghost: rgba(79, 70, 229, 0.06);
  
  /* Severity */
  --green: #10b981;
  --green-bg: #ecfdf5;
  --green-border: #a7f3d0;
  --red: #ef4444;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --amber: #f59e0b;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --blue: #3b82f6;
  --blue-bg: #eff6ff;
  --blue-border: #bfdbfe;
  
  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.1), 0 8px 24px rgba(0,0,0,0.06);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--gray-900); background: var(--white); line-height: 1.6; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-light); }

/* --- Header --- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--gray-100);
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--gray-900); }
.logo-icon { font-size: 1.5rem; }
.logo-accent { color: var(--primary); }

.nav { display: flex; gap: 32px; }
.nav-link { font-size: 0.9rem; font-weight: 500; color: var(--gray-500); transition: color 0.2s; }
.nav-link:hover { color: var(--gray-900); }

/* --- Hero --- */
.hero {
  position: relative; overflow: hidden;
  padding: 140px 0 80px;
  background: linear-gradient(180deg, var(--primary-ghost) 0%, var(--white) 100%);
}
.hero-inner { text-align: center; position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: var(--primary-lighter);
  color: var(--primary); font-size: 0.82rem; font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease-out;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  animation: pulse-dot 2s infinite;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800;
  line-height: 1.15; letter-spacing: -0.03em;
  margin-bottom: 20px; color: var(--gray-900);
  animation: fadeInUp 0.6s ease-out 0.1s both;
}
.title-highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--red) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem; color: var(--gray-500); max-width: 620px; margin: 0 auto 40px;
  line-height: 1.7; animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Floating shapes */
.hero-shape {
  position: absolute; border-radius: 50%; opacity: 0.5;
  animation: float 20s infinite ease-in-out;
}
.hero-shape-1 {
  width: 400px; height: 400px; top: -100px; right: -100px;
  background: radial-gradient(circle, var(--primary-lighter) 0%, transparent 70%);
}
.hero-shape-2 {
  width: 300px; height: 300px; bottom: -50px; left: -80px;
  background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, transparent 70%);
  animation-delay: -7s;
}
.hero-shape-3 {
  width: 200px; height: 200px; top: 40%; left: 60%;
  background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
  animation-delay: -14s;
}

/* --- Audit Form --- */
.audit-form-wrapper { animation: fadeInUp 0.6s ease-out 0.3s both; }

.audit-form {
  display: flex; gap: 12px; max-width: 640px; margin: 0 auto;
  background: var(--white);
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.audit-form:focus-within {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-xl), 0 0 0 4px var(--primary-lighter);
}

.input-group {
  flex: 1; display: flex; align-items: center; gap: 12px; padding: 0 16px;
}
.input-icon { font-size: 1.3rem; opacity: 0.4; }
.url-input {
  flex: 1; border: none; outline: none; background: none;
  font-family: var(--font); font-size: 1rem; color: var(--gray-900);
}
.url-input::placeholder { color: var(--gray-300); }

.btn-audit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border: none; border-radius: var(--radius-md);
  background: var(--primary); color: var(--white);
  font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-audit:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-audit:active { transform: translateY(0); }
.btn-audit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.btn-loader {
  display: none; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: white;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
.btn-audit.loading .btn-text { display: none; }
.btn-audit.loading .btn-loader { display: block; }

.form-hint { font-size: 0.8rem; color: var(--gray-300); margin-top: 12px; }

/* --- Scanning --- */
.scanning-section { padding: 80px 0; }
.scanning-card {
  text-align: center; padding: 60px 40px;
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.5s ease-out;
}

.scanner-animation {
  position: relative; width: 120px; height: 120px; margin: 0 auto 32px;
}
.scanner-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--primary-lighter);
  animation: scanner-pulse 2s ease-in-out infinite;
}
.ring-2 { inset: 12px; animation-delay: 0.4s; }
.ring-3 { inset: 24px; animation-delay: 0.8s; }
.scanner-icon {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 2.5rem;
}

.scanning-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.scanning-title span { color: var(--primary); }
.scanning-status { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 24px; }

.progress-bar-track {
  max-width: 400px; height: 6px; margin: 0 auto 32px;
  background: var(--gray-100); border-radius: 100px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; width: 0%; border-radius: 100px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.5s ease;
}

.scanning-checklist { display: flex; flex-direction: column; gap: 10px; max-width: 300px; margin: 0 auto; text-align: left; }
.check-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--gray-500); font-weight: 500;
  transition: color 0.3s;
}
.check-item.active { color: var(--primary); }
.check-item.done { color: var(--green); }
.check-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gray-200); flex-shrink: 0;
  transition: background 0.3s;
}
.check-item.active .check-dot { background: var(--primary); animation: pulse-dot 1s infinite; }
.check-item.done .check-dot { background: var(--green); }

/* --- Results --- */
.results-section { padding: 80px 0; animation: fadeInUp 0.5s ease-out; }

.results-header {
  text-align: center; margin-bottom: 48px;
}

.result-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 28px; border-radius: 100px;
  font-size: 1.3rem; font-weight: 800; letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.result-badge.pass { background: var(--green-bg); color: var(--green); border: 2px solid var(--green-border); }
.result-badge.fail { background: var(--red-bg); color: var(--red); border: 2px solid var(--red-border); }

.result-badge-icon { font-size: 1.5rem; }
.results-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.results-subtitle { color: var(--gray-500); font-size: 1rem; margin-bottom: 20px; }

.btn-new-scan {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 24px; border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); background: var(--white);
  font-family: var(--font); font-size: 0.88rem; font-weight: 500;
  color: var(--gray-500); cursor: pointer; transition: all 0.2s;
}
.btn-new-scan:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-ghost); }

/* Category Grid */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 40px; }

.category-card {
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg); padding: 28px;
  transition: all 0.3s; box-shadow: var(--shadow-sm);
}
.category-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.category-card.pass { border-left: 4px solid var(--green); }
.category-card.fail { border-left: 4px solid var(--red); }
.category-card.warn { border-left: 4px solid var(--amber); }

.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.card-icon { font-size: 1.5rem; }
.card-title { flex: 1; font-size: 1.1rem; font-weight: 700; }
.card-status {
  padding: 4px 12px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
}
.card-status.pass { background: var(--green-bg); color: var(--green); }
.card-status.fail { background: var(--red-bg); color: var(--red); }

.card-description { font-size: 0.82rem; color: var(--gray-500); line-height: 1.6; }

.card-issues { margin-top: 12px; }
.card-issue-item {
  padding: 10px 14px; margin-top: 8px;
  background: var(--red-bg); border: 1px solid var(--red-border);
  border-radius: var(--radius-sm); font-size: 0.82rem; color: var(--gray-700); line-height: 1.5;
}
.card-issue-item .issue-severity {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; margin-right: 6px;
}
.issue-severity.critical { background: var(--red); color: white; }
.issue-severity.high { background: var(--amber); color: white; }
.issue-severity.medium { background: var(--blue); color: white; }

/* Advisories */
.advisories-section { margin-top: 32px; }
.advisories-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.advisory-item {
  padding: 16px 20px;
  background: var(--blue-bg); border: 1px solid var(--blue-border);
  border-radius: var(--radius-md); margin-bottom: 12px;
  font-size: 0.88rem; color: var(--gray-700); line-height: 1.6;
}
.advisory-item strong { color: var(--blue); }

/* Issues Detail */
.issues-detail-section { margin-top: 32px; }
.issues-detail-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.issue-detail-item {
  padding: 20px; background: var(--white);
  border: 1px solid var(--gray-100); border-radius: var(--radius-md);
  margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.issue-detail-item h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.issue-detail-item p { font-size: 0.85rem; color: var(--gray-500); line-height: 1.6; }
.issue-detail-item .issue-category { font-size: 0.75rem; font-weight: 600; color: var(--primary); margin-bottom: 4px; }

/* Error */
.error-section { padding: 80px 0; }
.error-card {
  text-align: center; padding: 60px 40px;
  background: var(--red-bg); border: 1px solid var(--red-border);
  border-radius: var(--radius-xl); animation: fadeInUp 0.5s ease-out;
}
.error-icon { font-size: 3rem; }
.error-title { font-size: 1.5rem; font-weight: 700; margin: 12px 0 8px; color: var(--red); }
.error-message { color: var(--gray-500); margin-bottom: 24px; }

/* --- How It Works --- */
.how-section { padding: 80px 0; background: var(--off-white); }
.section-title { font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 48px; letter-spacing: -0.02em; }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.step-card {
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-sm); transition: all 0.3s;
}
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.step-number {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary-lighter); color: var(--primary);
  font-weight: 800; font-size: 1.1rem; margin-bottom: 16px;
}
.step-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 0.88rem; color: var(--gray-500); line-height: 1.6; }

/* --- What We Check --- */
.categories-section { padding: 80px 0; }
.law-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.law-card {
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-sm); transition: all 0.3s;
}
.law-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.law-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.law-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.law-card p { font-size: 0.88rem; color: var(--gray-500); line-height: 1.6; margin-bottom: 16px; }
.law-fine {
  display: inline-block; padding: 4px 12px;
  background: var(--red-bg); color: var(--red);
  font-size: 0.78rem; font-weight: 600; border-radius: 100px;
}

/* --- FAQ --- */
.faq-section { padding: 80px 0; background: var(--off-white); }
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-md); margin-bottom: 12px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq-item summary {
  padding: 20px 24px; cursor: pointer;
  font-weight: 600; font-size: 0.95rem;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  transition: background 0.2s;
}
.faq-item summary:hover { background: var(--gray-50); }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--gray-300); transition: transform 0.3s; }
.faq-item[open] summary::after { content: '−'; color: var(--primary); }
.faq-item p { padding: 0 24px 20px; font-size: 0.9rem; color: var(--gray-500); line-height: 1.7; }

/* --- Footer --- */
.footer {
  padding: 40px 0; border-top: 1px solid var(--gray-100);
  text-align: center;
}
.footer-brand { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 4px; }
.footer-brand a { font-weight: 600; }
.footer-legal { font-size: 0.78rem; color: var(--gray-300); }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(20px, -20px); }
  66% { transform: translate(-15px, 15px); }
}

@keyframes scanner-pulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav { display: none; }
  .hero { padding: 120px 0 60px; }
  .audit-form { flex-direction: column; padding: 12px; }
  .btn-audit { width: 100%; padding: 16px; }
  .category-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .law-grid { grid-template-columns: 1fr; }
}
