/* ===== CSS Variables ===== */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --secondary: #06b6d4;
  --secondary-hover: #0891b2;
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 25px rgba(0,0,0,0.06);
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ===== Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: reveal 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.reveal-d1 { animation-delay: 0.1s; }
.reveal-d2 { animation-delay: 0.2s; }
.reveal-d3 { animation-delay: 0.3s; }
.reveal-d4 { animation-delay: 0.4s; }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

.pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2s ease-in-out infinite;
}

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

/* ===== Hero ===== */
.pricing-hero {
  text-align: center;
  padding: 48px 24px 56px;
  background: linear-gradient(135deg, #f0f9ff 0%, #eef2ff 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  margin-bottom: 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 16px;
}

.pricing-hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text);
}

.pricing-hero .subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Section Header ===== */
.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-header .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.section-header .icon-blue { background: var(--primary-light); color: var(--primary); }
.section-header .icon-purple { background: #f3e8ff; color: #9333ea; }
.section-header .icon-green { background: var(--success-light); color: var(--success); }

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-header p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== Tables ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.pricing-table th,
.pricing-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.pricing-table thead th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.pricing-table tbody tr:last-child td {
  border-bottom: none;
}

.pricing-table tbody tr:hover {
  background: #fafafa;
}

.pricing-table td:first-child {
  font-weight: 500;
  color: var(--text);
}

.price-col {
  text-align: right;
  white-space: nowrap;
}

.price {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

/* ===== Pricing Principles ===== */
.pricing-principle {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* ===== Deployment ===== */
.deployment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.pricing-model {
  background: var(--primary-light);
  border: 1px solid var(--border);
}

.pricing-model h3 {
  color: var(--text);
}

.pricing-model p {
  color: var(--text-secondary);
}

/* ===== License / Table Notes ===== */
.license-note {
  background: var(--primary-light);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.license-note strong {
  color: var(--text);
}

.table-region-note {
  padding: 12px 20px 16px;
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
}

/* ===== FAQ Grid (reuses product-scope layout) ===== */
.product-scope-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.product-scope-card h3 {
  color: var(--text);
}

.product-scope-card .scope-description {
  color: var(--text-secondary);
}

/* ===== Included / Excluded Grid ===== */
.included-excluded-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.included-card,
.excluded-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.included-card .icon-wrap,
.excluded-card .icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.included-card .icon-green { background: var(--success-light); color: var(--success); }
.excluded-card .icon-red { background: var(--danger-light); color: var(--danger); }

.included-card h3,
.excluded-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.included-card ul,
.excluded-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.included-card li,
.excluded-card li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.included-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: 13px;
}

.excluded-card li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: var(--danger);
  font-weight: 700;
  font-size: 13px;
}

/* ===== Pricing Notes ===== */
.pricing-notes {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.pricing-notes h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.pricing-notes ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-notes li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.pricing-notes li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}

/* ===== CTA Section ===== */
.cta-section {
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  margin-top: 48px;
}

.cta-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.cta-section p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

.cta-btn-secondary {
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.cta-btn-secondary:hover {
  background: rgba(79, 70, 229, 0.15);
  border-color: rgba(79, 70, 229, 0.3);
}

/* ===== Page Footer ===== */
.page-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 0.8;
}

.product-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  main {
    padding: 24px 16px 60px;
  }

  .pricing-hero h1 {
    font-size: 28px;
  }

  .pricing-hero .subtitle {
    font-size: 16px;
  }

  .included-excluded-grid {
    grid-template-columns: 1fr;
  }

  .pricing-table th,
  .pricing-table td {
    padding: 12px 14px;
    font-size: 13px;
  }

  .section-header h2 {
    font-size: 20px;
  }

  .cta-section h2 {
    font-size: 20px;
  }

  .page-footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .pricing-table th,
  .pricing-table td {
    padding: 10px 12px;
  }

  .cta-btn {
    padding: 12px 20px;
    font-size: 13px;
  }
}