/* MIBEVA LTD — mibeva.com
   Static stylesheet. No frameworks, no external resources, no web fonts.
   Type is set in the reader's own system UI face; factual records are set
   in the system monospace face. Nothing here loads from a third party. */

/* ---------------------------------------------------------------- tokens */

:root {
  --paper:        #fafaf8;
  --paper-sunk:   #f3f2ee;
  --ink:          #17181c;
  --muted:        #65666d;
  --rule:         #e4e3de;
  --accent:       #2c4a70;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  --page:      68rem;   /* outer measure */
  --measure:   34rem;   /* prose measure, ~62 characters */
  --label-col: 9rem;
  --gutter:    4rem;
  --edge:      clamp(1.375rem, 5vw, 4rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #101114;
    --paper-sunk: #17181c;
    --ink:        #e9e8e4;
    --muted:      #98989f;
    --rule:       #2a2b30;
    --accent:     #8fb3de;
  }
}

/* ------------------------------------------------------------------ base */

*, *::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(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-weight: 600; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transition: text-decoration-color 140ms ease;
}

a:hover { text-decoration-color: var(--accent); }

a:focus-visible,
.skip:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font: 500 0.875rem/1 var(--font-sans);
  text-decoration: none;
}

.skip:focus { left: var(--edge); top: 0.75rem; }

/* --------------------------------------------------------------- shell */

.shell {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--edge);
}

/* --------------------------------------------------------------- header */

.masthead {
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;   /* the wordmark is artwork, not text — no baseline */
  justify-content: space-between;
  gap: 0.875rem 2rem;
}

/* The MIBEVA wordmark, traced from the supplied artwork to a single path.
   Inlined in the markup rather than loaded, so it costs no request and
   picks up `currentColor` — which is what makes dark mode work for free. */
.wordmark {
  display: block;
  width: clamp(6.75rem, 12vw, 8.5rem);
  color: var(--ink);
  text-decoration: none;
  border-radius: 2px;
}

.wordmark svg {
  display: block;
  width: 100%;
  height: auto;
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.5rem;
}

.masthead nav a {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;   /* keep multi-word labels intact when the nav wraps */
}

.masthead nav a:hover { color: var(--ink); }

/* ----------------------------------------------------------------- hero */

.hero {
  padding-block: clamp(3rem, 11vw, 8rem) clamp(3.5rem, 9vw, 7rem);
}

.hero h1 {
  font-size: clamp(2.125rem, 6.1vw, 4.125rem);
  line-height: 1.04;
  letter-spacing: -0.032em;
  max-width: 17ch;
  text-wrap: balance;
}

.hero .lede {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: var(--measure);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  line-height: 1.6;
  color: var(--muted);
}

/* -------------------------------------------------------------- sections */

.section {
  border-top: 1px solid var(--rule);
  padding-block: clamp(3.25rem, 7.5vw, 5.5rem);
}

.row {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: 0 var(--gutter);
  align-items: start;
}

/* The section heading *is* the margin label — small, set in the record face,
   held in the left column. The only large type on the page is the hero. */
.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.45rem;   /* optically aligns with the first prose line */
}

.body { max-width: var(--measure); }

.body > * + * { margin-top: 1.125rem; }

.statement {
  font-size: clamp(1.1875rem, 2.1vw, 1.375rem);
  line-height: 1.45;
  letter-spacing: -0.011em;
  color: var(--ink);
  text-wrap: pretty;
}

.body p { color: var(--muted); }
.body .statement { color: var(--ink); }

/* ---------------------------------------------------------- stance list */

.stance { margin-top: 2.5rem; }

.stance li + li { margin-top: 2.125rem; }

.stance h3 {
  font-size: 1.0625rem;
  line-height: 1.45;
  letter-spacing: -0.008em;
}

.stance p { margin-top: 0.5rem; color: var(--muted); }

/* -------------------------------------------------------------- products */

.products { margin-top: 2.25rem; }

.product + .product { margin-top: 2.5rem; }

.product-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}

.product h3 {
  font-size: 1.25rem;
  letter-spacing: -0.014em;
}

.note {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.product p { margin-top: 0.625rem; color: var(--muted); }

.product .out { display: inline-block; margin-top: 0.875rem; font-size: 0.9375rem; }

.arrow { font-family: var(--font-mono); }

.aside {
  margin-top: 2.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* --------------------------------------------------------------- contact */

.mail {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  letter-spacing: -0.01em;
}

/* The registration record. This is the block Companies House would print. */
.record {
  margin: 2.5rem 0 0;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.record div {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: 0 1.25rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.record dt { color: var(--muted); }
.record dd { margin: 0; color: var(--ink); }

/* ---------------------------------------------------------------- footer */

.colophon {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) clamp(2.5rem, 5vw, 4rem);
}

.colophon .row { align-items: start; }

.sign-off {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
  max-width: 28rem;
}

.legalese {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.9;
  color: var(--muted);
}

.legalese span { display: block; }

.colophon nav {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
}

/* ------------------------------------------------------------ legal pages */

.doc { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 8vw, 5rem); }

.doc h1 {
  font-size: clamp(1.875rem, 4.4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.024em;
  max-width: 20ch;
}

.doc .updated {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc section {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.25rem, 5vw, 3rem);
}

.doc h2 {
  font-size: 1.0625rem;
  line-height: 1.45;
  letter-spacing: -0.008em;
}

.doc .body { max-width: 36rem; }

.doc .body ul { margin-top: 1.125rem; }

.doc .body li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--muted);
}

.doc .body li + li { margin-top: 0.625rem; }

.doc .body li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--rule);
}

.doc .record { margin-top: 1.75rem; border-top: 0; }
.doc .record div:first-child { border-top: 1px solid var(--rule); }

.back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.back:hover { color: var(--ink); }

/* ------------------------------------------------------------------- 404 */

.lost {
  padding-block: clamp(5rem, 18vw, 11rem);
}

.lost h1 {
  font-size: clamp(1.875rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.026em;
  max-width: 18ch;
}

.lost p { margin-top: 1.25rem; max-width: var(--measure); color: var(--muted); }

/* ---------------------------------------------------------------- motion */

/* One orchestrated moment: the hero settles once, on load. Nothing else moves. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1,
  .hero .lede {
    animation: settle 620ms cubic-bezier(0.22, 0.68, 0.28, 1) both;
  }
  .hero .lede { animation-delay: 110ms; }
}

@keyframes settle {
  from { opacity: 0; transform: translateY(0.55rem); }
  to   { opacity: 1; transform: none; }
}

@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;
  }
}

/* -------------------------------------------------------------- narrow */

@media (max-width: 56rem) {
  .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem 0;
  }
  .label { padding-top: 0; }
  .body, .doc .body { max-width: 38rem; }
}

@media (max-width: 30rem) {
  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .masthead nav { gap: 0.5rem 1.125rem; }
  .record div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.125rem;
    padding-block: 0.6875rem;
  }
  .record dt { font-size: 0.75rem; }
}

/* ------------------------------------------------------------------ print */

@media print {
  :root { --paper: #fff; --ink: #000; --muted: #333; --accent: #000; --rule: #ccc; }
  .masthead nav, .skip { display: none; }
  a { text-decoration: none; }
}
