/* Service pages (/fire-alarm/ and the rest, built by services/build.mjs). They share styles.css
   with the home page and add this sheet; no script runs on them. */

/* ---------- Hero illustration ---------- */
.svc-art {
  margin: 0;
  position: relative;
  border: 1px solid var(--night-line);
  border-radius: 12px;
  padding: 40px 16px 14px;
  background:
    radial-gradient(circle at 1px 1px, rgba(154, 164, 177, 0.16) 1px, transparent 1.5px) 0 0 / 16px 16px,
    linear-gradient(180deg, #0d1218, #090c10);
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.svc-art-label {
  position: absolute; top: 14px; left: 16px; right: 16px;
  display: flex; justify-content: space-between; gap: 12px;
  font: 500 0.6875rem/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-night-muted);
}
.svc-art-label span:first-child { color: var(--amber); }
.svc-art-svg { display: block; width: 100%; height: auto; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.svc-art .a-ln { stroke: #2d3641; stroke-width: 1.5; }
.svc-art .a-ln2 { stroke: #5a6676; stroke-width: 1.5; }
.svc-art .a-hi { stroke: #b4bdc8; stroke-width: 1.6; }
.svc-art .a-wall { stroke: #7f8a98; stroke-width: 3; }
.svc-art .a-body { fill: #10151b; }
.svc-art .a-am { stroke: var(--amber); stroke-width: 1.6; }
.svc-art .a-amf { fill: var(--amber); }
.svc-art .a-ok { fill: #39c985; }
.svc-art .a-dim { fill: #3a4552; }
.svc-art .a-zone { fill: var(--amber); }
.svc-art text { font: 500 9px var(--f-mono); letter-spacing: 0.1em; stroke: none; fill: #7f8a98; }
.svc-art .a-tam { fill: var(--amber); }

/* Moving parts. Each one's resting style is a sensible still drawing, which is what reduced
   motion shows. */
.svc-art .a-flow { stroke: var(--amber); stroke-width: 1.8; stroke-dasharray: 2 12; animation: a-flow 1.4s linear infinite; }
@keyframes a-flow { to { stroke-dashoffset: -28; } }
.svc-art .a-blink { animation: a-blink 1.6s steps(1) infinite; }
@keyframes a-blink { 50% { opacity: 0.2; } }
.svc-art .a-flash { animation: a-flash 2.2s linear infinite; }
@keyframes a-flash { 0%, 10%, 100% { opacity: 0.15; } 3% { opacity: 1; } }
.svc-art .a-ring { transform-box: fill-box; transform-origin: center; animation: a-ring 1.8s ease-out infinite; }
@keyframes a-ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.8); opacity: 0; } }
.svc-art .a-wave > * { animation: a-wave 1.8s ease-in-out infinite; }
.svc-art .a-wave > :nth-child(2) { animation-delay: 0.25s; }
.svc-art .a-wave > :nth-child(3) { animation-delay: 0.5s; }
.svc-art .a-wave > :nth-child(4) { animation-delay: 0.25s; }
@keyframes a-wave { 0%, 100% { opacity: 0.15; } 40% { opacity: 1; } }
.svc-art .a-pulse { animation: a-pulse 2.6s ease-in-out infinite; }
@keyframes a-pulse { 50% { opacity: 0.45; } }
.svc-art .a-sweep { transform-box: view-box; transform-origin: 162px 160px; animation: a-sweep 7s ease-in-out infinite alternate; }
@keyframes a-sweep { from { transform: rotate(-27deg); } to { transform: rotate(27deg); } }
.svc-art .a-smoke { animation: a-smoke 3s ease-in infinite; }
@keyframes a-smoke { from { transform: translateY(8px); opacity: 0; } 40% { opacity: 0.8; } to { transform: translateY(-10px); opacity: 0; } }
/* The access control door: a badge comes to the reader, the light turns green and the strike releases. */
.svc-art .a-card { animation: a-card 4s ease-in-out infinite; }
@keyframes a-card { 0%, 12% { transform: translateX(28px); } 32%, 64% { transform: none; } 84%, 100% { transform: translateX(28px); } }
.svc-art .a-led { fill: #39c985; animation: a-led 4s steps(1) infinite; }
@keyframes a-led { 0% { fill: var(--amber); } 36% { fill: #39c985; } 72% { fill: var(--amber); } }
.svc-art .a-strike { animation: a-strike 4s steps(1) infinite; }
@keyframes a-strike { 0% { fill: none; } 36% { fill: rgba(247, 168, 27, 0.45); } 72% { fill: none; } }

/* ---------- Header and hero ---------- */
.svc .brand img { display: block; height: 52px; width: auto; }
.svc .footer a[aria-current="page"] { color: var(--on-night); }
.svc-hero { min-height: 0; background: radial-gradient(55% 75% at 80% 45%, rgba(247, 168, 27, 0.11), transparent 70%), var(--night); }
/* A faint dot grid, strongest behind the drawing. */
.svc-hero::before {
  background: radial-gradient(circle at 1px 1px, rgba(154, 164, 177, 0.11) 1px, transparent 1.5px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(100deg, transparent 15%, #000 75%); mask-image: linear-gradient(100deg, transparent 15%, #000 75%);
}
.svc-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-block: clamp(36px, 6vw, 76px) calc(clamp(40px, 6vw, 72px) + 56px);
}
.svc-hero-copy { display: grid; gap: 22px; align-content: center; }
.svc .hero h1 { font-size: clamp(2rem, 1.3rem + 2.5vw, 3.35rem); max-width: none; }
.svc .hero h1 > .hero-line { max-width: 18ch; }
.svc-hero-copy > :is(.lede, .hero-cta), .svc-art { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.svc-hero-copy > .lede { animation-delay: 0.16s; }
.svc-hero-copy > .hero-cta { animation-delay: 0.24s; }
.svc-art { animation-delay: 0.3s; }
.crumbs { font: 500 0.8125rem var(--f-mono); color: var(--on-night-muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.crumbs li + li::before { content: "/"; margin-right: 10px; color: #4a5562; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover, .crumbs [aria-current] { color: var(--on-night); }

/* Icons on the light body sit on a small amber tile. */
.svc-tile { flex: none; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--amber-wash); box-shadow: inset 0 0 0 1px rgba(143, 85, 0, 0.12); }
.svc-icon { width: 32px; height: 32px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svc-icon .accent { stroke: var(--amber-deep); }
.svc-icon .fill { fill: var(--amber); stroke: none; }
.svc-icon .fill.ok { fill: var(--ok); }

/* ---------- At a glance: four facts that overlap the hero's bottom edge ---------- */
.svc-highlights-band { position: relative; z-index: 2; margin-top: -56px; }
.svc-highlights { list-style: none; margin-block: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.svc-highlights li {
  display: flex; gap: 14px; align-items: center; padding: 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 26px 50px -30px rgba(18, 22, 27, 0.5);
}
.svc-highlights p { display: grid; gap: 2px; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
.svc-highlights strong { font: 600 1.0625rem/1.2 var(--f-display); color: var(--ink); }

/* ---------- On this page ---------- */
.svc-toc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-block: 32px 4px; }
.svc-toc p { font: 500 0.75rem var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.svc-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.svc-toc a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font-size: 0.875rem; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.svc-toc a:hover { border-color: var(--ink); color: var(--ink); background: var(--amber-wash); }

/* ---------- Sections ---------- */
.svc-sec { padding-block: clamp(56px, 8vw, 100px); }
.svc-sec--alt { background: var(--paper-2); }
.svc-sec-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.svc-sec-grid--solo { grid-template-columns: minmax(0, 1fr); }
.svc-sec-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.svc-sec-main h2 { font-size: var(--step-3); max-width: 22ch; }
.svc-sec-main .kicker { display: flex; align-items: center; gap: 10px; }
.svc-num { font: 600 0.75rem/1 var(--f-mono); letter-spacing: 0.04em; color: #1a1102; background: var(--amber); padding: 4px 6px; border-radius: 3px; }
.svc-prose { display: grid; gap: 14px; max-width: 66ch; }
.svc-prose p { color: var(--ink-2); font-size: 1.0625rem; }
.svc-side { position: sticky; top: calc(var(--header-h) + 24px); }

/* A section's own checklist, beside its text */
.svc-panel {
  padding: 26px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--amber); border-radius: 12px;
  box-shadow: 0 26px 50px -38px rgba(18, 22, 27, 0.45);
}
.svc-panel-title, .svc-aside-title { font: 500 0.75rem/1.3 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-deep); margin-bottom: 16px; }
.svc-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.svc-checks li { position: relative; padding-left: 34px; color: var(--ink-2); line-height: 1.5; }
.svc-checks li::before { content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 6px; background: var(--amber-wash); box-shadow: inset 0 0 0 1px rgba(143, 85, 0, 0.2); }
.svc-checks li::after { content: ""; position: absolute; left: 8px; top: 5px; width: 6px; height: 11px; border: solid var(--amber-deep); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Side panels: facts read like a spec sheet on the dark of the hero */
.svc-facts {
  padding: 26px; border-radius: 12px; color: var(--on-night); border: 1px solid var(--night-line);
  background: radial-gradient(circle at 1px 1px, rgba(154, 164, 177, 0.1) 1px, transparent 1.5px) 0 0 / 18px 18px, var(--night);
  box-shadow: 0 30px 60px -40px rgba(7, 9, 12, 0.7);
}
.svc-facts .svc-aside-title { color: var(--amber); margin-bottom: 6px; }
.svc-facts dl { margin: 0; display: grid; }
.svc-facts dl > div { display: grid; gap: 4px; padding-block: 14px; border-top: 1px solid var(--night-line); }
.svc-facts dl > div:first-child { border-top: 0; }
.svc-facts dt { font: 500 0.6875rem/1.4 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-night-muted); }
.svc-facts dd { margin: 0; font: 600 1.0625rem/1.35 var(--f-display); }

.svc-quote { margin: 0; padding: 30px 28px; border-radius: 12px; background: var(--amber); color: #1a1102; box-shadow: 0 30px 60px -40px rgba(143, 85, 0, 0.6); }
.svc-quote blockquote { margin: 0; font: 700 clamp(1.5rem, 1.1rem + 1.3vw, 2.125rem)/1.12 var(--f-display); text-wrap: balance; }
.svc-quote blockquote::before { content: "\201C"; display: block; font-size: 3.6rem; line-height: 0.62; margin-bottom: 8px; }
.svc-quote figcaption { margin-top: 16px; font-size: 1rem; color: #4a3000; }

.svc-flow-box { padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 26px 50px -38px rgba(18, 22, 27, 0.45); }
.svc-flow { list-style: none; margin: 0; padding: 0; display: grid; }
.svc-flow li { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: center; padding-block: 10px; color: var(--ink); font-weight: 500; line-height: 1.4; }
.svc-flow li + li::before { content: ""; position: absolute; left: 25px; top: -10px; height: 20px; border-left: 2px dashed var(--amber); }

.svc-stats { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; max-width: 66ch; }
.svc-stats li { display: grid; gap: 6px; align-content: start; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 10px; }
.svc-stat-num { font: 700 2.5rem/1 var(--f-display); color: var(--ink); letter-spacing: -0.01em; }
.svc-stat-num small { font: 500 0.875rem var(--f-mono); letter-spacing: 0.04em; color: var(--amber-deep); margin-left: 6px; }
.svc-stat-label { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }
.svc-stat-box { padding: 26px; border-radius: 12px; background: var(--night); color: var(--on-night); border: 1px solid var(--night-line); }
.svc-stat-box .svc-aside-title { color: var(--amber); }
.svc-stats--stack { margin: 0; grid-template-columns: minmax(0, 1fr); }
.svc-stat-box .svc-stats li { background: rgba(255, 255, 255, 0.03); border-color: var(--night-line); border-left-color: var(--amber); }
.svc-stat-box .svc-stat-num { color: var(--on-night); }
.svc-stat-box .svc-stat-num small { color: var(--amber); }
.svc-stat-box .svc-stat-label { color: #bfc7d1; }

/* "Label: text" bullets become cards under the section's text */
.svc-cards { list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.svc-card {
  display: grid; gap: 12px; align-content: start; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 22px 50px -40px rgba(18, 22, 27, 0.45); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.svc-card:hover { border-color: #c4ccd5; box-shadow: 0 26px 50px -30px rgba(18, 22, 27, 0.4); transform: translateY(-3px); }
.svc-card { grid-column: span 4; }
.svc-card--half { grid-column: span 6; }
.svc-card--quarter { grid-column: span 3; }
.svc-card--wide { grid-column: 1 / -1; }
/* A card on a row of its own reads better with the icon beside the text. */
.svc-card--half, .svc-card--wide { grid-template-columns: 52px minmax(0, 1fr); column-gap: 18px; row-gap: 8px; }
.svc-card--half > .svc-tile, .svc-card--wide > .svc-tile { grid-row: span 2; }
.svc-card h3 { font-size: 1.25rem; }
.svc-card p { color: var(--ink-2); font-size: 0.96875rem; }
.svc-steps { margin-top: clamp(28px, 4vw, 44px); }

/* ---------- FAQ ---------- */
.svc-faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.svc-faq-head { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 16px; justify-items: start; }
.svc-faq-head h2 { font-size: var(--step-3); }
.svc-faq-head p:not(.kicker) { color: var(--ink-2); font-size: 1.0625rem; max-width: 40ch; }
.svc-faq-head p a { color: var(--ink); font-weight: 600; text-decoration-color: var(--amber); text-underline-offset: 3px; white-space: nowrap; }
.svc-faq { display: grid; gap: 10px; }
.svc-faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; transition: border-color 0.2s, box-shadow 0.2s; }
.svc-faq details[open] { border-color: #c4ccd5; box-shadow: 0 22px 50px -38px rgba(18, 22, 27, 0.5); }
.svc-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-weight: 600; color: var(--ink); border-radius: 12px; }
.svc-faq summary::-webkit-details-marker { display: none; }
.svc-faq summary::after {
  content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(var(--amber-deep), var(--amber-deep)) center / 10px 2px no-repeat, linear-gradient(var(--amber-deep), var(--amber-deep)) center / 2px 10px no-repeat, var(--amber-wash);
  transition: transform 0.2s;
}
.svc-faq details[open] summary::after { background: linear-gradient(#1a1102, #1a1102) center / 10px 2px no-repeat, var(--amber); }
.svc-faq summary:hover { color: var(--amber-deep); }
.svc-faq summary:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.svc-faq details p { padding: 0 20px 20px; color: var(--ink-2); max-width: 70ch; }

/* ---------- Related services ---------- */
.svc-related h2 { font-size: var(--step-3); margin-top: 14px; }
.svc-rel-grid { list-style: none; margin: clamp(24px, 4vw, 36px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.svc-rel {
  height: 100%; display: grid; gap: 12px; align-content: start; padding: 24px; color: inherit; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.svc-rel:hover { border-color: var(--ink); box-shadow: 0 26px 50px -32px rgba(18, 22, 27, 0.45); transform: translateY(-3px); }
.svc-rel-name { font: 600 1.25rem/1.15 var(--f-display); color: var(--ink); }
.svc-rel-text { color: var(--ink-2); font-size: 0.9375rem; }
.svc-rel-more { font-weight: 600; font-size: 0.9375rem; color: var(--amber-deep); }
.svc-rel-more::after { content: " \2192"; }
.svc-rel:hover .svc-rel-more { color: var(--ink); }

/* Cards and panels rise into place as they scroll in, where the browser can drive that from
   the scroll position alone. Elsewhere they simply stand still. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .svc-highlights li, .svc-panel, .svc-aside, .svc-stats li, .svc-card, .svc-steps li, .svc-faq details, .svc-rel {
      animation: svc-in linear both; animation-timeline: view(); animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes svc-in { from { opacity: 0; translate: 0 26px; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .svc-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-cards, .svc-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-card, .svc-card--half, .svc-card--quarter { grid-column: auto; grid-template-columns: none; }
  .svc-card--half > .svc-tile, .svc-card--quarter > .svc-tile { grid-row: auto; }
  .svc-card:last-child:nth-child(odd) { grid-column: 1 / -1; grid-template-columns: 52px minmax(0, 1fr); column-gap: 18px; row-gap: 8px; }
  .svc-card:last-child:nth-child(odd) > .svc-tile { grid-row: span 2; }
}
@media (max-width: 900px) {
  .svc-hero-grid, .svc-sec-grid, .svc-faq-grid { grid-template-columns: minmax(0, 1fr); }
  .svc-art { max-width: 600px; }
  .svc-side, .svc-faq-head { position: static; }
  .svc .hero h1 > .hero-line { max-width: 20ch; }
}
@media (max-width: 620px) {
  .svc-highlights { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .svc-highlights li { padding: 14px 16px; }
  .svc-cards, .svc-rel-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* On a phone every card puts its icon beside the text, so a list of six isn't six screens tall. */
  .svc-card, .svc-card:last-child:nth-child(odd), .svc-rel { grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; row-gap: 6px; padding: 20px; }
  .svc-card > .svc-tile, .svc-card:last-child:nth-child(odd) > .svc-tile { grid-row: span 2; }
  .svc-rel > .svc-tile { grid-row: span 3; }
  .svc-card .svc-tile, .svc-rel .svc-tile { width: 44px; height: 44px; }
  .svc-card .svc-icon, .svc-rel .svc-icon { width: 28px; height: 28px; }
  .svc-card h3, .svc-rel-name { font-size: 1.125rem; }
  .svc-art { padding: 36px 10px 10px; }
  .svc-art-label { top: 13px; left: 12px; right: 12px; }
  /* The section links scroll sideways in one row instead of stacking. */
  .svc-toc ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .svc-toc ul::-webkit-scrollbar { display: none; }
  .svc-panel, .svc-facts, .svc-flow-box, .svc-stat-box { padding: 22px 20px; }
}

@media print {
  .svc-art, .svc-toc, .svc-faq-head .btn { display: none !important; }
  .svc-hero-grid { grid-template-columns: 1fr; padding-block: 16px; }
  .svc-highlights-band { margin-top: 0; }
  .svc-sec { padding-block: 24px; background: none !important; }
  .svc-side, .svc-faq-head { position: static; }
  .svc-facts, .svc-stat-box, .svc-quote { background: #fff !important; color: #000 !important; border: 1px solid #bbb; box-shadow: none; }
  .svc-facts dt, .svc-stat-box .svc-stat-label, .svc-quote figcaption { color: #333 !important; }
  .svc-faq details { break-inside: avoid; }
  .svc-highlights li, .svc-card, .svc-rel, .svc-panel, .svc-stats li { box-shadow: none; break-inside: avoid; }
}
