/* ==========================================================================
   Hillier Labs LLC — site styles
   Single stylesheet, no build step, no external dependencies, no web fonts.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --paper:      #FBFBF9;
  --paper-2:    #F3F3EF;
  --paper-3:    #FFFFFF;
  --ink:        #0B0F14;
  --text:       #171C22;
  --muted:      #5B6672;
  --rule:       #E3E2DC;
  --rule-soft:  #EDECE6;

  --accent:     #E2792B;   /* the mark's analog half */
  --accent-ink: #A85210;   /* darkened for accent-colored text on paper */
  --trace:      #E2792B;
  --trace-op:   0.16;

  --fig-grid:   #E6E5DE;
  --fig-axis:   #CFCEC5;

  /* Georgia is on effectively every Mac and Windows machine; the fallbacks
     are metric-compatible or close enough that the layout does not shift. */
  --font-display: Georgia, "Iowan Old Style", Charter, "Bitstream Charter",
                  "Palatino Linotype", Palatino, "Book Antiqua",
                  "Liberation Serif", "Times New Roman", serif;
  --font-body:    "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;

  --wrap: 1060px;
  --pad: 26px;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #0B0F14;
    --paper-2:    #10161D;
    --paper-3:    #101720;
    --ink:        #F4F5F3;
    --text:       #E7E9E7;
    --muted:      #93A0AC;
    --rule:       #212A34;
    --rule-soft:  #1A222B;

    --accent:     #F08A3C;
    --accent-ink: #F5A45F;
    --trace:      #E2792B;
    --trace-op:   0.16;

    --fig-grid:   #18202A;
    --fig-axis:   #2A3540;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; }

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

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- layout ---------- */
.wrap {
  position: relative;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.band {
  position: relative;
  overflow: hidden;
  padding-block: clamp(44px, 5.5vw, 68px);
  border-top: 1px solid var(--rule);
}

/* small label that heads each region */
.eyebrow {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ---------- routed-copper background ---------- */
.pcb {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: var(--trace-op);
  /* fade out downward so the copy never fights the artwork */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 92%);
          mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 92%);
}
.pcb svg { width: 100%; height: 100%; display: block; }
.pcb-flip svg { transform: scaleX(-1); }

.pcb-trace path,
.pcb-pair path {
  fill: none;
  stroke: var(--trace);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pcb-via circle { fill: none; stroke: var(--trace); stroke-width: 2; }
.pcb-pad rect { fill: var(--trace); }

/* ---------- header ---------- */
.site-head {
  position: relative;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 38px; height: 24px; display: block; overflow: visible; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.005em;
}

.nav-link {
  font-size: 12.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-link:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(52px, 7vw, 88px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(38px, 5.5vw, 60px);
  align-items: center;
}

.hero h1 { font-size: clamp(1.95rem, 4.3vw, 2.85rem); }
.nb { white-space: nowrap; }   /* keep "mixed-signal" off a hyphen break */

/* ---------- hero figure ---------- */
.hero-fig { margin: 0; }
.hero-fig svg {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-3);
}

.fig-axis { stroke: var(--fig-axis); stroke-width: 1; stroke-dasharray: 2 5; }

.fig-sine {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fig-stair {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .88;
}

.fig-dots circle { fill: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .fig-sine, .fig-stair {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.5s cubic-bezier(.5, 0, .2, 1) forwards;
  }
  .fig-stair { animation-delay: .55s; animation-duration: 1.4s; }
  .fig-dots circle {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: pop .42s cubic-bezier(.2, 1.3, .5, 1) forwards;
    animation-delay: calc(.6s + var(--i) * .055s);
  }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes pop  {
    from { opacity: 0; transform: scale(0); }
    to   { opacity: 1; transform: scale(1); }
  }
}

/* ---------- capabilities ---------- */
.caps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: cap;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 clamp(22px, 3.5vw, 44px);
}
.caps li {
  counter-increment: cap;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-block: 12px;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.95rem;
  color: var(--ink);
}
.caps li::before {
  content: counter(cap, decimal-leading-zero);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  color: var(--accent-ink);
  flex: 0 0 auto;
}

/* applications — set as a running line so it reads as context, not a menu */
.apps-head { margin-top: clamp(34px, 4vw, 48px); }

.apps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.95rem;
  color: var(--ink);
}
/* separator rides on the END of each item, so a wrap never strands it at the
   start of the next line */
.apps li:not(:last-child)::after {
  content: "\00B7";
  color: var(--accent);
  margin-left: 14px;
}

/* ---------- contact ---------- */
.contact-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.mail {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 3px;
  transition: border-color .18s ease;
  overflow-wrap: anywhere;
}
.mail:hover { border-bottom-color: var(--accent); }

.person {
  margin-bottom: 10px;
  font-size: 1rem;
  color: var(--ink);
}

.entity {
  font-size: 0.92rem;
  font-style: normal;
  line-height: 1.85;
  color: var(--muted);
  text-align: right;
}

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--rule); padding-block: 24px; }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot-brand { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

/* once the running line can no longer hold two items, stack it like the
   capabilities list instead of leaving orphaned separators */
@media (max-width: 720px) {
  .apps { display: block; }
  .apps li { padding-block: 11px; border-top: 1px solid var(--rule-soft); }
  .apps li:not(:last-child)::after { content: none; }
}

@media (max-width: 560px) {
  /* the trace field is scaled up (slice) on narrow screens, so ease it back */
  :root { --trace-op: 0.09; }
  .head-inner { min-height: 62px; }
  .entity { text-align: left; }
  .brand-name { font-size: 1.1rem; }
}
