/* LanceTek — shared styles */
:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6db;
  --card: #fbfaf6;
  --ink: #1c1b19;
  --ink-2: #3a3833;
  --muted: #5f5a51;
  --rule: #d6cfc1;
  --accent: #a8431b;
  --accent-soft: #f0dccf;
  --green: #2f5d4e;
  --night: #191a17;
  --night-2: #23241f;
  --night-rule: #3a3b35;
  --night-text: #e9e5da;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Let grid/flex children shrink below their content (wide SVGs, <pre>) instead of pushing the page sideways */
.hero-grid > *, .work-grid > *, .work-grid .stack > *, .svc-detail > *, .about-grid > *, .contact-grid > *,
.section-head > *, .cta-inner > *, .entry > *, .post > *, .cols-2 > * { min-width: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
[id] { scroll-margin-top: 90px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; font-variation-settings: "opsz" 72; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 400; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 40em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.label {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: .6em; margin-bottom: 1rem;
}
.label::before { content: ""; width: 18px; height: 1px; background: var(--accent); }
.tag {
  font-family: var(--mono); font-size: .74rem; padding: 2px 8px; border: 1px solid var(--rule);
  border-radius: 99px; color: var(--muted); white-space: nowrap;
}
.sample {
  font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 3px; white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.4rem; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand b { font-family: var(--mono); font-weight: 500; font-size: 1.05rem; margin-left: 1px; }

.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 4px; font-size: .97rem; color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav .nav-cta a { background: var(--ink); color: var(--paper); margin-left: 8px; border-radius: 4px; box-shadow: none; }
.nav .nav-cta a:hover { background: var(--accent); color: #fff; }
.nav .nav-cta a[aria-current="page"] { background: var(--accent); }

.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: 4px; padding: 8px 10px; font: inherit; font-family: var(--mono); font-size: .82rem; color: var(--ink); cursor: pointer; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; left: 0; right: 0; top: 68px; background: var(--paper); border-bottom: 1px solid var(--rule); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 18px; gap: 0; }
  .nav a { display: block; padding: 13px 4px; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 14px; }
  .nav .nav-cta a { margin: 14px 0 0; text-align: center; border: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500;
  padding: 13px 20px; border-radius: 4px; border: 1px solid var(--ink); font-size: 1rem; cursor: pointer; font-family: var(--sans);
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { font-family: var(--mono); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: clamp(56px, 8vw, 104px) 0; }
.section-rule { border-top: 1px solid var(--rule); }
.section-head { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: end; margin-bottom: 48px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 32px; } }

.dark { background: var(--night); color: var(--night-text); }
.dark .label, .dark .muted, .dark .section-head p { color: #b3ae9f; }
.dark a:hover { color: #f0a47e; }
.dark .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.dark .btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.dark .btn-ghost { color: var(--paper); border-color: #6b675d; }
.dark .btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { margin: 1.4rem 0 2rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; font-family: var(--mono); font-size: .82rem; color: var(--muted); }
.hero-meta span::before { content: "● "; color: var(--green); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

/* Figure / diagram frames */
.figure {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 18px 40px -28px rgba(40,30,10,.35);
}
.figure-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: .76rem; color: var(--muted); background: var(--paper-2); }
.figure-bar .dots { display: inline-flex; gap: 6px; }
.figure-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); display: block; }
.figure-body { padding: 18px; }
.figure figcaption, .caption { font-size: .86rem; color: var(--muted); padding: 12px 16px; border-top: 1px solid var(--rule); }
.figure svg text { font-family: var(--mono); }
/* Wide diagrams scroll inside their frame on small screens rather than shrinking to illegible */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 620px) {
  .scroll-x svg { min-width: var(--min, 560px); }
  .scroll-x + figcaption::before { content: "Swipe to see the full diagram. "; font-family: var(--mono); font-size: .78rem; color: var(--accent); }
}

/* Terminal */
.term { background: var(--night); color: #d9d5c9; font-family: var(--mono); font-size: .8rem; line-height: 1.7; padding: 18px 20px; overflow-x: auto; white-space: pre; margin: 0; }
.term .c { color: #8b877b; }
.term .g { color: #9cc7a6; }
.term .a { color: #f0a47e; }
.term .y { color: #e6cf8b; }

/* ---------- Services (home) ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.svc { padding: 28px 24px 30px 0; border-right: 1px solid var(--rule); }
.svc + .svc { padding-left: 24px; }
.svc:last-child { border-right: 0; }
.svc .num { font-family: var(--mono); font-size: .8rem; color: var(--accent); display: block; margin-bottom: 18px; }
.svc h3 { margin-bottom: .6em; }
.svc p { color: var(--ink-2); font-size: .98rem; }
.svc .from { font-family: var(--mono); font-size: .82rem; color: var(--muted); margin: 0; }
@media (max-width: 1040px) {
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .svc, .svc + .svc { padding: 26px 22px 28px 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .svc:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--rule); }
}
@media (max-width: 620px) {
  .svc-grid { grid-template-columns: 1fr; }
  .svc:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* ---------- Process steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 24px 0 0; }
.steps li::before {
  counter-increment: step; content: "0" counter(step);
  display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid currentColor; font-family: var(--mono); font-size: .85rem; margin-bottom: 20px; background: inherit;
  position: relative; z-index: 1;
}
.steps li::after { content: ""; position: absolute; top: 21px; left: 50px; right: 8px; height: 1px; background: var(--night-rule); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.25rem; }
.steps p { font-size: .96rem; margin: 0; }
.steps .dur { display: block; font-family: var(--mono); font-size: .76rem; color: #f0a47e; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; }
.dark .steps li::before { background: var(--night); }
.dark .steps p { color: #c5c0b3; }
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 0; }
  .steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 32px 62px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .steps li::after { top: 50px; bottom: 6px; left: 21px; right: auto; width: 1px; height: auto; display: block; }
  .steps li:nth-child(2)::after { display: block; }
  .steps li:last-child::after { display: none; }
}

/* ---------- Work examples ---------- */
.work-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; }
.work-grid .stack { display: grid; gap: 28px; }
@media (max-width: 960px) { .work-grid { grid-template-columns: 1fr; } }

/* ---------- Journal list ---------- */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.post { display: grid; grid-template-columns: 130px 1fr auto; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.post time { font-family: var(--mono); font-size: .82rem; color: var(--muted); }
.post h3 { margin: 0 0 .35em; font-size: 1.35rem; }
.post h3 a { text-decoration: none; }
.post h3 a:hover { text-decoration: underline; }
.post p { margin: 0; color: var(--ink-2); font-size: .98rem; max-width: 44em; }
.post .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .post { grid-template-columns: 1fr; gap: 8px; }
  .post .tags { justify-content: flex-start; margin-top: 6px; }
}

/* ---------- CTA band ---------- */
.cta { padding: clamp(56px, 8vw, 96px) 0; }
.cta-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; }
.cta h2 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 400; margin: 0; }
.cta p { color: #c5c0b3; }
@media (max-width: 820px) { .cta-inner { grid-template-columns: 1fr; } }

/* ---------- Page header ---------- */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--rule); }
.page-head h1 { max-width: 15em; }
.page-head .lede { margin-top: 1.2rem; }

/* ---------- Services page ---------- */
.svc-detail { display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 5vw, 72px); padding: clamp(48px, 6vw, 80px) 0; border-bottom: 1px solid var(--rule); }
.svc-detail:last-of-type { border-bottom: 0; }
.svc-detail aside { position: sticky; top: 100px; align-self: start; }
.svc-detail aside .num { font-family: var(--mono); color: var(--accent); font-size: .85rem; }
.svc-detail aside h2 { margin-top: .4em; }
.price {
  margin-top: 24px; padding: 18px 18px 16px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--card);
}
.price .k { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: block; }
.price .v { font-family: var(--serif); font-size: 1.7rem; line-height: 1.2; display: block; margin: 4px 0 6px; }
.price p { font-size: .88rem; color: var(--muted); margin: 0; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding: 8px 0 8px 26px; border-bottom: 1px dashed var(--rule); font-size: .98rem; }
.ticks li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.shape { list-style: none; margin: 0; padding: 0; }
.shape li { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--rule); font-size: .98rem; }
.shape li span { font-family: var(--mono); font-size: .8rem; color: var(--accent); padding-top: 3px; }
.h-sub { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 400; margin: 0 0 10px; }
.svc-detail .figure { margin-top: 32px; }
@media (max-width: 900px) {
  .svc-detail { grid-template-columns: 1fr; }
  .svc-detail aside { position: static; }
  .cols-2 { grid-template-columns: 1fr; gap: 28px; }
}

.toc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.toc a { font-family: var(--mono); font-size: .82rem; padding: 7px 12px; border: 1px solid var(--rule); border-radius: 99px; text-decoration: none; background: var(--card); }
.toc a:hover { border-color: var(--accent); }

.note-box { border-left: 3px solid var(--accent); background: var(--card); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; }
.note-box p:last-child { margin: 0; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--mono); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--paper-2); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 500; white-space: nowrap; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); }
.prose { max-width: 38em; }
.prose p { color: var(--ink-2); }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--ink); }
.principles li { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--rule); }
.principles li:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--rule); }
.principles h3 { font-size: 1.2rem; margin-bottom: .4em; }
.principles p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.stack-grid > div { background: var(--card); padding: 20px; }
.stack-grid h3 { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 500; margin-bottom: 12px; }
.stack-grid ul { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.stack-grid li { padding: 3px 0; }
.stack-grid li small { color: var(--muted); display: block; font-size: .82rem; line-height: 1.4; margin-bottom: 4px; }
@media (max-width: 960px) { .about-grid { grid-template-columns: 1fr; } .stack-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) {
  .principles { grid-template-columns: 1fr; }
  .principles li:nth-child(even) { padding-left: 0; border-left: 0; }
  .stack-grid { grid-template-columns: 1fr; }
}

/* ---------- Journal page ---------- */
.journal-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.journal-filter button { font-family: var(--mono); font-size: .8rem; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--rule); background: var(--card); color: var(--ink-2); cursor: pointer; }
.journal-filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.entry { border-bottom: 1px solid var(--rule); padding: 30px 0; display: grid; grid-template-columns: 150px 1fr; gap: 32px; }
.entry:first-child { border-top: 1px solid var(--ink); }
.entry .meta { font-family: var(--mono); font-size: .8rem; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.entry h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin-bottom: .35em; }
.entry .verdict { font-family: var(--mono); font-size: .82rem; color: var(--green); margin-bottom: .8em; }
.entry .verdict b { font-weight: 500; color: var(--ink); }
.entry p { color: var(--ink-2); max-width: 44em; }
.entry details { margin-top: 6px; max-width: 44em; }
.entry summary { cursor: pointer; font-family: var(--mono); font-size: .84rem; color: var(--accent); list-style: none; display: inline-flex; gap: 8px; align-items: center; }
.entry summary::-webkit-details-marker { display: none; }
.entry summary::before { content: "+"; display: inline-block; width: 1ch; }
.entry details[open] summary::before { content: "−"; }
.entry details .body { padding-top: 14px; }
.entry details h4 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 1.1em 0 .3em; }
.entry .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 760px) { .entry { grid-template-columns: 1fr; gap: 10px; } .entry .meta { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; align-items: center; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
form { display: grid; gap: 20px; }
.field label { display: block; font-weight: 500; margin-bottom: 6px; font-size: .97rem; }
.field .hint { display: block; font-size: .85rem; color: var(--muted); font-weight: 400; margin-top: 2px; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--card);
  border: 1px solid #bdb5a5; border-radius: 4px; padding: 12px 14px;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid #bdb5a5; border-radius: 4px; background: var(--card); font-weight: 400; cursor: pointer; font-size: .95rem; margin: 0; }
.radio-row input { accent-color: var(--accent); margin: 0; }
.radio-row label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 500; margin-bottom: 8px; padding: 0; font-size: .97rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.error { color: #9b2c13; font-size: .88rem; margin-top: 6px; display: none; }
.field.invalid .error { display: block; }
.field.invalid input, .field.invalid textarea { border-color: #9b2c13; }
.form-done { display: none; border: 1px solid var(--green); background: #e5ede7; padding: 22px 24px; border-radius: var(--radius); }
.form-done.show { display: block; }
.form-done h3 { color: var(--green); }
.next { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.next li { position: relative; padding: 0 0 24px 52px; }
.next li::before { counter-increment: n; content: counter(n); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: .82rem; background: var(--paper); }
.next li::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 4px; width: 1px; background: var(--rule); }
.next li:last-child::after { display: none; }
.next h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 600; margin: 5px 0 4px; }
.next p { margin: 0; font-size: .96rem; color: var(--ink-2); }
.side-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px; }
.side-card + .side-card { margin-top: 20px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .95rem; margin: 0; }
.kv dt { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.kv dd { margin: 0; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #bdb8ab; padding: 56px 0 36px; font-size: .93rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid var(--night-rule); }
.site-footer .brand { color: var(--night-text); }
.site-footer h4 { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: #8b877b; font-weight: 400; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #f0a47e; }
.foot-base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 24px; font-family: var(--mono); font-size: .78rem; color: #8b877b; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
  .flow-dash { stroke-dasharray: 4 5; animation: dash 1.6s linear infinite; }
  @keyframes dash { to { stroke-dashoffset: -18; } }
}
