/* Better Massage Bedford: ivory, midnight and the gold of their logo. Scroll tells the story; photos open through a golden iris, never slide. */
:root { --ivory: #fbf8f2; --ivory2: #f2ece1; --night: #17202b; --night2: #222d3b; --gold: #d6b25e; --gold-d: #a8822f; --mute: #6c675e; --line: #e6dfd2; --g: clamp(18px, 4vw, 40px); --ease: cubic-bezier(.22, 1, .36, 1); --head: 'Marcellus', Georgia, serif; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
body { margin: 0; background: var(--ivory); color: var(--night); font: 400 17px/1.65 Jost, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--head); font-weight: 400; line-height: 1.05; letter-spacing: -.01em; }
em { font-style: normal; background: linear-gradient(100deg, var(--gold-d), var(--gold) 45%, #f3dc9b 55%, var(--gold-d)); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gold 6s ease-in-out infinite; }
@keyframes gold { 0%, 100% { background-position: 0 0; } 50% { background-position: 100% 0; } }
.wrap { width: min(100% - 2 * var(--g), 1180px); margin-inline: auto; }
.sec { padding: clamp(80px, 11vw, 140px) 0; }
.kick { font-size: 12.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-d); margin-bottom: 16px; }
.h2 { font-size: clamp(38px, 5.6vw, 72px); margin-bottom: 18px; }
.sub { color: var(--mute); font-size: 18px; max-width: 520px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.demo-bar { position: relative; z-index: 120; background: #050606; color: #cfd3d1; font: 500 12.5px/1.4 system-ui, -apple-system, sans-serif; text-align: center; padding: 6px 16px; }
.demo-bar strong { color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 17px 28px; border-radius: 999px; background: var(--night); color: var(--ivory); font-weight: 600; font-size: 16px; position: relative; overflow: hidden; isolation: isolate; transition: color .4s; }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, var(--gold-d), var(--gold), #f3dc9b); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.btn:hover { color: var(--night); }
.btn:hover::before { transform: scaleX(1); }
.btn.line { background: transparent; color: var(--night); box-shadow: inset 0 0 0 1.5px var(--night); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* intro: a gold ring draws itself, their logo appears, a sheen passes */
.intro { position: fixed; inset: 0; z-index: 200; background: #fff; display: none; place-items: center; pointer-events: none; }
html.js .intro { display: grid; }
.ring { position: absolute; width: min(70vmin, 420px); height: auto; }
.ring circle { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: center; }
.intro-logo { position: relative; width: min(56vmin, 340px); opacity: 0; }
.sheen { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .85) 50%, transparent 60%); transform: translateX(-100%); }

/* header */
.top { position: fixed; inset: 0 0 auto; z-index: 100; display: flex; align-items: center; gap: 28px; padding: 14px var(--g); margin-top: var(--bar, 0px); transition: background .4s, box-shadow .4s, transform .5s var(--ease); }
.top.solid { background: rgba(251, 248, 242, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.top.hide { transform: translateY(-120%); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; font: 400 22px/1 var(--head); }
.brand small { display: block; font: 600 10.5px/1.6 Jost, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-d); }
.mark { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--gold); }
.mark i { position: absolute; left: 50%; top: 5px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--gold); }
.nav { display: flex; gap: 26px; font-weight: 500; font-size: 15px; }
.nav a { position: relative; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: var(--gold); transform: scaleX(0); transition: transform .4s var(--ease); }
.nav a:hover::after { transform: scaleX(1); }
.pill { padding: 11px 20px; border-radius: 999px; background: var(--night); color: var(--ivory); font-weight: 600; font-size: 15px; }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; width: min(100% - 2 * var(--g), 1240px); margin: 0 auto; padding: 130px 0 80px; min-height: 92svh; }
.h1 { font-size: clamp(54px, 8.4vw, 124px); line-height: .96; }
.h1 .ln { display: block; }
.lead { max-width: 520px; margin: 24px 0 32px; font-size: clamp(17px, 1.5vw, 19px); color: #3f3a33; }
.hero-art { position: relative; }
.frame { position: relative; z-index: 1; aspect-ratio: 4/3.2; border-radius: 50% 50% 28px 28px / 38% 38% 28px 28px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(23, 32, 43, .5); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.halo { position: absolute; left: 50%; top: 46%; width: 118%; height: auto; transform: translate(-50%, -50%); pointer-events: none; }
.halo circle { fill: none; stroke: var(--gold); stroke-width: 1; opacity: .55; stroke-dasharray: 4 10; animation: spin 60s linear infinite; transform-origin: center; }
.halo circle + circle { stroke-dasharray: none; opacity: .3; animation-direction: reverse; animation-duration: 90s; }
@keyframes spin { to { transform: rotate(360deg); } }
html.js .hero-txt > :not(.h1), html.js .hero-art { opacity: 0; transform: translateY(22px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
html.js .ready .hero-txt > *, html.js .ready .hero-art { opacity: 1; transform: none; }
.ready .lead { transition-delay: .3s; } .ready .ctas { transition-delay: .45s; } .ready .hero-art { transition-delay: .2s; }

.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.w > span { display: inline-block; }
html.js .split .w > span { transform: translateY(110%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 60ms); }
html.js .split.in .w > span, html.js .ready .h1 .w > span { transform: none; }

/* story: pinned; each photo opens through a golden iris over the last */
.story { background: var(--night); color: var(--ivory); }
.story .kick { color: var(--gold); }
.story-pin { min-height: 100svh; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 80px); align-items: center; width: min(100% - 2 * var(--g), 1240px); margin: 0 auto; padding: 100px 0 50px; }
.story-art { position: relative; aspect-ratio: 4/3.4; border-radius: 26px; overflow: hidden; background: var(--night2); }
.shot { position: absolute; inset: 0; margin: 0; clip-path: circle(var(--r, 0%) at 50% 50%); }
.shot.base { --r: 75%; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.iris { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.iris circle { fill: none; stroke: var(--gold); stroke-width: .6; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(214, 178, 94, .8)); }
.steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 4px; }
.steps li { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid rgba(251, 248, 242, .12); opacity: .32; transition: opacity .6s var(--ease); }
.steps li.on { opacity: 1; }
.steps span { font-family: var(--head); color: var(--gold); font-size: 15px; line-height: 1.9; }
.steps b { font: 400 24px/1.2 var(--head); }
.steps p { color: rgba(251, 248, 242, .65); font-size: 15px; }
html:not(.gs) .shot { position: relative; inset: auto; clip-path: none; }
html:not(.gs) .story-art { aspect-ratio: auto; display: grid; gap: 8px; background: none; }
html:not(.gs) .iris { display: none; }

/* pressure points down the spine */
.points { background: var(--ivory2); }
.pts-pin { min-height: 100svh; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 80px); align-items: center; width: min(100% - 2 * var(--g), 1180px); margin: 0 auto; padding: 90px 0 40px; }
.spine-wrap { position: relative; height: min(76svh, 640px); }
.spine { position: absolute; left: 0; top: 0; height: 100%; width: auto; overflow: visible; }
.sp-line { fill: none; stroke: rgba(168, 130, 47, .35); stroke-width: 2; stroke-dasharray: 3 8; }
.vert circle { fill: var(--ivory); stroke: var(--gold); stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.vert circle.lit { fill: var(--gold); filter: drop-shadow(0 0 10px rgba(214, 178, 94, .95)); }
.pts { list-style: none; padding: 0; margin: 0; position: absolute; left: clamp(110px, 14vw, 150px); right: 0; top: 0; height: 100%; }
.pts li { position: absolute; top: var(--y); transform: translateY(-50%); display: grid; gap: 2px; padding-left: 18px; border-left: 2px solid var(--gold); }
.pts b { font: 400 clamp(22px, 2.4vw, 30px)/1.15 var(--head); }
.pts span { color: var(--mute); font-size: 15px; }
html.js.gs .pts li { opacity: 0; }

/* membership card: flips over, then gets stamped */
.card-sec { background: var(--night); color: var(--ivory); }
.card-sec .kick { color: var(--gold); }
.card-sec .sub { color: rgba(251, 248, 242, .7); }
.card-pin { min-height: 100svh; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 80px); align-items: center; width: min(100% - 2 * var(--g), 1180px); margin: 0 auto; padding: 90px 0 40px; }
.count { margin-top: 26px; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: rgba(251, 248, 242, .6); }
.count b { font: 400 48px/1 var(--head); color: var(--gold); letter-spacing: 0; margin-right: 6px; font-variant-numeric: tabular-nums; }
.card-3d { perspective: 1400px; display: grid; justify-items: center; gap: 20px; }
.card-in { position: relative; width: min(100%, 460px); aspect-ratio: 1.6; transform-style: preserve-3d; }
.face { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: 26px; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .7); }
.back { transform: rotateY(180deg); background: radial-gradient(circle at 30% 20%, #2e3b4d, var(--night)); display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; border: 1px solid rgba(214, 178, 94, .4); }
.back b { font: 400 32px/1 var(--head); color: var(--gold); }
.back small { letter-spacing: .3em; text-transform: uppercase; font-size: 12px; color: rgba(251, 248, 242, .6); }
.mk { position: relative; width: 52px; height: 52px; border-radius: 50%; border: 2.5px solid var(--gold); }
.mk i { position: absolute; left: 50%; top: 8px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--gold); }
.front { background: linear-gradient(135deg, #f3dc9b, var(--gold) 45%, var(--gold-d)); color: var(--night); display: grid; grid-template-rows: auto 1fr auto; }
.mt { font: 400 28px/1 var(--head); }
.mf { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-content: center; }
.stamps span { aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(23, 32, 43, .35); position: relative; }
.stamps span::after { content: ''; position: absolute; inset: 14%; border-radius: 50%; background: var(--night); opacity: 0; transform: scale(1.8) rotate(-20deg); box-shadow: inset 0 0 0 3px var(--gold); }
.stamps span.on::after { opacity: 1; transform: none; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; }
.real { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(251, 248, 242, .55); }
.real img { width: 120px; border-radius: 8px; opacity: .85; }
html:not(.gs) .card-in { transform: none; }
html:not(.gs) .back { display: none; }

/* insurance clock: the hands sweep to 1:00 as you scroll */
.clock-in { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 6vw, 90px); align-items: center; }
.clock { width: clamp(180px, 24vw, 280px); height: auto; }
.c-face { fill: #fff; stroke: var(--gold); stroke-width: 2; filter: drop-shadow(0 20px 30px rgba(23, 32, 43, .12)); }
.ticks line { stroke: var(--night); stroke-width: 2.5; stroke-linecap: round; opacity: .5; }
.h-hand, .m-hand { stroke: var(--night); stroke-linecap: round; transform-origin: 100px 100px; }
.h-hand { stroke-width: 6; transform: rotate(270deg); } .m-hand { stroke-width: 3.5; stroke: var(--gold-d); }
html:not(.gs) .h-hand { transform: rotate(30deg); }

/* book */
.book-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.phone { display: inline-block; margin: 22px 0 22px; font: 400 clamp(38px, 4.4vw, 56px)/1 var(--head); }
.btn.line.dark { box-shadow: inset 0 0 0 1.5px var(--night); }
.addr { margin-top: 20px; color: var(--mute); }
.map { width: 100%; aspect-ratio: 1; border: 0; border-radius: 50% 50% 28px 28px / 40% 40% 28px 28px; background: var(--ivory2); }
.foot { background: var(--night); color: rgba(251, 248, 242, .7); padding: 46px 0 110px; font-size: 15px; }
.foot-in { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.foot-logo { width: 130px; border-radius: 12px; background: #fff; padding: 6px; }
.fab { position: fixed; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 95; display: none; padding: 15px 24px; border-radius: 999px; background: var(--night); color: var(--ivory); font-weight: 600; box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .5), inset 0 0 0 1.5px var(--gold); transform: translateY(160%); transition: transform .6s var(--ease); }
.fab.on { transform: none; }

@media (max-width: 920px) {
  .nav { display: none; }
  .hero, .story-pin, .pts-pin, .card-pin, .book-in { grid-template-columns: 1fr; }
  .hero { padding-top: 110px; min-height: 0; }
  .story-pin { padding: 76px 0 20px; gap: 14px; align-content: center; }
  .story-art { aspect-ratio: 4/3; }
  .story .h2 { font-size: 30px; margin-bottom: 4px; }
  .steps { margin-top: 6px; } .steps li { padding: 8px 0; } .steps p { display: none; } .steps b { font-size: 19px; }
  .pts-pin, .card-pin { padding: 76px 0 20px; gap: 12px; align-content: center; }
  .pts-head .sub { display: none; } .points .h2 { font-size: 34px; margin-bottom: 0; }
  .spine-wrap { height: 62svh; }
  .pts { left: 84px; } .pts b { font-size: 19px; } .pts span { font-size: 13.5px; }
  .card-sec .h2 { font-size: 34px; margin-bottom: 6px; } .card-sec .sub { font-size: 15px; } .count { margin-top: 8px; } .count b { font-size: 34px; }
  .card-3d { order: -1; } .real { display: none; }
  .clock-in { grid-template-columns: 1fr; justify-items: start; }
  .fab { display: block; }
}
@media (max-width: 560px) {
  .pill { padding: 10px 14px; font-size: 14px; white-space: nowrap; }
  .brand { font-size: 19px; }
  .brand small { font-size: 9.5px; letter-spacing: .14em; white-space: nowrap; }
  .ctas .btn { flex: 1 1 100%; }
  .face { padding: 16px; } .mt { font-size: 20px; } .stamps { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .intro { display: none; }
  html.js .hero-txt > *, html.js .hero-art { opacity: 1; transform: none; }
  html.js .split .w > span { transform: none; }
}

/* booking flow in Bedford's colours */
html .bk { --bk-accent: #b8913c; --bk-ink: #17202b; --bk-bg: #fbf8f2; --bk-soft: #ece4d5; --bk-head: 'Marcellus', Georgia, serif; }

/* demo bar pinned to the top at all times; page, header and booking panel start below it */
