/* ============================================================
   KneeHealth — styles.css
   Light, clean, medical-trustworthy design
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────── */
:root {
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --primary-light: #eff6ff;
  --teal:          #0891b2;
  --teal-light:    #e0f2fe;
  --bg-white:      #ffffff;
  --bg-blue:       #eff6ff;
  --text-dark:     #0f172a;
  --text-body:     #334155;
  --text-muted:    #475569;
  --text-subtle:   #94a3b8;
  --border:        #e2e8f0;
  --border-light:  #f1f5f9;
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.05);
  --shadow-card:   0 2px 16px rgba(0,0,0,0.07);
  --shadow-md:     0 4px 24px rgba(0,0,0,0.10);
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --radius-pill:   999px;
  --font-serif:    'Source Serif 4', Georgia, serif;
  --font-sans:     'Inter', system-ui, sans-serif;
  --max-w:         1180px;
  --transition:    0.25s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--primary);
  text-decoration: none;
}
button {
  cursor: pointer;
  font-family: inherit;
}
ul, ol {
  list-style: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Layout ────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 80px 0;
}
.section-white { background: var(--bg-white); }
.section-blue  { background: var(--bg-blue); }

/* ── Typography ────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--text-dark);
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-body); }

/* ── Scroll-Reveal ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 18px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}
.btn-white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.btn-white:hover {
  background: var(--primary-light);
  box-shadow: 0 4px 18px rgba(255,255,255,0.3);
  transform: translateY(-1px);
}
.btn-full {
  width: 100%;
  padding: 14px 28px;
  font-size: 1rem;
}
.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
  transition: color var(--transition);
}
.link-btn:hover { color: var(--primary-dark); }
.link-btn-light { color: rgba(255,255,255,0.85); }
.link-btn-light:hover { color: #fff; }

/* ── Pill Badge ────────────────────────────────────────── */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.pill-badge-light {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ── Section Header ────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.section-header h2 { margin-bottom: 14px; }
.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-dark);
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--primary); }
.header-cta { padding: 9px 22px; font-size: 0.88rem; }
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-white);
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-link {
  padding: 10px 0;
  font-size: 1rem;
  border-bottom: 1px solid var(--border-light);
}
.mobile-nav .btn { margin-top: 8px; text-align: center; }

/* ══════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════ */
.hero {
  background: var(--bg-white);
  padding: 64px 0 72px;
  min-height: 90vh;
  display: flex;
  align-items: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-heading {
  margin-bottom: 18px;
  color: var(--text-dark);
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 32px;
}
.hero-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  aspect-ratio: 4/3;
}

/* ── Form Card ─────────────────────────────────────────── */
.form-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.form-card-light {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
}
.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
}
.input-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--bg-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.input-group input::placeholder { color: var(--text-subtle); }
.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.input-group input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}
.input-error {
  display: none;
  font-size: 0.78rem;
  color: #ef4444;
  margin-top: 4px;
  font-weight: 500;
}
.input-error.visible { display: block; }

/* ── Form Success ──────────────────────────────────────── */
.form-success {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  border: 1px solid #bfdbfe;
  margin-bottom: 16px;
}
.form-success strong {
  display: block;
  color: var(--text-dark);
  font-size: 1rem;
  margin-bottom: 2px;
}
.form-success p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}
.success-icon { flex-shrink: 0; }

/* ── TCPA ──────────────────────────────────────────────── */
.tcpa-text {
  font-size: 0.75rem;
  color: var(--text-subtle);
  line-height: 1.6;
  margin-top: 12px;
}
.tcpa-light { color: rgba(255,255,255,0.7); }

/* ── Trust Stats ───────────────────────────────────────── */
.trust-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}
.trust-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════
   TRUST BAR
   ══════════════════════════════════════════════════════════ */
.trust-bar {
  background: var(--bg-blue);
  padding: 28px 0;
  border-top: 1px solid #dbeafe;
  border-bottom: 1px solid #dbeafe;
}
.trust-bar-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 40px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* ══════════════════════════════════════════════════════════
   CARDS GRID
   ══════════════════════════════════════════════════════════ */
.cards-grid {
  display: grid;
  gap: 20px;
}
.four-col  { grid-template-columns: repeat(4, 1fr); }
.six-col   { grid-template-columns: repeat(3, 1fr); }

/* ── WHO NEEDS — Card ──────────────────────────────────── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.card-icon-blue { background: var(--primary-light); }
.card-icon-teal { background: var(--teal-light); }
.card h3 { margin-bottom: 10px; }
.card p   { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* ── BENEFIT — Card ────────────────────────────────────── */
.benefit-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.benefit-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}
.benefit-icon {
  margin: 0 auto 14px;
  width: fit-content;
}
.benefit-card h4 { margin-bottom: 10px; font-size: 1rem; }
.benefit-card p  { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; }

/* ══════════════════════════════════════════════════════════
   STEPS (What to Expect)
   ══════════════════════════════════════════════════════════ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 32px;
  left: calc(16.66% + 12px);
  right: calc(16.66% + 12px);
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  border-radius: 2px;
  z-index: 0;
}
.step-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 0 0 28px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.step-number {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.step-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 0;
}
.step-card h3 {
  margin: 20px 22px 10px;
  font-size: 1.05rem;
}
.step-card p {
  margin: 0 22px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ══════════════════════════════════════════════════════════
   TESTIMONIALS
   ══════════════════════════════════════════════════════════ */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.testimonial-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.stars { display: flex; gap: 3px; }
blockquote p {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.75;
  font-style: italic;
}
blockquote p::before { content: '\201C'; }
blockquote p::after  { content: '\201D'; }
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}
.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.testimonial-author div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.testimonial-author strong {
  font-size: 0.95rem;
  color: var(--text-dark);
}
.testimonial-author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.procedure-tag {
  color: var(--primary) !important;
  font-weight: 500 !important;
}

/* ══════════════════════════════════════════════════════════
   FAQ
   ══════════════════════════════════════════════════════════ */
.faq-container { max-width: 800px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.open { border-color: var(--primary); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: color var(--transition), background var(--transition);
}
.faq-question:hover { color: var(--primary); background: var(--primary-light); }
.faq-item.open .faq-question { color: var(--primary); background: var(--primary-light); }
.faq-chevron {
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 24px;
}
.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 0 24px 22px;
}
.faq-answer p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
  padding-top: 14px;
}

/* ══════════════════════════════════════════════════════════
   CTA SECTION
   ══════════════════════════════════════════════════════════ */
.section-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
  padding: 80px 0;
}
.cta-container { max-width: 700px; }
.cta-content {
  text-align: center;
  color: #fff;
}
.cta-content h2 {
  color: #fff;
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.cta-content > p {
  color: rgba(255,255,255,0.88);
  font-size: 1.05rem;
  margin-bottom: 32px;
}
.cta-content .form-card {
  text-align: left;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: none;
}
.cta-content .input-group input {
  background: rgba(255,255,255,0.95);
}
.cta-content .input-group input:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}
.cta-content .form-success {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}
.cta-content .form-success strong { color: #fff; }
.cta-content .form-success p { color: rgba(255,255,255,0.8); }

/* ══════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 620px;
}
.footer-disclaimer {
  font-size: 0.82rem;
  color: var(--text-subtle);
  line-height: 1.65;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}
.footer-link {
  font-size: 0.88rem;
  color: var(--text-muted) !important;
  text-decoration: none !important;
}
.footer-link:hover { color: var(--primary) !important; }
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* ══════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-box {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-head h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
}
.modal-close {
  background: var(--primary-light);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--border); color: var(--text-dark); }
.modal-body {
  overflow-y: auto;
  padding: 28px;
  flex: 1;
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.75;
  scroll-behavior: smooth;
}
.modal-body h3 {
  font-size: 1rem;
  color: var(--text-dark);
  margin: 20px 0 8px;
  font-family: var(--font-sans);
  font-weight: 600;
}
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin-bottom: 10px; color: var(--text-muted); }
.modal-body ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 10px;
}
.modal-body ul li { color: var(--text-muted); margin-bottom: 4px; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — 768px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  .section { padding: 56px 0; }

  /* Header */
  .header-nav { display: none; }
  .mobile-menu-btn { display: flex; }

  /* Hero */
  .hero { min-height: auto; padding: 48px 0 56px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-image { order: -1; }
  .hero-image img { aspect-ratio: 16/9; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }

  /* Trust Bar */
  .trust-bar-inner { gap: 14px 24px; }

  /* Cards */
  .four-col { grid-template-columns: 1fr 1fr; }
  .six-col  { grid-template-columns: 1fr 1fr; }

  /* Steps */
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid::before { display: none; }

  /* Testimonials */
  .testimonials-grid { grid-template-columns: 1fr; }

  /* FAQ */
  .faq-container { max-width: 100%; }

  /* CTA */
  .cta-container { max-width: 100%; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — 480px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.45rem; }

  .container { padding: 0 16px; }
  .section { padding: 44px 0; }

  /* Cards */
  .four-col  { grid-template-columns: 1fr; }
  .six-col   { grid-template-columns: 1fr; }

  /* Trust Bar */
  .trust-bar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Form */
  .form-card { padding: 20px 16px; }
  .form-row  { grid-template-columns: 1fr; gap: 10px; }

  /* Steps */
  .step-img { height: 160px; }

  /* Trust Stats */
  .trust-stats { flex-direction: column; gap: 8px; }

  /* Modal */
  .modal-head { padding: 18px 20px; }
  .modal-body { padding: 20px; }
  .modal-box  { border-radius: var(--radius-lg); }

  /* Testimonial */
  .testimonial-card { padding: 22px; }
}
