/* ==========================================================================
   South Jersey Physical Therapy — Design System
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #1a3a5c;
  --navy-light: #234d7a;
  --navy-dark: #122840;
  --accent: #0E8FC9;
  --accent-light: #e8f4fa;
  --teal: #5EEAD4;
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-light: #6a6a6a;
  --border: #d8dde3;
  --bg-off: #f7f8fa;
  --bg-tint: #eef2f7;
  --white: #ffffff;
  --max-w: 860px;
  --max-w-wide: 1100px;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.3rem); margin-bottom: 0.75rem; }
h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); }
a:hover { color: var(--navy-light); }

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

/* --- Layout --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  text-decoration: none;
  padding: 0.85rem 1.8rem;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  transition: background 0.15s ease, transform 0.1s ease;
  text-align: center;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(14, 143, 201, 0.25);
}

.btn--primary:hover {
  background: #0a7db3;
  color: var(--white);
}

.btn--white {
  background: var(--white);
  color: var(--navy);
}

.btn--white:hover {
  background: #f0f0f0;
  color: var(--navy);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: var(--white);
}

/* --- Hero Pattern --- */
.hero {
  background: var(--navy-dark);
  color: var(--white);
  padding: 6rem 0 5rem;
}

.hero h1 {
  color: var(--white);
  max-width: 720px;
}

.hero .subhead {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: rgba(255,255,255,0.82);
  max-width: 620px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero .hero-meta {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-top: 1.25rem;
}

/* --- Page Hero (internal pages) --- */
.page-hero {
  background: var(--navy-dark);
  color: var(--white);
  padding: 4rem 0 3.5rem;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.page-hero .page-hero-deck {
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
  max-width: 620px;
}

/* --- Hero Split (text left, image right) --- */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-split-img {
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Blockquote --- */
.quote-block {
  border-left: 4px solid var(--accent);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: var(--bg-off);
}

.quote-block p {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  margin: 0;
  line-height: 1.75;
}

/* --- Data Stat Section --- */
.stat-section {
  background: var(--navy);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.stat-section.parallax-section {
  background-color: var(--navy);
}

.stat-number {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.stat-text {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin: 0 auto 0.75rem;
}

.stat-source {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.42);
  letter-spacing: 0.03em;
}

/* --- Video Facade --- */
.video-wrap {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 4px;
  background: #0a1520;
  cursor: pointer;
  margin-top: 2rem;
}

.video-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: opacity 0.25s ease, transform 0.35s ease;
}

.video-wrap:hover img {
  opacity: 1;
  transform: scale(1.03);
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.video-wrap:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 6px 32px rgba(0,0,0,0.45);
}

.video-play-btn--corner {
  top: auto !important;
  left: auto !important;
  bottom: 12px;
  right: 12px;
  transform: none;
  width: 48px;
  height: 48px;
}

.video-play-btn--corner svg {
  width: 20px;
  height: 20px;
}

.video-wrap:hover .video-play-btn--corner {
  transform: scale(1.12);
}

.video-play-btn svg {
  width: 26px;
  height: 26px;
  fill: var(--navy);
  margin-left: 3px;
}

/* --- Video Lightbox --- */
.video-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.video-lightbox.open {
  opacity: 1;
}

.video-lightbox-inner {
  position: relative;
  width: 90%;
  max-width: 900px;
  aspect-ratio: 16/9;
  transform: scale(0.92);
  transition: transform 0.3s ease;
}

.video-lightbox.open .video-lightbox-inner {
  transform: scale(1);
}

.video-lightbox-inner iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

.video-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.video-lightbox-close:hover {
  opacity: 1;
}

.video-caption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
}

/* --- Methods Grid --- */
.methods-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.method-item {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}

.method-item:last-child {
  border-bottom: 1px solid var(--border);
}

.method-tag {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.method-name {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.method-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

/* --- Comparison Table --- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 540px;
}

thead th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--navy);
}

thead th:first-child {
  color: var(--text-light);
  width: 30%;
}

thead th:nth-child(2) {
  background: var(--navy);
  color: var(--white);
  width: 35%;
}

thead th:nth-child(3) {
  background: var(--bg-off);
  color: var(--text-secondary);
  width: 35%;
}

tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 0.85rem 1.25rem;
  vertical-align: top;
  line-height: 1.55;
}

tbody td:first-child { font-weight: 600; color: var(--text); }
tbody td:nth-child(2) { background: #f0f5fa; }
tbody td:nth-child(3) { background: var(--bg-off); color: var(--text-secondary); }

/* --- Review Cards --- */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 4px;
}

.review-stars {
  color: #c09a3a;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.review-text {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.review-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

/* --- Steps / Journey --- */
.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
  align-items: start;
}

.step:last-child { border-bottom: 1px solid var(--border); }

.step-number {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
  padding-top: 0.15rem;
}

.step-title {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.step-desc {
  font-size: 0.93rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Team Grid --- */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 2.5rem;
}

.team-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.team-card:first-child {
  padding-top: 0;
}

.team-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.team-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
}

.team-info .credentials {
  margin-top: 0.75rem;
}

.team-name {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.team-role {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.team-bio {
  font-size: 0.93rem;
  color: var(--text-secondary);
}

/* --- Credential Tags --- */
.credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.credential-tag {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--white);
  border-radius: 3px;
}

/* --- FAQ Accordion --- */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.5rem 0;
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question:hover { color: var(--accent); }

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* --- Callout Box --- */
.callout {
  padding: 1.5rem 1.75rem;
  background: var(--bg-tint);
  border-left: 4px solid var(--accent);
  border-radius: 0 4px 4px 0;
  margin: 2rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

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

/* --- CTA Section --- */
.cta-section {
  background: var(--navy-dark);
  color: var(--white);
  padding: 5rem 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  max-width: 640px;
  margin: 0 auto 1.25rem;
}

.cta-subtext {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  max-width: 500px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

.cta-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.42);
}

/* --- Report Cards Grid --- */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.report-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.report-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(14, 143, 201, 0.1);
}

.report-card img {
  max-height: 180px;
  margin-bottom: 1rem;
}

.report-card-title {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 600;
  font-size: 0.95rem;
}

/* --- Footer --- */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.6);
  padding: 3rem 1.5rem 2rem;
  font-size: 0.82rem;
}

.footer-grid {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.3fr;
  gap: 2.5rem;
}

.footer-heading {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.footer-brand {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.footer-detail {
  line-height: 1.7;
}

.footer-detail a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.footer-detail a:hover { color: var(--white); }

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin-bottom: 0.35rem; }

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s ease;
}

.footer-links a:hover { color: var(--white); }

.footer-hours {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.8;
}

.footer-hours strong {
  color: rgba(255,255,255,0.85);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: background 0.15s ease;
}

.footer-social a:hover {
  background: var(--accent);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.footer-notice {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  max-width: var(--max-w-wide);
  margin-left: auto;
  margin-right: auto;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.32);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --- Parallax Image Sections --- */
.parallax-section {
  position: relative;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.parallax-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(18, 40, 64, 0.82);
  z-index: 0;
}

.parallax-section > * {
  position: relative;
  z-index: 1;
}

.hero.parallax-section::before,
.page-hero.parallax-section::before {
  background: rgba(18, 40, 64, 0.75);
}

.page-hero:has(.hero-split) {
  padding: 4rem 0;
}

.page-hero.parallax-section .container--wide,
.page-hero:has(.hero-split) .container {
  max-width: var(--max-w-wide);
}

.parallax-section--light::before {
  background: rgba(255, 255, 255, 0.88);
}

.parallax-section--light .section-label { color: var(--accent); }
.parallax-section--light h2 { color: var(--text); }

@supports (-webkit-touch-callout: none) {
  .parallax-section {
    background-attachment: scroll;
  }
}

@media (max-width: 768px) {
  .parallax-section {
    background-attachment: scroll;
  }
}

/* --- Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll { opacity: 1 !important; transform: none !important; }
}

/* --- Responsive --- */
@media (min-width: 640px) {
  .reviews-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr; }
}

@media (min-width: 768px) {
  .methods-grid {
    grid-template-columns: 1fr 1fr;
  }

  .method-item {
    padding: 1.75rem 1.5rem 1.75rem 0;
    border-top: none;
    border-bottom: 1px solid var(--border);
  }

  .method-item:nth-child(odd) { padding-right: 2.5rem; }
  .method-item:nth-child(even) { padding-left: 2.5rem; border-left: 1px solid var(--border); }
  .method-item:nth-last-child(-n+2) { border-bottom: none; }
  .method-item:first-child,
  .method-item:nth-child(2) { border-top: 1px solid var(--border); }
}

@media (max-width: 640px) {
  section { padding: 3.5rem 0; }
  .hero { padding: 4rem 0 3.5rem; }
  .team-card { grid-template-columns: 1fr; text-align: center; }
  .team-photo { margin: 0 auto; }
  .step { grid-template-columns: 36px 1fr; gap: 1rem; }
}

/* --- About Page Sidebar Layout --- */
.about-layout {
  position: relative;
}

.about-sidebar {
  position: fixed;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  z-index: 50;
}

.about-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-sidebar li {
  margin-bottom: 0.25rem;
}

.sidebar-link {
  display: block;
  padding: 0.5rem 1rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  border-right: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  text-align: right;
}

.sidebar-link:hover {
  color: var(--accent);
}

.sidebar-link.active {
  color: var(--accent);
  border-right-color: var(--accent);
  font-weight: 600;
}

@media (max-width: 1100px) {
  .about-sidebar { display: none; }
}

/* --- Ken Story Layout --- */
.ken-story-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  margin-top: 1.5rem;
  align-items: start;
}

.ken-story-video {
  position: sticky;
  top: 120px;
}

@media (max-width: 840px) {
  .ken-story-layout {
    grid-template-columns: 1fr;
  }
  .ken-story-video {
    position: static;
  }
}
