/* Union Square Rehab & Health
   Layout idea: a calm clinical page anchored by deep harbor-navy bands
   (hero, inner page headers, closing call band, footer). The signature is
   the logo's leaves and vertical "spine" of dots, drawn large in the hero. */

/* Fonts are self-hosted (SIL Open Font License, see fonts/LICENSE-*.txt)
   so visitors' browsers never contact Google. */
@font-face { font-family: "Josefin Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/josefin-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Josefin Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/josefin-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #f5f9fb;
  --surface: #ffffff;
  --ink: #123049;
  --muted: #4d6577;
  --line: #d8e5ed;
  --blue: #0071bc;
  --sky: #29abe2;
  --leaf: #4a7a1a;
  --leaf-soft: #8cc63f;
  --on-blue: #ffffff;
  --navy: #0c3354;
  --navy-ink: #ffffff;
  --navy-muted: #c4dbea;
  --mist: #e7f3fa;
  --display: "Josefin Sans", "Futura", "Century Gothic", "Trebuchet MS", sans-serif;
  --body: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --wrap: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1822;
    --surface: #10212d;
    --ink: #e4eff6;
    --muted: #9db3c2;
    --line: #213848;
    --blue: #4aa7e6;
    --sky: #5fc3ee;
    --leaf: #9fd35a;
    --leaf-soft: #9fd35a;
    --on-blue: #06131c;
    --navy: #0a2a45;
    --mist: #0f2433;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1822;
  --surface: #10212d;
  --ink: #e4eff6;
  --muted: #9db3c2;
  --line: #213848;
  --blue: #4aa7e6;
  --sky: #5fc3ee;
  --leaf: #9fd35a;
  --leaf-soft: #9fd35a;
  --on-blue: #06131c;
  --navy: #0a2a45;
  --mist: #0f2433;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--sky); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.prose { max-width: 66ch; display: grid; gap: 1rem; }
.prose h2 { margin-top: 1rem; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: .35rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 40px; }
.brand-text { font-family: var(--display); line-height: 1.05; display: grid; }
.brand-text b { font-weight: 400; font-size: 1.05rem; letter-spacing: .14em; color: var(--blue); }
.brand-text span { font-size: .72rem; letter-spacing: .2em; color: var(--leaf); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 6px; font-weight: 600; font-size: .95rem; }
.nav a:hover { background: var(--bg); color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--leaf-soft); border-radius: 0; }
.call-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: var(--on-blue); text-decoration: none;
  font-weight: 700; padding: 10px 16px; border-radius: 999px; white-space: nowrap;
}
.call-btn:hover { background: var(--sky); color: var(--on-blue); }
.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; font-weight: 700; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }
.menu summary::-webkit-details-marker { display: none; }
@media (max-width: 860px) {
  .site-header .nav, .site-header .call-btn.desktop { display: none; }
  .menu { display: block; }
  .menu[open] .nav { display: grid; position: absolute; left: 0; right: 0; top: 68px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
}

/* Mobile call bar */
.callbar { display: none; }
@media (max-width: 860px) {
  .callbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
    background: var(--blue); justify-content: center; padding: 10px 16px;
  }
  .callbar a { color: var(--on-blue); font-weight: 700; text-decoration: none; font-size: 1.05rem; }
  body { padding-bottom: 56px; }
}

/* Spine motif */
.spine { display: grid; justify-items: center; gap: 10px; padding-top: 6px; }
.spine i { display: block; border-radius: 50%; background: var(--sky); }
.spine i:nth-child(1) { width: 10px; height: 10px; }
.spine i:nth-child(2) { width: 16px; height: 16px; }
.spine i:nth-child(3) { width: 20px; height: 20px; }
.spine i:nth-child(4) { width: 18px; height: 18px; }
.spine i:nth-child(5) { width: 14px; height: 14px; }
.spine i:nth-child(6) { width: 10px; height: 10px; background: var(--leaf-soft); }

/* Navy surfaces: hero, inner page header, closing call band, footer */
.hero, .page-head, .cta-band, .site-footer { background: var(--navy); color: var(--navy-ink); }
.hero a:not(.call-btn), .page-head a, .cta-band a:not(.call-btn), .site-footer a { color: #bfe6f8; }
.hero a:not(.call-btn):hover, .page-head a:hover, .site-footer a:hover { color: #ffffff; }
.hero .call-btn, .cta-band .call-btn { background: var(--leaf-soft); color: #0c2a12; }
.hero .call-btn:hover, .cta-band .call-btn:hover { background: #a6d96a; color: #0c2a12; }
.hero :focus-visible, .page-head :focus-visible, .cta-band :focus-visible, .site-footer :focus-visible { outline-color: #ffffff; }

/* Hero */
.hero { padding: 64px 0 0; overflow: hidden; }
.hero { padding-bottom: 64px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-body { display: grid; gap: 20px; }
.hero h1 { color: #ffffff; }
.eyebrow { font-family: var(--display); letter-spacing: .04em; font-size: 1rem; color: var(--leaf-soft); font-weight: 600; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.hero .lede, .page-head .lede { color: var(--navy-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding-top: 6px; }
.hero-actions .call-btn { font-size: 1.1rem; padding: 13px 22px; }
/* The real logo, on white so its blue and green lettering reads as designed */
.hero-logo { justify-self: center; width: 100%; max-width: 340px; aspect-ratio: 1; background: #ffffff; border-radius: 24px; display: grid; place-items: center; padding: 34px; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
.hero-logo img { width: 100%; height: auto; }
@media (max-width: 760px) {
  .hero { padding: 36px 0 44px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .hero-logo { order: -1; justify-self: start; max-width: 132px; padding: 14px; border-radius: 16px; }
}

/* Sections */
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.band, .section.band + .section { border-top: 0; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 26px; }
.section-head::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--sky); flex: none; transform: translateY(-2px); }
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.point { display: grid; gap: 8px; align-content: start; }
.point h3 { color: var(--blue); }
.point p { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  display: grid; gap: 8px; align-content: start; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); border-top: 4px solid var(--leaf-soft);
  box-shadow: 0 6px 18px rgba(12, 51, 84, .07);
}
.card:hover { border-color: var(--sky); color: var(--ink); }
.card p { color: var(--muted); }
.card .more { color: var(--blue); font-weight: 700; }
.card h2 { font-size: 1.25rem; }
.band { background: var(--mist); }
.section:not(.band) { background: var(--surface); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 36px; }
.stack { display: grid; gap: 12px; align-content: start; }
.muted { color: var(--muted); }
.plans { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.plans li { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 999px; font-weight: 600; }

/* Hours */
.hours { width: 100%; max-width: 420px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { text-align: left; padding: 7px 8px 7px 0; white-space: nowrap; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours th { font-weight: 600; width: 40%; }
.hours td.closed { color: var(--muted); }

/* Also at our location */
.neighbors { display: grid; gap: 6px; padding: 18px 20px; border-left: 4px solid var(--sky); background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; }
.band .neighbors { background: var(--bg); }

/* Page header (inner pages) */
.page-head { padding: 48px 0 40px; position: relative; overflow: hidden; }
.page-head .wrap { display: grid; gap: 10px; position: relative; }
.page-head h1 { color: #ffffff; }
.page-head .post-meta { color: var(--navy-muted); }
/* Real logo, top right of each inner page's header band */
.page-head::after {
  content: ""; position: absolute; top: 50%; transform: translateY(-50%);
  right: max(20px, calc((100% - var(--wrap)) / 2 + 20px));
  width: 124px; height: 124px; border-radius: 18px;
  background: #ffffff url("logo-full-800.webp") center / 96px auto no-repeat;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .25); pointer-events: none;
}
@media (min-width: 761px) { .page-head .wrap { padding-right: 180px; } }
@media (max-width: 760px) { .page-head::after { width: 64px; height: 64px; border-radius: 12px; background-size: 50px auto; top: 22px; transform: none; } .page-head .wrap { padding-right: 90px; } }

/* Closing call band */
.cta-band { padding: 48px 0; text-align: center; }
.cta-band .wrap { display: grid; gap: 12px; justify-items: center; }
.cta-band h2 { color: #ffffff; }
.cta-band p { color: var(--navy-muted); }
.cta-band .call-btn { font-size: 1.1rem; padding: 13px 22px; margin-top: 6px; }
.page-body { padding: 40px 0 56px; }
.note { padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.faq { display: grid; gap: 10px; max-width: 66ch; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details[open] summary { margin-bottom: 8px; }
.post-list { display: grid; gap: 14px; max-width: 66ch; list-style: none; padding: 0; margin: 0; }
.post-list a { font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.post-meta { color: var(--muted); font-size: .9rem; }

/* Footer */
.site-footer { padding: 44px 0 28px; font-size: .95rem; border-top: 1px solid rgba(255,255,255,.12); }
.site-footer .split { gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h2 { font-size: 1.05rem; letter-spacing: .04em; margin-bottom: 8px; color: var(--leaf-soft); }
.site-footer .muted, .site-footer .hours td.closed { color: var(--navy-muted); }
.site-footer .hours th, .site-footer .hours td { border-bottom-color: rgba(255,255,255,.14); }
.site-footer .fine { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.14); color: var(--navy-muted); display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .85rem; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); line-height: 1.05; }
.footer-brand > span { display: grid; }
.footer-brand b { font-weight: 400; letter-spacing: .14em; color: #ffffff; }
.footer-brand span span { font-size: .72rem; letter-spacing: .2em; color: var(--leaf-soft); }

@media (prefers-reduced-motion: no-preference) {
  .card, .call-btn, .nav a { transition: background-color .15s, border-color .15s, color .15s; }
}

/* Learn: badges and video */
.badge { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; margin-right: 10px; vertical-align: middle; }
.video { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #0d2436; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { font: inherit; font-weight: 700; font-size: 1.05rem; background: var(--blue); color: var(--on-blue); border: 0; border-radius: 999px; padding: 12px 22px; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.video-play:hover, .video-play:focus-visible { background: #005a96; }
.more-link { margin-top: 18px; }
.prose a { overflow-wrap: anywhere; }
