/* Ace Rehab demo: styles for the inside pages (About, Services, Team, Clinic, News, FAQ, Partners).
   Loads after scrollcraft.css and site.css. */

/* ---------------------------------------------------------- page head --
   Layered: photo plane (slow), two brand stripes (faster, in front of the
   photo, behind the type), the title on top. Parallax via the engine. */
.phead { position: relative; min-height: min(86svh, 54rem); display: grid; align-items: end; overflow: clip; padding: calc(var(--bar-h) + 4rem) 0 clamp(3rem, 8vh, 6rem); }
/* The photo starts just under the header bar (so faces aren't hidden behind
   it), fades in from the left and from the top, and is framed from the top
   down so heads stay in shot on wide, short screens. */
.phead__photo { position: absolute; z-index: 0; inset: calc(var(--bar-h) * 0.55) -2% -12% 34%; }
.phead__photo img {
  width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 12%;
  filter: saturate(0.85) brightness(0.72) contrast(1.05);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%), linear-gradient(to bottom, transparent 0%, #000 14%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0%, #000 38%), linear-gradient(to bottom, transparent 0%, #000 14%);
          mask-composite: intersect;
}
.phead__stripes { position: absolute; z-index: 1; right: 14vw; bottom: -14%; width: min(30vw, 30rem); pointer-events: none; opacity: 0.92; }
.phead__stripes--far { right: 30vw; bottom: -30%; width: min(22vw, 22rem); opacity: 0.35; filter: blur(3px); }
.phead__floor { position: absolute; z-index: 2; inset: auto 0 0 0; height: 30%; background: linear-gradient(to top, var(--sc-canvas), transparent); pointer-events: none; }
.phead__inner { position: relative; z-index: 3; }
.phead h1 { font-size: clamp(2.6rem, 1.4rem + 5vw, 6rem); line-height: 0.96; max-width: 14ch; }
.phead__lede { margin-top: var(--sc-5); font-size: var(--sc-t-lg); line-height: 1.45; max-width: 40ch; }
.phead__go { margin-top: var(--sc-6); display: flex; gap: var(--sc-3); flex-wrap: wrap; }
.crumb { margin-bottom: var(--sc-5); }
.crumb a { text-decoration: none; color: var(--sc-ink-soft); }
.crumb a:hover { color: var(--sc-ink); }
@media (max-width: 860px) {
  .phead { min-height: 0; padding-top: calc(var(--bar-h) + 1rem); align-items: end; }
  .phead__photo { position: relative; inset: auto; height: 46svh; margin: 0 calc(-1 * var(--sc-gutter)) -6rem; grid-row: 1; }
  .phead__photo img { -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 45%); mask-image: linear-gradient(to top, transparent 0%, #000 45%); }
  .phead > .sc-wrap { display: contents; }
  .phead__inner { padding-inline: var(--sc-gutter); }
  .phead__stripes { right: -6vw; top: calc(var(--bar-h) + 18svh); bottom: auto; width: 46vw; }
  .phead__stripes--far { display: none; }
  .phead h1 { font-size: clamp(2.3rem, 10vw, 3.4rem); }
}

/* ------------------------------------------------------------ sections -- */
.sect { padding-block: var(--sc-section); }
.sect--tight { padding-top: clamp(2rem, 4vw, 4rem); }
.sect--rule { border-top: 1px solid var(--sc-hairline); }
.sect__head { max-width: 46rem; margin-bottom: var(--sc-8); }
.sect__head p { margin-top: var(--sc-4); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 7rem); align-items: center; }
.split--top { align-items: start; }
.split--wide { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.frame { position: relative; overflow: hidden; border-radius: 4px; box-shadow: var(--sc-e3); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--43 { aspect-ratio: 4 / 3; }
.frame--34 { aspect-ratio: 3 / 4; }
.frame--para img { position: absolute; inset: -8% 0; height: 116%; max-width: none; }
.prose { max-width: 62ch; }
.prose p + p { margin-top: var(--sc-4); }
.prose p { color: var(--sc-ink-soft); }
.prose p.lead { color: var(--sc-ink); font-size: var(--sc-t-lg); line-height: 1.5; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ticks li { padding: 0.7rem 0 0.7rem 1.4rem; border-bottom: 1px solid var(--sc-hairline); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1.3rem; width: 0.55rem; height: 1px; background: var(--sc-accent); }
.ticks--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sc-7); }
@media (max-width: 860px) {
  .split, .split--wide { grid-template-columns: 1fr; }
  .ticks--cols { grid-template-columns: 1fr; }
}
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sc-5); border-top: 1px solid var(--sc-hairline-strong); padding-top: var(--sc-6); }
.facts b { display: block; font-size: var(--sc-t-2xl); font-weight: 760; font-variation-settings: "wdth" 115; letter-spacing: -0.03em; line-height: 1; }
.facts span { display: block; margin-top: var(--sc-2); color: var(--sc-ink-soft); font-size: 0.92rem; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--sc-6); } }

/* ------------------------------------------------------- services page -- */
.svc { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(2rem, 6vw, 7rem); align-items: center; padding-block: clamp(3rem, 7vw, 7rem); border-top: 1px solid var(--sc-hairline); }
.svc:nth-of-type(even) .svc__media { order: 2; }
.svc__media { position: relative; }
.svc__tag { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: var(--sc-4); }
.svc__tag span { color: var(--sc-accent); }
.svc h2 { font-size: var(--sc-t-3xl); }
.svc .prose { margin-top: var(--sc-5); }
.svc__who { margin-top: var(--sc-6); display: flex; gap: var(--sc-3); flex-wrap: wrap; align-items: center; }
.svc__faces { display: flex; }
.svc__faces img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 16%; box-shadow: 0 0 0 2px var(--sc-canvas); }
.svc__faces img + img { margin-left: -10px; }
.toc { display: flex; flex-wrap: wrap; gap: var(--sc-2); margin-top: var(--sc-6); }
.toc a { text-decoration: none; padding: 0.5rem 1rem; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--sc-hairline-strong); font-size: 0.92rem; transition: background-color 160ms var(--sc-ease-out); }
.toc a:hover { background: rgb(255 255 255 / 0.06); }
@media (max-width: 860px) {
  .svc { grid-template-columns: 1fr; }
  .svc:nth-of-type(even) .svc__media { order: 0; }
}

/* ----------------------------------------------------------- team page -- */
.filters { display: flex; flex-wrap: wrap; gap: var(--sc-2); margin-bottom: var(--sc-8); }
.filters button { cursor: pointer; border: 0; background: transparent; color: var(--sc-ink-soft); min-height: 44px; padding: 0.5rem 1rem; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--sc-hairline-strong); font-size: 0.92rem; transition: background-color 160ms var(--sc-ease-out), color 160ms var(--sc-ease-out); }
.filters button:hover { color: var(--sc-ink); }
.filters button[aria-pressed="true"] { background: var(--sc-ink); color: var(--sc-canvas); box-shadow: none; }
.bio { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr); gap: clamp(2rem, 5vw, 6rem); align-items: center; padding-block: clamp(2.5rem, 5vw, 5rem); border-top: 1px solid var(--sc-hairline); scroll-margin-top: var(--bar-h); }
.bio[hidden] { display: none; }
.bio__photo { position: relative; aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: #151410; box-shadow: var(--sc-e2); }
.bio__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.bio__corner { position: absolute; top: 0.8rem; left: 0.8rem; display: grid; justify-items: center; line-height: 1; font-weight: 760; font-variation-settings: "wdth" 120; font-size: 1rem; background: var(--card); color: var(--paper-ink); padding: 0.4em 0.35em 0.3em; border-radius: 3px; }
.bio__corner span { color: var(--paper-accent); margin-top: 0.1em; }
.bio h2 { font-size: var(--sc-t-3xl); }
.bio__role { margin-top: var(--sc-3); color: var(--sc-accent); font-weight: 600; }
.bio .prose { margin-top: var(--sc-5); }
.bio__skills { list-style: none; padding: 0; margin: var(--sc-5) 0 0; display: flex; flex-wrap: wrap; gap: var(--sc-2); }
.bio__skills li { font-size: 0.84rem; padding: 0.3rem 0.65rem; border-radius: 3px; background: var(--sc-surface); box-shadow: var(--sc-edge); }
.bio .btn { margin-top: var(--sc-6); }
.bio:nth-of-type(even) .bio__photo { order: 2; }
.team-group { margin-top: var(--sc-9); }
.team-group:first-of-type { margin-top: 0; }
@media (max-width: 860px) {
  .bio { grid-template-columns: 1fr; }
  .bio:nth-of-type(even) .bio__photo { order: 0; }
  .bio__photo { aspect-ratio: 1 / 1; max-width: 26rem; }
}

/* --------------------------------------------------------- clinic page -- */
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(0.6rem, 1.2vw, 1.2rem); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.gallery figcaption { margin-top: var(--sc-2); font-size: 0.9rem; color: var(--sc-ink-soft); }
.gallery figcaption b { color: var(--sc-ink); font-weight: 620; }
.g-a { grid-column: span 7; } .g-a img { aspect-ratio: 4 / 3.4; }
.g-b { grid-column: span 5; } .g-b img { aspect-ratio: 3 / 3.65; }
.g-c { grid-column: span 4; } .g-c img { aspect-ratio: 3 / 4; }
.g-d { grid-column: span 4; } .g-d img { aspect-ratio: 3 / 4; }
.g-e { grid-column: span 4; } .g-e img { aspect-ratio: 3 / 4; }
@media (max-width: 760px) { .g-a, .g-b, .g-c, .g-d, .g-e { grid-column: span 12; } .g-c, .g-d, .g-e { grid-column: span 6; } .g-e { grid-column: span 12; } .g-e img { aspect-ratio: 4 / 3; } }
.hours { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--sc-6) var(--sc-7); }
.hours h3 { font-size: 1.05rem; font-weight: 680; font-variation-settings: "wdth" 110; margin-bottom: var(--sc-3); }
.hours dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.35rem var(--sc-5); font-size: 0.95rem; }
.hours dt { color: var(--sc-ink-soft); }
.hours dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.hours dd.closed { color: var(--sc-ink-soft); }
.hours .today { color: var(--sc-ink); font-weight: 650; }
.hours .today + dd { color: var(--sc-accent); font-weight: 650; }
.map { position: relative; aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; box-shadow: var(--sc-e2); background: var(--sc-surface); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(0.9) invert(0.92) contrast(0.9) hue-rotate(180deg); }
.contact-lines { display: grid; gap: var(--sc-4); margin-top: var(--sc-6); }
.contact-lines div { display: grid; grid-template-columns: 6rem 1fr; gap: var(--sc-4); padding-bottom: var(--sc-4); border-bottom: 1px solid var(--sc-hairline); }
.contact-lines dt, .contact-lines .k { color: var(--sc-ink-soft); }
.contact-lines dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.suburbs { columns: 3; column-gap: var(--sc-6); list-style: none; padding: 0; margin: 0; color: var(--sc-ink-soft); font-size: 0.95rem; }
.suburbs li { padding: 0.25rem 0; break-inside: avoid; }
@media (max-width: 760px) { .suburbs { columns: 2; } }

/* ------------------------------------------------------------- FAQ page -- */
.faq { border-top: 1px solid var(--sc-hairline-strong); }
.faq details { border-bottom: 1px solid var(--sc-hairline-strong); }
.faq summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 3rem 1fr auto; gap: var(--sc-4); align-items: baseline;
  padding: var(--sc-6) 0; font-size: var(--sc-t-xl); font-weight: 650; font-variation-settings: "wdth" 108; letter-spacing: -0.015em; line-height: 1.2;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .n { color: var(--sc-accent); font-size: 0.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.faq summary .pm { width: 22px; height: 22px; position: relative; align-self: center; }
.faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--sc-ink); transition: transform 200ms var(--sc-ease-out); }
.faq summary .pm::after { transform: rotate(90deg); }
.faq details[open] summary .pm::after { transform: rotate(0deg); }
.faq summary:hover { color: #fff; }
.faq .ans { padding: 0 0 var(--sc-7) calc(3rem + var(--sc-4)); max-width: calc(62ch + 7rem); }
.faq .ans p { color: var(--sc-ink-soft); }
.faq .ans p + p { margin-top: var(--sc-3); }
.faq .ans strong { color: var(--sc-ink); font-weight: 600; }
@media (max-width: 600px) { .faq summary { grid-template-columns: 2rem 1fr auto; font-size: 1.15rem; } .faq .ans { padding-left: 0; } }

/* -------------------------------------------------------- partners page -- */
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: var(--sc-4); }
.logo-plate { background: var(--card); color: var(--paper-ink); border-radius: 6px; padding: var(--sc-6); display: grid; grid-template-rows: 8.5rem auto; gap: var(--sc-5); box-shadow: 0 1px 0 #fff inset, var(--sc-e2); }
.logo-plate .lg { display: grid; place-items: center; }
.logo-plate img { max-height: 8.5rem; max-width: 80%; width: auto; height: auto; object-fit: contain; }
.logo-plate b { display: block; font-weight: 700; font-variation-settings: "wdth" 108; }
.logo-plate span { display: block; margin-top: 0.2rem; font-size: 0.88rem; color: var(--paper-soft); }

/* ------------------------------------------------------------ news page -- */
.post { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 6rem); padding-block: clamp(3rem, 6vw, 6rem); border-top: 1px solid var(--sc-hairline); align-items: start; scroll-margin-top: var(--bar-h); }
.post__media .frame { aspect-ratio: 4 / 3; }
.post__media .frame--logo { background: var(--card); display: grid; place-items: center; }
.post__media .frame--logo img { width: auto; height: auto; max-width: 60%; max-height: 70%; object-fit: contain; }
.post__media .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; aspect-ratio: 4 / 3; }
.post__media .pair .frame { aspect-ratio: auto; }
.post__date { color: var(--sc-accent); font-weight: 650; font-size: 0.9rem; }
.post h2 { margin-top: var(--sc-3); font-size: var(--sc-t-2xl); }
.post .prose { margin-top: var(--sc-5); }
@media (max-width: 860px) { .post { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- CTA band -- */
.band { position: relative; overflow: clip; background: var(--paper); color: var(--paper-ink); --sc-ink: var(--paper-ink); --sc-ink-soft: var(--paper-soft); --sc-accent: var(--paper-accent); --sc-accent-ink: #fff; --sc-hairline-strong: rgb(23 19 19 / 0.22); padding-block: clamp(4rem, 9vw, 8rem); }
.band::selection, .band ::selection { background: var(--paper-accent); color: #fff; }
.band__inner { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: var(--sc-7); align-items: end; }
.band h2 { font-size: var(--sc-t-3xl); max-width: 16ch; }
.band p { margin-top: var(--sc-4); color: var(--paper-soft); max-width: 44ch; }
.band__go { display: flex; gap: var(--sc-3); flex-wrap: wrap; }
.band .btn { background: var(--paper-accent); color: #fff; }
.band .btn--ghost { background: transparent; color: var(--paper-ink); box-shadow: inset 0 0 0 1px rgb(23 19 19 / 0.3); }
.band__mark { position: absolute; right: -4rem; top: -6rem; width: 22rem; opacity: 0.08; pointer-events: none; }
@media (max-width: 760px) { .band__inner { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- site footer -- */
.site-foot { background: #0D0C0C; padding: clamp(3rem, 6vw, 5rem) 0 2rem; font-size: 0.93rem; }
.site-foot__grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: var(--sc-7); }
.site-foot h3 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sc-ink-soft); font-weight: 600; margin-bottom: var(--sc-4); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-foot a { text-decoration: none; color: var(--sc-ink); }
.site-foot a:hover { text-decoration: underline; }
.site-foot__brand svg { width: 44px; }
.site-foot__brand p { margin-top: var(--sc-4); color: var(--sc-ink-soft); max-width: 30ch; }
.site-foot__small { margin-top: var(--sc-8); padding-top: var(--sc-5); border-top: 1px solid var(--sc-hairline); display: flex; justify-content: space-between; gap: var(--sc-4); flex-wrap: wrap; color: var(--sc-ink-soft); font-size: 0.8rem; }
@media (max-width: 860px) { .site-foot__grid { grid-template-columns: 1fr 1fr; } .site-foot__brand { grid-column: 1 / -1; } }
