/* ==========================================================================
   /medspa-seo/ — page layout.

   The shared house devices live in public/assets/css/service-devices.css,
   loaded first via ServicePageData.extraStyles. This file is layout that is
   genuinely this page's own; it must not redefine anything that sheet owns.
   ========================================================================== */

/* The palette and section rhythm for this page's own sections. Kept per page
   rather than moved into service-devices.css because the selector list is a
   list of THIS page's section names; service-devices.css offers .svcd-section
   for new pages, and these predate it.

   service-page.css scopes its custom properties to its own class list, so a
   sibling section outside that list would resolve them to nothing. */
.mseo-receipts,
.mseo-aiproof,
.mseo-revenue,
.mseo-method,
.mseo-why,
.mseo-offer {
  --surface: #0a0a0f;
  --surface-2: #101018;
  --card-border: #1a1a24;
  --purple: #6119ac;
  --purple-light: #8b5cf6;
  --purple-glow: #7c3aed;
  --purple-border: rgba(139, 92, 246, 0.22);
  --text-primary: #ffffff;
  --text-body: #e8e8f0;
  --text-secondary: #a1a1b5;
  --text-muted: #6a6a77;
  background: var(--surface);
  color: var(--text-body);
  font-family: var(--font-body);
  font-stretch: var(--wdth-body, 100%);
  padding: var(--section-y, clamp(5rem, 10vw, 11rem)) var(--gutter, 24px);
  -webkit-font-smoothing: antialiased;
}

.mseo-receipts__inner,
.mseo-aiproof__inner,
.mseo-method__inner,
.mseo-why__inner,
.mseo-offer__inner,
.mseo-revenue__inner {
  max-width: var(--shell, 1180px);
  margin-inline: auto;
}



.mseo-receipts__inner,
.mseo-aiproof__inner,
.mseo-method__inner,
.mseo-why__inner,
.mseo-offer__inner,
.mseo-revenue__inner {
  max-width: var(--shell, 1180px);
  margin-inline: auto;
}

/* Template-owned section tops. service-page.css only sets position on the
   hero, so these four need it before a pseudo-element can pin to them. */
.svc-problem,
.svc-includes,
.svc-proof,
.svc-faq {
  position: relative;
}

/* Hero entrance. The hero is in view at load, so this is a timed beat rather
   than a scroll trigger. motion.js scopes its own hero timeline to
   .hp-b--hero, and widening that selector would change all four sibling
   pages, so the sequence lives here instead. .svc-hero__lead is
   display:contents, which leaves its children in the layout tree, so `> *`
   still matches them. */
.has-motion .svc-hero__lead > *,
.has-motion .svc-hero .svc-stats {
  animation: mseo-rise 0.9s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

.has-motion .svc-hero__lead > *:nth-child(2) {
  animation-delay: 0.08s;
}
.has-motion .svc-hero__lead > *:nth-child(3) {
  animation-delay: 0.16s;
}
.has-motion .svc-hero__lead > *:nth-child(4) {
  animation-delay: 0.24s;
}
.has-motion .svc-hero__lead > *:nth-child(5) {
  animation-delay: 0.3s;
}

/* --- Receipts --------------------------------------------------------------
   Copy left, the tabbed demo right. The demo is the evidence for the claim the
   copy makes, so the two belong on the same line rather than stacked with a
   half-empty column beside the text. */

.mseo-receipts__inner--stacked {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.mseo-receipts__copy .mseo-receipts__p:last-child {
  margin-bottom: 0;
}

.mseo-receipts__copy .svc-h2 {
  max-width: 18ch;
}

.mseo-receipts__p {
  margin-top: 1.1rem;
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 62ch;
}

/* --- Services bento --------------------------------------------------------
   Five cells for five things: the lead panel spans both rows of the first
   column, the four service cards fill the rest. */

.mseo-bento {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
}

.mseo-bento__lead {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2rem);
  padding: clamp(1.5rem, 3vw, 2.1rem);
}

.mseo-bento__quote {
  font-family: var(--font-display);
  font-stretch: var(--wdth-display, 108%);
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.35;
  color: var(--text-primary);
}

.mseo-index::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--purple),
    var(--purple-glow) 60%,
    rgba(139, 92, 246, 0.25)
  );
  transform-origin: top;
}

.has-motion .mseo-index::before {
  transform: scaleY(0);
  transition: transform 2.4s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)) 0.2s;
}

.has-motion .mseo-bento__lead.is-in .mseo-index::before {
  transform: scaleY(1);
}

.mseo-index li {
  position: relative;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-secondary);
}

/* The halo punches a hole in the spine behind the node.
   how-it-works.html:711-717 — using --surface here, because --bg, the variable
   that file uses, does not exist in this scope. */
.mseo-index li::before {
  content: "";
  position: absolute;
  left: -2.5rem;
  top: 0.3em;
  width: 10px;
  height: 10px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--purple-light);
  box-shadow: 0 0 0 6px var(--surface), 0 0 16px rgba(124, 58, 237, 0.6);
}

.mseo-bento .svc-card {
  transition: border-color var(--dur, 340ms) var(--ease-out),
    transform var(--dur, 340ms) var(--ease-out);
}

.mseo-bento .svc-card:hover {
  border-color: var(--purple-border);
  transform: translateY(-2px);
}

/* --- Method: the three-stage flow ------------------------------------------
   A spine that draws downward with a halo'd node per stage, replacing three
   separate inline diagrams. how-it-works.html:625-745. */

.mseo-method__lede {
  margin-top: 1.1rem;
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 62ch;
}

/* Stages left, the artifacts they refer to right. The stage bodies cap at
   62ch, so a full-width flow left this section half empty and pushed both
   images onto rows of their own at the full width of the shell. */
.mseo-method__body {
  margin-top: clamp(2.25rem, 4.5vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.mseo-method__aside {
  display: grid;
  gap: 0.85rem clamp(1.75rem, 3.5vw, 2.5rem);
  /* Rides alongside the three stages on a tall viewport rather than sitting at
     the top of a long empty column. */
  position: sticky;
  top: clamp(6rem, 12vh, 9rem);
}

/* --- The generalist argument ------------------------------------------------ */

.mseo-why__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.mseo-why__p {
  margin-top: 1.1rem;
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 62ch;
}

.mseo-why__p a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--purple-border);
  transition: text-decoration-color var(--dur, 340ms) var(--ease-out);
}

.mseo-why__p a:hover,
.mseo-why__p a:focus-visible {
  text-decoration-color: var(--purple-light);
}

/* --- Revenue: the money number ---------------------------------------------- */

.mseo-revenue__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.mseo-revenue__p {
  margin-top: 1.25rem;
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 56ch;
}

/* --- Offer ------------------------------------------------------------------
   The loudest panel on the page, and the only offer, so it wears the "new way"
   treatment at full strength. */

.mseo-offer__card {
  padding: clamp(1.75rem, 4vw, 3rem);
}

.mseo-offer__p {
  margin-top: 1.1rem;
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 60ch;
}

.mseo-offer__actions {
  margin-top: clamp(1.75rem, 3.5vw, 2.25rem);
}

/* --- AI citation block ------------------------------------------------------- */

.mseo-aiproof__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

/* The same hairline as the section dividers, so the two proofs read as one
   exhibit split in half rather than two unrelated blocks. */
.mseo-aiproof__inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.18), transparent);
}

/* The demo sets its own type in px, inherited from the page it came from.
   It sits in a grid column now, so it only needs to not overflow it. */
.mseo-demo {
  min-width: 0;
}

/* Space between an artifact and the caption that explains it. */
.mseo-method__aside .mseo-caption {
  margin-top: -0.9rem;
  max-width: none;
}

/* --- Responsive -------------------------------------------------------------- */

@media (max-width: 1080px) {
  .mseo-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mseo-bento__lead {
    grid-row: auto;
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .mseo-method__body {
    grid-template-columns: 1fr;
  }
  .mseo-method__aside {
    position: static;
  }
  .mseo-receipts__inner,
  .mseo-receipts__inner--stacked,
  .mseo-why__inner,
  .mseo-revenue__inner,
  .mseo-aiproof__inner {
    grid-template-columns: 1fr;
  }
  /* Argument first on a narrow screen; the drawing follows it. */
  .mseo-why__figure {
    order: 2;
  }
}


@media (max-width: 640px) {
  .mseo-bento {
    grid-template-columns: 1fr;
  }
}


@media (prefers-reduced-motion: reduce) {
  .mseo-why__p a,
  .svc-card .mseo-mark,
  .mseo-bento .svc-card {
    transition: none;
  }
}

/* --- Restored page layout ---------------------------------------------------
   These are this page's own rules. They sit here rather than in
   service-devices.css because they describe the bento and its index, which no
   other page has. */

.mseo-receipts__copy .svc-h2 {
  max-width: 18ch;
}

/* One node per service card beside it, joined by the spine drawn by
   .mseo-index::before above. */
.mseo-index li {
  position: relative;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-secondary);
}

/* The halo punches a hole in the spine behind the node.
   how-it-works.html:711-717, using --surface because --bg, the variable that
   file uses, does not exist in this scope. */
.mseo-index li::before {
  content: "";
  position: absolute;
  left: -2.5rem;
  top: 0.3em;
  width: 10px;
  height: 10px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--purple-light);
  box-shadow: 0 0 0 6px var(--surface), 0 0 16px rgba(124, 58, 237, 0.6);
}

.mseo-bento .svc-card {
  transition: border-color var(--dur, 340ms) var(--ease-out),
    transform var(--dur, 340ms) var(--ease-out);
}

.mseo-bento .svc-card:hover {
  border-color: var(--purple-border);
  transform: translateY(-2px);
}

.svc-card .svcd-mark {
  color: var(--text-muted);
  transition: color var(--dur, 340ms) var(--ease-out);
}

.mseo-bento .svc-card:hover .svcd-mark {
  color: var(--purple-light);
}

.mseo-method__record {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.mseo-method__aside .svcd-caption {
  margin-top: -0.9rem;
  max-width: none;
}

.mseo-why__p a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--purple-border);
  transition: text-decoration-color var(--dur, 340ms) var(--ease-out);
}

.mseo-why__p a:hover,
.mseo-why__p a:focus-visible {
  text-decoration-color: var(--purple-light);
}

@media (max-width: 1080px) {
  .mseo-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mseo-bento__lead {
    grid-row: auto;
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .mseo-receipts__inner,
  .mseo-receipts__inner--stacked,
  .mseo-why__inner,
  .mseo-revenue__inner,
  .mseo-aiproof__inner,
  .mseo-method__body {
    grid-template-columns: 1fr;
  }
  .mseo-method__aside {
    position: static;
  }
  /* Argument first on a narrow screen; the drawing follows it. */
  .mseo-why__figure {
    order: 2;
  }
}

@media (max-width: 640px) {
  .mseo-bento {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mseo-why__p a,
  .svc-card .svcd-mark,
  .mseo-bento .svc-card {
    transition: none;
  }
}

/* The index inside the bento lead panel. Grows to fill the panel so the four
   nodes distribute down the column and sit roughly level with the four cards
   they name. */
.mseo-index {
  position: relative;
  flex: 1;
  margin: 0;
  padding-left: 2.5rem;
  list-style: none;
  display: grid;
  align-content: space-between;
  gap: clamp(0.9rem, 2vw, 1.4rem);
}