/* ═══════════════════════════════════════════════
   STUDIO MATCHAFRIQUE — Design System v2.0
   PRD-DESIGN compliant — 3 colors only
   ═══════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --duration-reveal: 700ms;
}

/* ── Global Typography ── */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: #475569;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: #0f172a;
  text-wrap: balance;
}

p, li { max-width: 65ch; }

/* ── Header ── */
#site-header {
  background: transparent;
  transition: all 300ms var(--ease-out-expo);
}

#site-header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Nav links color change on scroll */
#site-header.scrolled .nav-link {
  color: #334155;
}
#site-header.scrolled .nav-link:hover {
  color: #0f172a;
}
#site-header.scrolled .header-logo-text {
  color: #0f172a;
}
#site-header.scrolled .header-logo-text + svg,
#site-header.scrolled svg.text-brand-400 {
  color: #3b82f6;
}
#site-header.scrolled #mobile-menu-btn {
  color: #334155;
}
#site-header.scrolled #mobile-menu-btn:hover {
  color: #0f172a;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
              transform var(--duration-reveal) var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 100ms; }
.reveal-d2 { transition-delay: 200ms; }
.reveal-d3 { transition-delay: 300ms; }
.reveal-d4 { transition-delay: 400ms; }

/* ── Hero Title Gradient (ONLY place for gradient text) ── */
.hero-title {
  background: linear-gradient(135deg, #ffffff 0%, #93c5fd 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: #f97316;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out-expo);
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}
.btn-primary:hover {
  background: #ea580c;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: #2563eb;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out-expo);
}
.btn-secondary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}
.btn-secondary:active {
  transform: translateY(0);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  color: #2563eb;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid #bfdbfe;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out-expo);
}
.btn-outline:hover {
  background: #eff6ff;
  border-color: #3b82f6;
}

.btn-outline-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out-expo);
}
.btn-outline-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 1rem;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 9999px;
  border: 1px solid #bfdbfe;
}

.badge-dark {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ── Cards ── */
.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem;
  transition: all 300ms var(--ease-out-expo);
}
.card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.card-dark {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Inputs ── */
.input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: #ffffff;
  color: #1e293b;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  transition: all 200ms var(--ease-out-expo);
}
.input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}
.input::placeholder {
  color: #94a3b8;
}
.input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* ── Process Timeline ── */
.process-step {
  position: relative;
  padding-left: 4rem;
}
.process-step::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 56px;
  bottom: -24px;
  width: 2px;
  background: #e2e8f0;
}
.process-step:last-child::before { display: none; }

.process-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  background: #eff6ff;
  color: #2563eb;
  border: 2px solid #bfdbfe;
  z-index: 1;
}

/* ── Pricing ── */
.pricing-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 2.5rem;
  transition: all 300ms var(--ease-out-expo);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.pricing-card-popular {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.3);
  transition: all 300ms var(--ease-out-expo);
}
.pricing-card-popular:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.35);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #f97316;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.375rem 1.25rem;
  border-radius: 9999px;
}

.price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
}
.feature-list li svg {
  width: 20px;
  height: 20px;
  color: #10b981;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── FAQ ── */
details summary::-webkit-details-marker { display: none; }
details summary { list-style: none; }
details[open] .faq-chevron { transform: rotate(180deg); }
.faq-chevron {
  transition: transform 300ms var(--ease-out-expo);
}

/* ── Form Wizard ── */
.wizard-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
@media (max-width: 639px) {
  .wizard-card {
    padding: 1.5rem;
    border-radius: 16px;
  }
}

.wizard-progress {
  display: flex;
  align-items: center;
  max-width: 480px;
  margin: 0 auto 3rem;
}

.step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 400ms var(--ease-out-expo);
}
.step-dot.inactive {
  background: #f1f5f9;
  color: #94a3b8;
}
.step-dot.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: scale(1.1);
}
.step-dot.completed {
  background: #10b981;
  color: #ffffff;
}

.step-line {
  flex: 1;
  height: 3px;
  background: #e2e8f0;
  margin: 0 0.5rem;
  border-radius: 2px;
  transition: background 400ms;
}
.step-line.completed {
  background: #10b981;
}

.step-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 0.5rem;
  text-align: center;
}
.step-dot.active ~ .step-label,
.step-wrapper.active .step-label { color: #2563eb; }
.step-dot.completed ~ .step-label,
.step-wrapper.completed .step-label { color: #10b981; }
@media (max-width: 639px) {
  .step-label { display: none; }
}

/* Form steps */
.form-step { display: none; }
.form-step.active { display: block; }

/* Step transitions */
.step-exit {
  animation: stepOut 250ms ease forwards;
}
@keyframes stepOut {
  to { opacity: 0; transform: translateX(-20px); }
}
.step-enter {
  animation: stepIn 350ms var(--ease-out-expo) forwards;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Radio cards */
.radio-card {
  position: relative;
  cursor: pointer;
}
.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}
.radio-card .card-body {
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: all 200ms;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.radio-card input:checked + .card-body {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.radio-card .card-body:hover {
  border-color: #93c5fd;
}

/* Checkbox premium */
.checkbox-premium {
  padding: 0.625rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  transition: all 200ms;
  cursor: pointer;
}
.checkbox-premium:hover {
  border-color: #93c5fd;
}
.checkbox-premium:has(input:checked) {
  border-color: #bfdbfe;
  background: rgba(59, 130, 246, 0.04);
}
.checkbox-premium input:checked + span {
  color: #2563eb;
  font-weight: 600;
}

/* Field error message */
.field-error {
  color: #ef4444;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── PRD Content ── */
#prd-content {
  font-family: 'Inter', sans-serif;
  color: #475569;
  line-height: 1.8;
}
#prd-content h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}
#prd-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
#prd-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #334155;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
#prd-content p {
  margin-bottom: 1rem;
  max-width: 65ch;
}
#prd-content ul, #prd-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}
#prd-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
#prd-content strong {
  color: #0f172a;
  font-weight: 600;
}
#prd-content code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875rem;
  color: #2563eb;
}
#prd-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.875rem;
}
#prd-content th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e2e8f0;
}
#prd-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
}
#prd-content tr:last-child td {
  border-bottom: none;
}

/* ── Spinner ── */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Shimmer loading ── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ── Focus visible ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
  border-radius: 8px;
}

/* ── Print ── */
@media print {
  header, footer, .no-print, button { display: none !important; }
  body { background: white; color: #000; }
  #prd-content { box-shadow: none; border: none; padding: 0; }
  main { padding-top: 0 !important; }
  .card, .wizard-card, .pricing-card, .pricing-card-popular {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
