/* ==========================================================================
 * Specialty pages (/dental-marketing/ … and /practice/<slug>/).
 * Only what the homepage lacks. Everything else reuses main.css classes
 * (hero, trust strip, hiw, stories, midcta, integrations, hipaa, footer CTA).
 * Tokens only: --bg --warm --warm2 --ink --muted --muted2 --border --border2
 * --cyan --green, Newsreader + Manrope.
 * ========================================================================== */

.sp { background: var(--bg); }

/* ---------- Hero ---------- */
.sp-hero .hero-bg img { object-position: var(--sp-pos, 72% center); }
@media (max-width: 1024px) { .sp-hero .hero-bg img { object-position: var(--sp-pos-m, 80% center); } }
.sp-hero .hero-content { align-items: flex-end; }
.sp-hero .hero-left { max-width: 860px; gap: 22px; }
/* Desktop copy column (H1 + intro) ends left of the photo's subject zone.
   Its right edge is a share of the viewport (--sp-copy-end, default 64vw),
   not a fixed 860px: the fixed width ran to 70%+ of a 1280-1440 screen and
   across the faces. A page whose photo has faces further left sets a
   tighter value ('copy_end' in inc/specialty-data.php), and --sp-pos moves
   the people as far right as the frame allows. Both were measured against
   each photo's face boxes at 1280-1920 (40px+ clearance). The H1 font size
   stays the homepage's. Left padding is --sec-x (156px above 1200px, 48px below). */
@media (min-width: 1025px) {
  .sp-hero .hero-left { max-width: min(860px, calc(var(--sp-copy-end, 64vw) - var(--sec-x))); }
}
@media (min-width: 1201px) {
  .sp-hero .hero-left { max-width: min(860px, calc(var(--sp-copy-end, 64vw) - 156px)); }
}
.sp-hero-kicker {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--sans); font-weight: 400; font-size: 13px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
/* Breadcrumbs: same as .sv-crumbs / .ch-crumbs (integration pass). */
.sp-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; font-size: 14px; font-weight: 400; color: rgba(255, 255, 255, 0.72); }
.sp-crumbs li + li::before { content: "/"; margin: 0 10px; color: rgba(255, 255, 255, 0.4); }
.sp-crumbs a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
.sp-crumbs a:hover { color: var(--white); }
.sp-crumbs [aria-current] { color: var(--white); }
.sp-hero-kicker { margin-top: -6px; }
.sp-hero-ctas + .hero-btn-note { margin-top: -6px; }
.sp-hero-h1 { text-wrap: balance; }
.sp-hero .hero-sub { max-width: 600px; }
.sp-hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.sp-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 15px 31px;
  font-family: var(--sans); font-weight: 400; font-size: 18px; color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 8px;
  transition: background 0.3s, border-color 0.3s; white-space: nowrap;
}
.sp-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }
.sp-hero .hero-gradient {
  background:
    linear-gradient(0deg, rgba(8,11,16,0.92) 0%, rgba(8,11,16,0.42) 42%, rgba(8,11,16,0.2) 66%, rgba(8,11,16,0.5) 100%),
    linear-gradient(95deg, rgba(8,11,16,0.74) 0%, rgba(8,11,16,0.2) 58%, rgba(8,11,16,0) 100%);
}

/* ---------- Section shell: the main.css layout system (band + warm panel) ---------- */
.sp-sec { padding: var(--sec-y) var(--sec-x); }
.sp-panel {
  padding: var(--panel-pt) var(--panel-x) var(--panel-pb); background: var(--warm);
  display: flex; flex-direction: column; gap: var(--stack-content);
}
.sp-panel > .hipaa-kicker { margin-bottom: calc(var(--stack-kicker) - var(--stack-content)); }
.sp-head { display: flex; flex-direction: column; gap: var(--stack-lead); max-width: var(--measure-head); }
.sp-head--hiw { margin: 0 0 var(--stack-content); }
.sp-h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: -0.4px;
  color: var(--ink); margin: 0; text-wrap: balance;
}
.sp-lede {
  font-family: var(--sans); font-weight: 300;
  font-size: var(--fs-lead); line-height: 1.45;
  color: var(--muted2); margin: 0; max-width: var(--measure-text);
}

/* ---------- Band alternation (the homepage rhythm: plain / warm / plain) ----------
   Plain bands keep the panel padding, so content keeps the same edge; their
   cards take the warm fill instead, as .hv-plain / .sv-plain / .ch-plain do. */
#patients .sp-panel, #faq .sp-panel, #specialty-notes .hipaa-inner { background: transparent; }
#patients .sp-jcard, #specialty-notes .hipaa-pillar { background: var(--warm); }
#patients .sp-queries li { background: var(--bg); }

/* ---------- Where patients look ---------- */
.sp-journey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
.sp-jcard {
  display: flex; flex-direction: column; gap: 20px;
  padding: var(--card-pad); border: 1px solid var(--border2); background: var(--bg);
}
.sp-jcard-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(22px, 1.8vw, 28px); line-height: 1.25; margin: 0; color: var(--ink);
}
.sp-queries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sp-queries li {
  font-family: var(--sans); font-weight: 400; font-size: 15px; line-height: 1.4;
  color: var(--ink); padding: 10px 14px; background: var(--warm2);
  border: 1px solid var(--border2); border-radius: 8px;
}
.sp-leak {
  margin: auto 0 0; padding-top: 18px; border-top: 1px solid var(--border2);
  font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.5; color: var(--muted2);
}
.sp-leak span {
  display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}

/* ---------- What we do (homepage HIW, 3 steps) ---------- */
#how-it-works.sp-hiw .hiw-step { min-height: 0; padding: 0 0 64px; margin-bottom: 64px; }
#how-it-works.sp-hiw .hiw-step:last-child { padding-bottom: 0; margin-bottom: 0; }
.sp-hiw .hiw-text { gap: 18px; }
.sp-step-n {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
  margin: 0; display: flex; align-items: center; gap: 8px;
}
.sp-step-n::before { content: ''; width: 8px; height: 8px; background: var(--cyan); transform: rotate(45deg); flex-shrink: 0; }
.sp-hiw .hiw-img-wrap { position: relative; }
.sp-example {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--white); background: rgba(10, 17, 26, 0.55); padding: 6px 10px; border-radius: 999px;
  pointer-events: none;
}

/* Service links (also used in Related) */
/* Same link rows as .sv-links / .ch-links (integration pass). */
.sp-links { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border2); max-width: 460px; }
.sp-links li { border-bottom: 1px solid var(--border2); }
.sp-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 48px; padding: 11px 0;
  font-family: var(--sans); font-weight: 400; font-size: 16px; color: var(--ink);
}
.sp-links a span { font-size: 20px; line-height: 1; color: var(--ink); flex-shrink: 0; transition: transform 0.2s ease; }
.sp-links a:hover span { transform: translateX(4px); }
.sp-links--lg { max-width: none; margin-top: 0; }
.sp-links--lg a { font-size: 17px; min-height: 56px; padding: 14px 0; }
.sp-related-h { font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 2.2vw, 32px); line-height: 1.2; margin: 0 0 16px; color: var(--ink); }

/* Report band: two actions, same as .sv-midcta-actions / .ch-midcta-actions. */
.sp-midcta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }
.sp-btn-light {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 14px 13px 26px;
  font-family: var(--sans); font-weight: 600; font-size: 16px;
  color: var(--ink); background: var(--white); border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease;
}
.sp-btn-light:hover { transform: translateY(-2px); }
.sp-btn-ghost--pill { border-radius: 999px; padding: 13px 26px; font-size: 16px; font-weight: 600; }

/* ---------- Proof ---------- */
.sp-proof .sp-head { margin-bottom: var(--stack-content); }
.sp-sites { margin-top: 56px; display: flex; flex-direction: column; gap: 20px; }
/* Sites we built for other practices: set apart from the results so they never read as the same practice. */
.sp-sites--apart { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--border2); }
.sp-sites-h {
  margin: 0; font-family: var(--serif); font-weight: 300;
  font-size: clamp(24px, 2.2vw, 32px); line-height: 1.2; color: var(--ink);
}
.sp-sites-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sp-sites-grid--1 { grid-template-columns: minmax(0, 1fr); }
/* One site: a wide card, screenshot left and name right, so the row does not end in an empty half. */
@media (min-width: 769px) {
  .sp-sites-grid--1 .sp-site {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr;
    column-gap: clamp(28px, 4vw, 56px); row-gap: 8px; padding: 14px clamp(24px, 3vw, 48px) 14px 14px;
  }
  .sp-sites-grid--1 .sp-site img { grid-column: 1; grid-row: 1 / -1; margin-bottom: 0; }
  .sp-sites-grid--1 .sp-site-name { grid-column: 2; grid-row: 2; font-size: clamp(26px, 2.4vw, 34px); }
  .sp-sites-grid--1 .sp-site-field { grid-column: 2; grid-row: 3; font-size: 16px; }
}
.sp-sites-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-site {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 12px 18px; background: var(--bg); border: 1px solid var(--border2);
  transition: border-color 0.2s ease;
}
.sp-site:hover { border-color: var(--border); }
.sp-site img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; margin-bottom: 12px; border: 1px solid var(--border2); }
.sp-site-name { font-family: var(--serif); font-weight: 300; font-size: 22px; line-height: 1.25; color: var(--ink); }
.sp-site-field { font-family: var(--sans); font-weight: 300; font-size: 14px; color: var(--muted2); }
/* Proof cards: metric grids sized to their count (main.css assumes 3), so one or two metrics are not
   squeezed into thirds with labels wrapped to four lines on phones. */
.stories-cards .snap-metrics:has(> .snap-metric:only-child) { grid-template-columns: minmax(0, 1fr); }
.stories-cards .snap-metrics:has(> .snap-metric:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Integrations: h3 in place of the homepage h4, same look ---------- */
.sp-int-name { font-family: var(--serif); font-weight: 300; font-size: 32px; line-height: 1.26; color: var(--ink); margin: 0; }

/* ---------- FAQ ---------- */
.sp-faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 56px; align-items: start; }
.sp-faq-wrap > .sp-h2 { position: sticky; top: 110px; }
.sp-faq { border-top: 1px solid var(--border); }
.sp-faq-item { border-bottom: 1px solid var(--border); }
/* Questions and answers: same as .sv-faq-q / .ch-faq-q (integration pass). */
.sp-faq-q {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding: 22px 0; min-height: 44px;
  font-family: var(--sans); font-weight: 500; font-size: 18px; line-height: 1.4; letter-spacing: -0.2px; color: var(--ink);
}
.sp-faq-q::-webkit-details-marker { display: none; }
.sp-faq-q::after { content: "+"; font-weight: 300; font-size: 28px; line-height: 0.9; color: var(--muted); flex-shrink: 0; transition: transform 0.25s; }
.sp-faq-item[open] .sp-faq-q::after { transform: rotate(45deg); color: var(--ink); }
.sp-faq-a { padding: 0 40px 24px 0; }
.sp-faq-a p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted2); max-width: 70ch; }

/* ---------- Related ---------- */
.sp-related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.sp-related-col { display: flex; flex-direction: column; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .sp-journey { grid-template-columns: 1fr; }
  .sp-jcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; row-gap: 16px; }
  .sp-jcard .hipaa-pillar-icon, .sp-jcard-title { grid-column: 1; }
  .sp-queries { grid-column: 2; grid-row: 1 / span 3; }
  .sp-leak { grid-column: 1; margin-top: 0; }
}
@media (max-width: 1024px) {
  .sp-faq-wrap { grid-template-columns: 1fr; gap: 32px; }
  .sp-faq-wrap > .sp-h2 { position: static; }
  .sp-sites-grid, .sp-sites-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-hero .hero-content { align-items: flex-end; }
}
@media (max-width: 768px) {
  .sp-hero .hero-content { padding: 96px 16px 32px; }
  .sp-hero-kicker { font-size: 11px; letter-spacing: 0.12em; }
  .sp-hero-ctas { flex-direction: column; align-items: stretch; width: 100%; }
  .sp-hero-ctas .hero-btn, .sp-btn-ghost { width: 100%; justify-content: center; font-size: 16px; padding: 14px 24px; }
  .sp-jcard { display: flex; gap: 16px; }
  .sp-queries li { font-size: 14px; }
  #how-it-works.sp-hiw .hiw-step { padding: 0 0 32px; margin-bottom: 32px; }
  .sp-links { max-width: none; }
  .sp-sites-grid, .sp-sites-grid--1, .sp-sites-grid--2 { grid-template-columns: 1fr; }
  .sp-int-name { font-size: 26px; }
  .sp-related { grid-template-columns: 1fr; gap: 40px; }
  .sp-faq-q { font-size: 16.5px; padding: 18px 0; }
  .sp-midcta-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .sp-btn-light, .sp-btn-ghost--pill { justify-content: center; min-height: 48px; }
  .sp-crumbs ol { font-size: 13px; }
  .sp-faq-a { padding-right: 0; }
  .sp-faq-a p { font-size: 16px; }
}

/* main.css styles every `#how-it-works .hiw-text p` at 17–22px; keep the step eyebrow small */
#how-it-works.sp-hiw .sp-step-n { font-size: 13px; line-height: 1.3; }
#how-it-works.sp-hiw .hiw-img-wrap { align-self: center; }

/* Tap targets (brief: 44px minimum) */
.sp .stories-viewall-link { min-height: 44px; }
@media (max-width: 768px) {
  .sp .midcta-btn-arrow { width: 44px; height: 44px; }
}
@media (max-width: 768px) {
  .sp-integrations .integrations-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sp-integrations .integrations-card { padding: 20px; gap: 16px; }
  .sp-integrations .integrations-icon { width: 44px; height: 44px; }
  .sp-integrations .sp-int-name { font-size: 21px; }
  .sp-integrations .integrations-card-text { padding-top: 0; }
  .sp-integrations .integrations-card-text p { font-size: 14px; }
}

@media (max-width: 1024px) {
  .sp-crumbs a { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }
  .sp-midcta-actions { margin-top: 8px; }
}

/* ---------- Hero photo placement (images pass) ----------
   Desktop: the subject sits right of the headline (--sp-pos per page).
   Phone: the headline spans the full width, so the photo becomes a band
   across the top of the hero and the copy starts below it; the subject stays
   visible instead of sitting under the H1 (--sp-pos-m per page). */
@media (max-width: 768px) {
  .sp-hero { background: var(--ink); }
  .sp-hero .hero-bg { bottom: auto; height: 400px; }
  .sp-hero .hero-bg img { object-position: var(--sp-pos-m, 80% center); }
  .sp-hero .hero-gradient {
    background: linear-gradient(180deg, rgba(10,17,26,0.5) 0%, rgba(10,17,26,0) 26%, rgba(10,17,26,0) 58%, rgba(10,17,26,0.82) 88%, rgba(10,17,26,1) 100%);
  }
  .sp-hero .hero-content { padding-top: 340px; }
}

/* Headings never end on a single short word (card titles, section heads, footer CTA). */
.sp :is(h2, h3, h4), .cta-content h2 { text-wrap: balance; }
