/* Base reset */
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Layout concept: a financial instrument, not a brochure. Security-paper ground; the guilloche is the
   one signature device (a two-ink rosette in the hero, a ribbon with microtext closing the hero and
   the page); old-style serif for headings, monospace for the register details; one inverted band.
   Three banknote features on top: a serial number that seeds the rosette (and is hashed in the footer),
   a windowed security thread that traces the transfer and turns into linked blocks on the on-chain
   leg, and a dark theme that behaves like the sheet under a UV lamp (fibres and a hidden ring). */
:root {
  --paper: #E9EFEA;        /* security-paper green-grey */
  --raise: #F5F8F5;        /* instrument surface */
  --ink: #0D2A21;          /* engraving ink */
  --muted: #4C645A;
  --accent: #12684E;       /* brand forest green */
  --live: #B8741A;         /* amber, status only */
  --rule: rgba(13, 42, 33, .18);
  --band-bg: #0D2A21;
  --band-fg: #E6EEE8;
  --band-muted: #9DB5A9;
  --band-accent: #6FD0A8;
  --band-rule: rgba(230, 238, 232, .18);
  /* UV lamp: fluorescent inks, visible only in the dark theme */
  --uv-r: #FF6B5E; --uv-b: #62A8FF; --uv-y: #D7FF5E;
  --uv-show: none;
  --uv-glow: none;
  --serial-halo: 0 0 .5rem var(--paper), 0 0 .2rem var(--paper);

  --display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --data: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A1C16; --raise: #102820; --ink: #E3ECE6; --muted: #8FA89C;
    --accent: #58C49A; --live: #E3A24B; --rule: rgba(227, 236, 230, .16);
    --band-bg: #123327; --band-fg: #E6EEE8; --band-muted: #9DB5A9;
    --band-accent: #6FD0A8; --band-rule: rgba(230, 238, 232, .18);
    --uv-show: block; --uv-glow: drop-shadow(0 0 .3rem var(--accent));
    --serial-halo: 0 0 .8rem color-mix(in srgb, var(--live) 75%, transparent);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0A1C16; --raise: #102820; --ink: #E3ECE6; --muted: #8FA89C;
  --accent: #58C49A; --live: #E3A24B; --rule: rgba(227, 236, 230, .16);
  --band-bg: #123327; --band-fg: #E6EEE8; --band-muted: #9DB5A9;
  --band-accent: #6FD0A8; --band-rule: rgba(230, 238, 232, .18);
  --uv-show: block; --uv-glow: drop-shadow(0 0 .3rem var(--accent));
  --serial-halo: 0 0 .8rem color-mix(in srgb, var(--live) 75%, transparent);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
}
/* security fibres in the paper: they fluoresce under the UV lamp and stay invisible in daylight */
.fibres { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; overflow: hidden; display: var(--uv-show); }
.fibres path { fill: none; stroke-width: 1; stroke-linecap: round; opacity: .8; }
.fibres .halo { stroke-width: 4; opacity: .12; }
.fibres .r { stroke: var(--uv-r); } .fibres .b { stroke: var(--uv-b); } .fibres .y { stroke: var(--uv-y); }
a { color: inherit; }
a:focus-visible, .btn:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.w {
  max-width: 1280px;
  margin-inline: auto;
  padding-left: max(16px, 4vw, env(safe-area-inset-left, 0px));
  padding-right: max(16px, 4vw, env(safe-area-inset-right, 0px));
}
.label {
  font-family: var(--data);
  font-size: .75rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.sec { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.sec-head { display: grid; gap: .9rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); max-width: 46rem; }
.sec-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.5vw, 3.7rem);
  line-height: 1.04;
  letter-spacing: -.022em;
  text-wrap: balance;
}
.sec-head p { color: var(--muted); max-width: 38rem; }

/* ── top bar ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.mark { font-family: var(--display); font-weight: 500; font-size: 1.5rem; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.mark b { font-family: var(--data); font-size: .8em; font-weight: 400; color: var(--accent); margin-inline: .05em; position: relative; top: -.03em; }
.top nav { display: flex; gap: clamp(.9rem, 2.4vw, 2rem); align-items: center; }
.top nav a { font-family: var(--data); font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }
.uv { font-family: var(--data); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: none; border: 1px solid var(--rule); border-radius: 2px; padding: .4rem .6rem; cursor: pointer; white-space: nowrap; transition: color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.uv:hover { color: var(--ink); border-color: var(--ink); }
.uv[aria-pressed="true"] { color: var(--uv-y); border-color: var(--uv-y); box-shadow: 0 0 .8rem color-mix(in srgb, var(--uv-y) 40%, transparent); }
@media (max-width: 640px) { .top nav a.opt, .uv .opt { display: none; } }

/* ── hero ── */
.hero { position: relative; overflow: clip; border-bottom: 1px solid var(--rule); }
/* the rosette fades in under the header instead of being cut by it */
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 7rem; background: linear-gradient(var(--paper), transparent); z-index: 1; pointer-events: none; }
#guilloche {
  position: absolute; top: 46%; right: -11%; width: min(72vw, 900px); max-width: none; aspect-ratio: 1;
  transform: translateY(-50%); pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 2%, #000 38%);
  mask-image: linear-gradient(to right, transparent 2%, #000 38%);
}
.hero-in { position: relative; z-index: 2; display: grid; gap: clamp(1.3rem, 2.6vw, 2rem); padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3.5rem, 8vw, 6.5rem); }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.9rem, 6.7vw, 6.4rem); line-height: .98; letter-spacing: -.026em; max-width: 9.7em; text-wrap: balance; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { max-width: 33rem; font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.5; }
.cta { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--data);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 1.5rem;
  border-radius: 2px;
  transition: background .18s ease;
}
.btn:hover { background: var(--accent); }
.link { font-family: var(--data); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; text-underline-offset: .3em; }
/* serial number: every visit gets its own, and the rosette is drawn from it */
.serial[hidden], .uv[hidden], .hashline[hidden] { display: none; }
.serial { display: grid; gap: .3rem; justify-items: start; }
.serial button { all: unset; cursor: pointer; font-family: var(--data); font-size: clamp(1rem, 1.45vw, 1.2rem); letter-spacing: .16em; font-variant-numeric: tabular-nums; color: var(--live); text-shadow: var(--serial-halo); white-space: nowrap; transition: color .18s ease; }
.serial button::before { content: "No. "; color: var(--muted); }
.serial button:hover { color: var(--ink); }
.serial button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.serial .label { text-shadow: 0 0 .5rem var(--paper), 0 0 .2rem var(--paper); }
@media (min-width: 761px) {
  .serial { position: absolute; right: max(16px, 4vw, env(safe-area-inset-right, 0px)); bottom: clamp(1.5rem, 3.4vw, 2.75rem); justify-items: end; text-align: right; }
}
/* guilloche ribbon with a line of microtext, as on the edge of a banknote */
.ribbon { position: relative; border-top: 1px solid var(--rule); background: var(--paper); }
.ribbon canvas { display: block; width: 100%; height: 3rem; max-width: none; }
.micro { font-family: var(--data); font-size: .5rem; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; padding-block: .3rem .45rem; border-top: 1px solid var(--rule); }
@media (max-width: 760px) {
  #guilloche { width: 124vw; right: -58%; top: 40%; opacity: .55; }
}

/* ── facts strip ── */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 2rem; padding-block: clamp(1.75rem, 3vw, 2.5rem); }
.facts div { display: grid; gap: .3rem; align-content: start; min-width: 0; }
.facts dt { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 3.3vw, 2.7rem); line-height: 1; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.facts dd { color: var(--muted); font-size: .95rem; line-height: 1.4; max-width: 17rem; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* ── what we build: one transfer traced through the register ── */
.figcap { display: flex; gap: .9rem; align-items: baseline; margin-bottom: 1rem; }
.figcap b { font-family: var(--data); font-size: .74rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--ink); padding: .2rem .45rem; white-space: nowrap; }
.reg { --h3: clamp(1.5rem, 2.5vw, 2rem); --pad: 1.35rem; --dot: .8rem; --thread: 7px; --block: .7rem; padding-left: 2.25rem; border-top: 1px solid var(--ink); }
.reg li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 2.4fr);
  gap: .6rem 2rem;
  align-items: baseline;
  padding-block: var(--pad);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
/* the security thread: a segment from this row's stop down to the next one. Windowed like the thread
   in a banknote (it surfaces and dives), with microtext along it. */
.reg li::before {
  content: "MIRACLE TECH · MIRACLE TECH · MIRACLE TECH · MIRACLE TECH · MIRACLE TECH · MIRACLE TECH · MIRACLE TECH · MIRACLE TECH · MIRACLE TECH · MIRACLE TECH · MIRACLE TECH · MIRACLE TECH · ";
  position: absolute; left: calc(-1.6rem - var(--thread) / 2); top: calc(var(--pad) + var(--h3) * .55); height: 100%; width: var(--thread);
  writing-mode: vertical-rl; white-space: nowrap; overflow: hidden;
  font-family: var(--data); font-size: 6px; font-weight: 500; line-height: var(--thread); letter-spacing: .14em; color: var(--paper);
  background: repeating-linear-gradient(to bottom, var(--accent) 0 1.2rem, color-mix(in srgb, var(--accent) 24%, transparent) 1.2rem 2.1rem);
  filter: var(--uv-glow);
}
.reg li:last-child::before { display: none; }
/* the on-chain leg: the thread becomes a chain of linked blocks until the next stop */
.reg li.chain::before {
  content: ""; width: var(--block); left: calc(-1.6rem - var(--block) / 2); background: var(--accent); filter: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 19'%3E%3Crect x='1' y='1' width='10' height='10' fill='none' stroke='%23000' stroke-width='1.7'/%3E%3Cpath d='M6 11.5V19.5' stroke='%23000' stroke-width='1.7'/%3E%3C/svg%3E") top center / var(--block) calc(var(--block) * 19 / 12) repeat-y;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 19'%3E%3Crect x='1' y='1' width='10' height='10' fill='none' stroke='%23000' stroke-width='1.7'/%3E%3Cpath d='M6 11.5V19.5' stroke='%23000' stroke-width='1.7'/%3E%3C/svg%3E") top center / var(--block) calc(var(--block) * 19 / 12) repeat-y;
}
.reg li.chain::after { border-radius: 1px; }
.reg li::after { content: ""; position: absolute; left: calc(-1.6rem - var(--dot) / 2); top: calc(var(--pad) + var(--h3) * .55 - var(--dot) / 2); width: var(--dot); height: var(--dot); border: 2px solid var(--accent); background: var(--paper); border-radius: 50%; transition: background .2s ease; }
.reg li:hover::after { background: var(--accent); }
.reg.aside { border-top: 0; }
.reg.aside li::after { border-color: var(--muted); }
.sys { display: grid; gap: .4rem; min-width: 0; }
.step { font-family: var(--data); font-size: .74rem; line-height: 1.4; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.reg h3 { font-family: var(--display); font-weight: 400; font-size: var(--h3); line-height: 1.1; letter-spacing: -.018em; }
.reg p { color: var(--muted); min-width: 0; }
.reg .seen { font-family: var(--data); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; text-align: right; }
.fignote { color: var(--muted); font-size: .9rem; margin-top: 1rem; }
@media (max-width: 820px) {
  .reg li { grid-template-columns: minmax(0, 1fr); }
  .reg .seen { text-align: left; }
}

/* ── products ── */
.prods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.prod { display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 1rem; background: var(--raise); border: 1px solid var(--rule); border-radius: 2px; padding: clamp(1.25rem, 2.2vw, 1.75rem); min-width: 0; }
.status { display: flex; align-items: center; gap: .55rem; }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--live); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .dot { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .35; } }
}
.prod h3 { font-family: var(--display); font-weight: 500; font-size: clamp(1.9rem, 2.8vw, 2.4rem); line-height: 1; letter-spacing: -.02em; }
.prod p { color: var(--muted); }
.trace { font-family: var(--data); font-size: .8rem; line-height: 1.5; padding: .7rem .8rem; border: 1px dashed var(--rule); border-radius: 2px; overflow-wrap: anywhere; }
.trace i { font-style: normal; color: var(--accent); }
.prod a { font-family: var(--data); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; text-underline-offset: .3em; justify-self: start; }
.prod a:hover { color: var(--accent); }
@media (max-width: 900px) { .prods { grid-template-columns: minmax(0, 1fr); } }

/* ── NDA register: the inverted band ── */
.band { background: var(--band-bg); color: var(--band-fg); }
.band .label { color: var(--band-muted); }
.band .sec-head p { color: var(--band-muted); }
.work { border-top: 1px solid var(--band-fg); }
.work li { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 2fr); gap: .6rem 2rem; align-items: baseline; padding-block: 1.4rem; border-bottom: 1px solid var(--band-rule); }
.who { display: grid; gap: .5rem; min-width: 0; }
.redact { display: inline-block; height: 1.05em; background: var(--band-fg); border-radius: 1px; vertical-align: -.12em; opacity: .92; }
.who span.kind { font-family: var(--data); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--band-muted); }
.work h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.4rem, 2.2vw, 1.8rem); line-height: 1.12; letter-spacing: -.015em; margin-bottom: .4rem; }
.work p { color: var(--band-muted); min-width: 0; }
.state { font-family: var(--data); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--band-accent); text-align: right; }
.sub { margin-top: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1rem; }
@media (max-width: 820px) {
  .work li { grid-template-columns: minmax(0, 1fr); }
  .state { text-align: left; }
}

/* ── method ── */
.method { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.steps { display: grid; gap: 1.6rem; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0 1rem; counter-increment: s; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--data); font-size: .8rem; color: var(--accent); padding-top: .45rem; }
.steps h3 { font-family: var(--display); font-weight: 500; font-size: 1.6rem; line-height: 1.1; letter-spacing: -.015em; }
.steps p { color: var(--muted); grid-column: 2; margin-top: .3rem; }
.gates { background: var(--raise); border: 1px solid var(--rule); border-radius: 2px; padding: clamp(1.1rem, 2vw, 1.5rem); min-width: 0; }
.gates .label { margin-bottom: .7rem; }
.gates li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; font-family: var(--data); font-size: .84rem; line-height: 1.45; padding-block: .55rem; border-top: 1px solid var(--rule); }
.gates li span:last-child { color: var(--accent); letter-spacing: .08em; }
@media (max-width: 860px) { .method { grid-template-columns: minmax(0, 1fr); } }

/* ── compliance ── */
.comp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem); }
.comp > div { display: grid; gap: 1.1rem; align-content: start; border-top: 1px solid var(--ink); padding-top: 1.25rem; min-width: 0; }
.comp h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.45rem, 2.3vw, 1.9rem); line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { font-family: var(--data); font-size: .84rem; letter-spacing: .04em; padding: .5rem .8rem; border: 1px solid var(--accent); border-radius: 2px; }
.note { color: var(--muted); font-size: .9rem; max-width: 44rem; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
@media (max-width: 760px) { .comp { grid-template-columns: minmax(0, 1fr); } }

/* ── ways to work + contact ── */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2.5rem; }
.ways div { display: grid; gap: .5rem; align-content: start; border-top: 1px solid var(--ink); padding-top: 1.1rem; min-width: 0; }
.ways h3 { font-family: var(--display); font-weight: 500; font-size: 1.6rem; line-height: 1.1; letter-spacing: -.015em; }
.ways p { color: var(--muted); }
@media (max-width: 760px) { .ways { grid-template-columns: minmax(0, 1fr); } }

.contact { border-top: 1px solid var(--rule); }
.contact-in { display: grid; gap: 1.75rem; padding-block: clamp(3.5rem, 9vw, 7rem); }
.contact h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2.9rem, 8vw, 6.6rem); line-height: .98; letter-spacing: -.026em; max-width: 9em; text-wrap: balance; }
.contact h2 em { font-style: italic; color: var(--accent); }
.contact p { max-width: 34rem; color: var(--muted); }
.addr { font-family: var(--data); font-size: 1rem; user-select: all; color: var(--ink); }
.hashline b { font-weight: 400; text-transform: none; letter-spacing: .03em; color: var(--accent); white-space: nowrap; }
footer .w { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.5rem 2.25rem; border-top: 1px solid var(--rule); }
