/* Service pages: /services/ and its child pages (functions.php loads this only there). Tokens come from style.css.
   Everything here reads fine without JavaScript. service-pages.js adds the chips, step controls and Before/After switch,
   and marks each enhanced block with .is-live. */

/* ---------- Shared ---------- */
.svc-section { padding-top: clamp(48px, 7vw, 80px); }
.svc-section .section-head { margin-bottom: 28px; }
.svc-section .section-head .eyebrow { margin: 0; }

/* Check-mark lists */
.svc-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.svc-checks li { margin: 0; position: relative; padding-left: 30px; }
.svc-checks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 19px; height: 19px; border-radius: 50%;
  background: rgba(242,169,59,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.2 2.2 4.6-4.9' fill='none' stroke='%23f2a93b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.svc-checks--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 40px; max-width: 1040px; }
@media (max-width: 760px) { .svc-checks--cols { grid-template-columns: 1fr; } }

.svc-nowrap { white-space: nowrap; } /* keeps words like "read-only" on one line */

.svc-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); }
.svc-box h3 { margin: 0 0 14px; }

/* ---------- Intro ---------- */
.svc-intro { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 28px clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 880px) { .svc-intro { grid-template-columns: 1fr; } }
.svc-intro__text > p { max-width: 64ch; }
.svc-intro__text > p:first-child { font-size: 1.08rem; }
.svc-intro .actions { margin-top: 22px; }
.svc-glance { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 8px; }
.svc-glance__k { font-family: var(--font-mono); font-weight: 500; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.svc-glance dl { margin: 0; }
.svc-glance dl > div { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.svc-glance dl > div:first-child { border-top: 0; }
.svc-glance dt { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
.svc-glance dd { margin: 0; }

/* ---------- What you get (AI chat: two boxes) ---------- */
.svc-get { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 820px) { .svc-get { grid-template-columns: 1fr; } }

/* ---------- Real example ---------- */
.svc-example { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px clamp(28px, 5vw, 56px); align-items: center; }
@media (max-width: 880px) { .svc-example { grid-template-columns: 1fr; } }
.svc-example__text h2 { margin-bottom: 14px; }
.svc-example__text .eyebrow { margin-bottom: 10px; color: var(--muted); } /* matches the section-head eyebrows (style.css) */
.svc-example__text a { font-weight: 500; }
.svc-shot { margin: 0; min-width: 0; }
.svc-shot img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }
.svc-shot figcaption { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.svc-shot--phone { width: min(300px, 100%); justify-self: center; }
.svc-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); }
.svc-stat p { margin: 0; color: var(--muted); }
.svc-stat__k { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px !important; }
.svc-stat .svc-stat__big { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.1; color: var(--amber); margin-top: 14px; }

/* ---------- FAQ and checklist: <details> ---------- */
.faq, .checklist { display: grid; gap: 10px; max-width: 880px; }
.faq details, .checklist details { background: var(--card); border: 1px solid var(--line); border-radius: 9px; transition: border-color .2s ease; }
.faq details[open], .checklist details[open] { border-color: #3a4554; }
.faq summary, .checklist summary { list-style: none; cursor: pointer; position: relative; padding: 16px 54px 16px 18px; border-radius: 9px; }
.faq summary::-webkit-details-marker, .checklist summary::-webkit-details-marker { display: none; }
.faq summary { font-weight: 600; }
.faq summary::after, .checklist summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--amber); border-bottom: 2px solid var(--amber);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] > summary::after, .checklist details[open] > summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq summary:hover, .checklist summary:hover { background: rgba(255,255,255,.025); }
.faq summary:focus-visible, .checklist summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 9px; }
.faq__a { padding: 0 18px 18px; }
.faq__a p { margin: 0 0 .7em; }
.faq__a p:last-child { margin-bottom: 0; }

.checklist summary { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; }
.checklist__n {
  grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(242,169,59,.5);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: .78rem; color: var(--amber);
}
.checklist details[open] .checklist__n { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.checklist__t { font-weight: 600; }
.checklist__s { color: var(--muted); font-size: .93rem; }
.checklist__body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; padding: 2px 18px 18px 66px; }
@media (max-width: 640px) { .checklist__body { grid-template-columns: 1fr; padding-left: 18px; } }
.checklist__body p { margin: 0; }
.checklist__k { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin-bottom: 4px !important; }
.checklist-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; max-width: 880px; margin: 0 0 14px; }
.checklist-tools p { margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; }

/* Small outline buttons added by the script */
.svc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 9px 15px;
  border: 1px solid var(--field-line); border-radius: 7px; background: transparent; color: var(--text);
  font: 500 .95rem/1.2 var(--font-body); cursor: pointer;
}
.svc-btn:hover { border-color: var(--muted); }
.svc-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.svc-btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.svc-btn[aria-pressed="true"], .svc-btn[aria-expanded="true"] { border-color: var(--amber); background: rgba(242,169,59,.12); color: var(--text); }

/* ---------- AI chat: "What could it do for you?" ---------- */
.fit-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.fit-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 24px); }
.fit-group h3 { font-size: 1.2rem; margin: 0 0 14px; }
.fit-group[hidden] { display: none; }
.fit.is-live .fit-group { border-color: rgba(242,169,59,.4); animation: svc-in .3s ease both; }
.fit-pick { margin: 0 0 10px; font-weight: 600; }
.fit-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.fit-chip {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 9px 14px; text-align: left;
  border: 1px solid var(--field-line); border-radius: 10px; background: transparent; color: var(--text);
  font: 500 .95rem/1.25 var(--font-body); cursor: pointer; transition: border-color .15s, background .15s;
}
.fit-chip::before { content: ""; width: 17px; height: 17px; flex: none; border-radius: 5px; border: 1.5px solid var(--field-line); }
.fit-chip:hover { border-color: var(--muted); }
.fit-chip:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.fit-chip[aria-pressed="true"] { border-color: var(--amber); background: rgba(242,169,59,.12); }
.fit-chip[aria-pressed="true"]::before {
  border-color: var(--amber);
  background: var(--amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.2 2.2 4.6-4.9' fill='none' stroke='%231a1205' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.fit-status { margin: 0 0 18px; color: var(--muted); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; }
.fit-empty { margin: 0; padding: 22px; border: 1px dashed var(--field-line); border-radius: var(--radius); color: var(--muted); }
.fit-empty[hidden] { display: none; }
@keyframes svc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Automation: request → saved → emailed → logged ---------- */
.flow__steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: flow; }
@media (max-width: 980px) { .flow__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .flow__steps { grid-template-columns: 1fr; } }
.flow__step {
  counter-increment: flow; margin: 0; position: relative; display: grid; gap: 8px; align-content: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 20px;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.flow__step::before { content: "0" counter(flow); font-family: var(--font-mono); color: var(--amber); font-size: .8rem; letter-spacing: .1em; }
.flow__icon { color: var(--amber); display: inline-flex; }
.flow__icon svg { width: 28px; height: 28px; }
.flow__step h3 { font-size: 1.2rem; margin: 0; }
.flow__step p { margin: 0; color: var(--muted); font-size: .97rem; }
/* Arrows between the steps on a wide screen */
@media (min-width: 981px) {
  .flow__step:not(:last-child)::after {
    content: ""; position: absolute; top: 38px; right: -16px; width: 14px; height: 2px; background: var(--line);
  }
}
.flow__if-fail { display: none; }
.flow__fail { margin-top: 18px; padding: 16px 18px; border: 1px dashed rgba(242,169,59,.55); border-radius: 9px; background: rgba(242,169,59,.06); max-width: 880px; }
.flow__fail h3 { font-size: 1.1rem; margin: 0 0 6px; }
.flow__fail p { margin: 0; }
.flow__fail[hidden] { display: none; }
.flow__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.flow__status { flex: 1 1 100%; margin: 0; font-family: var(--font-mono); font-size: .82rem; letter-spacing: .04em; color: var(--muted); }
/* Live: the current step is lit, earlier steps are done. Every step stays readable. */
.flow.is-live .flow__step.is-current { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 14px 40px rgba(242,169,59,.12); }
.flow.is-live .flow__step.is-done { border-color: rgba(242,169,59,.45); }
@media (min-width: 981px) { .flow.is-live .flow__step.is-done::after { background: var(--amber); } }
.flow.is-live .flow__step.is-done .flow__icon::after { content: "Done"; margin-left: 10px; align-self: center; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--online); }
.flow.is-fail .flow__step--mail { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.flow.is-fail .flow__step--mail .flow__icon { color: var(--danger); }
.flow.is-fail .flow__if-fail { display: block; color: var(--text); padding: 8px 10px; border-radius: 6px; background: rgba(255,138,128,.1); font-size: .93rem; }

/* ---------- Websites: before and after ---------- */
.ba-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .ba-grid { grid-template-columns: 1fr; } }
.ba-metric { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 24px); min-width: 0; }
.ba-client { margin: 0 0 4px; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ba-metric h3 { font-size: 1.25rem; margin: 0 0 4px; }
.ba-note { margin: 0 0 16px; color: var(--muted); font-size: .93rem; }
.ba-rows { display: grid; gap: 10px; }
.ba-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.ba-lbl { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ba-track { display: block; height: 12px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.ba-fill { display: block; height: 100%; border-radius: 6px; background: #6b7686; }
.ba-row--after .ba-fill { background: var(--amber); }
.ba-val { font-family: var(--font-mono); font-size: .9rem; white-space: nowrap; text-align: right; }
.ba-also { margin-top: 24px; max-width: 880px; }
.ba-also h3 { font-size: 1.15rem; margin: 0 0 12px; }

.ba-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 18px; border: 1px solid var(--field-line); border-radius: 10px; }
.ba-switch button {
  min-height: 40px; min-width: 88px; padding: 8px 16px; border: 0; border-radius: 7px; background: transparent; color: var(--text);
  font: 600 .95rem/1.2 var(--font-body); cursor: pointer;
}
.ba-switch button:hover { background: rgba(255,255,255,.05); }
.ba-switch button[aria-pressed="true"] { background: var(--amber); color: var(--amber-ink); }
.ba-switch button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
/* Live: one bar per card that changes between the two values. The two plain rows stay for screen readers. */
.ba-live { display: none; }
.ba.is-live .ba-live { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; }
.ba.is-live .ba-rows { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ba-big { flex: 1 1 100%; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 2.5rem); line-height: 1; }
/* Normal case on purpose: units like "s" must not turn into "S". */
.ba-when { flex: 1 1 100%; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .02em; color: var(--muted); }
.ba-live .ba-track { flex: 1 1 100%; margin-top: 8px; height: 16px; border-radius: 8px; border-style: dashed; border-color: var(--field-line); }
.ba-live .ba-fill { border-radius: 7px; transition: width .8s cubic-bezier(.2, .7, .2, 1), background-color .3s ease; }
.ba[data-view="after"] .ba-live .ba-fill { background: var(--amber); }

/* ---------- Closing call to action and other services ---------- */
.svc-cta {
  margin-top: clamp(48px, 7vw, 80px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 36px;
  padding: clamp(22px, 4vw, 34px); border: 1px solid rgba(242,169,59,.4); border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(242,169,59,.1), rgba(242,169,59,0) 60%), var(--card);
}
.svc-cta > div { flex: 1 1 380px; min-width: 0; }
.svc-cta h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 6px; }
.svc-cta p { margin: 0; color: var(--muted); max-width: 58ch; }
.svc-more { margin-top: clamp(40px, 6vw, 56px); }
.svc-more .eyebrow { color: var(--muted); }
.svc-more ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.svc-more li { margin: 0; }
.svc-more a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--text); text-decoration: none; font-weight: 500;
}
.svc-more a::after { content: "→"; content: "→" / ""; color: var(--amber); flex: none; }
.svc-more a:hover { border-color: var(--amber); color: var(--text); }

/* ---------- Hub: /services/ ---------- */
.svc-hub-intro { max-width: 760px; }
.svc-hub-intro p { margin: 0; }
.svc-hub-intro .actions { margin-top: 20px; }
.svc-hub-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: clamp(32px, 5vw, 48px); }
@media (max-width: 760px) { .svc-hub-cards { grid-template-columns: 1fr; } }
.svc-hub-card {
  position: relative; display: grid; gap: 12px; align-content: start; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 30px);
  transition: border-color .2s ease, transform .2s ease;
}
.svc-hub-card:hover, .svc-hub-card:focus-within, .svc-hub-card:target { border-color: var(--amber); }
.svc-hub-card:hover { transform: translateY(-2px); }
.svc-hub-card .k { font-family: var(--font-mono); font-size: .72rem; color: var(--amber); letter-spacing: .1em; }
.svc-hub-card h2 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); margin: 0; }
.svc-hub-card h2 a { color: var(--text); text-decoration: none; }
/* The heading link covers the whole card. */
.svc-hub-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.svc-hub-card h2 a:focus-visible { outline: none; }
.svc-hub-card h2 a:focus-visible::after { outline: 2px solid var(--amber); outline-offset: 3px; }
.svc-hub-card > p { margin: 0; color: var(--muted); }
.svc-hub-card .svc-checks { gap: 6px; font-size: .97rem; }
.svc-hub-card .more { margin-top: 4px; color: var(--amber); font-weight: 500; }
.svc-hub-about { margin: 24px 0 0; }
.svc-hub-about a { font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .svc-hub-card:hover { transform: none; }
  .ba-live .ba-fill, .flow__step, .fit-chip, .faq details, .checklist details { transition: none; }
}
