/* ==========================================================================
   Top Form Physical Therapy — design system
   Brand: cyan #0891b2 + navy #0f172a, Inter. Built to Rich's mockup concept.
   ========================================================================== */

:root {
  /* Brand */
  --primary:        #0891b2;
  --primary-dark:   #0e7490;
  --primary-light:  #22d3ee;
  --navy:           #0f172a;
  --navy-soft:      #1e293b;

  /* Neutrals */
  --white:    #ffffff;
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --text:     #1f2937;
  --text-light: #6b7280;

  /* Semantic */
  --bg:       var(--white);
  --surface:  var(--gray-50);
  --heading:  var(--navy);

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-4xl: 7rem;

  /* Layout */
  --container: 1180px;
  --container-narrow: 820px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --header-h: 76px;

  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06);
  --shadow: 0 8px 28px rgba(15,23,42,0.10);
  --shadow-lg: 0 20px 50px rgba(15,23,42,0.16);
  --transition: 0.25s ease;
}

/* Reset / base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font); color: var(--heading); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.25rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-lg); }
.container--narrow { max-width: var(--container-narrow); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--primary);
}

.section { padding-block: var(--space-3xl); }
.section--surface { background: var(--surface); }
.section__head { max-width: 640px; margin-bottom: var(--space-2xl); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head .eyebrow { margin-bottom: var(--space-sm); }
.section__head p { color: var(--text-light); font-size: 1.05rem; margin-top: var(--space-sm); }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
  padding: 0.85rem 1.75rem; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary { background: var(--primary); color: var(--white); }
.btn--primary:hover { background: var(--primary-dark); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--white { background: var(--white); color: var(--navy); }
.btn--white:hover { background: var(--white); color: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn--outline:hover { background: rgba(255,255,255,0.12); color: var(--white); border-color: var(--white); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--gray-300); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn--lg { padding: 1.05rem 2.25rem; font-size: 1.05rem; }

/* Header — transparent over the hero, solid white on scroll ----------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: var(--space-lg); }

/* TF wordmark (typographic stand-in until the real logo is provided) */
.logo { display: inline-flex; align-items: center; gap: 0.6rem; }
.logo__mark {
  font-style: italic; font-weight: 800; font-size: 1.7rem; letter-spacing: -0.01em;
  color: var(--white); line-height: 1; transition: color var(--transition);
}
.site-header.scrolled .logo__mark { color: var(--navy); }
.logo__word { display: flex; flex-direction: column; line-height: 1; }
.logo__word b { font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; }
.logo__word span { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; margin-top: 3px; }

.main-nav > ul { display: flex; align-items: center; gap: var(--space-xl); }
.main-nav a { color: rgba(255,255,255,0.92); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; }
.main-nav a:hover { color: var(--primary-light); }
.site-header.scrolled .main-nav a { color: var(--navy); }
.site-header.scrolled .main-nav a:hover { color: var(--primary-dark); }
.has-dropdown { position: relative; }
.has-dropdown > a::after { content: '▾'; font-size: 0.7em; margin-left: 0.3rem; opacity: 0.7; }
.dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 210px; background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.5rem;
  opacity: 0; visibility: hidden; transition: all var(--transition);
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(4px); }
.dropdown a { display: block; padding: 0.55rem 0.75rem; border-radius: 7px; font-weight: 500; font-size: 0.9rem; text-transform: none; letter-spacing: 0; color: var(--navy); }
.dropdown a:hover { background: var(--gray-50); color: var(--primary-dark); }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { width: 26px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }
.site-header.scrolled .menu-toggle span { background: var(--navy); }

.mobile-nav { display: none; }

/* Hero --------------------------------------------------------------------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; text-align: center; color: var(--white); overflow: hidden; background: var(--navy); }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.86) 0%, rgba(15,23,42,0.7) 50%, rgba(15,23,42,0.9) 100%);
}
.hero__inner { position: relative; z-index: 1; max-width: 880px; margin-inline: auto; padding-block: var(--space-4xl); }
.hero h1 { color: var(--white); font-weight: 300; letter-spacing: -0.01em; font-size: clamp(2.5rem, 7vw, 5rem); margin-bottom: var(--space-md); }
.hero__divider { display: flex; align-items: center; justify-content: center; gap: var(--space-lg); max-width: 480px; margin: 0 auto var(--space-lg); }
.hero__divider::before, .hero__divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.45); }
.hero__divider span { font-size: 0.85rem; font-weight: 500; letter-spacing: 0.38em; text-transform: uppercase; color: rgba(255,255,255,0.88); white-space: nowrap; }
.hero__sub { font-size: clamp(1.1rem, 2.2vw, 1.45rem); color: rgba(255,255,255,0.9); max-width: 30ch; margin: 0 auto var(--space-xl); font-weight: 400; }
.hero__ctas { display: flex; gap: var(--space-md); justify-content: center; flex-wrap: wrap; }
.hero__ctas .btn { text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }

/* Pillars / intro ---------------------------------------------------------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); margin-top: var(--space-2xl); }
.pillar { text-align: center; }
.pillar__icon { width: 56px; height: 56px; margin: 0 auto var(--space-md); display: grid; place-items: center; border-radius: 14px; background: rgba(8,145,178,0.1); color: var(--primary-dark); }
.pillar h3 { margin-bottom: var(--space-xs); }
.pillar p { color: var(--text-light); font-size: 0.95rem; }

/* Service cards ------------------------------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform var(--transition), box-shadow var(--transition); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: var(--space-lg) var(--space-lg) var(--space-xl); display: flex; flex-direction: column; flex: 1; }
.card__body h3 { margin-bottom: var(--space-sm); }
.card__body p { color: var(--text-light); font-size: 0.95rem; flex: 1; margin-bottom: var(--space-md); }
.card__link { font-weight: 700; color: var(--primary-dark); font-size: 0.9rem; letter-spacing: 0.02em; }
.card__link::after { content: ' →'; }

/* Split (community teaser) ------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3xl); align-items: center; }
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.split__body .eyebrow { margin-bottom: var(--space-sm); }
.split__body p { color: var(--text-light); margin-block: var(--space-md) var(--space-lg); }

/* Testimonials ------------------------------------------------------------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.quote { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: var(--space-xl); box-shadow: var(--shadow-sm); }
.quote__stars { color: var(--primary); letter-spacing: 0.15em; margin-bottom: var(--space-sm); }
.quote p { font-size: 1rem; color: var(--text); margin-bottom: var(--space-md); }
.quote cite { font-style: normal; font-weight: 700; color: var(--navy); font-size: 0.9rem; }
.placeholder-note { display: inline-block; margin-top: var(--space-lg); font-size: 0.8rem; color: var(--text-light); background: var(--gray-100); padding: 0.4rem 0.8rem; border-radius: var(--radius-pill); }

/* CTA band ----------------------------------------------------------------- */
.cta-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); margin-bottom: var(--space-md); }
.cta-band p { color: rgba(255,255,255,0.8); max-width: 52ch; margin: 0 auto var(--space-xl); }
.cta-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-md); }

/* Footer ------------------------------------------------------------------- */
.site-footer { background: var(--navy); color: var(--gray-300); padding-block: var(--space-3xl) var(--space-xl); font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-2xl); }
.footer-col h4 { color: var(--white); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: var(--space-md); }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--gray-300); }
.footer-col a:hover { color: var(--primary-light); }
.footer-col p { color: var(--gray-400); margin-bottom: var(--space-sm); }
.footer-brand .logo__mark { color: var(--white); }
.footer-brand .logo__word b { color: var(--white); }
.footer-brand .logo__word span { color: var(--gray-400); }
.footer-brand p { margin-top: var(--space-md); max-width: 32ch; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: 1px solid rgba(255,255,255,0.1); color: var(--gray-400); font-size: 0.85rem; }
.footer-bottom a { color: var(--primary-light); }

/* Page hero (interior pages) ----------------------------------------------- */
.page-hero { position: relative; min-height: 56vh; display: flex; align-items: center; text-align: center; color: var(--white); overflow: hidden; background: var(--navy); }
.page-hero__bg { position: absolute; inset: 0; z-index: 0; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.page-hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,0.84) 0%, rgba(15,23,42,0.74) 100%); }
.page-hero__inner { position: relative; z-index: 1; max-width: 760px; margin-inline: auto; padding-block: calc(var(--header-h) + var(--space-2xl)) var(--space-2xl); }
.page-hero .eyebrow { color: var(--primary-light); margin-bottom: var(--space-sm); }
.page-hero h1 { color: var(--white); font-weight: 300; }
.page-hero p { color: rgba(255,255,255,0.88); margin-top: var(--space-md); font-size: 1.1rem; }

/* Service sections --------------------------------------------------------- */
.service { padding-block: var(--space-3xl); scroll-margin-top: var(--header-h); }
.service--surface { background: var(--surface); }
.service__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3xl); align-items: center; }
.service__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; }
.service--reverse .service__media { order: 2; }
.service__body .eyebrow { margin-bottom: var(--space-sm); }
.service__body h2 { margin-bottom: var(--space-sm); }
.service__tagline { color: var(--primary-dark); font-weight: 600; margin-bottom: var(--space-md); }
.service__body p { color: var(--text-light); margin-bottom: var(--space-md); }

/* Pricing list ------------------------------------------------------------- */
.pricing { margin: var(--space-md) 0 var(--space-lg); border-top: 1px solid var(--gray-200); }
.pricing li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: 0.7rem 0; border-bottom: 1px solid var(--gray-200); font-size: 0.95rem; }
.pricing li span:first-child { color: var(--text); }
.pricing li span:last-child { font-weight: 700; color: var(--navy); white-space: nowrap; }
.notice { font-size: 0.82rem; color: var(--text-light); background: var(--gray-50); border-left: 3px solid var(--gray-300); padding: var(--space-md); border-radius: 0 var(--radius) var(--radius) 0; margin-top: var(--space-md); }

/* Prose + team (About page) ------------------------------------------------ */
.prose { max-width: 760px; }
.prose h2 { margin-bottom: var(--space-md); }
.prose h3 { margin-top: var(--space-lg); margin-bottom: var(--space-xs); color: var(--primary-dark); }
.prose p { color: var(--text-light); margin-bottom: var(--space-md); }
.prose p:last-child { margin-bottom: 0; }
.lead { font-size: 1.2rem; color: var(--text); font-weight: 500; }

.team { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.team-card { display: flex; gap: var(--space-lg); align-items: flex-start; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm); }
.team-card__photo { flex: 0 0 150px; }
.team-card__photo img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; width: 100%; }
.team-card__name { font-size: 1.2rem; font-weight: 800; color: var(--navy); }
.team-card__role { color: var(--primary-dark); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-sm); }
.team-card p { color: var(--text-light); font-size: 0.92rem; }

/* Contact ------------------------------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3xl); align-items: start; }
.contact-info .eyebrow { margin-bottom: var(--space-sm); }
.contact-info > p { color: var(--text-light); margin-bottom: var(--space-md); }
.contact-list { margin-top: var(--space-md); }
.contact-list li { display: flex; gap: var(--space-md); padding: var(--space-md) 0; border-bottom: 1px solid var(--gray-200); }
.contact-list .ci-icon { color: var(--primary-dark); flex: 0 0 auto; margin-top: 3px; }
.contact-list a { color: var(--text); }
.contact-list a:hover { color: var(--primary-dark); }
.map-embed { margin-top: var(--space-lg); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--gray-200); aspect-ratio: 16 / 10; background: var(--gray-100); }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Forms -------------------------------------------------------------------- */
.form { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: var(--space-xl); box-shadow: var(--shadow-sm); }
.form__group { margin-bottom: var(--space-md); }
.form__group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.35rem; color: var(--navy); }
.form__group input, .form__group textarea { width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--gray-300); border-radius: var(--radius); font: inherit; font-size: 0.95rem; background: var(--white); color: var(--text); transition: border-color var(--transition), box-shadow var(--transition); }
.form__group input:focus, .form__group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(8,145,178,0.12); }
.form .req { color: #dc2626; }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__status { margin-top: var(--space-md); font-size: 0.9rem; min-height: 1.2em; }
.form__status.is-success { color: #047857; }
.form__status.is-error { color: #dc2626; }

/* Embed placeholder (Jane / future widgets) -------------------------------- */
.embed-slot { border: 2px dashed var(--gray-300); border-radius: var(--radius-lg); background: var(--gray-50); padding: var(--space-3xl) var(--space-xl); text-align: center; color: var(--text-light); }
.embed-slot strong { color: var(--navy); display: block; margin-bottom: var(--space-xs); font-size: 1.1rem; }

/* Weekly class schedule ---------------------------------------------------- */
.schedule-list { list-style: none; margin: var(--space-lg) auto 0; padding: 0; max-width: 28rem; }
.schedule-list li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-lg); padding: var(--space-md) 0; border-bottom: 1px solid var(--gray-200); }
.schedule-list li:last-child { border-bottom: none; }
.schedule-list strong { color: var(--navy); font-size: 1.05rem; }
.schedule-list span { color: var(--text-light); font-weight: 600; }

/* Fade-in animation -------------------------------------------------------- */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade-in { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 900px) {
  .pillars, .cards, .quotes { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: var(--space-xl); }
  .split__media { order: -1; }
  .service__grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .service__media { order: -1; }
  .service--reverse .service__media { order: -1; }
  .team { grid-template-columns: 1fr; }
  .team-card { flex-direction: column; align-items: center; text-align: center; }
  .team-card__photo { flex-basis: auto; max-width: 200px; }
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .site-header.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mobile-nav {
    display: block; position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--white); border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow); padding: var(--space-md) var(--space-lg) var(--space-xl);
    transform: translateY(-120%); transition: transform var(--transition); z-index: 999;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .site-header.nav-open .mobile-nav { transform: translateY(0); }
  .mobile-nav ul li { border-bottom: 1px solid var(--gray-100); }
  .mobile-nav a { display: block; padding: 0.9rem 0; color: var(--navy); font-weight: 600; }
  .mobile-nav .mobile-sub a { padding-left: var(--space-md); font-weight: 500; color: var(--text-light); }
  .mobile-nav .btn { display: inline-flex; margin-top: var(--space-md); width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
