/* LanceTek — wiring-diagram notebook */
:root {
  --paper: #ECEFEA;
  --paper-2: #E2E7E2;
  --ink: #1A2A31;
  --ink-soft: #4A5A60;
  --moss: #3D6650;
  --lamp: #F0B429;
  --rule: #BAC4BF;
  --white: #F8FAF7;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Literata", Georgia, serif;

  --measure: 34em;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration-color: var(--moss); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--lamp); text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 4.3rem); font-stretch: 118%; font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.3rem; font-stretch: 105%; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.32rem); line-height: 1.55; color: var(--ink); }
.muted { color: var(--ink-soft); }
.small { font-size: 0.92rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--lamp); padding: 8px 12px; z-index: 10; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-stretch: 120%; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px 22px; flex-wrap: wrap; font-family: var(--display); font-size: 0.98rem; }
.nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { border-bottom-color: var(--lamp); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  background: var(--ink); color: var(--white);
  padding: 13px 22px; border: 2px solid var(--ink); border-radius: 999px;
  text-decoration: none; cursor: pointer;
}
.btn::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--lamp); }
.btn:hover { background: var(--moss); border-color: var(--moss); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost::before { background: var(--rule); }
.btn.ghost:hover { background: var(--paper-2); }

/* ---------- sections ---------- */
.band { padding: clamp(56px, 8vw, 104px) 0; border-bottom: 1px solid var(--rule); }
.band.tint { background: var(--paper-2); }
.band.dark { background: var(--ink); color: var(--paper); }
.band.dark a { color: var(--paper); }
.band.dark .muted { color: #A9B7B4; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px var(--gutter); }
.split > :first-child h2 { position: sticky; top: 24px; }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 88px); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px var(--gutter); align-items: center; }
.hero h1 { max-width: 11em; font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.diagram { background: var(--white); border: 1px solid var(--rule); border-radius: 14px; padding: 18px 18px 8px; }
.diagram-cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--display); font-size: 0.85rem; color: var(--ink-soft); margin: 0 4px 6px; }
.diagram svg { width: 100%; height: auto; }
.diagram .node { cursor: pointer; }
.diagram .node rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; transition: fill .25s; }
.diagram .node.human rect { stroke-dasharray: 5 4; }
.diagram .node text { font-family: var(--display); font-size: 15px; fill: var(--ink); font-weight: 600; }
.diagram .node .sub { font-family: var(--body); font-size: 12px; font-weight: 400; fill: var(--ink-soft); }
.diagram .node .lampdot { fill: var(--rule); transition: fill .25s; }
.diagram .node.lit .lampdot, .diagram .node[aria-pressed="true"] .lampdot { fill: var(--lamp); }
.diagram .node[aria-pressed="true"] rect { fill: #FBF1D6; }
.diagram .node:focus { outline: none; }
.diagram .node:focus-visible rect { stroke: var(--moss); stroke-width: 3; }
.diagram .wire { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.diagram .wire.alt { stroke-dasharray: 3 4; stroke: var(--ink-soft); }
.diagram .pulse { fill: var(--lamp); stroke: var(--ink); stroke-width: 1.5; transition: opacity .6s; }
.diagram-note { min-height: 4.8em; border-top: 1px solid var(--rule); margin: 10px 4px 0; padding: 12px 0 8px; font-size: 0.97rem; }
.diagram-note strong { font-family: var(--display); }
.diagram-note p { margin: 0; }

/* ---------- service rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 3fr); gap: 12px 32px; padding: 28px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.row h3 { margin: 0; }
.row p { margin: 0; }
.row .price { font-family: var(--display); font-weight: 600; text-align: right; }
.row .price span { display: block; font-weight: 400; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- steps (a real sequence) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.steps li { counter-increment: s; padding: 0 24px 0 0; position: relative; }
.steps li::before {
  content: counter(s);
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid currentColor;
  font-family: var(--display); font-weight: 700;
  margin-bottom: 18px; position: relative; z-index: 1;
  background: var(--paper);
}
.dark .steps li::before { background: var(--ink); }
.steps.vertical { grid-template-columns: minmax(0, 1fr); gap: 0; }
.steps.vertical li { padding: 0 0 26px 58px; }
.steps.vertical li::before { position: absolute; left: 0; top: 0; margin: 0; }
.steps.vertical li:not(:last-child)::after { display: block; top: 38px; bottom: 0; left: 19px; right: auto; border-top: 0; border-left: 2px dashed var(--rule); }
.steps.vertical li:last-child::after { display: none; }
.steps.vertical h3 { padding-top: 6px; }
.steps li::after { content: ""; position: absolute; top: 19px; left: 38px; right: 0; border-top: 2px dashed #5C6E70; }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.15rem; }
.steps p { font-size: 0.98rem; }

/* ---------- journal list ---------- */
.journal { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.journal > li { border-bottom: 1px solid var(--rule); }
.entry { display: grid; grid-template-columns: 9em minmax(0, 1fr) 10em; gap: 6px 28px; padding: 22px 0; align-items: baseline; }
.entry time, .entry .tag { font-family: var(--display); font-size: 0.9rem; color: var(--ink-soft); }
.entry .tag { text-align: right; }
.entry h3 { margin: 0 0 6px; font-size: 1.25rem; }
.entry p { margin: 0; }
details.entry-more summary { list-style: none; cursor: pointer; }
details.entry-more summary::-webkit-details-marker { display: none; }
details.entry-more summary h3 { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
details.entry-more summary:hover h3 { text-decoration-color: var(--lamp); }
details.entry-more .toggle { font-family: var(--display); font-size: 0.88rem; color: var(--moss); }
details.entry-more[open] .toggle .closed, details.entry-more:not([open]) .toggle .opened { display: none; }
.article { padding: 4px 0 30px; display: grid; grid-template-columns: 9em minmax(0, 1fr) 10em; gap: 0 28px; }
.article > div { grid-column: 2; }
.article h4 { font-size: 1.02rem; margin: 1.4em 0 0.4em; }
.verdict { border-left: 4px solid var(--lamp); padding: 8px 0 8px 16px; background: var(--white); max-width: var(--measure); }
.verdict p:last-child { margin-bottom: 0; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }
.filters button {
  font-family: var(--display); font-size: 0.92rem; background: transparent; color: var(--ink);
  border: 1.5px solid var(--rule); border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- specimen screen ---------- */
.specimen { background: var(--white); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.specimen .bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--paper-2); font-family: var(--display); font-size: 0.82rem; color: var(--ink-soft); align-items: center; }
.specimen .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); display: inline-block; }
.specimen .bar span { margin-left: 8px; }
.figcap { font-size: 0.88rem; color: var(--ink-soft); margin-top: 10px; }

/* ---------- facts list ---------- */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); margin: 0; }
.facts div { border-top: 1px solid var(--rule); padding: 16px 0; }
.facts dt { font-family: var(--display); font-weight: 700; margin-bottom: 4px; }
.facts dd { margin: 0; }

/* ---------- form ---------- */
.form { display: grid; gap: 20px; max-width: 36em; }
.field label { display: block; font-family: var(--display); font-weight: 600; margin-bottom: 6px; }
.field .hint { display: block; font-size: 0.9rem; color: var(--ink-soft); margin: -2px 0 8px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1.5px solid var(--ink-soft); border-radius: 8px; padding: 12px 14px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--lamp); outline-offset: 1px; border-color: var(--ink); }
.field .error { color: #9B2C1F; font-size: 0.92rem; margin-top: 6px; display: none; }
.field.invalid .error { display: block; }
.field.invalid input, .field.invalid textarea { border-color: #9B2C1F; }
.radio-set { border: 0; padding: 0; margin: 0; }
.radio-set legend { font-family: var(--display); font-weight: 600; margin-bottom: 8px; }
.radio-set label { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-family: var(--body); font-weight: 400; }
.radio-set input { width: 18px; height: 18px; accent-color: var(--moss); }
.sent { border: 2px solid var(--moss); background: var(--white); border-radius: 12px; padding: 24px; max-width: 36em; }
.sent h2 { font-size: 1.5rem; }

/* ---------- cta + footer ---------- */
.cta h2 { max-width: 16em; font-size: clamp(1.9rem, 3.6vw, 3rem); }
.site-foot { padding: 40px 0 56px; font-size: 0.92rem; color: var(--ink-soft); }
.site-foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 40px; }
.site-foot p { margin: 0; }

.page-head { padding: clamp(48px, 7vw, 96px) 0 clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--rule); }
.page-head h1 { max-width: 14em; }

/* ---------- service detail ---------- */
.service { padding: clamp(48px, 7vw, 88px) 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 12px; }
.service-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px var(--gutter); }
.service h2 { margin-bottom: 0.4em; }
.service h3 { font-size: 1.05rem; margin: 1.6em 0 0.6em; }
.service h3:first-child { margin-top: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; max-width: var(--measure); }
.ticks li { padding: 7px 0 7px 26px; position: relative; border-bottom: 1px solid var(--rule); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--moss); }

.shape { display: flex; width: 100%; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; font-family: var(--display); font-size: 0.85rem; }
.shape div { padding: 10px 10px 9px; border-right: 1.5px solid var(--ink); min-width: 0; }
.shape div:last-child { border-right: 0; }
.shape b { display: block; font-weight: 700; }
.shape span { color: var(--ink-soft); }
.shape .fill { background: var(--white); }
.shape .key { background: #F7E3AE; }
.shape-scale { display: flex; justify-content: space-between; font-family: var(--display); font-size: 0.8rem; color: var(--ink-soft); margin-top: 6px; }

.pricebox { border: 2px solid var(--ink); border-radius: 12px; padding: 18px 20px; background: var(--white); max-width: 30em; }
.pricebox p { margin: 0 0 0.4em; }
.pricebox .big { font-family: var(--display); font-size: 1.6rem; font-weight: 800; font-stretch: 115%; line-height: 1.2; }

/* job tracker specimen */
.jt { display: grid; grid-template-columns: 1fr; font-family: var(--display); font-size: 0.86rem; }
.jt-head { display: flex; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--rule); gap: 8px; flex-wrap: wrap; }
.jt-head b { font-size: 1rem; }
.jt-row { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) 6.5em; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--paper-2); align-items: center; }
.jt-row:last-child { border-bottom: 0; }
.jt-row .who { color: var(--ink-soft); }
.chip { justify-self: end; border-radius: 999px; padding: 2px 10px; font-size: 0.78rem; border: 1px solid var(--rule); white-space: nowrap; }
.chip.wait { background: #F7E3AE; border-color: #E2C36B; }
.chip.done { background: #D6E5DA; border-color: #9DBBA6; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split, .service-grid { grid-template-columns: minmax(0, 1fr); }
  .split > :first-child h2 { position: static; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row .price { text-align: left; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 0; }
  .steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li::after { display: none; }
  .entry, .article { grid-template-columns: minmax(0, 1fr); }
  .article > div { grid-column: 1; }
  .entry .tag { text-align: left; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .shape { flex-direction: column; }
  .shape div { border-right: 0; border-bottom: 1.5px solid var(--ink); flex: none !important; }
  .shape div:last-child { border-bottom: 0; }
  .shape-scale { display: none; }
  .nav { gap: 4px 16px; font-size: 0.95rem; }
  .diagram { padding: 12px 10px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
