/* =============================================
   PageCraft — Design System
   Dark theme, warm orange accent, distinctive
   ============================================= */

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

:root {
  --bg-deep: #0c0f14;
  --bg-card: #14181f;
  --bg-accent: #1c2029;
  --text-primary: #f0ede8;
  --text-muted: #8a8d96;
  --accent: #e8734a;
  --accent-glow: rgba(232, 115, 74, 0.15);
  --accent-light: #f09e7a;
  --warm: #d4a574;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.hidden { display: none !important; }
.accent { color: var(--accent); }

/* ---- NAV ---- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

nav .tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid #2a2d36;
  padding: 6px 14px;
  border-radius: 20px;
}

/* ---- HERO ---- */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 48px 80px;
  position: relative;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 32px;
  position: relative;
  padding-left: 20px;
}

.hero-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.1;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ---- AUDIT FORM ---- */
.audit-form {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto 24px;
}

.input-group {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid #2a2d36;
  border-radius: 16px;
  padding: 6px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.input-icon {
  padding: 0 12px 0 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  padding: 14px 8px;
  min-width: 0;
}

.input-group input::placeholder {
  color: #555;
}

.input-group button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.input-group button:hover {
  background: #d4623e;
  transform: translateY(-1px);
}

.input-group button:active {
  transform: translateY(0);
}

.input-group button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.trust-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.trust-item {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---- LOADING ---- */
.loading-section {
  padding: 80px 48px;
  text-align: center;
}

.loading-content {
  max-width: 500px;
  margin: 0 auto;
}

.loading-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.loading-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.scan-animation {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 32px;
}

.scan-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent-glow);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.ring-2 {
  inset: 8px;
  animation-duration: 1.8s;
  animation-direction: reverse;
  border-top-color: var(--accent-light);
}

.ring-3 {
  inset: 16px;
  animation-duration: 2.4s;
  border-top-color: var(--warm);
}

.scan-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
}

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

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

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ---- ERROR ---- */
.error-section {
  padding: 60px 48px;
}

.error-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid #3a1a1a;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
}

.error-icon {
  width: 48px;
  height: 48px;
  background: rgba(248, 113, 113, 0.1);
  color: var(--danger);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 auto 16px;
}

.error-card h3 {
  font-family: 'Syne', sans-serif;
  margin-bottom: 8px;
}

.error-card p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.btn-retry {
  background: var(--bg-accent);
  color: var(--text-primary);
  border: 1px solid #2a2d36;
  padding: 10px 24px;
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s;
}

.btn-retry:hover {
  border-color: var(--accent);
}

/* ---- RESULTS ---- */
.results-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 48px 80px;
}

.results-header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 48px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid #2a2d36;
  border-radius: 20px;
}

.score-circle {
  text-align: center;
  flex-shrink: 0;
}

.score-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid #2a2d36;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
}

.score-number {
  font-family: 'Syne', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.score-of {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.score-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.score-great { color: var(--success); }
.score-good { color: var(--success); }
.score-ok { color: var(--warning); }
.score-bad { color: var(--danger); }

.results-meta h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.scanned-url {
  color: var(--accent);
  font-size: 0.9rem;
  word-break: break-all;
  margin-bottom: 4px;
}

.results-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- CATEGORY CARDS ---- */
.category-card {
  background: var(--bg-card);
  border: 1px solid #2a2d36;
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #1e222b;
}

.category-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.category-title {
  flex: 1;
}

.category-title h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.score-bar {
  height: 6px;
  background: #1e222b;
  border-radius: 3px;
  overflow: hidden;
  width: 100%;
}

.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--text-muted);
}

.score-bar-fill.score-great,
.score-bar-fill.score-good { background: var(--success); }
.score-bar-fill.score-ok { background: var(--warning); }
.score-bar-fill.score-bad { background: var(--danger); }

.cat-score {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ---- CHECKS LIST ---- */
.checks-list {
  padding: 8px 24px 16px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #1a1e26;
}

.check-item:last-child { border-bottom: none; }

.check-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.check-item.pass .check-icon {
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
}

.check-item.fail .check-icon {
  background: rgba(248, 113, 113, 0.1);
  color: var(--danger);
}

.check-item.warn .check-icon {
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
}

.check-item.info .check-icon {
  background: rgba(96, 165, 250, 0.1);
  color: var(--info);
}

.check-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.check-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- RESULTS CTA ---- */
.results-cta {
  text-align: center;
  padding: 48px 32px;
  background: var(--bg-card);
  border: 1px solid #2a2d36;
  border-radius: 16px;
  margin-top: 32px;
}

.results-cta h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.results-cta p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 24px;
  font-size: 0.95rem;
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #d4623e;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid #2a2d36;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
}

.btn-outline:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ---- HOW IT WORKS ---- */
.how-section {
  padding: 100px 48px;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-card) 50%, var(--bg-deep) 100%);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.section-inner h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto 56px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid #2a2d36;
  border-radius: 16px;
  padding: 36px 28px;
  text-align: left;
  transition: border-color 0.3s, transform 0.2s;
}

.step-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.step-num {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--accent);
  opacity: 0.4;
  margin-bottom: 16px;
}

.step-card h4 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

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

/* ---- PRICING ---- */
.pricing-section {
  padding: 100px 48px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
  align-items: start;
}

.price-card {
  background: var(--bg-card);
  border: 1px solid #2a2d36;
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: border-color 0.3s, transform 0.2s;
}

.price-card:hover {
  transform: translateY(-4px);
}

.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 60px var(--accent-glow);
  transform: scale(1.04);
}

.price-card.featured:hover {
  transform: scale(1.04) translateY(-4px);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 16px;
  border-radius: 20px;
}

.price-tag {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.price-amount {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.8rem;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.price-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.price-features {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}

.price-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 24px;
}

.price-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.price-best {
  font-size: 0.82rem;
  color: var(--warm);
  font-style: italic;
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid #1e222b;
}

.price-card .btn-primary,
.price-card .btn-outline {
  width: 100%;
  text-align: center;
}

/* ---- FOOTER ---- */
footer {
  border-top: 1px solid #1e222b;
  padding: 48px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 12px 0 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.8rem;
  color: #444;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  nav {
    padding: 16px 20px;
  }

  .nav-links { display: none; }

  nav .tag { display: none; }

  .hero {
    padding: 60px 20px 48px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .input-group {
    flex-direction: column;
    padding: 12px;
    gap: 8px;
  }

  .input-icon { display: none; }

  .input-group input {
    width: 100%;
    padding: 12px;
    text-align: center;
  }

  .input-group button {
    width: 100%;
    padding: 14px;
  }

  .trust-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .results-section {
    padding: 24px 16px 60px;
  }

  .results-header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 24px 20px;
  }

  .category-header {
    flex-wrap: wrap;
    padding: 16px;
  }

  .checks-list {
    padding: 8px 16px 12px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .price-card.featured {
    transform: none;
  }

  .price-card.featured:hover {
    transform: translateY(-4px);
  }

  .how-section,
  .pricing-section {
    padding: 60px 20px;
  }

  .loading-section {
    padding: 60px 20px;
  }

  .error-section {
    padding: 40px 20px;
  }

  .error-card {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.7rem;
  }

  .results-cta h3 {
    font-size: 1.3rem;
  }

  .score-ring {
    width: 90px;
    height: 90px;
  }

  .score-number {
    font-size: 2rem;
  }
}
