/* ============================================================
   Physiotherapy Clinic — Stylesheet
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* --- Design Tokens --- */
:root {
  /* Colors */
  --white: #ffffff;
  --off-white: #f7f9fb;
  --light-gray: #e8ecf1;
  --mid-gray: #6b7a8d;
  --dark: #1a2332;
  --blue: #2b6cb0;
  --blue-hover: #235a94;
  --blue-light: #ebf2fa;
  --green: #48856e;
  --green-light: #edf5f1;

  /* Typography */
  --font-heading: "Source Serif 4", "Georgia", serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Spacing */
  --section-py: 80px;
  --section-px: 24px;
  --container-max: 1140px;
  --radius: 6px;
  --radius-lg: 10px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.3s;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

a:hover {
  color: var(--blue-hover);
}

/* --- Utility --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--section-px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--dark);
}

h1 {
  font-size: 2.75rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

p {
  color: var(--mid-gray);
  margin-bottom: 16px;
}

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

.section-subtitle {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 8px;
}

.section-header {
  max-width: 560px;
  margin-bottom: 48px;
}

.section-header.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  line-height: 1.4;
}

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

.btn-primary:hover {
  background: var(--blue-hover);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 1.5px solid var(--light-gray);
}

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}

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

.btn-white:hover {
  background: var(--off-white);
  color: var(--blue-hover);
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--blue);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius);
  z-index: 1000;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 16px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              padding var(--duration) var(--ease);
}

.site-nav.scrolled {
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 10px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
}

.nav-brand:hover {
  color: var(--dark);
}

.nav-brand svg {
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 450;
  color: var(--mid-gray);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.nav-links a:hover {
  color: var(--dark);
}

.nav-cta {
  margin-left: 8px;
}

.nav-cta .btn-primary {
  color: var(--white);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition: transform var(--duration) var(--ease),
              opacity var(--duration) var(--ease);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 140px 0 var(--section-py);
  background: var(--white);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-content {
  max-width: 520px;
}

.hero-content h1 {
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.0625rem;
  margin-bottom: 28px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image {
  width: 100%;
  height: auto;
  max-width: 520px;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: var(--section-py) 0;
  background: var(--off-white);
}

.about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.about-text p {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--light-gray);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--blue);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--mid-gray);
  margin-top: 4px;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding: var(--section-py) 0;
  background: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  padding: 32px 28px;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration) var(--ease);
}

.service-card:hover {
  border-color: var(--blue);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  border-radius: var(--radius);
  margin-bottom: 20px;
  color: var(--blue);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ============================================================
   TEAM
   ============================================================ */
.team {
  padding: var(--section-py) 0;
  background: var(--off-white);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--light-gray);
}

.team-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
}

.team-card-info {
  padding: 24px;
  border-top: 3px solid var(--blue);
}

.team-card-info h3 {
  margin-bottom: 4px;
}

.team-card-role {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--blue);
  margin-bottom: 10px;
}

.team-card-info p {
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials {
  padding: var(--section-py) 0;
  background: var(--white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimonial-card {
  padding: 32px;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-gray);
  position: relative;
}

.testimonial-quote-mark {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--blue);
  opacity: 0.3;
  margin-bottom: 8px;
  user-select: none;
}

.testimonial-card blockquote {
  font-size: 0.9375rem;
  font-style: normal;
  line-height: 1.75;
  color: var(--dark);
  margin-bottom: 20px;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--dark);
}

.testimonial-detail {
  font-size: 0.8125rem;
  color: var(--mid-gray);
}

/* ============================================================
   CONTACT / CTA
   ============================================================ */
.contact {
  padding: var(--section-py) 0;
  background: var(--off-white);
}

.contact .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-gray);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--dark);
  background: var(--off-white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  transition: border-color var(--duration) var(--ease);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form .btn {
  width: 100%;
  padding: 14px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-info h2 {
  margin-bottom: 4px;
}

.contact-info > p {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.info-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  border-radius: var(--radius);
  color: var(--blue);
}

.info-icon svg {
  width: 18px;
  height: 18px;
}

.info-text strong {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 2px;
  color: var(--dark);
}

.info-text span,
.info-text a {
  font-size: 0.875rem;
  color: var(--mid-gray);
}

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 4px;
  border: 1px solid var(--light-gray);
}

.contact-map img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark);
  padding: 56px 0 0;
  color: rgba(255, 255, 255, 0.65);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 14px;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9375rem;
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  transition: color var(--duration) var(--ease);
}

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

.footer-bottom {
  margin-top: 48px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 400ms; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .services-grid,
  .team-grid,
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-py: 56px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  /* Navigation */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    padding: 16px var(--section-px) 24px;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-cta {
    margin-left: 0;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    background: var(--white);
  }

  /* Hero */
  .hero {
    padding: 110px 0 var(--section-py);
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-visual {
    order: -1;
  }

  /* About */
  .about .container {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-image {
    order: -1;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Team */
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

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

  /* Contact */
  .contact .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form {
    padding: 28px;
  }

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

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
