/* Paper continues from the curtain. Each proof occupies its own scroll scene. */
#services {
  --header-h: 80px;
  padding: 0;
  color: var(--deep);
  background: #f3f2ee;
}
#services .services-heading {
  max-width: 850px;
  margin: 0;
  /* <=40px above the heading: with the in-flow consent row (or the released opening stage)
     above it, the seam never opens a flat band over 64px (qa/m12-films-whole.browser.mjs). */
  padding: 40px 6vw 24px;
  background: transparent;
}
#services .services-heading h2 { max-width: 12ch; }
#services .services-heading p { margin-block: 0 16px; }
#services a {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 44px;
  min-height: 44px;
  color: var(--deep);
  text-decoration: none;
}
#services .service-row { color: var(--deep); background: var(--paper); }
/* The rows are an ordinary stacked list here. With motion on, one pinned screen swaps them in
   place: js/film/scenes/services-reel.mjs + css/indigo/services-reel.css (phone and wide). */
/* The desktop header is in flow and long gone by here, so the reel owns the full screen. */
#services { --header-h: 0px; }
#services .service-row-inner {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding: 40px 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(32px, 6vw, 88px);
}
#services .service-copy { flex: 1 1 42%; min-width: 0; padding: 0; background: transparent; }
#services .service-copy h3 { max-width: 18ch; margin: 0 0 20px; font-size: clamp(34px, 4.6vw, 68px); font-weight: 800; line-height: 1.15; color: var(--deep); text-wrap: balance; }
#services .service-label::before { content: ""; display: block; width: 28px; height: 2px; margin-bottom: 20px; background: #c9803a; }
#services .service-benefit { max-width: 34ch; margin: 0 0 24px; font-size: clamp(20px, 1.6vw, 24px); font-weight: 400; line-height: 1.6; color: var(--deep); }
#services .service-contact { justify-content: space-between; gap: 20px; padding-block: 10px; }
#services .service-proof { flex: 1 1 52%; min-width: 0; margin: 0; }
#services .demo-screen { border: 1px solid var(--deep); border-radius: 4px; background: var(--paper); box-shadow: none; }
#services .demo-screen figcaption { padding: 8px 16px; }
#services .demo-screen .preview-stage, #services .demo-browser .preview-stage { border: 0; }
/* Playback belongs to the frame itself. Shared player feedback must not cover it. */
#services [data-media-stage]::after { content: none; display: none; }
#services [data-media-sound] { position: static; margin-block: 8px; }
#services .demo-browser { border: 1px solid var(--deep); border-radius: 4px; background: var(--paper); box-shadow: none; }
#services .browser-bar { border-bottom: 1px solid var(--deep); }
#services .browser-bar i { border-radius: 0; }
#services .demo-browser figcaption { padding: 8px 16px; }
#services .social-proof { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 28px); }
#services .social-frame { flex: 1 1 0; min-width: 0; max-width: 240px; margin: 0; }
#services .social-frame .preview-stage { border: 1px solid var(--deep); border-radius: 4px; background: var(--paper); }
#services .social-frame img { color: var(--deep); font-size: 14px; line-height: 1.7; }
#services .automation { max-width: 610px; }
#services .automation-demo-tag { margin: 0 0 20px; font-size: 14px; font-weight: 700; }
#services .automation-steps { margin-bottom: 18px; }
#services .automation * { animation: none; clip-path: none; }
#services .auto-form, #services .lead-table, #services .wa-toast { border: 1px solid var(--deep); border-radius: 4px; background: var(--paper); color: var(--deep); }
#services .wa-toast { border-inline-start-width: 1px; }
#services .field-fill, #services .lead-entry i, #services .toast-lines i { background: var(--deep); }
/* The HTML diagram is the final frame; css/film/automation.css stages its reveal. */
#services .lead-entry, #services .wa-toast { opacity: 1; transform: none; }
#services .auto-connector { background: var(--deep); transform: none; }
/* Proof media scale with the screen height so the pinned frame is filled, not a small island. */
@media (min-width: 721px) and (min-height: 541px) {
  #services .service-proof { flex-basis: 56%; }
  #services .demo-screen, #services .demo-browser { max-width: calc(66svh * 16 / 10); margin-inline: auto 0; }
  #services .social-frame { max-width: min(300px, calc(64svh * 9 / 16)); }
  #services .automation { max-width: 680px; }
}
@media (min-width: 1600px) and (min-height: 541px) {
  #services .service-row-inner { max-width: 1720px; }
  #services .automation { max-width: 760px; }
}
/* The ink mat sits inside the card edge, square, so frame, bar and caption share one outline. */
#services :is(.demo-screen, .demo-browser) { border-radius: 0; }
#services :is(.demo-screen, .demo-browser) .preview-stage { outline: 0; box-shadow: none; border: 6px solid #22201f; }
/* The stage is a button: a keyboard user sees where they are. Mouse and touch presses do not
   match :focus-visible, so no ring appears on a click or a tap. */
#services :is(.demo-screen, .demo-browser) .preview-stage:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; }
#services :is(.demo-screen, .demo-browser) .preview-stage :is(img, video) { object-fit: cover; }
#services .persona-proof-link { flex: 0 1 40%; justify-content: space-between; padding: 28px 0; border-block: 1px solid var(--deep); background: transparent; font-size: clamp(20px, 2.5vw, 32px); }
#services .service-row-persona .service-row-inner { padding-block: 48px 80px; }

@media (max-width: 720px) {
  #services { --header-h: 73px; }
  #services .services-heading { padding: 40px 24px 20px; }
  #services .services-heading > p { display: none; }
  #services.has-service-scenes [data-service-scene] { height: 140svh; }
  #services .service-row-inner { flex-direction: column; align-items: stretch; padding: 24px 24px calc(72px + var(--consent-h, 0px)); gap: 24px; }
  #services.has-service-scenes [data-service-scene] .service-row-inner { transform: none; }
  #services.has-service-scenes [data-service-scene] .service-proof {
    clip-path: inset(var(--service-cut-top, 0%) 0 var(--service-cut-bottom, 0%));
    transform: translateY(var(--service-shot-y, 0px));
  }
  #services.has-service-scenes [data-service-scene]:focus-within .service-proof { clip-path: none; transform: none; }
  #services .service-copy { flex: none; }
  #services .service-copy h3 { margin-bottom: 12px; }
  #services .service-label::before { margin-bottom: 12px; }
  /* Title, benefit and CTA always stack in one rhythm, whatever the title length. */
  #services .service-copy { display: flex; flex-direction: column; align-items: flex-start; }
  /* Benefit sentence: phone copy decision lives in css/indigo/mobile.css. */
  #services .service-contact { font-size: 16px; }
  /* #persona follows right below; its heading already says where the link would go. */
  #services .persona-proof-link { display: none; }
  #services .service-proof { flex: none; }
  #services .social-proof { gap: 16px; }
  #services .social-frame { max-width: 160px; }
  #services .automation-demo-tag { margin-bottom: 8px; }
  #services .service-row-content .service-row-inner { gap: 16px; }
  #services .automation-steps { margin-bottom: 12px; }
  #services .auto-form, #services .lead-table, #services .wa-toast { padding: 10px; }
  #services .fake-field { min-height: 32px; }
  #services .table-head { padding-bottom: 8px; }
  #services .lead-entry { padding-top: 10px; }
  #services .toast-lines { gap: 8px; padding-top: 10px; }
  #services .auto-connector { height: 18px; }
  #services .automation-steps { display: none; }
  #services .table-head, #services .fake-field, #services .wa-toast { font-size: 16px; }
  #services .persona-proof-link { flex: none; font-size: 22px; }
}

/* Without enhancement, or with reduced motion, all proofs are ordinary blocks. */
.motion-off #services.has-service-scenes [data-service-scene] { height: auto; }
.motion-off #services .service-scene-pin { position: static; height: auto; }
.motion-off #services .service-row-inner { opacity: 1; transform: none; }
.motion-off #services.has-service-scenes [data-service-scene] .service-proof,
.a11y-nomotion #services.has-service-scenes [data-service-scene] .service-proof { clip-path: none; transform: none; }
.motion-off #services .automation * { animation: none; opacity: 1; visibility: visible; transform: none; }
.a11y-nomotion #services.has-service-scenes [data-service-scene] { height: auto; }
.a11y-nomotion #services .service-scene-pin { position: static; height: auto; }
.a11y-nomotion #services .service-row-inner { transform: none; }
@media (prefers-reduced-motion: reduce) {
  #services.has-service-scenes [data-service-scene] { height: auto; }
  #services .service-scene-pin { position: static; height: auto; }
  #services.has-service-scenes [data-service-scene] .service-row-inner { opacity: 1; transform: none; }
  #services.has-service-scenes [data-service-scene] .service-proof { clip-path: none; transform: none; }
  #services .automation * { animation: none; opacity: 1; visibility: visible; transform: none; }
}

/* Underline only the label: an ancestor underline can cross an arrow's text box. */
#services a [data-copy] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .5em; }
#services a:hover [data-copy] { text-decoration-thickness: 2px; }
#services a [aria-hidden="true"] { display: inline-block; color: inherit; text-decoration: none; }
/* Keep text-line rectangles clear of ink borders, including static/reduced layouts. */
#services .automation-steps span { padding-top: 14px; }

/* Short phone viewports (browser toolbars leave ~600-740px): every scene must fit above the
   floating tools without cropping its proof. Proof widths derive from svh so aspect ratios hold. */
@media (max-width: 720px) and (max-height: 780px) {
  #services .service-row-inner { padding: 10px 24px calc(72px + var(--consent-h, 0px)); gap: 12px; }
  #services .service-copy h3 { margin-bottom: 6px; font-size: clamp(26px, 4.6svh, 34px); }
  #services .service-label::before { margin-bottom: 8px; }
  #services .service-benefit { margin-bottom: 4px; font-size: 16px; line-height: 1.45; }
  #services .service-contact { min-height: 44px; padding-block: 4px; }
  #services .demo-screen .preview-stage { width: min(100%, calc(27svh * 16 / 9)); margin-inline: auto; }
  #services .demo-screen figcaption, #services .demo-browser figcaption { padding: 4px 12px; }
  #services .demo-browser .preview-stage { width: min(100%, calc(26svh * 1.6)); margin-inline: auto; }
  #services .social-frame { max-width: min(160px, calc(33svh * 9 / 16)); }
  #services .automation-steps { display: none; }
  #services .automation-demo-tag { margin-bottom: 4px; }
  #services .auto-form, #services .lead-table, #services .wa-toast { padding: 8px; }
  #services .fake-field { min-height: 26px; }
  #services .auto-connector { height: 10px; }
  #services .toast-lines { padding-top: 6px; }
}

/* A landscape phone cannot contain a full proof and safe tool margins in one pin. */
@media (max-height: 540px) {
  #services.has-service-scenes [data-service-scene] { height: auto; }
  #services.has-service-scenes .service-scene-pin { position: static; height: auto; }
  #services.has-service-scenes [data-service-scene] .service-row-inner { transform: none; }
  #services.has-service-scenes [data-service-scene] .service-proof { clip-path: none; transform: none; }
}
/* Homepage: while the in-flow consent row sits right above, it already separates the stage
   from services; a shorter top keeps the seam free of a flat band over 64px. */
[data-consent-flow="always"]:has(> .hs-consent:not([hidden])) + #services .services-heading { padding-top: 24px; }
