/* Shared structure for the NorWeb Clinic demo websites.
   Each page sets its look with --c-* tokens, --font-d, --font-b and --radius, and styles its own hero. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--c-bg); color: var(--c-ink); font-family: var(--font-b);
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  --nwc-accent: var(--c-accent); --nwc-on-accent: var(--c-on-accent); --nwc-ink: var(--c-ink);
  --nwc-muted: var(--c-muted); --nwc-line: var(--c-line); --nwc-surface: var(--c-surface);
  --nwc-soft: var(--c-soft); --nwc-font: var(--font-b);
}
svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-d); margin: 0; line-height: 1.1; text-wrap: balance; overflow-wrap: break-word; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
main { overflow-x: clip; }
.sec { padding: 92px 0; }
.sec-head { max-width: 680px; }
.sec-head p { color: var(--c-muted); margin-top: 14px; font-size: 1.08rem; }
.note { color: var(--c-muted); font-size: 14px; margin-top: 20px; }

/* Demo bar: the same on all three websites */
.demo-bar { background: #0F2427; color: #D4E6E3; font-family: "Figtree", system-ui, sans-serif; font-size: 14px; line-height: 1.4; }
.demo-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-height: 44px; padding: 7px 0; }
.demo-bar b { color: #FFFFFF; font-weight: 700; }
.demo-bar a { color: #FFFFFF; font-weight: 600; text-underline-offset: 3px; }
.demo-bar .links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.demo-bar .get { color: #0F2427; background: #7FD3C3; padding: 4px 12px; border-radius: 999px; text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px;
  padding: 12px 24px; border-radius: var(--btn-radius, 999px); border: 1.5px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-a { background: var(--c-accent); color: var(--c-on-accent); }
.btn-o { border-color: currentColor; background: transparent; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Services and team blocks (filled by nwc.js; pages restyle them) */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.svc-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.svc-card h3 { font-size: 1.2rem; }
.svc-meta { color: var(--c-muted); font-size: 15px; }
.svc-price { font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; margin-top: auto; padding-top: 10px; }
.svc-link { font-weight: 700; color: var(--c-accent); text-underline-offset: 3px; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.team-card { display: flex; flex-direction: column; gap: 16px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 24px; }
.team-av { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--c-soft); color: var(--c-accent); font-family: var(--font-d); font-weight: 700; font-size: 1.5rem; }
.team-card h3 { font-size: 1.25rem; }
.team-role { color: var(--c-accent); font-weight: 700; font-size: 15px; margin: 4px 0 10px; }
.team-card p:last-child { color: var(--c-muted); font-size: 15px; }

/* Booking */
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 40px; }
.book-grid .nwc-book, .book-grid .nwc-wa { min-height: 580px; border-radius: var(--radius); }
.book-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 10px; }

/* Visit */
.visit-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: stretch; margin-top: 40px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; align-content: start; }
.facts h3 { font-family: var(--font-b); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 6px; }
.facts p { color: var(--c-muted); font-size: 16px; }
.facts p b { color: var(--c-ink); font-weight: 700; }
.map { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 340px; border: 1px solid var(--c-line); }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.m-bg { fill: var(--map-bg); }
.m-blk { fill: var(--map-blk); }
.m-park { fill: var(--map-park); }
.m-hw { fill: none; stroke: var(--map-hw); stroke-width: 18; stroke-linecap: round; }
.m-rd { fill: none; stroke: var(--map-rd); stroke-width: 11; stroke-linecap: round; }
.m-pin path { fill: var(--map-pin); }
.m-pin-dot { fill: #FFFFFF; }
.map-label { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); background: var(--c-surface); color: var(--c-ink); font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); white-space: nowrap; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; margin-top: 32px; max-width: 820px; }
.faq details { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.faq details p { color: var(--c-muted); padding-bottom: 16px; }

/* Footer */
.site-foot { padding: 44px 0 110px; font-size: 14px; color: var(--c-muted); border-top: 1px solid var(--c-line); }
.site-foot .wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 24px; }
.site-foot b { color: var(--c-ink); display: block; margin-bottom: 6px; }
.site-foot a { text-underline-offset: 3px; }

@media (max-width: 960px) {
  .svc-grid, .team-grid { grid-template-columns: 1fr 1fr; }
  .book-grid, .visit-grid { grid-template-columns: 1fr; }
  .site-foot .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sec { padding: 68px 0; }
  .svc-grid, .team-grid, .facts { grid-template-columns: 1fr; }
  .demo-bar .links { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Motion kit (pairs with assets/motion.js) =====
   .fx = motion allowed, .still = reduced motion, .sda / .no-sda = native scroll-driven animations or not.
   Scenes pin on wide, tall screens; on phones they scrub as they pass through the view. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-chars] .w { display: inline-block; white-space: nowrap; }
[data-chars] .c, [data-words] .w { display: inline-block; }
[data-tilt] { position: relative; }

@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes reveal-up { from { opacity: 0; translate: 0 36px; } }
@keyframes char-rise { from { opacity: 0; transform: translateY(.55em) rotate(7deg); } }
@keyframes word-on { from { opacity: .14; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-22px); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes in-out { 0% { opacity: 0; transform: translateY(22px); } 22%, 78% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-22px); } }
@keyframes lit { from { opacity: .3; } to { opacity: 1; } }

/* Page progress line in the header: decorative, native only */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--c-accent); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    .progress { animation: grow-x linear both; animation-timeline: scroll(root); }
  }
}

/* Reveal on enter */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .fx .reveal { animation: reveal-up linear both; animation-timeline: view(); animation-range: entry calc(var(--d, 0) * 12%) entry calc(75% + var(--d, 0) * 12%); }
  }
}
.fx.no-sda.io .reveal { opacity: 0; translate: 0 36px; transition: opacity .8s cubic-bezier(.2, .7, .2, 1), translate .8s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0) * 90ms); }
.fx.no-sda.io .reveal.in { opacity: 1; translate: 0 0; }

/* Headline characters rise on load */
@media (prefers-reduced-motion: no-preference) {
  .fx [data-chars] .c { animation: char-rise .75s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(80ms + var(--i) * 15ms); }
}

/* Words light up as you scroll */
[data-words] .w {
  --a: calc(var(--A, 0) + (var(--B, 1) - var(--A, 0)) * var(--i) / var(--n, 1));
  --b: calc(var(--A, 0) + (var(--B, 1) - var(--A, 0)) * (var(--i) + 1) / var(--n, 1));
}
.fx [data-words] .w { animation-name: word-on; }
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .fx [data-words="solo"] { view-timeline: --words block; }
    .fx [data-words="solo"] .w { animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: --words; animation-range: cover calc(18% + var(--a) * 36%) cover calc(18% + var(--b) * 36%); }
  }
}
.fx.no-sda [data-words="solo"] .w { animation-duration: 1s; animation-timing-function: linear; animation-fill-mode: both; animation-play-state: paused; animation-delay: calc((var(--a) - var(--p, 0)) / (var(--b) - var(--a)) * 1s); }

/* Scenes: a tall section with a sticky stage. --a and --b set where in the scene each piece moves (0 to 1). */
@media (min-width: 900px) and (min-height: 620px) {
  .fx .scene { height: var(--scene-h, 300vh); }
  .fx .scene > .stage { position: sticky; top: var(--stick, 0px); height: calc(100vh - var(--stick, 0px)); height: calc(100svh - var(--stick, 0px)); overflow: hidden; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .fx .scene { view-timeline: --scene block; }
    .fx .scrub { animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: --scene; animation-range: cover calc(15% + var(--a, 0) * 60%) cover calc(15% + var(--b, 1) * 60%); }
  }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) and (min-height: 620px) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .fx .scrub, .fx .scrub-pin { animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: --scene; animation-range: contain calc(var(--a, 0) * 100%) contain calc(var(--b, 1) * 100%); }
  }
}
.fx.no-sda .scrub { animation-duration: 1s; animation-timing-function: linear; animation-fill-mode: both; animation-play-state: paused; animation-delay: calc((var(--a, 0) - var(--p, 0)) / (var(--b, 1) - var(--a, 0)) * 1s); }
@media (min-width: 900px) and (min-height: 620px) {
  .fx.no-sda .scrub-pin { animation-duration: 1s; animation-timing-function: linear; animation-fill-mode: both; animation-play-state: paused; animation-delay: calc((var(--a, 0) - var(--p, 0)) / (var(--b, 1) - var(--a, 0)) * 1s); }
}

/* Pointer craft */
.fx [data-tilt] { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.fx [data-tilt].tilting { transition-duration: .12s; }
.fx [data-tilt]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .55), transparent 42%); opacity: 0; transition: opacity .35s; }
.fx [data-tilt]:hover::after { opacity: 1; }
.fx [data-magnet] { transition: translate .4s cubic-bezier(.2, .7, .2, 1), transform .15s; }
.cursor-ring { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; opacity: 0; transition: opacity .3s; }
.cursor-ring.on { opacity: 1; }
.cursor-ring i { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--c-accent); transition: transform .35s cubic-bezier(.2, .7, .2, 1), background .35s; }
.cursor-ring b { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); font: 800 10px/1 var(--font-b); letter-spacing: .16em; text-transform: uppercase; color: var(--c-on-accent); opacity: 0; transition: opacity .25s; white-space: nowrap; }
.cursor-ring.hov i { transform: scale(1.6); }
.cursor-ring.big i { transform: scale(2.3); background: var(--c-accent); border-color: transparent; }
.cursor-ring.big b { opacity: 1; }
