/* ==========================================================================
   Luminaris MD: Services and Skin Journal pages (agent 3)
   Loaded after site.css (via $page['styles']) on /services/, /services/{slug}/, /blog/ and /blog/{slug}/.
   Builds on the site.css contract (.section .container .eyebrow .h2 .prose .btn .card .card-media
   .card-body .card-link .grid-3 .grid-4 .page-hero .cta-inline .faq-list .note .toc .section-actions)
   and its tokens. Every class added here is prefixed svc- or blog-. Mobile first: base = 360px layout.
   ========================================================================== */

/* ---------- Shared: section heads, card grids, first section under the hero ---------- */
.page-hero + .svc-group, .page-hero + .blog-list { padding-top: clamp(12px, 2.5vw, 32px); }
.svc-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 32px; margin-bottom: clamp(24px, 4vw, 44px); }
.svc-head .link-arrow { flex: none; }

.svc-cards > li, .blog-grid > li { display: flex; min-width: 0; }
.svc-cards > li > .card, .blog-grid > li > .card { flex: 1; }

/* ---------- Treatment cards ---------- */
.svc-card .card-body { gap: 12px; }
.svc-card-title { color: var(--ink); }
.svc-card-text { color: var(--text); }
.svc-card-kicker { font: 700 .62rem/1.3 var(--font-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--maroon); }

/* Detail-service card without a photo: a beige panel with the brand mark. */
.svc-card-media--mark { display: grid; place-items: center; aspect-ratio: 16 / 9; background: radial-gradient(70% 90% at 85% 10%, rgba(255, 255, 255, .85), transparent 60%), var(--bone); }
.svc-card-mark { width: 64px; height: 64px; color: var(--maroon); transition: rotate .6s var(--ease); }
.svc-card:hover .svc-card-mark { rotate: -8deg; }

/* Round icon badge; over a photo it overlaps the image edge. */
.svc-card-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--bone); color: var(--maroon); flex: none; }
.svc-card-ic .ic { width: 22px; height: 22px; }
.svc-card .card-media + .card-body .svc-card-ic { position: relative; z-index: 2; margin-top: -46px; background: var(--maroon); color: var(--paper); box-shadow: 0 0 0 5px var(--paper); }

/* ---------- Service detail: layout ---------- */
.svc-article { padding-top: clamp(28px, 4vw, 56px); }
.svc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.svc-main, .svc-aside { min-width: 0; }

/* On-page contents: a <details>, collapsed on phones, opened (and sticky) on desktop. */
.svc-toc { padding: 0; }
.svc-toc-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 12px 18px 12px 22px; cursor: pointer; list-style: none; font: 700 .75rem/1.3 var(--font-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--maroon); }
.svc-toc-summary::-webkit-details-marker { display: none; }
.svc-toc-plus { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid rgba(26, 26, 26, .3); flex: none; transition: rotate .45s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease); }
.svc-toc-plus::before, .svc-toc-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; border-radius: 2px; background: var(--maroon); translate: -50% -50%; }
.svc-toc-plus::after { rotate: 90deg; }
.svc-toc[open] .svc-toc-plus { rotate: 45deg; background: var(--maroon); border-color: var(--maroon); }
.svc-toc[open] .svc-toc-plus::before, .svc-toc[open] .svc-toc-plus::after { background: var(--paper); }
.svc-toc-list { padding: 0 22px 10px; }
.svc-toc[open] .svc-toc-list { animation: panelIn .45s var(--ease-out) both; }
.svc-toc .svc-toc-list a { font-size: .97rem; }

.svc-aside-cta { display: none; }
.svc-aside-call { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; color: var(--ink); }
.svc-aside-call .ic { width: 16px; height: 16px; color: var(--maroon); }
.svc-aside-call:hover { color: var(--maroon); }

/* ---------- Service detail: doc content (inside .prose) ---------- */
.svc-intro > p:first-child { font-size: clamp(1.0625rem, 1.3vw, 1.2rem); color: var(--ink); }
.svc-section { padding-top: clamp(32px, 5vw, 52px); scroll-margin-top: calc(var(--topbar-h) + var(--header-h) + 20px); }
.svc-section + .svc-section, .svc-intro + .svc-section, .cta-inline + .svc-section { margin-top: clamp(32px, 5vw, 52px); border-top: 1px solid var(--line); }
.cta-inline + .svc-section { margin-top: 0; border-top: 0; padding-top: 0; }
.svc-main > .svc-section:first-child { padding-top: 0; }
.prose.svc-section > h2 { margin-top: 0; }
.prose .svc-label { margin-top: 1.6em; font: 600 clamp(1.3rem, 2vw, 1.5rem)/1.25 var(--font-display); color: var(--ink); }
.prose .svc-label strong { font-weight: 600; }
.prose .svc-label + p { margin-top: .4em; }

/* Numbered consultation steps (the doc's "1." to "6." lines) */
.prose .svc-steps { display: grid; gap: 12px; margin-top: 1.3em; padding: 0; list-style: none; }
.prose .svc-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.svc-step-no { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--maroon); color: var(--paper); font: italic 600 1.2rem/1 var(--font-display); }
.prose .svc-step-title { margin: 8px 0 6px; font-size: clamp(1.3rem, 2vw, 1.5rem); line-height: 1.2; }
.svc-step-body p { margin: 0; }

/* Booking strip between sections */
.svc-main > .cta-inline { margin-block: clamp(36px, 5vw, 56px); }

/* ---------- Service detail: FAQ, review note ---------- */
.svc-narrow { max-width: 920px; }
.svc-faq .section-title { margin-bottom: clamp(22px, 3vw, 36px); }
.svc-faq-list details > p { max-width: 68ch; }
.svc-note { margin-top: clamp(32px, 5vw, 52px); }
.svc-note p { margin: 0; }
.svc-note-byline { font-weight: 600; }
.svc-note-byline a, .blog-note a { color: var(--maroon); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.svc-note-text { color: var(--muted); }

/* Byline under the H1 (the page-hero partial prints it in .page-hero-meta) */
.svc-page .page-hero-meta a, .blog-page .page-hero-meta a { color: var(--maroon); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- Skin Journal: listing ---------- */
.blog-empty { display: grid; justify-items: center; gap: 18px; max-width: 780px; margin-inline: auto; padding: clamp(30px, 6vw, 60px) clamp(18px, 5vw, 56px); border-radius: var(--radius-lg); background: var(--bone-soft); border: 1px solid var(--line); text-align: center; }
.blog-empty-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--maroon); color: var(--paper); box-shadow: 0 0 0 8px var(--paper); }
.blog-empty-ic .ic { width: 28px; height: 28px; }
.blog-empty-text { max-width: 26ch; font: 600 clamp(1.7rem, 4vw, 2.5rem)/1.15 var(--font-display); color: var(--ink); text-wrap: balance; }
.blog-empty-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 24px; }
.blog-empty-links { display: grid; justify-items: center; gap: 14px; width: 100%; margin-top: 10px; padding-top: 24px; border-top: 1px solid var(--line); }
.blog-empty-links ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.blog-empty-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line-strong); font-size: .92rem; font-weight: 600; line-height: 1.25; color: var(--ink); text-align: left; transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.blog-empty-links a .ic { width: 13px; height: 13px; flex: none; color: var(--maroon); }
.blog-empty-links a:hover, .blog-empty-links a:focus-visible { background: var(--maroon); border-color: var(--maroon); color: var(--paper); }
.blog-empty-links a:hover .ic, .blog-empty-links a:focus-visible .ic { color: var(--paper); }

/* Post cards: one link (the title), stretched over the card. */
.blog-card .card-media { aspect-ratio: 720 / 520; }
.blog-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font: 600 .7rem/1.3 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.blog-card-cat { padding: 6px 10px; border-radius: 999px; background: var(--bone); color: var(--maroon); }
.blog-card-title a { color: inherit; }
.blog-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.blog-card-link:focus-visible { outline: none; }
.blog-card:has(.blog-card-link:focus-visible) { outline: 2px solid var(--maroon); outline-offset: 3px; }
.blog-card:hover .blog-card-title { color: var(--maroon); }
.blog-card-more { display: inline-flex; align-items: center; gap: 10px; align-self: start; margin-top: auto; min-height: 44px; padding: 10px 2px; font: 700 .76rem/1.2 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--maroon); }
.blog-card-more .ic { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.blog-card:hover .blog-card-more .ic { transform: translateX(5px); }

.blog-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin-top: clamp(32px, 5vw, 52px); }
.blog-pager-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.blog-pager-num, .blog-pager-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.blog-pager-link .ic { width: 14px; height: 14px; }
.blog-pager-num.is-current { background: var(--maroon); border-color: var(--maroon); color: var(--paper); }
.blog-pager a:hover { border-color: var(--maroon); color: var(--maroon); }

/* ---------- Skin Journal: article ---------- */
.blog-sample-flag { display: block; width: fit-content; max-width: 100%; margin: 0 0 24px; padding: 10px 16px; border-radius: 14px; background: var(--cream); border: 1px dashed var(--maroon); font: 600 .92rem/1.45 var(--font-ui); color: var(--ink); }
.blog-article-main { padding-top: clamp(24px, 4vw, 48px); }
.blog-article-in > * { max-width: 880px; }
.blog-hero-media { margin: 0 0 clamp(28px, 4vw, 44px); overflow: hidden; border-radius: 24px; background: var(--bone); box-shadow: 0 40px 80px -50px rgba(26, 26, 26, .6); }
.blog-hero-media img { width: 100%; height: auto; }
.blog-note { margin-top: clamp(32px, 5vw, 48px); }
.blog-note p { margin: 0; color: var(--muted); }
.blog-note .blog-note-byline { color: var(--ink); font-weight: 600; }
.blog-back { margin-top: 18px; }

/* Phones: number and title share the first row, the text takes the full card width below. */
@media (max-width: 640px) {
  .prose .svc-step { grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; row-gap: 8px; align-items: center; }
  .svc-step-no { width: 36px; height: 36px; font-size: 1.05rem; }
  .svc-step-body { display: contents; }
  .prose .svc-step-title { margin: 0; }
  .svc-step-body > p { grid-column: 1 / -1; }
}

/* ---------- Larger screens ---------- */
@media (min-width: 641px) {
  .prose .svc-step { padding: 20px 24px; gap: 18px; }
}
@media (min-width: 1081px) {
  .svc-layout { grid-template-columns: 300px minmax(0, 1fr); gap: clamp(48px, 5vw, 88px); align-items: start; }
  .svc-aside { position: sticky; top: calc(var(--topbar-h) + var(--header-h) - 10px); display: grid; gap: 16px; max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .svc-aside-cta { display: grid; justify-items: start; gap: 4px; padding: 0 4px 24px; }
  .svc-toc .svc-toc-list a { min-height: 44px; padding: 6px 0; font-size: .9rem; line-height: 1.3; }
  .svc-toc-summary { min-height: 52px; }
  .svc-main { max-width: 760px; }
}

@media print {
  .svc-aside, .section-actions, .blog-pager, .cta-inline { display: none !important; }
  .svc-layout { display: block; }
}
