/* ========================================
   VERTEXINSIGHT360 — Design System
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* Colors */
  --ink:       #0f1117;
  --ink-soft:  #2a2d3a;
  --ink-muted: #6b7080;
  --paper:     #faf9f6;
  --paper-2:   #f2f0ea;
  --paper-3:   #e8e4db;
  --sage:      #4a7c6f;
  --sage-light:#6fa898;
  --sage-pale: #d4e8e3;
  --amber:     #c8832a;
  --amber-pale:#f5e6d0;
  --coral:     #d4645a;
  --coral-pale:#f7e0de;
  --violet:    #6b5b9e;
  --violet-pale:#e8e3f5;
  --white:     #ffffff;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-pill:999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(15,17,23,.08);
  --shadow-md:  0 4px 16px rgba(15,17,23,.10);
  --shadow-lg:  0 12px 40px rgba(15,17,23,.12);
  --shadow-xl:  0 24px 64px rgba(15,17,23,.16);

  /* Transitions */
  --ease:       cubic-bezier(.25,.8,.25,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);

  /* Layout */
  --max-width:  1200px;
  --nav-h:      72px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; }

/* ---- Utility ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-xl); }
@media (max-width: 768px) { .container { padding: 0 var(--space-md); } }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 600; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { font-size: 1rem; color: var(--ink-soft); }
.lead { font-size: 1.2rem; line-height: 1.7; }
.caption { font-size: .85rem; color: var(--ink-muted); }
.overline { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  padding: 12px 24px; border-radius: var(--radius-pill);
  font-size: .95rem; font-weight: 500; transition: all .22s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink); color: var(--white);
}
.btn-primary:hover { background: var(--ink-soft); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-sage {
  background: var(--sage); color: var(--white);
}
.btn-sage:hover { background: var(--sage-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(74,124,111,.3); }

.btn-outline {
  border: 1.5px solid var(--ink); color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-ghost { color: var(--ink-muted); }
.btn-ghost:hover { color: var(--ink); }

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

/* ---- Tags / Badges ---- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: .78rem; font-weight: 500;
}
.tag-sage   { background: var(--sage-pale);   color: var(--sage); }
.tag-amber  { background: var(--amber-pale);  color: var(--amber); }
.tag-violet { background: var(--violet-pale); color: var(--violet); }
.tag-coral  { background: var(--coral-pale);  color: var(--coral); }

/* ---- Cards ---- */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-body { padding: var(--space-xl); }

/* ---- Section helpers ---- */
.section { padding: var(--space-3xl) 0; }
.section-sm { padding: var(--space-2xl) 0; }
.section-header { margin-bottom: var(--space-2xl); }
.section-header .overline { margin-bottom: var(--space-sm); }

/* ---- Grid ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---- Forms ---- */
.form-group { margin-bottom: var(--space-lg); }
.form-label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 6px; color: var(--ink-soft); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--paper-3); border-radius: var(--radius-md);
  background: var(--white); color: var(--ink); font-size: .95rem;
  transition: border-color .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(74,124,111,.12);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: .8rem; color: var(--ink-muted); margin-top: 4px; }

/* ---- Stars ---- */
.stars { display: flex; gap: 2px; color: var(--amber); }
.stars span { font-size: 1rem; }

/* ---- Avatar ---- */
.avatar {
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--sage-pale); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; color: var(--sage);
}
.avatar-sm  { width: 36px;  height: 36px;  font-size: .9rem; }
.avatar-md  { width: 48px;  height: 48px;  font-size: 1.1rem; }
.avatar-lg  { width: 72px;  height: 72px;  font-size: 1.5rem; }
.avatar-xl  { width: 96px;  height: 96px;  font-size: 2rem; }

/* ---- Divider ---- */
hr.divider { border: none; border-top: 1px solid var(--paper-3); margin: var(--space-xl) 0; }

/* ---- Toast ---- */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 14px 20px; background: var(--ink); color: var(--white);
  border-radius: var(--radius-md); font-size: .9rem; box-shadow: var(--shadow-lg);
  animation: slideUp .3s var(--ease-spring);
  display: flex; align-items: center; gap: 10px;
}
.toast.success { background: var(--sage); }
.toast.error   { background: var(--coral); }
@keyframes slideUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,17,23,.55); backdrop-filter: blur(4px);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: var(--space-lg); opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: var(--radius-xl); padding: var(--space-2xl);
  max-width: 520px; width: 100%; box-shadow: var(--shadow-xl);
  transform: scale(.96) translateY(12px); transition: transform .3s var(--ease-spring);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-xl); }
.modal-close { width: 32px; height: 32px; border-radius: 50%; background: var(--paper-2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; }
.modal-close:hover { background: var(--paper-3); }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 4px; background: var(--paper-2); border-radius: var(--radius-pill); padding: 4px; }
.tab-btn {
  flex: 1; padding: 8px 20px; border-radius: var(--radius-pill);
  font-size: .9rem; font-weight: 500; color: var(--ink-muted);
  transition: all .2s;
}
.tab-btn.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- Pricing card ---- */
.pricing-card {
  background: var(--white); border-radius: var(--radius-xl);
  padding: var(--space-2xl); box-shadow: var(--shadow-sm);
  border: 2px solid transparent; transition: all .3s var(--ease);
  position: relative;
}
.pricing-card:hover, .pricing-card.featured {
  border-color: var(--sage); box-shadow: var(--shadow-lg);
}
.pricing-card.featured { background: var(--ink); color: var(--white); }
.pricing-card.featured p, .pricing-card.featured .overline { color: rgba(255,255,255,.65); }
.pricing-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--sage); color: var(--white);
  padding: 4px 20px; border-radius: var(--radius-pill);
  font-size: .78rem; font-weight: 600;
}
.price-amount { font-family: var(--font-display); font-size: 3rem; font-weight: 800; line-height: 1; }
.price-amount sup { font-size: 1.5rem; vertical-align: top; margin-top: .5rem; }
.price-amount sub { font-size: 1rem; font-family: var(--font-body); font-weight: 400; color: var(--ink-muted); }
.pricing-features { margin-top: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-md); }
.pricing-feature { display: flex; align-items: center; gap: var(--space-sm); font-size: .93rem; }
.pricing-feature .check { color: var(--sage); font-size: 1.1rem; }
.pricing-card.featured .pricing-feature .check { color: var(--sage-light); }

/* ---- Therapist card ---- */
.therapist-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}
.therapist-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.therapist-card-img {
  height: 200px; background: linear-gradient(135deg, var(--sage-pale), var(--violet-pale));
  display: flex; align-items: center; justify-content: center; position: relative;
}
.therapist-card-body { padding: var(--space-lg); }
.therapist-card-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 4px; }
.therapist-card-spec { font-size: .85rem; color: var(--ink-muted); margin-bottom: var(--space-sm); }
.therapist-card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-md); }
.therapist-price { font-weight: 600; color: var(--sage); }

/* ---- Blog card ---- */
.blog-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .25s, transform .25s; }
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.blog-card-img { height: 200px; background: var(--paper-2); overflow: hidden; position: relative; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-body { padding: var(--space-lg); }
.blog-card-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; margin: var(--space-sm) 0; line-height: 1.4; }
.blog-card-excerpt { font-size: .88rem; color: var(--ink-muted); line-height: 1.6; }
.blog-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--paper-2); }

/* ---- Testimonial ---- */
.testimonial-card {
  background: var(--white); border-radius: var(--radius-xl); padding: var(--space-xl);
  box-shadow: var(--shadow-sm); position: relative;
}
.testimonial-quote { font-family: var(--font-display); font-size: 3rem; color: var(--sage-pale); line-height: 1; margin-bottom: var(--space-md); }
.testimonial-text { font-size: .98rem; color: var(--ink-soft); line-height: 1.7; font-style: italic; margin-bottom: var(--space-lg); }
.testimonial-author { display: flex; align-items: center; gap: var(--space-md); }
.testimonial-name { font-weight: 600; font-size: .92rem; }
.testimonial-role { font-size: .8rem; color: var(--ink-muted); }

/* ---- Progress / Quiz ---- */
.quiz-progress { height: 4px; background: var(--paper-3); border-radius: var(--radius-pill); margin-bottom: var(--space-2xl); overflow: hidden; }
.quiz-progress-bar { height: 100%; background: var(--sage); border-radius: var(--radius-pill); transition: width .4s var(--ease); }
.quiz-option {
  width: 100%; text-align: left; padding: var(--space-md) var(--space-lg);
  border: 2px solid var(--paper-3); border-radius: var(--radius-md);
  font-size: .95rem; color: var(--ink-soft); transition: all .2s;
  margin-bottom: var(--space-sm); background: var(--white);
}
.quiz-option:hover { border-color: var(--sage); color: var(--sage); background: var(--sage-pale); }
.quiz-option.selected { border-color: var(--sage); background: var(--sage-pale); color: var(--sage); font-weight: 500; }

/* ---- Misc ---- */
.dot-divider { display: flex; align-items: center; gap: var(--space-md); }
.dot-divider::before, .dot-divider::after { content: ''; flex: 1; height: 1px; background: var(--paper-3); }

/* ---- Animations ---- */
@keyframes fadeInUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes pulse    { 0%,100% { transform:scale(1); } 50% { transform:scale(1.04); } }
@keyframes shimmer  { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.animate-fade-up   { animation: fadeInUp .6s var(--ease) both; }
.animate-fade-up-2 { animation: fadeInUp .6s var(--ease) .15s both; }
.animate-fade-up-3 { animation: fadeInUp .6s var(--ease) .3s both; }
.animate-fade      { animation: fadeIn .5s var(--ease) both; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper-3) 50%, var(--paper-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
