/* Perkins Applied Technologies: shared styles for service pages and 404.
   Tokens match the homepage (see DESIGN.md). */
:root {
  color-scheme: dark;
  --bg: #030603;
  --bg-2: #071007;
  --line: #133a17;
  --line-soft: #0c2210;
  --green: #00ff41;
  --green-2: #00c832;
  --green-dim: #0f6b22;
  --green-mid: #21a03c;
  --green-rgb: 0 255 65;
  --text: #c9d8ca;
  --muted: #7f9a82;
  --white: #eefcef;
  --hit: 44px;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --max: 1180px;
  accent-color: var(--green);
  scrollbar-color: var(--green-dim) var(--bg);
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; color: var(--text); background: var(--bg); font: 400 17px/1.65 var(--sans); }
::selection { background: var(--green); color: #000; }
a { color: var(--green); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; display: inline-flex; align-items: center; min-height: var(--hit); background: var(--green); color: #000; padding: 0 1rem; }

/* top bar */
.top { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; background: rgb(3 6 3 / .92); backdrop-filter: blur(6px); }
.top > .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { position: relative; display: inline-flex; align-items: center; gap: .6em; font-family: var(--mono); font-weight: 600; color: var(--white); text-decoration: none; font-size: .95rem; letter-spacing: .02em; }
.brand::after { content: ""; position: absolute; inset: -10px -6px; }
.brand .pmark { color: var(--green); height: 1.3em; width: auto; flex: none; filter: drop-shadow(0 0 5px rgb(var(--green-rgb) / .6)); }
.brand .caret { display: inline-block; width: .62em; height: .16em; margin-left: .06em; background: var(--green); box-shadow: 0 0 8px rgb(var(--green-rgb) / .75); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.top .primary { display: flex; align-items: center; gap: 1.75rem; font-family: var(--mono); font-size: .85rem; }
.top .primary a { color: var(--muted); text-decoration: none; }
.top .primary a:hover { color: var(--green); }
.top .primary a.opt { position: relative; padding-block: 3px; }
.top .primary a.opt::after { content: ""; position: absolute; inset: -8px -6px; }
.top .primary a[aria-current] { color: var(--green); }
.top .primary .call { display: inline-flex; align-items: center; min-height: var(--hit); color: var(--bg); background: var(--green); padding: 0 1rem; font-weight: 600; }
.top .primary .call:hover { color: var(--bg); background: var(--white); }
.menu-btn { display: none; font: 500 .8rem var(--mono); color: var(--text); background: transparent; border: 1px solid var(--line); min-height: var(--hit); min-width: var(--hit); padding: 0 .9rem; cursor: pointer; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { color: var(--green); border-color: var(--green-dim); }
.mnav { border-top: 1px solid var(--line); }
.mnav[hidden] { display: none; }
.mnav .wrap { display: grid; padding-block: .25rem .75rem; }
.mnav a { font-family: var(--mono); font-size: .9rem; color: var(--muted); text-decoration: none; padding: .8rem 0; border-bottom: 1px solid var(--line-soft); }
.mnav a:last-child { border-bottom: 0; }
.mnav a:hover { color: var(--green); }
@media (max-width: 820px) { .top .primary .opt { display: none; } .menu-btn { display: inline-flex; align-items: center; } .top .primary { gap: .75rem; } }
@media (min-width: 821px) { .mnav { display: none !important; } }
@media (max-width: 560px) { .brand .typed { display: none; } }

/* breadcrumb */
.crumbs { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin: 0 0 1.5rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--hit); }
.crumbs a:hover { color: var(--green); }
.crumbs [aria-current] { color: var(--text); display: inline-flex; align-items: center; min-height: var(--hit); }

/* hero */
.hero { border-bottom: 1px solid var(--line); padding-block: clamp(2.5rem, 7vw, 5rem); background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.label { font-family: var(--mono); font-size: .8rem; color: var(--green); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .75rem; }
h1 { font-family: var(--mono); font-weight: 600; color: var(--white); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 1.25rem; max-width: 26ch; }
h1 em { font-style: normal; color: var(--green); }
.lead { font-size: 1.15rem; max-width: 60ch; margin: 0 0 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.btn { display: inline-flex; align-items: center; min-height: var(--hit); font-family: var(--mono); font-weight: 600; font-size: .95rem; text-decoration: none; padding: .9rem 1.4rem; background: var(--green); color: #000; border: 1px solid var(--green); }
.btn:hover { background: var(--white); border-color: var(--white); }
.link-mono { display: inline-flex; align-items: center; min-height: var(--hit); font-family: var(--mono); font-size: .95rem; color: var(--text); text-decoration: underline; text-decoration-color: var(--green-dim); text-underline-offset: 6px; }
.link-mono:hover { color: var(--green); text-decoration-color: var(--green); }

/* sections */
section { padding-block: clamp(2.75rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
h2 { font-family: var(--mono); color: var(--white); font-weight: 600; font-size: clamp(1.35rem, 2.6vw, 1.8rem); line-height: 1.3; margin: 0 0 1rem; max-width: 32ch; }
h3 { font-family: var(--mono); color: var(--white); font-size: 1.05rem; font-weight: 600; margin: 0 0 .5rem; }
p { margin: 0 0 1.1rem; }
.muted { color: var(--muted); }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; max-width: 70ch; }
.checks li { position: relative; padding-left: 1.75rem; }
.checks li::before { content: ">"; position: absolute; left: 0; top: 0; font-family: var(--mono); color: var(--green-mid); font-weight: 600; }

.grid { display: grid; gap: 0; grid-template-columns: 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: 2rem; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.cell { padding: 1.5rem 1.4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgb(7 16 7 / .6); }
.cell p { margin: 0; }

.steps { list-style: none; margin: 1.5rem 0 0; padding: 0; border-left: 1px solid var(--line); font-family: var(--mono); max-width: 70ch; }
.steps li { position: relative; padding: 0 0 1.6rem 1.75rem; }
.steps li::before { content: ""; position: absolute; left: -5px; top: .55rem; width: 9px; height: 9px; background: var(--bg); border: 1px solid var(--green); }
.steps li:last-child { padding-bottom: 0; }
.steps b { display: block; color: var(--white); font-weight: 600; margin-bottom: .2rem; }
.steps span { color: var(--muted); font-family: var(--sans); }

/* faq */
.faq { border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-height: var(--hit); padding: 1rem 0; font-family: var(--mono); font-weight: 500; color: var(--white); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 1.2rem; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--green); }
.faq .a { padding: 0 0 1.25rem; max-width: 70ch; }
.faq .a p:last-child { margin-bottom: 0; }

/* related + cta */
.related { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.related a { display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-height: var(--hit); padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-family: var(--mono); }
.related a:hover { color: var(--green); }
.related a span { color: var(--muted); font-family: var(--sans); font-size: .95rem; }
.cta { background: var(--bg-2); }
.cta .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .cta .wrap { grid-template-columns: 1.3fr .7fr; align-items: center; } }
.kv { font-family: var(--mono); margin: 0; }
.kv div { display: grid; grid-template-columns: 80px 1fr; gap: 1rem; align-items: center; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--white); }
.kv a { display: inline-flex; align-items: center; min-height: var(--hit); color: var(--white); text-decoration: underline; text-decoration-color: var(--green-dim); text-underline-offset: 6px; overflow-wrap: anywhere; }
.kv a:hover { color: var(--green); }

footer { padding-block: 2.5rem; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
footer .cols { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { footer .cols { grid-template-columns: 1.2fr 1fr 1fr; } }
footer h2 { font-size: .8rem; color: var(--white); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .5rem; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; }
footer a:hover { color: var(--green); }
footer p { margin: 0 0 .4rem; }

@media (prefers-reduced-motion: reduce) { .brand .caret { animation: none; } }
