/* DevServices · bespoke layer on top of Tailwind utilities.
   Single CSS strategy: Tailwind utilities in markup, this file only for tokens,
   keyframes, and component states Tailwind cannot express. */

:root {
  --paper: #F1EDE4;
  --surface: #FAF8F2;
  --sunken: #E7E2D6;
  --ink: #211E19;
  --ink2: #575147;
  --ink3: #6E6759;
  --line: rgba(33, 30, 25, .14);
  --linestrong: rgba(33, 30, 25, .32);
  --accent: #E1531F;
  --accentdeep: #B33E12;
  --coal: #161310;
  --amber: #F1A33C;
  --linedark: rgba(247, 244, 238, .10);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

a, button, summary { touch-action: manipulation; }

:focus-visible {
  outline: 2px solid var(--accentdeep);
  outline-offset: 2px;
}

::selection { background: var(--accent); color: var(--coal); }

/* Skip link */
.skip {
  position: fixed; top: -100px; left: 16px; z-index: 100;
  background: var(--ink); color: var(--paper);
  font: 500 11px/1 "Martian Mono", monospace;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 12px 16px; transition: transform .15s var(--ease-out);
}
.skip:focus-visible { transform: translateY(116px); }

/* Drafting-paper dot grid */
.dotgrid {
  background-image: radial-gradient(rgba(33, 30, 25, .16) 1px, transparent 1.1px);
  background-size: 22px 22px;
}
.dotgrid-dark {
  background-image: radial-gradient(rgba(247, 244, 238, .09) 1px, transparent 1.1px);
  background-size: 22px 22px;
}

/* Corner crosshair marks: <i class="cmark" data-pos="tl|tr|bl|br"> */
.cmark { position: absolute; width: 14px; height: 14px; pointer-events: none; }
.cmark::before, .cmark::after { content: ""; position: absolute; background: var(--linestrong); }
.cmark::before { width: 100%; height: 1px; top: 50%; }
.cmark::after { height: 100%; width: 1px; left: 50%; }
.cmark[data-pos="tl"] { top: -7px; left: -7px; }
.cmark[data-pos="tr"] { top: -7px; right: -7px; }
.cmark[data-pos="bl"] { bottom: -7px; left: -7px; }
.cmark[data-pos="br"] { bottom: -7px; right: -7px; }
.cmark.dark::before, .cmark.dark::after { background: rgba(247, 244, 238, .28); }

/* Generic press acknowledgement for links and quiet buttons */
.press {
  transition: transform .12s var(--ease-out);
  will-change: transform;
}
.press:active { transform: translate(1px, 1px); }

/* Stamp button: rests on a hard ink block, presses into it. Pure transform. */
.btn-stamp {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  background: var(--ink);
  color: var(--paper);
  font: 500 11px/1 "Martian Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 15px 22px;
  border-radius: 2px;
  border: 1px solid var(--ink);
  transition: transform .13s var(--ease-out);
  will-change: transform;
}
.btn-stamp::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 2px;
  background: transparent;
  border: 1px solid var(--ink);
  transform: translate(4px, 4px);
  z-index: -1;
  transition: transform .13s var(--ease-out);
}
@media (hover: hover) {
  .btn-stamp:hover { transform: translate(-1px, -1px); }
  .btn-stamp:hover::before { transform: translate(5px, 5px); }
}
.btn-stamp:active { transform: translate(3px, 3px); }
.btn-stamp:active::before { transform: translate(1px, 1px); }

/* Orange variant for coal surfaces */
.btn-stamp.on-coal {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--coal);
}
.btn-stamp.on-coal::before { border-color: rgba(247, 244, 238, .35); }

/* Bracket link */
.bracket {
  position: relative;
  font: 500 11px/1 "Martian Mono", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accentdeep);
  transition: transform .12s var(--ease-out);
}
.bracket::after {
  content: "";
  position: absolute;
  top: -14px; bottom: -14px; left: -6px; right: -6px;
}
.bracket:active { transform: translate(1px, 1px); }
@media (hover: hover) { .bracket:hover { color: var(--accent); } }

/* Nav links */
.navlink {
  position: relative;
  color: var(--ink2);
  padding: 6px 2px;
  transition: color .15s var(--ease-out), transform .12s var(--ease-out);
}
.navlink::after {
  content: "";
  position: absolute;
  top: -12px; bottom: -12px; left: -8px; right: -8px;
}
.navlink:active { transform: translateY(1px); }
@media (hover: hover) { .navlink:hover { color: var(--ink); } }
.navlink[aria-current="page"] { color: var(--accentdeep); }
.navlink[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: -21px; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}

/* Service index rows */
.svc-row {
  display: block;
  border-top: 1px solid var(--line);
  transition: background-color .18s var(--ease-out), transform .12s var(--ease-out);
}
.svc-row:last-of-type { border-bottom: 1px solid var(--line); }
.svc-row:active { transform: translate(1px, 1px); }
@media (hover: hover) {
  .svc-row:hover { background: var(--surface); }
  .svc-row:hover .svc-arrow { transform: translateX(8px); }
  .svc-row:hover .svc-num { color: var(--accent); }
}
.svc-arrow { transition: transform .2s var(--ease-out); }
.svc-num { transition: color .18s var(--ease-out); }

/* Chips */
.chip {
  display: inline-block;
  font: 400 10px/1 "Martian Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink3);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 5px 8px;
  white-space: nowrap;
}
.chip.hot { color: var(--accentdeep); border-color: rgba(179, 62, 18, .35); }
.chip.on-coal { color: var(--amber); border-color: rgba(241, 163, 60, .35); }

/* Terminal */
.term {
  background: var(--coal);
  border-radius: 6px;
  border: 1px solid rgba(247, 244, 238, .08);
  outline: 1px solid rgba(33, 30, 25, .35);
  outline-offset: 3px;
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--linedark);
}
.term-dot { width: 9px; height: 9px; border-radius: 999px; border: 1px solid rgba(247, 244, 238, .35); }
.term-body {
  font: 400 12px/1.9 "Martian Mono", monospace;
  padding: 18px 18px 22px;
  color: rgba(247, 244, 238, .88);
  min-height: 232px;
}
.term-body .tp { color: var(--amber); }       /* prompt/typed */
.term-body .tk { color: rgba(247, 244, 238, .5); } /* comment */
.term-body .tg { color: #9CC97A; }             /* green ok */
.cursor {
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--amber);
  vertical-align: -2px;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Reveal on scroll: opacity + translate + blur only */
.rv {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(4px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), filter .6s var(--ease-out);
}
.rv.on { opacity: 1; transform: translateY(0); filter: blur(0); }

/* Client marquee */
.marq { overflow: hidden; position: relative; }
.marq-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  padding-right: 56px;
  animation: marq 34s linear infinite;
}
@media (hover: hover) { .marq:hover .marq-track { animation-play-state: paused; } }
@keyframes marq { to { transform: translateX(-50%); } }

/* Testimonial slider */
.slider-track {
  display: flex;
  transition: transform .5s var(--ease-out);
}
.slide { width: 100%; flex-shrink: 0; }
.tickbar { display: flex; gap: 6px; }
.tick {
  position: relative;
  width: 22px; height: 3px;
  background: var(--linestrong);
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
  opacity: .45;
}
.tick::after {
  content: "";
  position: absolute;
  top: -19px; bottom: -19px; left: -2px; right: -2px;
}
.tick.on { background: var(--accent); opacity: 1; }
.sq-btn {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--linestrong);
  border-radius: 2px;
  background: var(--surface);
  transition: transform .12s var(--ease-out), background-color .15s var(--ease-out);
}
.sq-btn:active { transform: translate(2px, 2px); }
@media (hover: hover) { .sq-btn:hover { background: var(--paper); } }
.sq-btn.on-coal { background: transparent; border-color: rgba(247,244,238,.3); color: var(--paperbrt); }

/* Accordion: grid-rows 0fr -> 1fr height reveal */
.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s var(--ease-out);
}
.acc.open .acc-panel { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; }
.acc-btn { width: 100%; text-align: left; }
.acc-x { transition: transform .25s var(--ease-out); display: inline-block; }
.acc.open .acc-x { transform: rotate(45deg); }
@media (hover: hover) { .acc-btn:hover .acc-q { color: var(--accentdeep); } }

/* Tabs */
.tab-btn {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink2);
  font: 500 11px/1 "Martian Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 15px 16px;
  transition: transform .12s var(--ease-out), background-color .15s var(--ease-out), color .15s var(--ease-out);
}
.tab-btn:active { transform: translate(1px, 1px); }
@media (hover: hover) { .tab-btn:hover { color: var(--ink); background: var(--surface); } }
.tab-btn[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.tab-panel[hidden] { display: none; }
.tab-panel {
  animation: panelin .35s var(--ease-out);
}
@keyframes panelin {
  from { opacity: 0; transform: translateY(8px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Word rotator */
.rot { display: inline-block; }
.rot span {
  display: inline-block;
  transition: opacity .22s var(--ease-out), transform .22s var(--ease-out), filter .22s var(--ease-out);
}
.rot.swap span { opacity: 0; transform: translateY(-10px); filter: blur(3px); }

/* Pipeline packets (devops): pure-transform travel along the connector */
.pipe-line { position: relative; }
.packet {
  position: absolute;
  top: 50%; left: 0;
  width: 7px; height: 7px;
  margin-top: -3.5px;
  background: var(--accent);
  animation: travel 2.6s linear infinite;
}
@keyframes travel {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(var(--travel, 72px)); opacity: 0; }
}
.packet.v { animation-name: travelv; left: 50%; top: 0; margin: 0 0 0 -3.5px; }
@keyframes travelv {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateY(var(--travel, 40px)); opacity: 0; }
}
.pulse { animation: pulse 2s var(--ease-out) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Mobile nav overlay */
#mnav {
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
}
#mnav.closed {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  visibility: hidden;
}
.mnav-link { transition: transform .12s var(--ease-out), color .15s var(--ease-out); }
.mnav-link:active { transform: translate(2px, 2px); }

/* Redaction bars for the sample audit excerpt */
.redact {
  display: inline-block;
  height: .85em;
  background: var(--ink);
  border-radius: 1px;
  vertical-align: -1px;
  opacity: .85;
}

/* Table */
.spec-table th, .spec-table td { border-bottom: 1px solid var(--line); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

/* Reduced motion: kill loops, show everything settled */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; filter: none; transition: none; }
  .marq-track, .cursor, .packet, .pulse { animation: none; }
  .packet { display: none; }
  .slider-track { transition: none; }
  .tab-panel { animation: none; }
  .press, .btn-stamp, .btn-stamp::before, .navlink, .sq-btn, .svc-row, .acc-panel, .acc-x, .rot span, #mnav { transition: none; }
}
