/* ============================================================
   Milo Physical Therapy — stylesheet
   ============================================================ */

:root {
  --red-900: #6b1418;
  --red-700: #8b1a1f;
  --red-600: #a82126;
  --red-500: #c8302e;
  --red-400: #e04a3f;
  --red-50:  #fbeeec;

  --ink-900: #161616;
  --ink-700: #2a2a2a;
  --ink-500: #5a5a5a;
  --ink-400: #7e7e7e;
  --ink-200: #d8d6d2;
  --ink-100: #ece9e4;

  --cream:   #f7f3ee;
  --paper:   #fbf9f5;
  --white:   #ffffff;

  --shadow-sm: 0 1px 2px rgba(20, 10, 10, 0.06), 0 2px 6px rgba(20, 10, 10, 0.04);
  --shadow-md: 0 6px 24px rgba(20, 10, 10, 0.08), 0 2px 8px rgba(20, 10, 10, 0.05);
  --shadow-lg: 0 24px 60px rgba(20, 10, 10, 0.18), 0 8px 20px rgba(20, 10, 10, 0.08);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 22px;

  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }

a { color: var(--red-700); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--red-500); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink-900);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 500; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-700);
  margin: 0 0 1rem;
}

.section {
  padding: clamp(80px, 10vw, 140px) 0;
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vw, 70px);
  text-align: center;
}
.section-sub {
  color: var(--ink-500);
  font-size: 1.05rem;
  margin: 0;
}

.grid { display: grid; gap: clamp(28px, 4vw, 56px); }
.grid-2 { grid-template-columns: 1fr 1fr; align-items: center; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 880px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-sm { padding: 0.65em 1.2em; font-size: 0.85rem; }
.btn-primary {
  background: var(--red-700);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--red-600);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: var(--white);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  color: var(--red-700);
  border-bottom: 1.5px solid transparent;
  padding-bottom: 2px;
  transition: gap .2s ease, color .2s ease, border-color .2s ease;
}
.link-arrow:hover { gap: 0.7em; color: var(--red-500); border-color: var(--red-500); }

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.site-header.scrolled {
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand { display: flex; align-items: center; }
.brand-logo {
  height: 110px;
  width: auto;
  margin: -34px -14px;
  transition: filter .3s ease, height .3s ease, margin .3s ease;
}
.site-header.scrolled .brand-logo {
  height: 84px;
  margin: -22px -10px;
}
.site-header:not(.scrolled) .brand-logo {
  filter: brightness(0) invert(1);
}
.nav { display: flex; gap: 2rem; align-items: center; }
.nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-700);
  position: relative;
}
.site-header:not(.scrolled) .nav a { color: rgba(255,255,255,0.92); }
.site-header:not(.scrolled) .nav a:hover { color: var(--white); }
.nav a:hover { color: var(--red-700); }

.nav-cta { color: #fff; }
.site-header:not(.scrolled) .nav-cta { background: var(--white); color: var(--red-700); }
.site-header:not(.scrolled) .nav-cta:hover { background: var(--cream); color: var(--red-700); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink-900);
  transition: background .3s ease;
}
.site-header:not(.scrolled) .nav-toggle span { background: #fff; }

@media (max-width: 880px) {
  .nav, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .site-header.menu-open {
    background: rgba(251, 249, 245, 0.97);
    backdrop-filter: saturate(180%) blur(14px);
  }
  .site-header.menu-open .brand-logo { filter: none; }
  .site-header.menu-open .nav-toggle span { background: var(--ink-900); }
  .site-header.menu-open .nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 12px var(--gutter) 24px;
    background: rgba(251, 249, 245, 0.98);
    backdrop-filter: blur(14px);
  }
  .site-header.menu-open .nav a {
    color: var(--ink-900);
    padding: 14px 0;
    border-bottom: 1px solid var(--ink-100);
    font-size: 1.05rem;
  }
}

/* ----------------------------- Hero ----------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  color: #fff;
  padding: 180px 0 80px;
}
@media (max-width: 880px) {
  .hero { align-items: center; padding: 140px 0 80px; }
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none; /* prevent mobile tap-to-pause and play-button overlay */
}
/* If autoplay is blocked (e.g. iOS Low Power Mode), keep the poster visible
   instead of the browser's play-button overlay. */
.hero-video.autoplay-blocked {
  display: none;
}
.hero.autoplay-blocked {
  background-image: url("assets/hero-poster.jpg");
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(95deg, rgba(15,8,8,0.85) 0%, rgba(15,8,8,0.65) 28%, rgba(15,8,8,0.25) 55%, rgba(15,8,8,0.15) 100%),
    linear-gradient(180deg, rgba(15,8,8,0.35) 0%, rgba(15,8,8,0.0) 30%, rgba(15,8,8,0.55) 100%);
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero-content {
  max-width: 520px;
}
@media (max-width: 880px) {
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(15,8,8,0.55) 0%, rgba(15,8,8,0.35) 40%, rgba(15,8,8,0.85) 100%);
  }
  .hero-content { max-width: 100%; }
}
.hero .eyebrow { color: rgba(255,255,255,0.85); }
.hero h1 { color: #fff; margin-bottom: 7em; }
.hero h1 .accent {
  font-style: italic;
  color: var(--red-400);
  font-weight: 400;
}
.hero .lede {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: rgba(255,255,255,0.92);
  max-width: 620px;
  margin-bottom: 2.2em;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
}
.hero-meta strong { color: #fff; font-weight: 600; }
.hero-meta .dot {
  width: 4px; height: 4px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
}

/* ----------------------------- About ----------------------------- */
.about { background: var(--paper); }
.about-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-media img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
}
.about-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-md);
}
.badge-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--red-700);
  line-height: 1;
  font-weight: 600;
}
.badge-label {
  font-size: 0.85rem;
  color: var(--ink-500);
  line-height: 1.35;
}

.about-text h2 { margin-bottom: 0.4em; }
.about-text em { font-style: italic; color: var(--red-700); font-family: var(--font-display); }

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.5em 0 2em;
}
.check-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  color: var(--ink-700);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 18px; height: 18px;
  background: var(--red-50);
  border-radius: 50%;
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 5px; top: 12px;
  width: 8px; height: 4px;
  border-left: 2px solid var(--red-700);
  border-bottom: 2px solid var(--red-700);
  transform: rotate(-45deg);
}

/* ----------------------------- Services ----------------------------- */
.services { background: var(--white); }
.service-card {
  background: var(--paper);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--red-50);
}
.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--red-50);
  color: var(--red-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 { margin-bottom: 10px; color: var(--ink-900); }
.service-card p { color: var(--ink-500); margin: 0; font-size: 0.97rem; }

/* ----------------------------- Quote ----------------------------- */
.quote {
  background: var(--red-900);
  color: #fff;
  padding: clamp(80px, 10vw, 140px) 0;
  position: relative;
  overflow: hidden;
}
.quote::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 90% at 80% 30%, rgba(255,255,255,0.07) 0%, rgba(0,0,0,0) 60%),
    radial-gradient(50% 80% at 10% 80%, rgba(224,74,63,0.18) 0%, rgba(0,0,0,0) 60%);
}
.quote blockquote {
  position: relative;
  margin: 0 auto;
  max-width: 880px;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.quote blockquote p { margin-bottom: 1em; }
.quote blockquote footer {
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}

/* ----------------------------- Gallery ----------------------------- */
.clinic { background: var(--paper); }
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}
.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  position: relative;
  background: var(--ink-100);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-tall { grid-row: span 2; }
.gallery-wide { grid-column: span 2; }

@media (max-width: 880px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
  .gallery-tall { grid-row: span 1; }
  .gallery-wide { grid-column: span 2; }
}

/* ----------------------------- Contact ----------------------------- */
.contact { background: var(--white); }
.contact-grid { align-items: start; }
.contact-text h2 { margin-bottom: 0.5em; }
.contact-list {
  list-style: none;
  padding: 0;
  margin: 2em 0 0;
  border-top: 1px solid var(--ink-100);
}
.contact-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ink-100);
  align-items: baseline;
}
.contact-list li > a,
.contact-list li > span:not(.contact-label) {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 420px) {
  .contact-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
.contact-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-400);
  font-weight: 600;
}
.contact-list a { font-weight: 500; }

.contact-form {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-100);
}

/* Contact CTA card (used while real form is disabled) */
.contact-cta {
  background: linear-gradient(155deg, var(--red-900) 0%, var(--red-700) 70%, var(--red-600) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(32px, 4vw, 48px);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.contact-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 100% 0%, rgba(255,255,255,0.12) 0%, rgba(0,0,0,0) 60%);
  pointer-events: none;
}
.contact-cta > * { position: relative; }
.contact-cta h3 {
  color: #fff;
  font-size: 1.65rem;
  margin-bottom: 0.6em;
}
.contact-cta p {
  color: rgba(255,255,255,0.88);
  margin-bottom: 1.6em;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 1.4em;
}
.contact-cta .btn {
  width: 100%;
  background: #fff;
  color: var(--red-700);
}
.contact-cta .btn:hover {
  background: var(--cream);
  color: var(--red-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.contact-cta .btn-ghost-dark {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
}
.contact-cta .btn-ghost-dark:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: #fff;
  transform: translateY(-1px);
  box-shadow: none;
}
.cta-note {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin: 0;
}
.contact-form h3 { margin: 0 0 1.2em; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
}
.field label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-500);
  margin-bottom: 6px;
}
.field-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-400);
}
.field input,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink-900);
  background: var(--white);
  border: 1.5px solid var(--ink-100);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
  width: 100%;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px rgba(200, 48, 46, 0.12);
}
.contact-form button { width: 100%; margin-top: 8px; }
.form-note {
  font-size: 0.8rem;
  color: var(--ink-400);
  text-align: center;
  margin: 14px 0 0;
}

/* ----------------------------- Footer ----------------------------- */
.site-footer {
  background: var(--ink-900);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { height: 44px; filter: brightness(0) invert(1); opacity: 0.95; }
.footer-brand p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
}
.footer-meta { font-size: 0.85rem; text-align: right; }
.footer-meta p { margin: 0 0 4px; }

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
}

/* ----------------------------- Reveal animation ----------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
