/* ==========================================================================
   Byonixia — design system
   Direction: "The record". Document-grade, form-stock paper, transactional
   rather than editorial. No photography: the page proves the company with
   records, not with pictures.
   ========================================================================== */

:root {
  /* Colour ---------------------------------------------------------------- */
  --paper:      #f5f6f4;  /* cool recycled form stock */
  --card:       #ffffff;
  --ink:        #14181c;  /* blue-black */
  --slate:      #5b6670;  /* secondary text */
  --rule:       #d8dcd8;  /* hairlines */
  --rule-soft:  #e8eae7;
  --signal:     #1b4de4;  /* the one accent */
  --signal-ink: #1339a8;
  --verified:   #0f7a4a;  /* status only, never decoration */
  --flag:       #b4530a;  /* unresolved placeholders only */

  /* Type ------------------------------------------------------------------ */
  --f-display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --f-body:    "Public Sans", ui-sans-serif, system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --t-xs: 0.75rem;
  --t-sm: 0.8125rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.375rem;
  --t-xl: 1.875rem;
  --t-2xl: clamp(2rem, 3.6vw, 2.75rem);
  --t-3xl: clamp(2.5rem, 6.4vw, 4.75rem);

  /* Space ----------------------------------------------------------------- */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --wrap: 74rem;
  --measure: 68ch;
  --band-y: clamp(3.5rem, 8vw, 6.5rem);
}

/* Reset -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  /* ledger-paper grid */
  background-image:
    linear-gradient(rgba(20, 24, 28, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 24, 28, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
img, svg { max-width: 100%; display: block; }

a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--signal-ink); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1rem; z-index: 100; font-family: var(--f-mono); font-size: var(--t-sm);
}
.skip:focus { left: 0; }

/* Layout primitives -------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.band { padding-block: var(--band-y); }
.band--tight { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.band--edge { border-top: 1px solid var(--rule); }
.measure { max-width: var(--measure); }

/* Shared type roles -------------------------------------------------------- */
.tag {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 1rem;
}
.lede {
  font-size: var(--t-md);
  color: var(--slate);
  max-width: 56ch;
}
.h-section {
  font-size: var(--t-2xl);
  font-stretch: 112%;
}
.prose p + p { margin-top: 1rem; }
.prose ul { margin: 1rem 0; padding-left: 1.25rem; }
.prose li + li { margin-top: 0.5rem; }

/* Masthead ----------------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4.25rem;
}
.wordmark {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 118%;
  font-size: 1.1875rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 0.5rem;
}
.wordmark:hover { color: var(--ink); }

/* Logo: a printer's registration mark — the symbol used to verify alignment */
.mark {
  width: 1.4rem; height: 1.4rem;
  color: var(--signal);
  align-self: center;
  flex: none;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.mark path, .mark .mark__ring { fill: none; stroke: currentColor; stroke-width: 2.5; }
.mark__core { fill: currentColor; stroke: none; }
.wordmark:hover .mark { transform: rotate(90deg); }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 2rem); }
.nav a {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--signal); }
@media (max-width: 40rem) {
  .nav { gap: 0.9rem; font-size: var(--t-xs); }
  .nav a { font-size: var(--t-xs); }
}

/* Hero --------------------------------------------------------------------- */
.hero {
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4rem);
  position: relative;
  overflow: hidden;
}
.hero__ghost {
  position: absolute;
  right: -7vw; top: 50%;
  width: clamp(22rem, 44vw, 36rem); height: auto;
  color: var(--ink);
  opacity: 0.055;
  pointer-events: none;
  animation: ghost-spin 90s linear infinite;
  transform-origin: center;
  translate: 0 -50%;
}
.hero__ghost path, .hero__ghost circle { fill: none; stroke: currentColor; stroke-width: 0.6; }
@keyframes ghost-spin { to { rotate: 360deg; } }
@media (max-width: 56rem) { .hero__ghost { display: none; } }
.hero .wrap { position: relative; }
.hero__title {
  font-size: var(--t-3xl);
  font-weight: 800;
  font-stretch: 116%;
  letter-spacing: -0.035em;
  max-width: 17ch;
}
.hero__title em {
  font-style: normal;
  background-image: linear-gradient(var(--signal), var(--signal));
  background-repeat: no-repeat;
  background-position: 0 94%;
  background-size: 0% 0.08em;
  animation: ink-rule 0.9s 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes ink-rule { to { background-size: 100% 0.08em; } }
@media (prefers-reduced-motion: reduce) {
  .hero__title em { background-size: 100% 0.08em; }
}
.hero__lede {
  margin-top: 1.75rem;
  font-size: var(--t-md);
  color: var(--slate);
  max-width: 54ch;
}
.hero__actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Pipeline strip — the one animated moment, on load only ------------------- */
.pipeline {
  margin-top: clamp(3rem, 7vw, 4.5rem);
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}
.pipeline::before {
  content: "";
  position: absolute; top: -1px; left: 0;
  width: 100%; height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  animation: draw-rule 1.2s 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes draw-rule { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .pipeline::before { transform: scaleX(1); } }
.pipeline__stage {
  padding: 1rem 1rem 0 0;
  border-right: 1px solid var(--rule);
  opacity: 0;
  animation: stage-in 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.pipeline__stage:last-child { border-right: 0; }
.pipeline__stage:nth-child(1) { animation-delay: 0.10s; }
.pipeline__stage:nth-child(2) { animation-delay: 0.22s; }
.pipeline__stage:nth-child(3) { animation-delay: 0.34s; }
.pipeline__stage:nth-child(4) { animation-delay: 0.46s; }
.pipeline__stage b {
  display: block;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 0.4rem;
}
.pipeline__stage span { font-size: var(--t-sm); color: var(--slate); }
@keyframes stage-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pipeline__stage { opacity: 1; transform: none; }
}
@media (max-width: 46rem) {
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline__stage:nth-child(2) { border-right: 0; }
  .pipeline__stage:nth-child(3), .pipeline__stage:nth-child(4) {
    border-top: 1px solid var(--rule); padding-top: 1rem;
  }
}

/* Ticker strip — the company record on the move ---------------------------- */
.ticker {
  border-block: 1px solid var(--ink);
  background: var(--card);
  overflow: hidden;
}
.ticker__track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: ticker 42s linear infinite;
}
.ticker__track span {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  padding-block: 0.7rem;
}
.ticker__track b { color: var(--signal); font-weight: 500; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* Registration frame — corner brackets around a verified block ------------- */
.frame { position: relative; padding: 1rem; }
.frame > i {
  position: absolute;
  width: 1.2rem; height: 1.2rem;
  border: 0 solid var(--signal);
  pointer-events: none;
}
.frame > i:nth-of-type(1) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.frame > i:nth-of-type(2) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.frame > i:nth-of-type(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.frame > i:nth-of-type(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

/* Rotating verification seal ------------------------------------------------ */
.seal {
  position: absolute;
  top: -2.4rem; right: -1rem;
  width: 7rem; height: 7rem;
  color: var(--verified);
  z-index: 2;
  filter: drop-shadow(0 2px 6px rgba(20, 24, 28, 0.12));
}
.seal text {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  fill: currentColor;
}
.seal__spin {
  transform-origin: 50px 50px;
  animation: seal-spin 45s linear infinite;
}
@keyframes seal-spin { to { transform: rotate(360deg); } }
@media (max-width: 46rem) { .seal { width: 5.75rem; height: 5.75rem; top: -2rem; right: -0.35rem; } }

/* Scroll reveals ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--f-body);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--ink);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn::after {
  content: "\2192";
  font-family: var(--f-mono);
  font-weight: 400;
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.btn:hover::after { transform: translateX(4px); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

/* ==========================================================================
   Signature element: the Company Record
   A filing extract, not a marketing block.
   ========================================================================== */
.record {
  background: var(--card);
  border: 1px solid var(--ink);
}
.record__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.75rem;
  padding: 1.125rem var(--gutter);
  border-bottom: 1px solid var(--ink);
}
.record__head .tag { margin-bottom: 0; }
.record__stamp {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--verified);
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.record__stamp::before {
  content: "";
  width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: var(--verified);
}
.record__grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.field {
  padding: 1.05rem var(--gutter);
  border-bottom: 1px solid var(--rule-soft);
  border-right: 1px solid var(--rule-soft);
  min-width: 0;
}
.field:nth-child(2n) { border-right: 0; }
.record__grid .field:nth-last-child(-n+2) { border-bottom: 0; }
.field dt {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.35rem;
}
.field dd {
  margin: 0;
  font-size: var(--t-base);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.field--wide { grid-column: 1 / -1; border-right: 0; }
@media (max-width: 46rem) {
  .record__grid { grid-template-columns: 1fr; }
  .field { border-right: 0; }
  .record__grid .field:nth-last-child(-n+2) { border-bottom: 1px solid var(--rule-soft); }
  .record__grid .field:last-child { border-bottom: 0; }
}

/* Unresolved placeholder token -------------------------------------------- */
.tok {
  font-family: var(--f-mono);
  font-size: 0.9em;
  color: var(--flag);
  background: color-mix(in srgb, var(--flag) 9%, transparent);
  padding: 0.1em 0.35em;
  border-bottom: 1px dashed var(--flag);
}
.setup-banner {
  background: var(--flag);
  color: #fff;
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  padding: 0.65rem var(--gutter);
  text-align: center;
}
.setup-banner b { font-weight: 700; }

/* Service ledger ----------------------------------------------------------- */
.ledger { border-top: 1px solid var(--ink); margin-top: 2.5rem; }
.ledger__row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--gutter);
  padding-block: 1.65rem;
  border-bottom: 1px solid var(--rule);
  align-items: start;
  position: relative;
  transition: background-color 0.25s ease;
}
.ledger__row::after {
  content: "";
  position: absolute; left: calc(var(--gutter) * -0.5); top: 0; bottom: 0;
  width: 2px;
  background: var(--signal);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.ledger__row:hover { background: var(--card); }
.ledger__row:hover::after { transform: scaleY(1); }
.ledger__ref {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
  padding-top: 0.35rem;
}
.ledger__name { font-size: var(--t-lg); font-stretch: 108%; }
.ledger__body { color: var(--slate); font-size: var(--t-sm); }
.ledger__body ul {
  margin: 0.75rem 0 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.ledger__body li {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 0.2rem 0.5rem;
  background: var(--card);
}
@media (max-width: 52rem) {
  .ledger__row { grid-template-columns: 1fr; gap: 0.6rem; }
  .ledger__ref { padding-top: 0; }
}

/* Two-column explainer ----------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; } }

.notes { border-top: 1px solid var(--ink); }
.notes__item { padding-block: 1.35rem; border-bottom: 1px solid var(--rule); }
.notes__item h3 { font-size: var(--t-md); font-stretch: 106%; margin-bottom: 0.4rem; }
.notes__item p { color: var(--slate); font-size: var(--t-sm); }

/* Callout ------------------------------------------------------------------ */
.callout {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2rem, 5vw, 3.25rem);
  border-top: 3px solid var(--signal);
  position: relative;
  overflow: hidden;
}
.callout::before {
  content: "";
  position: absolute; inset: 0 0 0 auto;
  width: 36%;
  background: repeating-linear-gradient(-45deg,
    rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 11px);
  -webkit-mask-image: linear-gradient(to left, #000 55%, transparent);
  mask-image: linear-gradient(to left, #000 55%, transparent);
  pointer-events: none;
}
.callout > * { position: relative; }
.callout h2 { font-size: var(--t-xl); font-stretch: 110%; color: #fff; }
.callout p { color: #b9c0c7; margin-top: 0.85rem; max-width: 52ch; font-size: var(--t-sm); }
.callout .btn { margin-top: 1.75rem; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.callout .btn:hover { background: var(--signal); border-color: var(--signal); color: #fff; }

/* Contact ------------------------------------------------------------------ */
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 2.5rem; }
.channel { background: var(--card); padding: 1.5rem; position: relative; }
.channel::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.channel:hover::before { transform: scaleX(1); }
.channel h3 {
  font-family: var(--f-mono); font-size: var(--t-xs); font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); margin-bottom: 0.5rem;
}
.channel a, .channel p { font-size: var(--t-base); font-weight: 500; overflow-wrap: anywhere; }
.channel small { display: block; margin-top: 0.5rem; color: var(--slate); font-size: var(--t-xs); }

/* ==========================================================================
   Legal documents
   Clause numbers are real citation handles, not decoration.
   ========================================================================== */
.doc { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 60rem) { .doc { grid-template-columns: 1fr; } }

.doc__toc { position: sticky; top: 6rem; }
.doc__toc ol { list-style: none; margin: 0.75rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.doc__toc li { border-bottom: 1px solid var(--rule-soft); }
.doc__toc a {
  display: block; padding: 0.5rem 0;
  font-size: var(--t-sm); color: var(--slate); text-decoration: none;
}
.doc__toc a:hover { color: var(--ink); }
@media (max-width: 60rem) { .doc__toc { position: static; } }

.doc__meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem;
  font-family: var(--f-mono); font-size: var(--t-xs);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding-block: 0.85rem; margin-top: 1.75rem;
}

.clause { margin-top: 2.5rem; scroll-margin-top: 6rem; }
.clause__no {
  font-family: var(--f-mono); font-size: var(--t-xs); font-weight: 500;
  letter-spacing: 0.12em; color: var(--signal); display: block; margin-bottom: 0.5rem;
}
.clause h2 { font-size: var(--t-lg); font-stretch: 106%; margin-bottom: 0.85rem; }
.clause h3 { font-size: var(--t-base); font-stretch: 104%; margin: 1.5rem 0 0.5rem; }
.clause p, .clause li { max-width: var(--measure); }
.clause p + p { margin-top: 0.9rem; }
.clause ul { margin: 0.9rem 0; padding-left: 1.15rem; }
.clause li + li { margin-top: 0.45rem; }

.notice {
  border-left: 2px solid var(--signal);
  background: var(--card);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  font-size: var(--t-sm);
  max-width: var(--measure);
}

/* Footer ------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--ink); background: var(--card); margin-top: var(--band-y); }
.footer__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 2.5rem; padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.footer h4 {
  font-family: var(--f-mono); font-size: var(--t-xs); font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); margin-bottom: 0.9rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 0.45rem; }
.footer a { font-size: var(--t-sm); color: var(--ink); text-decoration: none; }
.footer a:hover { color: var(--signal); text-decoration: underline; }
.footer__legal {
  border-top: 1px solid var(--rule);
  padding-block: 1.35rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
  font-size: var(--t-xs); color: var(--slate);
}
.footer__legal p { max-width: 60ch; }

/* Error page --------------------------------------------------------------- */
.stub { padding-block: clamp(4rem, 12vw, 8rem); }
.stub h1 { font-size: var(--t-2xl); font-stretch: 112%; }
