/* ==========================================================================
   Prosperly — site styles

   One file, no framework. Colour, type and spacing tokens sit on :root; every
   section reads them. Three rules hold throughout:

   1. No inline styles anywhere. The CSP is style-src 'self', so a style=""
      attribute would be refused. Per-logo aspect ratios, per-brand colours
      and animation delays are therefore classes, not attributes.
   2. Motion is opt-in. Every animation sits inside
      @media (prefers-reduced-motion: no-preference); the base styles are the
      finished state, so a visitor who asks for less motion sees the page
      complete and still.
   3. Reveal-on-scroll is CSS scroll-driven animation, behind @supports. A
      browser without it shows the content immediately; nothing waits on
      JavaScript to become visible.
   ========================================================================== */

/* ---------- Fonts (self-hosted; OFL licences sit beside the files) ---------- */
@font-face {
  font-family: 'Figtree';
  src: url('/static/fonts/figtree-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/static/fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/static/fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  /* Ink and paper: the house colours. */
  --ink: #0b0d12;
  --ink-2: #10131a;
  --paper: #f6f3ee;
  --paper-2: #eee9e1;
  --white: #ffffff;

  --text: #0b0d12;
  --text-2: #464b55;
  --text-3: #62666f;
  --rule: rgba(11, 13, 18, 0.12);

  --on-dark: #f3efe8;
  --on-dark-2: rgba(243, 239, 232, 0.74);
  --on-dark-3: rgba(243, 239, 232, 0.58);
  --rule-dark: rgba(243, 239, 232, 0.14);

  /* The spectrum: teal, violet, rose and gold, drawn from the brands Prosperly
     builds for. Decorative only; never carries text that has to be read. */
  --sp-1: #3ec7e0;
  --sp-2: #8f7dff;
  --sp-3: #ff4f8f;
  --sp-4: #f2c26f;
  --spectrum: linear-gradient(90deg, var(--sp-1), var(--sp-2) 36%, var(--sp-3) 68%, var(--sp-4));

  /* Brand colours, sampled from each brand's own artwork. */
  --transform: #e33172;
  --electiva: #0d2a3a;
  --electiva-plus: #22b0d1;
  --lbf: #213946;
  --signature: #0d0c0b;
  --signature-gold: #c9a458;
  --surgerly-gold: #be9b5a;
  --surgerly-ink: #1a1714;

  --font-sans: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 4.5vw, 56px);
  --radius: 22px;
  --nav-h: 76px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html.menu-open body { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
p, h1, h2, h3, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: inherit; }
/* :where() keeps this at zero specificity, so a component's own padding
   (.journey__steps, for one) is not silently reset by it. */
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button { font: inherit; color: inherit; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }

::selection { background: #ff4f8f; color: #fff; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 6px;
}
main:focus { outline: none; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--on-dark);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s;
}
.skip:focus { transform: none; }

/* ---------- Logos ----------
   Inline SVGs sized by one dimension; the aspect ratio supplies the other.
   Brand-coloured parts (.accent) fall back to the text colour, so the same
   artwork serves the monochrome strip and the full-colour cards. */
.logo { width: auto; height: auto; }
.logo .accent { fill: var(--logo-accent, currentColor); }
.logo .mark { fill: var(--logo-mark, currentColor); }
.logo .sub { opacity: 0.72; }
.logo--prosperly { aspect-ratio: 2907 / 437; }
.logo--signature { aspect-ratio: 2879 / 843; }
.logo--labelleforme { aspect-ratio: 3626 / 1211; }
.logo--electiva { aspect-ratio: 1301 / 430; }
.logo--transform { aspect-ratio: 409 / 43; }
.logo--surgerly { aspect-ratio: 3273 / 819; }
.logo--surgerly-mark { aspect-ratio: 921 / 811; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Type ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow--dark { color: var(--on-dark-2); }
.eyebrow--gold { color: #d8bb80; }
.eyebrow__rule {
  width: 2.5rem;
  height: 1px;
  flex: none;
  background: var(--spectrum);
}

.h1, .h2 {
  font-weight: 320;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
}
.h1 { font-size: clamp(3rem, 1.6rem + 5.4vw, 6.25rem); }
.h2 { font-size: clamp(2.35rem, 1.45rem + 3.5vw, 4.6rem); }

/* The serif italic carries the one word in each headline that holds the idea.
   Instrument Serif runs small beside Figtree, hence the 1.1em. */
.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -0.015em;
}
/* Gradient-filled serif. The padding gives the italic's overhang somewhere to
   paint: background-clip: text only fills the element's own box. */
.serif--spectrum {
  padding: 0 0.08em 0.06em 0.02em;
  margin: 0 -0.04em 0 -0.02em;
  background: linear-gradient(100deg, var(--sp-1) 0%, var(--sp-2) 34%, var(--sp-3) 66%, var(--sp-4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lead {
  max-width: 40rem;
  font-size: clamp(1.125rem, 1rem + 0.42vw, 1.3125rem);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.lead--dark { color: var(--on-dark-2); }

/* ---------- Buttons and links ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--on-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 54px;
  padding: 0.85rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), background-color 0.25s;
}
.btn .icon { width: 1.15em; height: 1.15em; transition: transform 0.45s var(--ease-out); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -14px rgba(0, 0, 0, 0.5); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(0); }
.btn--light { --btn-bg: var(--on-dark); --btn-fg: var(--ink); }
.btn--ink { --btn-bg: var(--ink); --btn-fg: var(--on-dark); }
.btn--gold { --btn-bg: var(--surgerly-gold); --btn-fg: #15120e; }
.btn--block { width: 100%; }
.btn--nav { min-height: 42px; padding: 0.55rem 1.15rem; font-size: 0.9375rem; }

.link-quiet {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid currentColor;
  font-weight: 600;
  text-decoration: none;
}
.link-quiet .icon { width: 1.1em; height: 1.1em; transition: transform 0.45s var(--ease-out); }
.link-quiet:hover .icon { transform: translateY(3px); }
.link-quiet--dark { color: var(--on-dark); border-bottom-color: rgba(243, 239, 232, 0.36); }
.link-quiet--dark:hover { border-bottom-color: var(--on-dark); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  color: var(--on-dark);
  transition: color 0.35s;
}
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-rule);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  opacity: 0;
  transition: opacity 0.35s, background-color 0.35s, border-color 0.35s;
}
.nav.is-scrolled::before { opacity: 1; }
.nav[data-theme="dark"] {
  --nav-bg: rgba(11, 13, 18, 0.66);
  --nav-rule: rgba(243, 239, 232, 0.08);
  color: var(--on-dark);
}
.nav[data-theme="light"] {
  --nav-bg: rgba(246, 243, 238, 0.8);
  --nav-rule: rgba(11, 13, 18, 0.08);
  color: var(--ink);
}
.nav[data-theme="dark"] .btn--nav { --btn-bg: var(--on-dark); --btn-fg: var(--ink); }
.nav[data-theme="light"] .btn--nav { --btn-bg: var(--ink); --btn-fg: var(--on-dark); }

.nav__bar {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav__brand { display: inline-flex; flex: none; padding: 0.6rem 0; margin-right: auto; text-decoration: none; }
.nav__logo { height: 21px; }
.nav__links { display: none; gap: 2.1rem; }
.nav__links a {
  position: relative;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.2rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { opacity: 1; }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { display: none; }
.nav__toggle {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.nav__toggle .icon { width: 22px; height: 22px; }

/* Six links and the call to action need about 1,000px on one line; below
   that the menu button takes over rather than letting the links wrap. */
@media (min-width: 1100px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; white-space: nowrap; }
  .nav__toggle { display: none; }
}

/* The menu is a native popover: Escape and an outside click close it. */
.menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0 0 2rem;
  border: 0;
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(143, 125, 255, 0.22), transparent 70%),
    radial-gradient(60% 40% at 0% 100%, rgba(62, 199, 224, 0.16), transparent 70%),
    var(--ink);
  color: var(--on-dark);
  overflow-y: auto;
}
.menu:popover-open { display: flex; flex-direction: column; }
.menu::backdrop { background: rgba(0, 0, 0, 0.5); }
.menu__head {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
}
.menu__logo { height: 21px; }
.menu__links { display: flex; flex-direction: column; padding-top: 1.5rem; }
.menu__links a {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--rule-dark);
  font-size: clamp(1.75rem, 1.2rem + 3vw, 2.5rem);
  font-weight: 320;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-decoration: none;
}
.menu__links span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--on-dark-3);
  letter-spacing: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .menu { transition: opacity 0.35s var(--ease-out), translate 0.35s var(--ease-out), overlay 0.35s allow-discrete, display 0.35s allow-discrete; }
  .menu:popover-open { opacity: 1; translate: 0 0; }
  @starting-style {
    .menu:popover-open { opacity: 0; translate: 0 -12px; }
  }
}

/* ---------- Shared section furniture ---------- */
.section {
  position: relative;
  padding: clamp(5.5rem, 4rem + 6vw, 10rem) 0;
}
.section__head { max-width: 54rem; margin-bottom: clamp(3rem, 2rem + 3.2vw, 5.5rem); }
.section__head .h2 { margin-bottom: 1.6rem; }
.section__head--split {
  max-width: none;
  display: grid;
  gap: 1.75rem 5rem;
  align-items: end;
}
@media (min-width: 960px) {
  .section__head--split { grid-template-columns: 1.2fr 1fr; }
  .section__head--split .h2 { margin-bottom: 0; }
  .section__head--split .lead { padding-bottom: 0.5rem; }
}

/* Film grain over the dark sections, so the gradients never band. */
.grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--nav-h) + 3.5rem);
  background: var(--ink);
  color: var(--on-dark);
}
/* Keeps the left-hand copy legible over the aurora. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 13, 18, 0.72) 0%, rgba(11, 13, 18, 0.25) 55%, transparent 80%),
    linear-gradient(0deg, rgba(11, 13, 18, 0.55) 0%, transparent 30%);
}
.hero--short { min-height: min(100svh, 760px); justify-content: center; }

.hero__aurora {
  position: absolute;
  inset: -10% -10% -10% -10%;
  z-index: 0;
  pointer-events: none;
}
.hero__aurora i {
  position: absolute;
  width: 62vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  mix-blend-mode: screen;
  opacity: 0.78;
}
.hero__aurora i:nth-child(1) { left: -22vmax; bottom: -30vmax; background: radial-gradient(closest-side, rgba(62, 199, 224, 0.55), transparent 72%); }
.hero__aurora i:nth-child(2) { left: 34%; bottom: -36vmax; background: radial-gradient(closest-side, rgba(143, 125, 255, 0.55), transparent 72%); }
.hero__aurora i:nth-child(3) { right: -16vmax; top: 6%; background: radial-gradient(closest-side, rgba(255, 79, 143, 0.5), transparent 72%); }
.hero__aurora i:nth-child(4) { right: 10%; top: -34vmax; background: radial-gradient(closest-side, rgba(242, 194, 111, 0.42), transparent 72%); }
.hero__aurora--soft i { opacity: 0.56; }
@media (prefers-reduced-motion: no-preference) {
  .hero__aurora i { animation: drift 28s var(--ease-in-out) infinite alternate; will-change: transform; }
  .hero__aurora i:nth-child(2) { animation-duration: 34s; animation-delay: -9s; }
  .hero__aurora i:nth-child(3) { animation-duration: 25s; animation-delay: -5s; }
  .hero__aurora i:nth-child(4) { animation-duration: 31s; animation-delay: -14s; }
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(5vmax, -4vmax, 0) scale(1.1); }
  100% { transform: translate3d(-4vmax, 3vmax, 0) scale(0.95); }
}

.hero__thread {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.hero__thread-line { fill: none; stroke: url(#thread-gradient); stroke-width: 1.6; }
.hero__thread-shadow { fill: none; stroke: rgba(243, 239, 232, 0.09); stroke-width: 1; }
/* On a phone the stretched curve crosses the copy; keep it a whisper there. */
@media (max-width: 760px) {
  .hero__thread { opacity: 0.45; }
}
.hero__thread-dot { fill: #fff; display: none; }
@media (min-width: 1000px) and (prefers-reduced-motion: no-preference) {
  .hero__thread-dot { display: block; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero__thread { animation: reveal-x 2.8s var(--ease-out) 0.35s both; }
}
@keyframes reveal-x {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* Centred in whatever height the strip leaves, so a tall portrait screen does
   not stack the copy at the bottom under an empty sky. */
.hero__inner {
  position: relative;
  z-index: 2;
  margin-block: auto;
  padding-block: clamp(1.5rem, 4vh, 3rem) clamp(3.5rem, 9vh, 7rem);
}
.hero__eyebrow { margin-bottom: 2rem; }
.hero__title {
  margin: 0 0 2rem;
  font-size: clamp(3.1rem, 1.1rem + 7.6vw, 8.5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.048em;
}
.hero__title--small { font-size: clamp(2.8rem, 1.2rem + 6vw, 6.5rem); }
.hero__line { display: block; }
.hero__lead {
  max-width: 37rem;
  margin-bottom: 2.5rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.55;
  color: var(--on-dark-2);
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.25rem; }

.hero__strip {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 3rem;
  padding: 1.9rem 0 2.4rem;
  border-top: 1px solid var(--rule-dark);
}
.hero__strip-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-3);
  white-space: nowrap;
}
.hero__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 3.25rem;
  color: var(--on-dark-2);
}
.hero__logos li { display: flex; }
.hero__logos .logo--transform { height: 14px; }
.hero__logos .logo--electiva { height: 27px; }
.hero__logos .logo--labelleforme { height: 38px; }
.hero__logos .logo--signature { height: 36px; }
@media (max-width: 640px) {
  .hero__logos { display: grid; grid-template-columns: repeat(2, auto); justify-content: start; gap: 1.5rem 2.5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__eyebrow, .hero__line, .hero__lead, .hero__actions, .hero__strip {
    animation: rise 1.2s var(--ease-out) both;
  }
  .hero__line:nth-child(1) { animation-delay: 0.12s; }
  .hero__line:nth-child(2) { animation-delay: 0.24s; }
  .hero__lead { animation-delay: 0.42s; }
  .hero__actions { animation-delay: 0.56s; }
  .hero__strip { animation-delay: 0.8s; }

  .nav__logo path { animation: rise-letter 1s var(--ease-out) both; transform-box: fill-box; }
  .nav__logo path:nth-child(2) { animation-delay: 0.04s; }
  .nav__logo path:nth-child(3) { animation-delay: 0.08s; }
  .nav__logo path:nth-child(4) { animation-delay: 0.12s; }
  .nav__logo path:nth-child(5) { animation-delay: 0.16s; }
  .nav__logo path:nth-child(6) { animation-delay: 0.2s; }
  .nav__logo path:nth-child(7) { animation-delay: 0.24s; }
  .nav__logo path:nth-child(8) { animation-delay: 0.28s; }
  .nav__logo path:nth-child(9) { animation-delay: 0.32s; }
}
@keyframes rise {
  from { opacity: 0; translate: 0 28px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes rise-letter {
  from { opacity: 0; transform: translateY(45%); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Scroll reveal ----------
   Scrubbed by scroll position where supported; elsewhere, simply present.
   It animates `translate`, not `transform`, so it never fights a hover lift. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}
@keyframes reveal-up {
  from { opacity: 0; translate: 0 36px; }
  to   { opacity: 1; translate: 0 0; }
}

/* ---------- Brands ---------- */
.brands { background: var(--paper); }

.brand-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1120px) { .brand-grid { grid-template-columns: repeat(4, 1fr); } }

.brand {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  padding: 1.6rem 1.6rem 1.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  transition: transform 0.7s var(--ease-out), box-shadow 0.7s var(--ease-out);
}
/* A soft top light and a large ring, the same on every card, so four very
   different brands still read as one set. */
.brand::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(130% 70% at 50% -10%, rgba(255, 255, 255, 0.2), transparent 60%);
}
.brand::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 140%;
  aspect-ratio: 1;
  left: -20%;
  top: 22%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 1.2s var(--ease-out);
}
.brand:hover { transform: translateY(-6px); box-shadow: 0 34px 60px -32px rgba(11, 13, 18, 0.6); }
.brand:hover::after { transform: scale(1.08); }

@media (max-width: 639px) {
  .brand { min-height: 380px; }
}
/* The stretched link: its ::after covers the card, so the whole card is the
   target, and the focus ring is drawn on that overlay. */
.brand__link { display: block; width: 100%; color: inherit; text-decoration: none; }
.brand__link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.brand__link:focus-visible { outline: none; }
.brand__link:focus-visible::after { outline: 2px solid #fff; outline-offset: -6px; }
.brand__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 22px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand__kind { opacity: 0.86; }
.brand__arrow { width: 22px; height: 22px; transition: transform 0.5s var(--ease-out); }
.brand:hover .brand__arrow { transform: translate(3px, -3px); }
.brand__logo {
  flex: 1;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 2.75rem 0.5rem;
  font: inherit;
}
.brand__logo .logo { margin-inline: auto; }
.brand__logo .logo { transition: transform 0.9s var(--ease-out); }
.brand:hover .brand__logo .logo { transform: scale(1.045); }
.brand__body { display: grid; gap: 1.1rem; }
.brand__desc { font-size: 1rem; line-height: 1.5; margin: 0; }
.brand__tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.brand__tags span {
  padding: 0.32rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Each card in its own brand's colours. Text sits on the darkest part. */
.brand--transform,
.case--transform .case__brand {
  background: linear-gradient(170deg, #ea4a84 0%, #d42a69 46%, #a9164d 100%);
}
.brand--transform .brand__logo .logo { width: min(100%, 236px); }

.brand--electiva,
.case--electiva .case__brand {
  --logo-accent: var(--electiva-plus);
  background: linear-gradient(170deg, #143a4f 0%, var(--electiva) 55%, #081c27 100%);
}
.brand--electiva .brand__logo .logo { width: min(80%, 168px); }

.brand--labelleforme,
.case--labelleforme .case__brand {
  background: linear-gradient(170deg, #2d4a5a 0%, var(--lbf) 55%, #14262f 100%);
}
.brand--labelleforme .brand__logo .logo { width: min(100%, 236px); }

.brand--signature,
.case--signature .case__brand {
  --logo-accent: var(--signature-gold);
  background: linear-gradient(170deg, #26221d 0%, var(--signature) 60%, #000 100%);
}
.brand--signature .brand__logo .logo { width: min(100%, 240px); }
.brand--signature .brand__tags span { border-color: rgba(201, 164, 88, 0.5); }

/* ---------- What we do ---------- */
.services { background: var(--white); }
.services__grid { display: grid; gap: 3.5rem; }
@media (min-width: 1000px) {
  .services__grid { grid-template-columns: 5fr 7fr; gap: 6rem; }
  .services__head { position: sticky; top: calc(var(--nav-h) + 3.5rem); align-self: start; }
}
.services__head .h2 { margin-bottom: 1.6rem; }
.services__list { border-top: 1px solid var(--rule); }
.service {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.75rem;
  padding: 2.4rem 0 2.6rem;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 640px) { .service { grid-template-columns: 5.5rem 1fr; } }
.service__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--text-3);
  transition: color 0.4s;
}
.service:hover .service__num { color: var(--sp-3); }
.service__title {
  margin-bottom: 0.8rem;
  font-size: clamp(1.6rem, 1.25rem + 1.1vw, 2.15rem);
  font-weight: 420;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.service p { max-width: 36rem; color: var(--text-2); }

.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.35rem; }
.tags span {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
}

/* ---------- Approach ---------- */
.approach {
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 100% 0%, rgba(143, 125, 255, 0.14), transparent 70%),
    radial-gradient(50% 50% at 0% 100%, rgba(62, 199, 224, 0.1), transparent 70%),
    var(--ink-2);
  color: var(--on-dark);
}
.approach > .wrap { position: relative; z-index: 2; }

.journey { position: relative; }
.journey__lines { display: none; }
.journey__main { fill: none; stroke: url(#journey-gradient); stroke-width: 1.6; }
.journey__legacy { fill: none; stroke: url(#legacy-gradient); stroke-width: 1.4; stroke-dasharray: 3 7; stroke-linecap: round; }

.journey__steps {
  position: relative;
  display: grid;
  gap: 2.75rem;
  padding-left: 2.25rem;
}
/* Narrow screens: the line runs down the left. */
.journey__steps::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 1.5px;
  background: linear-gradient(180deg, var(--sp-1), var(--sp-2) 40%, var(--sp-3) 75%, var(--sp-4));
}
.step { position: relative; }
.step__node {
  position: absolute;
  left: calc(-2.25rem);
  top: 0.15rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink-2);
  border: 1.5px solid var(--on-dark);
  box-shadow: 0 0 0 5px var(--ink-2);
}
.step:last-child .step__node { background: var(--sp-4); border-color: var(--sp-4); box-shadow: 0 0 0 5px var(--ink-2), 0 0 24px 4px rgba(242, 194, 111, 0.45); }
.step__num {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--on-dark-3);
}
.step__title {
  margin-bottom: 0.7rem;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.step p { font-size: 1rem; line-height: 1.6; color: var(--on-dark-2); }

.journey__key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin-top: 3.5rem;
  font-size: 0.8125rem;
  color: var(--on-dark-3);
}
.journey__key span { display: inline-flex; align-items: center; gap: 0.7rem; }
.journey__key span::before { content: ''; width: 2.25rem; height: 0; }
.journey__key-new::before { border-top: 1.6px solid var(--sp-2); }
.journey__key-old::before { border-top: 1.4px dashed rgba(243, 239, 232, 0.5); }
.journey__key { display: none; }

@media (min-width: 1040px) {
  .journey__lines {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 48px;
    overflow: visible;
  }
  .journey__steps {
    grid-template-columns: repeat(5, 1fr);
    gap: 2.25rem;
    padding-left: 0;
    padding-top: 5rem;
  }
  .journey__steps::before { display: none; }
  .step__node { left: 0; top: calc(-5rem + 24px - 7px); }
  .journey__key { display: flex; }
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .journey__lines {
        animation: reveal-x linear both;
        animation-timeline: view();
        animation-range: entry 30% cover 45%;
      }
    }
  }
}

/* ---------- Surgerly ---------- */
.surgerly {
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 90% 15%, rgba(190, 155, 90, 0.24), transparent 65%),
    radial-gradient(55% 50% at 0% 100%, rgba(190, 155, 90, 0.12), transparent 70%),
    var(--surgerly-ink);
  color: var(--on-dark);
}
.surgerly > .wrap { position: relative; z-index: 2; }
.surgerly__grid { display: grid; gap: 4.5rem; align-items: center; }
@media (min-width: 1120px) { .surgerly__grid { grid-template-columns: 1.05fr 1fr; gap: 5rem; } }
.surgerly__logo { --logo-mark: var(--surgerly-gold); height: 34px; margin-bottom: 2.75rem; color: #fff; }
.surgerly .h2 { margin-bottom: 1.6rem; }

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem 2.25rem;
  margin: 2.75rem 0 3rem;
}
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.features li { display: grid; grid-template-columns: 42px 1fr; gap: 0.95rem; align-items: start; }
.features .icon {
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid rgba(190, 155, 90, 0.28);
  border-radius: 13px;
  background: rgba(190, 155, 90, 0.1);
  color: #dcc089;
}
.features b { display: block; margin-bottom: 0.15rem; font-weight: 600; font-size: 1rem; line-height: 1.35; }
.features span { display: block; font-size: 0.9375rem; line-height: 1.5; color: var(--on-dark-2); }

/* The mock portal. Bar and accent colours are registered so they interpolate
   rather than step; the figure owns them so the floating toasts follow too. */
@property --mock-bar { syntax: '<color>'; inherits: true; initial-value: #be9b5a; }
@property --mock-accent { syntax: '<color>'; inherits: true; initial-value: #be9b5a; }

.mock {
  --mock-bar: #be9b5a;
  --mock-accent: #be9b5a;
  position: relative;
  margin: 0 auto;
  width: min(100%, 520px);
  perspective: 1800px;
}
.mock__window {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  color: #14161b;
  box-shadow:
    0 60px 110px -50px rgba(0, 0, 0, 0.85),
    0 24px 50px -30px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: rotateY(-8deg) rotateX(3deg);
  transform-origin: 60% 50%;
}
.mock__chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: #f1f0ee;
  border-bottom: 1px solid #e5e3df;
}
.mock__dot { width: 10px; height: 10px; border-radius: 50%; background: #d6d3ce; }
.mock__url {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.9rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  font-size: 0.75rem;
  color: #6b6f78;
}
.mock__url .icon { width: 12px; height: 12px; }
.mock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.4rem;
  background: var(--mock-bar);
}
.mock__logos { position: relative; height: 30px; width: 160px; }
.mock__logo {
  position: absolute;
  left: 0;
  top: 50%;
  translate: 0 -50%;
  color: #fff;
  opacity: 0;
}
.mock__logo--surgerly { height: 24px; opacity: 1; }
.mock__logo--transform { height: 13px; }
.mock__logo--signature { --logo-accent: var(--signature-gold); height: 30px; }
.mock__logo--labelleforme { height: 30px; }
.mock__avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #14161b;
  font-size: 0.72rem;
  font-weight: 700;
}
.mock__body { padding: 1.4rem 1.4rem 1.5rem; }
.mock__hello { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.mock__sub { margin-bottom: 1.1rem; font-size: 0.875rem; color: #6b6f78; }
.mock__card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--mock-accent) 35%, transparent);
  background: color-mix(in srgb, var(--mock-accent) 9%, #fff);
}
.mock__label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #6b6f78; }
.mock__title { margin: 0.2rem 0 0.15rem; font-size: 1rem; font-weight: 650; }
.mock__meta { font-size: 0.8125rem; color: #555a63; }
.mock__card-icon { width: 24px; height: 24px; color: var(--mock-accent); }
.mock__journey { margin-bottom: 1.1rem; }
.mock__journey-head { display: flex; justify-content: space-between; margin-bottom: 0.55rem; font-size: 0.8125rem; font-weight: 600; }
/* Darkened so small text on white passes contrast in every brand's colour. */
.mock__accent-text { color: color-mix(in srgb, var(--mock-accent) 62%, #14161b); }
.mock__steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mock__steps i { height: 6px; border-radius: 99px; background: #ebe9e5; }
.mock__steps i.is-done { background: var(--mock-accent); }
.mock__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mock__tile { padding: 0.9rem 1rem; border: 1px solid #ebe9e5; border-radius: 12px; }
.mock__tile .icon { width: 20px; height: 20px; margin-bottom: 0.6rem; color: var(--mock-accent); }
.mock__tile p { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #6b6f78; }
.mock__tile b { font-size: 0.9375rem; font-weight: 650; }

.mock__toast {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.05rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  color: #14161b;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 24px 44px -22px rgba(0, 0, 0, 0.75);
}
.mock__toast .icon {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  background: var(--mock-accent);
  color: #fff;
}
/* Notifications pop over the edges of the app, never over its content: one
   over the brand bar, one hanging off the bottom of the window. */
.mock__toast--one { right: -1.25rem; top: 3.6rem; }
.mock__toast--two { left: -1.25rem; bottom: 1.75rem; }
@media (min-width: 1240px) {
  .mock__toast--one { right: -2.75rem; }
  .mock__toast--two { left: -2.75rem; }
}
@media (max-width: 640px) {
  .mock__toast { display: none; }
  .mock__window { transform: none; }
}
.mock__caption {
  margin-top: 2.5rem;
  font-size: 0.8125rem;
  color: var(--on-dark-3);
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .mock { animation: mock-cycle 16s infinite var(--ease-in-out); }
  .mock__logo { animation: mock-logo 16s infinite; }
  .mock__logo--surgerly { animation-delay: -0.64s; }
  .mock__logo--transform { animation-delay: 3.36s; }
  .mock__logo--signature { animation-delay: 7.36s; }
  .mock__logo--labelleforme { animation-delay: 11.36s; }
  .mock__toast--one { animation: float 7s ease-in-out infinite; }
  .mock__toast--two { animation: float 8s ease-in-out -3s infinite; }
}
@keyframes mock-cycle {
  0%, 21%   { --mock-bar: #be9b5a; --mock-accent: #be9b5a; }   /* Surgerly */
  25%, 46%  { --mock-bar: #e33172; --mock-accent: #e33172; }   /* Transform */
  50%, 71%  { --mock-bar: #0d0c0b; --mock-accent: #b48d3e; }   /* Signature Clinic */
  75%, 96%  { --mock-bar: #213946; --mock-accent: #2f5b70; }   /* La Belle Forme */
  100%      { --mock-bar: #be9b5a; --mock-accent: #be9b5a; }
}
/* Each logo fades in while its bar colour arrives (local 0–4%, i.e. global
   21–25% given the delays above) and out while the next one arrives (local
   25–29%), so the bar is never without a logo. */
@keyframes mock-logo {
  0%        { opacity: 0; }
  4%, 25%   { opacity: 1; }
  29%, 100% { opacity: 0; }
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

/* ---------- Principles ---------- */
.principles { background: var(--paper); }
.principle-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--rule);
}
@media (min-width: 760px) { .principle-grid { grid-template-columns: 1fr 1fr; } }
.principle {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: clamp(1.75rem, 1rem + 2.6vw, 3.25rem);
  background: var(--paper);
  transition: background-color 0.4s;
}
.principle::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--spectrum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-out);
}
.principle:hover { background: #faf8f4; }
.principle:hover::before { transform: scaleX(1); }
.principle__num {
  margin-bottom: auto;
  padding-bottom: 3.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-3);
}
.principle h3 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.6rem, 1.15rem + 1.5vw, 2.4rem);
  font-weight: 360;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}
.nowrap { white-space: nowrap; }
.principle p { max-width: 30rem; color: var(--text-2); }
@media (max-width: 759px) {
  .principle { min-height: 0; }
  .principle__num { padding-bottom: 1.75rem; }
}

/* ---------- Security ---------- */
.trust { background: var(--white); }
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem 3rem; }
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-grid li { padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.trust-grid .icon { width: 30px; height: 30px; margin-bottom: 1.35rem; color: var(--ink); }
.trust-grid h3 { margin-bottom: 0.5rem; font-size: 1.25rem; font-weight: 550; letter-spacing: -0.012em; }
.trust-grid p { font-size: 1rem; color: var(--text-2); }

/* ---------- About ---------- */
.about { background: var(--paper-2); }
.about__grid { display: grid; gap: 2.5rem; }
@media (min-width: 980px) { .about__grid { grid-template-columns: 1fr 1fr; gap: 6rem; align-items: start; } }
.about__copy > p + p { margin-top: 1.4rem; color: var(--text-2); max-width: 38rem; }
.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
}
@media (min-width: 560px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts b { display: block; margin-bottom: 0.3rem; font-size: 1.375rem; font-weight: 450; letter-spacing: -0.02em; }
.facts span { display: block; font-size: 0.875rem; line-height: 1.45; color: var(--text-3); }

/* ---------- Contact ---------- */
.contact {
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
  color: var(--on-dark);
}
.contact__grid { position: relative; z-index: 2; display: grid; gap: 3.5rem; align-items: center; }
@media (min-width: 1040px) { .contact__grid { grid-template-columns: 1.1fr 1fr; gap: 5.5rem; } }
.contact__title { margin-bottom: 1.75rem; font-size: clamp(2.6rem, 1.4rem + 4.8vw, 5.5rem); }

/* The address is the call to action, so it is set large, as on
   sagittariushealth.com. */
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  max-width: 100%;
  margin-top: 2.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(243, 239, 232, 0.32);
  color: var(--on-dark);
  font-size: clamp(1.35rem, 1.05rem + 1.4vw, 2.25rem);
  font-weight: 350;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: border-color 0.3s;
}
.contact-email .icon { width: 0.8em; height: 0.8em; transition: transform 0.45s var(--ease-out); }
.contact-email:hover { border-bottom-color: var(--on-dark); }
.contact-email:hover .icon { transform: translateX(4px); }
.contact-note { margin-top: 1rem; font-size: 0.875rem; color: var(--on-dark-3); }
.contact-tender {
  max-width: 34rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-dark);
  font-size: 0.9375rem;
  color: var(--on-dark-2);
}
.contact-tender a { color: var(--on-dark); text-decoration-color: rgba(243, 239, 232, 0.4); }
.contact-tender a:hover { text-decoration-color: currentColor; }

.contact-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  justify-self: end;
  padding: clamp(1.75rem, 1rem + 2vw, 2.6rem);
  border-radius: 26px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.8);
}
@media (max-width: 1039px) { .contact-card { justify-self: start; } }
.contact-card.is-open { padding: 0.75rem; }
.contact-card__title { margin-bottom: 0.55rem; font-size: 1.75rem; font-weight: 500; letter-spacing: -0.025em; line-height: 1.2; }
.contact-card p { color: var(--text-2); }
.ticks { display: grid; gap: 0.75rem; margin: 1.6rem 0 2rem; }
.ticks li { display: flex; align-items: center; gap: 0.75rem; }
.ticks .icon {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-dark);
}
.fine { margin-top: 1.1rem; font-size: 0.8125rem; line-height: 1.5; }
.contact-card .fine { color: var(--text-3); }
.contact-card__slot { position: relative; min-height: 560px; border-radius: 18px; }
.contact-card__slot:focus { outline: none; }
/* Shown behind the frame until the form paints over it. */
.contact-card__slot::before {
  content: 'Loading the booking form\2026';
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  font-size: 0.9375rem;
  color: var(--text-3);
}
.contact-card__slot iframe { position: relative; z-index: 1; border-radius: 14px; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 3rem + 4vw, 7.5rem) 0 2.25rem;
  background: var(--ink);
  color: var(--on-dark);
  border-top: 1px solid var(--rule-dark);
}
.footer__grid { display: grid; gap: 3rem; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 3rem; } }
.footer__line {
  max-width: 27rem;
  margin-bottom: 2rem;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 350;
  line-height: 1.4;
  letter-spacing: -0.015em;
}
.footer__line a { text-decoration-color: rgba(243, 239, 232, 0.4); }
.footer__line a:hover { text-decoration-color: currentColor; }
.footer__email { margin-top: 1.5rem; font-size: 0.9375rem; }
.footer__email a { color: var(--on-dark-2); text-decoration-color: rgba(243, 239, 232, 0.3); }
.footer__email a:hover { color: var(--on-dark); }
.footer__heading {
  margin: 0 0 1.1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-3);
}
.footer__col ul { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.footer__col a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--on-dark-2);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__col a:hover { color: var(--on-dark); }
.icon--inline { width: 0.95em; height: 0.95em; }

/* The closing wordmark, edge to edge, filled with the spectrum. It is a
   mask over a gradient, so the artwork stays one file and one colour. */
.footer__mark {
  display: block;
  margin: clamp(4.5rem, 3rem + 6vw, 9rem) 0 2.25rem;
  aspect-ratio: 2907 / 437;
  background: linear-gradient(100deg, var(--sp-1) 0%, var(--sp-2) 34%, var(--sp-3) 66%, var(--sp-4) 100%);
  -webkit-mask: url('/static/img/prosperly-wordmark.svg') center / contain no-repeat;
  mask: url('/static/img/prosperly-wordmark.svg') center / contain no-repeat;
  opacity: 0.92;
}
.footer__mark .logo { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .footer__mark { background-size: 200% 100%; animation: sweep 14s var(--ease-in-out) infinite alternate; }
}
@keyframes sweep {
  from { background-position: 0% 0; }
  to   { background-position: 100% 0; }
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule-dark);
  font-size: 0.8125rem;
  color: var(--on-dark-3);
}

/* ---------- Legal pages ---------- */
.legal-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + clamp(4rem, 3rem + 4vw, 7rem)) 0 clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(143, 125, 255, 0.2), transparent 70%),
    radial-gradient(40% 60% at 80% 100%, rgba(255, 79, 143, 0.12), transparent 70%),
    var(--ink);
  color: var(--on-dark);
}
.legal-hero > .wrap { position: relative; z-index: 2; }
.legal-hero .h1 { margin-bottom: 1.5rem; }
.legal-meta { margin-top: 1.75rem; font-size: 0.875rem; color: var(--on-dark-3); }

.legal { background: var(--paper); padding-top: clamp(3.5rem, 2.5rem + 3vw, 6rem); }
.legal__grid { display: grid; gap: 3rem; }
@media (min-width: 1020px) {
  .legal__grid { grid-template-columns: 240px minmax(0, 1fr); gap: 5rem; }
  .legal__toc { position: sticky; top: calc(var(--nav-h) + 2.5rem); align-self: start; }
}
.legal__toc ol { display: grid; gap: 0.15rem; margin: 0; padding: 0 0 0 1.25rem; color: var(--text-3); font-size: 0.9375rem; }
.legal__toc li { padding: 0.3rem 0 0.3rem 0.25rem; }
.legal__toc a { color: var(--text-2); text-decoration: none; }
.legal__toc a:hover { color: var(--text); text-decoration: underline; }

.prose { max-width: 44rem; }
.prose h2 {
  margin: 3.25rem 0 1rem;
  font-size: 1.65rem;
  font-weight: 450;
  letter-spacing: -0.02em;
  line-height: 1.25;
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); line-height: 1.75; }
.prose p + p, .prose ul + p { margin-top: 1rem; }
.prose ul { display: grid; gap: 0.5rem; margin: 1rem 0; padding-left: 1.25rem; }
.prose a { color: var(--text); text-decoration-color: rgba(11, 13, 18, 0.35); }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code { padding: 0.1em 0.4em; border-radius: 6px; background: rgba(11, 13, 18, 0.06); font-size: 0.88em; }

/* ---------- Capability statement ----------
   A document as much as a page: numbered blocks, a facts table, and a print
   stylesheet below so "Print or save as PDF" gives a clean handout. */
.cap-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
}
.cap-hero__meta .legal-meta { margin: 0; }
.cap-print .icon { width: 15px; height: 15px; }

.cap { background: var(--paper); padding-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.cap-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem 4rem;
  padding: clamp(2.5rem, 2rem + 2vw, 4rem) 0;
  border-top: 1px solid var(--rule);
}
.cap-block:first-child { border-top: 0; }
@media (min-width: 1000px) {
  .cap-block { grid-template-columns: 250px minmax(0, 1fr); }
  .cap-block > * { grid-column: 2; }
  .cap-block > .cap-block__title { grid-column: 1; grid-row: 1 / span 4; align-self: start; }
}
.cap-block__title {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
  font-weight: 420;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.cap-block__title span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05em;
  color: var(--text-3);
}
.cap-block__lead { max-width: 46rem; font-size: 1.125rem; line-height: 1.6; color: var(--text-2); }

.facts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
@media (min-width: 640px) { .facts-grid { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; } }
.facts-grid > div {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.facts-grid dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.facts-grid dd { margin: 0; font-size: 1.0625rem; color: var(--text); }
.facts-grid a { color: var(--text); text-decoration-color: rgba(11, 13, 18, 0.35); }

.cap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 2.5rem;
  margin-top: 0.75rem;
}
@media (min-width: 720px) { .cap-grid { grid-template-columns: 1fr 1fr; } }
.cap-grid li { padding: 1.4rem 0; border-top: 1px solid var(--rule); }
.cap-grid h3 { margin-bottom: 0.4rem; font-size: 1.15rem; font-weight: 550; letter-spacing: -0.012em; }
.cap-grid p { font-size: 1rem; color: var(--text-2); }

.cap-product {
  display: grid;
  gap: 2rem 3rem;
  align-items: start;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(190, 155, 90, 0.16), transparent 70%),
    var(--white);
  border: 1px solid var(--rule);
}
@media (min-width: 860px) { .cap-product { grid-template-columns: 1.1fr 1fr; } }
.cap-product__logo { --logo-mark: var(--surgerly-gold); height: 30px; margin-bottom: 1.4rem; color: var(--ink); }
.cap-product__link { margin-top: 1.25rem; font-weight: 600; }
.cap-product__link a { display: inline-flex; align-items: center; gap: 0.35rem; text-decoration-color: rgba(11, 13, 18, 0.35); }

.cap-list { display: grid; gap: 0.9rem; max-width: 46rem; margin-top: 0.5rem; }
.cap-list li { position: relative; padding-left: 1.6rem; color: var(--text-2); line-height: 1.6; }
.cap-list li::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sp-1), var(--sp-3));
}

.ticks--plain { margin: 0; }
.ticks--plain li { align-items: flex-start; line-height: 1.45; color: var(--text); }
.ticks--plain .icon { margin-top: 0.05rem; }
.ticks--pending .icon { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }

.assurance { display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .assurance { grid-template-columns: 1fr 1fr; } }
.assurance__col {
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--white);
}
.assurance__col--next { background: transparent; border-style: dashed; }
.assurance__col h3 {
  margin-bottom: 1.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.assurance__note { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: 0.9375rem; color: var(--text-2); }

.cap-cta {
  margin-top: clamp(1rem, 0.5rem + 2vw, 2.5rem);
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 0;
  border-top: 1px solid var(--rule);
}
.cap-cta .h2 { margin-bottom: 1.25rem; }
.cap-cta__email {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  max-width: 100%;
  margin-top: 2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(11, 13, 18, 0.3);
  color: var(--ink);
  font-size: clamp(1.35rem, 1.05rem + 1.4vw, 2.25rem);
  font-weight: 350;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.cap-cta__email .icon { width: 0.8em; height: 0.8em; transition: transform 0.45s var(--ease-out); }
.cap-cta__email:hover { border-bottom-color: var(--ink); }
.cap-cta__email:hover .icon { transform: translateX(4px); }

/* ---------- Our work ----------
   Case studies: a programme band, then one card per brand. The brand panel
   wears the same colours as that brand's card on the home page. */
.work-hero .lead { max-width: 46rem; }
.work-programme { background: var(--paper); }
.work-cases { background: var(--white); }
.work-cases__list { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 2.5rem); }

/* Figures. The value is the headline, the label says what it counts and the
   date says when, so no figure on the site is ever undated. */
.stats {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule);
}
.stat { padding: 1.75rem 0 2rem; border-bottom: 1px solid var(--rule); }
@media (min-width: 820px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 2.25rem 2rem 0.25rem 0; border-bottom: 0; }
  .stat + .stat { padding-left: 2rem; border-left: 1px solid var(--rule); }
}
.stat__value {
  font-size: clamp(3.25rem, 2.4rem + 3.4vw, 5.75rem);
  font-weight: 300;
  letter-spacing: -0.05em;
  line-height: 0.95;
  white-space: nowrap;
}
.stat__value span {
  margin-left: 0.14em;
  font-size: 0.4em;
  font-weight: 450;
  letter-spacing: -0.01em;
  color: var(--text-2);
}
.stat__value::after {
  content: '';
  display: block;
  width: 2.25rem;
  height: 2px;
  margin-top: 1.1rem;
  background: var(--spectrum);
}
.stat__label { max-width: 21rem; margin-top: 1rem; color: var(--text-2); line-height: 1.5; text-wrap: pretty; }
.stat__when { margin-top: 0.6rem; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.03em; color: var(--text-3); }

.case {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
}
@media (min-width: 1000px) { .case { grid-template-columns: minmax(270px, 0.38fr) minmax(0, 1fr); } }
.case__brand {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 250px;
  padding: 1.6rem;
  overflow: hidden;
  color: #fff;
}
.case__brand::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(130% 70% at 50% -10%, rgba(255, 255, 255, 0.2), transparent 60%);
}
.case__brand::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 150%;
  aspect-ratio: 1;
  left: -25%;
  top: 30%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.case__kind {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.86;
}
.case__logo { flex: 1; display: grid; place-items: center; padding: 1rem 0.5rem; }
.case__logo .logo { width: min(100%, 230px); margin-inline: auto; }
.case--electiva .case__logo .logo { width: min(72%, 168px); }
.case__tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.case__tags span {
  padding: 0.32rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}
.case--signature .case__tags span { border-color: rgba(201, 164, 88, 0.5); }

.case__body { padding: clamp(1.75rem, 1.2rem + 2.2vw, 3.25rem); }
.case__body .eyebrow { margin-bottom: 1rem; }
.case__title {
  max-width: 40rem;
  margin-bottom: 1.1rem;
  font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}
.case__lead { max-width: 44rem; color: var(--text-2); line-height: 1.6; text-wrap: pretty; }
.case__list { display: grid; gap: 0.6rem; max-width: 44rem; margin: 1.5rem 0 0; }
.case__list li { position: relative; padding-left: 1.5rem; line-height: 1.5; }
.case__list li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sp-1), var(--sp-3));
}
.stats--case { margin-top: 2.25rem; }
/* Six figures in two rows of three, and four in two rows of two: the
   divider sits between columns, and a rule separates the rows. */
@media (min-width: 820px) {
  .stats.stats--six .stat:nth-child(3n + 1),
  .stats.stats--four .stat:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
  .stats--six .stat:nth-child(n + 4),
  .stats--four .stat:nth-child(n + 3) { border-top: 1px solid var(--rule); padding-top: 2rem; margin-top: 0.75rem; }
  .stats--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stats--case .stat__value { font-size: clamp(2.5rem, 2rem + 1.6vw, 3.5rem); }
@media (min-width: 820px) {
  .stats--case .stat { padding-right: 1.5rem; }
  .stats--case .stat + .stat { padding-left: 1.5rem; }
}

.work-note {
  max-width: 46rem;
  margin-top: clamp(1rem, 0.5rem + 1.5vw, 2rem);
  color: var(--text-2);
}
.work-note__title {
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.work-cta .lead a { color: var(--text); text-decoration-color: rgba(11, 13, 18, 0.35); }
.work-cta .lead a:hover { text-decoration-color: currentColor; }

/* "See the work" links under the brand cards and in the capability statement. */
.brands__more { margin-top: clamp(2rem, 1.5rem + 1.5vw, 3rem); font-weight: 600; }
.cap-block__more { margin-top: 1.25rem; font-weight: 600; }
.brands__more a,
.cap-block__more a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  text-decoration-color: rgba(11, 13, 18, 0.35);
}
.brands__more a:hover,
.cap-block__more a:hover { text-decoration-color: currentColor; }
.brands__more .icon,
.cap-block__more .icon { width: 1em; height: 1em; transition: transform 0.45s var(--ease-out); }
.brands__more a:hover .icon,
.cap-block__more a:hover .icon { transform: translateX(3px); }

/* ---------- Pause motion ----------
   `motion-off` (set by the toggle) removes every animation, so each element
   shows its finished state, exactly as it does under reduced motion. */
html.motion-off *,
html.motion-off *::before,
html.motion-off *::after { animation: none !important; }
html.motion-off .hero__thread-dot { display: none; }

.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  background: transparent;
  color: var(--on-dark-2);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.motion-toggle:hover { color: var(--on-dark); border-color: rgba(243, 239, 232, 0.42); }
/* A class's display would otherwise beat the UA's [hidden] rule. */
.motion-toggle[hidden] { display: none; }
.motion-toggle__icon { position: relative; width: 10px; height: 10px; flex: none; }
.motion-toggle__icon::before,
.motion-toggle__icon::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 1px;
  background: currentColor;
}
.motion-toggle__icon::before { left: 1px; }
.motion-toggle__icon::after { right: 1px; }
/* Pressed: the pause bars become a play triangle. */
.motion-toggle[aria-pressed="true"] .motion-toggle__icon::before {
  left: 1px;
  width: 0;
  border-style: solid;
  border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent currentColor;
  background: none;
}
.motion-toggle[aria-pressed="true"] .motion-toggle__icon::after { display: none; }
.hero__motion { margin-left: auto; }

/* ---------- Print ----------
   Mostly for the capability statement: a plain, black-on-white handout. */
@media print {
  @page { margin: 15mm 14mm; }
  html { font-size: 13px; }
  body { background: #fff !important; color: #000 !important; }
  .nav, .menu, .skip, .hero__aurora, .hero__thread, .grain, .footer, .motion-toggle { display: none !important; }
  .hero, .approach, .surgerly, .contact, .legal-hero, .cap, .legal { background: #fff !important; color: #000 !important; }
  [data-reveal] { opacity: 1 !important; translate: none !important; animation: none !important; }
  .wrap { width: 100% !important; }
  .legal-hero { padding: 0 0 6mm !important; border-bottom: 1px solid #999; }
  .legal-hero .lead--dark, .legal-hero .eyebrow--dark, .legal-meta { color: #333 !important; }
  .serif--spectrum { background: none !important; color: #000 !important; -webkit-text-fill-color: #000; }
  .cap { padding-top: 0 !important; }
  .cap-block { padding: 6mm 0 !important; break-inside: avoid; }
  .cap-product, .assurance__col { background: #fff !important; break-inside: avoid; }
  .cap-cta { break-inside: avoid; }
  .work-programme, .work-cases { background: #fff !important; padding: 6mm 0 !important; }
  .case { break-inside: avoid; background: #fff !important; }
  .case__brand { background: #fff !important; color: #000 !important; border-bottom: 1px solid #999; }
  .case__brand::before, .case__brand::after { display: none; }
  a { color: #000 !important; }
}
