/* ================================================================
   RxRecon Pro — Design System
   Completely independent visual language. Warm ivory base,
   deep charcoal text, teal primary accent, amber secondary.
   ================================================================ */

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

:root {
  /* Backgrounds */
  --bg-100: #faf8f5;
  --bg-200: #f5f2ed;
  --bg-300: #ebe7e0;
  --bg-dark: #0f172a;
  --bg-dark-2: #1e293b;

  /* Surfaces */
  --surface: #ffffff;
  --surface-warm: #fdfcfa;

  /* Text */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-on-dark: #f8fafc;

  /* Accents — completely different from navy/gold */
  --accent: #0d9488;           /* teal-600 */
  --accent-hover: #0f766e;     /* teal-700 */
  --accent-light: #ccfbf1;     /* teal-100 */
  --accent-wash: #f0fdfa;      /* teal-50 */

  --secondary: #d97706;        /* amber-600 */
  --secondary-hover: #b45309;  /* amber-700 */
  --secondary-light: #fef3c7;  /* amber-100 */
  --secondary-wash: #fffbeb;   /* amber-50 */

  --success: #16a34a;
  --danger: #dc2626;
  --info: #0284c7;

  /* Borders */
  --border: #e2e8f0;
  --border-warm: #ddd8cf;
  --border-dark: #334155;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", ui-monospace, monospace;

  /* Spacing scale */
  --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;

  /* Transitions */
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p { margin-bottom: var(--space-4); color: var(--text-secondary); }

.text-lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.text-small { font-size: 0.875rem; color: var(--text-muted); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

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

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

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-warm);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}
.navbar-brand:hover { text-decoration: none; }

.brand-mark {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), #14b8a6);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}
.brand-tagline {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}
.navbar-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}
.navbar-links a:hover { color: var(--text-primary); }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.25);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-200);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 16px;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-200); }

.btn-dark {
  background: var(--bg-dark);
  color: white;
}
.btn-dark:hover { background: var(--bg-dark-2); }

.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-flat {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  background: var(--surface-warm);
}
.card-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.card-icon.teal { background: var(--accent-wash); }
.card-icon.amber { background: var(--secondary-wash); }
.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.card-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- Feature list ---- */
.feature-list {
  list-style: none;
  margin-top: var(--space-4);
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.feature-list .check {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: var(--space-5);
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
input::placeholder, textarea::placeholder { color: var(--text-light); }
input:disabled, select:disabled {
  background: var(--bg-200);
  color: var(--text-muted);
  cursor: not-allowed;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.checkbox-group input[type="checkbox"] {
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.checkbox-group label {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Grid layouts ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .navbar-links { display: none; }
}

/* ---- Step wizard ---- */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-10);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  position: relative;
}
.step-circle {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  border: 2.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
  z-index: 2;
}
.step.active .step-circle {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: 0 0 0 4px var(--accent-wash);
}
.step.completed .step-circle {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent);
}
.step-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.step.active .step-label { color: var(--accent); }
.step.completed .step-label { color: var(--text-secondary); }

.step-connector {
  flex: 1;
  height: 2.5px;
  background: var(--border);
  margin: 0 var(--space-2);
  margin-bottom: 26px;
  position: relative;
  z-index: 1;
  max-width: 80px;
}
.step-connector.completed { background: var(--accent); }

/* ---- Sections ---- */
.section-hero {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: var(--space-20) 0 var(--space-16);
  position: relative;
  overflow: hidden;
}
.section-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(13,148,136,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.section-hero h1,
.section-hero h2,
.section-hero h3 { color: var(--text-on-dark); }
.section-hero p { color: rgba(248, 250, 252, 0.75); }

.section-alt {
  background: var(--bg-200);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.section-dark h2,
.section-dark h3 { color: var(--text-on-dark); }
.section-dark p { color: rgba(248, 250, 252, 0.7); }

/* ---- Stats bar ---- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  padding: var(--space-8) 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: var(--space-12);
}
.stat-item { text-align: center; }
.stat-number {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--text-on-dark);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.875rem;
  color: rgba(248, 250, 252, 0.55);
  margin-top: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ---- Testimonials ---- */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: box-shadow var(--transition);
}
.testimonial-card:hover { box-shadow: var(--shadow-lg); }
.testimonial-quote {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: var(--space-5);
}
.testimonial-author {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9375rem;
}
.testimonial-role {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---- Pricing ---- */
.pricing-card {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  position: relative;
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pricing-price {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin: var(--space-4) 0;
}
.pricing-price span {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ---- FAQ ---- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-5) 0;
}
.faq-question {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}
.faq-answer {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: var(--space-3);
  max-width: 90%;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-dark);
  color: rgba(248, 250, 252, 0.6);
  padding: var(--space-12) 0 var(--space-6);
}
.site-footer h4 {
  color: var(--text-on-dark);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}
.site-footer a {
  color: rgba(248, 250, 252, 0.6);
  text-decoration: none;
  font-size: 0.9375rem;
  display: block;
  padding: var(--space-1) 0;
  transition: color var(--transition);
}
.site-footer a:hover {
  color: var(--text-on-dark);
  text-decoration: none;
}
.site-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}
.footer-brand-desc {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(248, 250, 252, 0.55);
  margin-top: var(--space-3);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: rgba(248, 250, 252, 0.4);
}
@media (max-width: 768px) {
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
}

/* ---- Legal pages ---- */
.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
}
.legal-container h1 {
  font-size: 2rem;
  margin-bottom: var(--space-2);
}
.legal-container .last-updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-8);
}
.legal-container h2 {
  font-size: 1.25rem;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  color: var(--accent);
}
.legal-container h3 {
  font-size: 1.0625rem;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}
.legal-container p,
.legal-container li {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.legal-container ul,
.legal-container ol {
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
}
.legal-container li { margin-bottom: var(--space-2); }

/* ---- Wizard form container ---- */
.wizard-container {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.wizard-page {
  display: none;
}
.wizard-page.active {
  display: block;
  animation: fadeIn 300ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.wizard-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.wizard-card {
  background: var(--surface);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.wizard-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.wizard-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

/* ---- Review summary ---- */
.review-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
.review-row:last-child { border-bottom: none; }
.review-label { color: var(--text-muted); }
.review-value { font-weight: 600; color: var(--text-primary); }

/* ---- Toast / Alert ---- */
.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  margin-bottom: var(--space-5);
}
.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.alert-warning {
  background: var(--secondary-wash);
  border: 1px solid #fde68a;
  color: #92400e;
}

/* ---- Hero split layout ---- */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
@media (max-width: 992px) {
  .hero-split { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
}

/* ---- Trust badges ---- */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: rgba(248, 250, 252, 0.6);
}
.trust-badge .icon {
  width: 20px; height: 20px;
  color: var(--accent);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-200); }
::-webkit-scrollbar-thumb { background: var(--border-warm); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }
