/* Baer Den Physical Therapy: site styles
   Colours, type and spacing follow the "Baer Den Physical Therapy — Website" design canvas. */

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --line-dark: #262626;
  --line-light: #d4d4d4;
  --grey-100: #cfcfcf;
  --grey-200: #bdbdbd;
  --grey-300: #9a9a9a;
  --grey-400: #8a8a8a;
  --grey-500: #6b6b6b;
  --grey-600: #555555;
  --ink-soft: #444444;
  --ink: #333333;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1200px;
  --gutter: 24px;
  --section-y: 96px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.75;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Text for screen readers only (e.g. "opens in a new tab"). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  background: var(--white);
  color: var(--black);
  padding: 12px 16px;
  font-weight: 600;
}

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

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

/* ---------- Shared type ---------- */

.display {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.btn--solid {
  background: var(--white);
  color: var(--black);
  font-weight: 600;
}

.btn--outline {
  border: 1px solid var(--white);
  font-weight: 500;
}

.btn--sm {
  padding: 12px 20px;
  font-size: 14px;
}

.btn--md {
  padding: 16px 28px;
  font-size: 16px;
}

.btn--lg {
  padding: 18px 32px;
  font-size: 17px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line-dark);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  height: 40px;
  width: auto;
}

.brand span {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.32em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 88px;
  padding-bottom: var(--section-y);
}

.hero__copy {
  flex: 999 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--grey-200);
}

.hero__eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hero h1 .muted {
  color: var(--grey-400);
}

.hero__lead {
  max-width: 520px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--grey-100);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Photo placeholders ---------- */

.photo {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  margin: 0;
}

.photo--image {
  padding: 0;
  overflow: hidden;
  background: #141414;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}

/* ---------- Hero photo gallery (manual) ---------- */

.gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Arrow buttons sit on the left and right edges of the photos. */
.gallery__viewport {
  position: relative;
}

/* The photos are layered: the front one in the middle, its neighbours tucked
   about a third of the way behind it, slightly smaller, tilted and dimmed. */
.gallery__stage {
  position: relative;
  aspect-ratio: 1.3;
  max-height: 520px;
  overflow: hidden;
  touch-action: pan-y;
}

.gallery__slide {
  position: absolute;
  top: 3%;
  left: 50%;
  height: 90%;
  aspect-ratio: 924 / 1240;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: #141414;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transform: translateX(-50%);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease, opacity 0.5s ease;
}

.gallery__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  user-select: none;
  -webkit-user-drag: none;
}

/* Front photo */
.gallery__slide[data-pos="0"] {
  z-index: 3;
  cursor: default;
}

.gallery__slide[data-pos="-1"] {
  z-index: 2;
  transform: translateX(-108%) rotate(-4deg) scale(0.88);
  filter: brightness(0.5);
}

.gallery__slide[data-pos="1"] {
  z-index: 2;
  transform: translateX(8%) rotate(4deg) scale(0.88);
  filter: brightness(0.5);
}

.gallery__slide[data-pos="-1"]:hover,
.gallery__slide[data-pos="1"]:hover {
  filter: brightness(0.75);
}

/* Any further photos wait, invisible, behind the front one. */
.gallery__slide[data-pos="hidden"] {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.8);
}

.gallery__btn {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.75);
  color: var(--white);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gallery__btn--prev {
  left: 6px;
}

.gallery__btn--next {
  right: 6px;
}

.gallery__btn:hover {
  border-color: var(--white);
  background: var(--white);
  color: var(--black);
}

.gallery__btn:focus-visible,
.gallery__dot:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* Dots: the current photo's dot stretches into a bar. */
.gallery__dots {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.gallery__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  border: 0;
  background: none;
  cursor: pointer;
}

.gallery__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--grey-500);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.gallery__dot:hover::before {
  background: var(--grey-200);
}

.gallery__dot[aria-current="true"]::before {
  width: 28px;
  background: var(--white);
}

html:not(.js) .gallery__btn,
html:not(.js) .gallery__dots {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .gallery__slide,
  .gallery__dot::before {
    transition: none;
  }
}
.about__photo.photo--image {
  border: 1px solid var(--line-light);
}

.about__photo img {
  object-position: 50% 0;
}

.photo--placeholder-dark {
  background: repeating-linear-gradient(135deg, #1a1a1a 0 12px, #141414 12px 24px);
  border: 1px solid var(--line-dark);
}

.photo--placeholder-light {
  background: repeating-linear-gradient(135deg, #e9e9e9 0 12px, #f2f2f2 12px 24px);
  border: 1px solid var(--line-light);
}

.photo__label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.photo--placeholder-dark .photo__label {
  color: var(--grey-300);
}

.photo--placeholder-light .photo__label {
  color: var(--grey-600);
}

.hero__gallery {
  flex: 1 1 540px;
  min-width: 0;
}

/* ---------- Light sections ---------- */

.section--light {
  background: var(--white);
  color: var(--black);
}

/* ---------- Services ---------- */

.services__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.services__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.services__head p {
  max-width: 440px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
}

.service {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  padding: 32px;
  background: var(--white);
}

.service__num {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--grey-500);
}

.service h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-transform: uppercase;
}

.service p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- How it works ---------- */

.process {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.process__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 40px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 2px solid var(--white);
}

.step__num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--grey-500);
}

.step h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

.step p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey-200);
}

/* ---------- About ---------- */

.about__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 56px;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.about__photo {
  flex: 1 1 360px;
  height: 460px;
}

.about__copy {
  flex: 999 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.about__copy .eyebrow {
  color: var(--grey-600);
}

.about__copy h2 {
  font-size: clamp(40px, 5vw, 60px);
}

.about__copy p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}

.about__copy .about__note {
  color: var(--black);
  font-weight: 600;
}

/* Keep the photo in view beside the longer bio on wide screens. */
@media (min-width: 1000px) {
  .about__photo {
    position: sticky;
    top: 32px;
  }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags li {
  border: 1px solid var(--black);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- FAQ ---------- */

.faq {
  border-top: 1px solid var(--line-light);
}

.faq__inner {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.faq__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.faq__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.faq__intro > p {
  max-width: 440px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (min-width: 1000px) {
  .faq__layout {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 72px;
    align-items: start;
  }

  .faq__intro {
    position: sticky;
    top: 32px;
  }
}

.faq__list {
  border-bottom: 1px solid var(--line-light);
}

.faq__item {
  border-top: 1px solid var(--line-light);
}

.faq__heading {
  font: inherit;
}

.faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 26px 0;
  border: 0;
  background: none;
  color: var(--black);
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.faq__question {
  transition: opacity 0.15s ease;
}

.faq__trigger:hover .faq__question {
  opacity: 0.75;
}

.faq__trigger:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 4px;
}

/* Plus when closed; the vertical bar turns flat to make a minus when open. */
.faq__icon {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--black);
  border-radius: 50%;
  color: var(--black);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}

.faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq__item.is-open .faq__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq__trigger:hover .faq__icon,
.faq__item.is-open .faq__icon {
  background: var(--black);
  color: var(--white);
}

/* Without JavaScript the answers stay open and the buttons do nothing. */
html:not(.js) .faq__icon {
  display: none;
}

html:not(.js) .faq__trigger {
  padding-bottom: 12px;
  cursor: default;
}

/* With JavaScript, answers start collapsed. Height animates via grid rows
   (0fr to 1fr); collapsed answers are also visibility: hidden so screen readers
   and the Tab key skip them. The text stays in the HTML for search engines. */
.js .faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.35s ease, visibility 0s linear 0.35s;
}

.js .faq__item.is-open .faq__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.35s ease, visibility 0s linear 0s;
}

.js .faq__item.is-instant .faq__panel,
.faq__item.is-instant .faq__icon::after {
  transition: none;
}

.faq__panel-inner {
  min-height: 0;
  overflow: hidden;
}

.faq__answer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 72ch;
  padding: 0 56px 30px 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}

.faq__answer ul,
.faq__answer ol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 1.4em;
}

.faq__answer ul {
  list-style: disc;
}

.faq__answer ol {
  list-style: decimal;
}

/* "Still Have Questions?" call to action under the accordion */
.faq-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 56px;
  padding: clamp(32px, 5vw, 64px);
  background: var(--black);
  color: var(--white);
}

.faq-cta__copy {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-cta__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.faq-cta__copy p {
  max-width: 640px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--grey-100);
}

.faq-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .js .faq__panel,
  .js .faq__item.is-open .faq__panel,
  .faq__icon,
  .faq__icon::before,
  .faq__icon::after {
    transition: none;
  }
}

@media (max-width: 720px) {
  .faq__trigger {
    padding: 22px 0;
    font-size: 17px;
  }

  .faq__answer {
    padding-right: 0;
    font-size: 16px;
  }

  .faq-cta__actions {
    width: 100%;
  }

  .faq-cta__actions .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}

/* ---------- Contact ---------- */

.contact {
  border-top: 1px solid var(--line-dark);
}

.contact__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 56px;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.contact__copy {
  flex: 999 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.contact__copy h2 {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.98;
}

.contact__copy p {
  max-width: 480px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--grey-100);
}

.contact__details {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 24px;
  border-top: 2px solid var(--white);
}

.contact__details div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact__details dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--grey-300);
}

.contact__details dd {
  font-size: 17px;
}

/* ---------- Booking (Square Appointments widget) ---------- */

.contact__inner {
  padding-bottom: 56px;
}

.booking {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: var(--section-y);
}

.booking__title {
  color: var(--grey-200);
  font-weight: 400;
}

/* Square's iframe sets height: 100% and does not resize itself to its content,
   so the frame's height decides how much of the booking flow shows at once. */
.booking__frame {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--line-dark);
  height: clamp(560px, 85vh, 820px);
  height: clamp(560px, 85svh, 820px);
  overflow: hidden;
}

.booking__fallback {
  font-size: 14px;
  color: var(--grey-300);
}

.booking__fallback a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.booking__frame iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
  border: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-dark);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.footer__logo {
  height: 96px;
  width: auto;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 14px;
  color: var(--grey-200);
}

.footer__links {
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
}

.social-link svg {
  flex: none;
}

.footer__copy {
  font-size: 13px;
  color: var(--grey-400);
}

/* ---------- 404 ---------- */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  min-height: 60vh;
}

.not-found p {
  max-width: 480px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--grey-100);
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  :root {
    --section-y: 64px;
    --gutter: 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .hero {
    gap: 40px;
    padding-top: 56px;
  }

  .about__photo {
    height: 360px;
  }

  .service {
    padding: 24px;
    min-height: 0;
  }

  .footer__logo {
    height: 80px;
  }
}

@media (max-width: 420px) {
  .nav-links .btn {
    width: 100%;
  }

  .hero__actions .btn,
  .contact__copy .btn {
    width: 100%;
  }
}
