/* Metis Dynamics — site styles
   Near-black and off-white. Amber is reserved for status and emphasis. */

@font-face {
  font-family: "Metis Display";
  src: url("assets/fonts/orbitron-black.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Metis Display";
  src: url("assets/fonts/orbitron-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Heros";
  src: url("assets/fonts/heros-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Heros";
  src: url("assets/fonts/heros-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #151411;         /* the near-black of the logo background */
  --paper: #fafaf5;      /* the off-white of the logo */
  --dim: #b1b0a7;        /* secondary text on the dark background */
  --rule: #38372f;       /* lines on the dark background */
  --amber: #ffb000;      /* status and emphasis only */
  --ink: #151411;        /* text on paper */
  --paper-dim: #55544e;  /* secondary text on paper */
  --paper-rule: #c9c8c0; /* lines on paper */

  --display: "Metis Display", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Heros", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --measure: 60ch;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--display);
  margin: 0;
  text-wrap: balance;
}
h1 { font-weight: 900; font-size: clamp(1.75rem, 4.3vw, 3.2rem); line-height: 1.14; }
h2 { font-weight: 900; font-size: clamp(1.35rem, 2.7vw, 2rem); line-height: 1.18; }
h3 { font-weight: 700; font-size: 1rem; line-height: 1.3; letter-spacing: 0.01em; }

p { margin: 0 0 1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

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

/* Header */

.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
  flex-wrap: wrap;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .brand-owl { width: 30px; }
.brand .brand-word { width: 190px; }
.site-nav { display: flex; gap: 2px 24px; flex-wrap: wrap; font-size: 1rem; }
.site-nav a { text-decoration: none; padding: 6px 0; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { text-decoration: underline; }

/* Buttons */

.button {
  display: inline-block;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 13px 20px;
  border: 1px solid var(--paper);
}
.button:hover { background: transparent; color: var(--paper); }
.button.quiet { background: transparent; color: var(--paper); border-color: var(--dim); }
.button.quiet:hover { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; margin-top: 1.8rem; }

/* Status marker: amber dot plus plain words */

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--paper);
}
.status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}
.status.planned::before { background: transparent; box-shadow: inset 0 0 0 2px var(--dim); }

/* Hero */

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-top: clamp(44px, 8vw, 104px);
  padding-bottom: clamp(52px, 8vw, 112px);
}
.hero-lede { font-size: 1.1875rem; line-height: 1.5; margin-top: 1.4rem; max-width: 40ch; }

/* Link-layer figure (MAK concept) */

.layers { margin: 0; border: 1px solid var(--rule); }
.layers-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--dim);
}
.layers-head strong { font-family: var(--display); font-weight: 700; font-size: 0.9375rem; color: var(--paper); }
.layers ol { list-style: none; margin: 0; padding: 0; counter-reset: layer; }
.layers li {
  counter-increment: layer;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: baseline;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
  border-left: 3px solid transparent;
  color: var(--dim);
}
.layers li::before { content: counter(layer); font-family: var(--display); font-weight: 700; font-size: 0.875rem; }
.layers .layer-name { font-weight: 700; }
.layers .layer-what { grid-column: 2 / -1; font-size: 0.9375rem; }
.layers .layer-state { font-size: 0.9375rem; white-space: nowrap; }
.layers li.live { color: var(--paper); border-left-color: var(--amber); }
.layers li.live .layer-state { color: var(--amber); font-weight: 700; }
.layers figcaption { padding: 14px 18px; font-size: 0.9375rem; color: var(--dim); }

/* Sections */

.section { border-top: 1px solid var(--rule); }
.section > .wrap { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}
.product-name { margin-top: 0.9rem; }
.product-sub { color: var(--dim); margin-top: 0.5rem; }
.product-body { margin-top: 1.2rem; }
.product-body p { color: var(--dim); }
.product-body p.lead { color: var(--paper); font-size: 1.125rem; }

.ledger { margin: 0; padding: 0; }
.ledger > div {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 6px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger > div:first-child { border-top: 1px solid var(--rule); }
.ledger dt { font-family: var(--display); font-weight: 700; font-size: 0.9375rem; line-height: 1.45; }
.ledger dd { margin: 0; color: var(--dim); max-width: 48ch; }

/* The time card: the one paper object */

.timecard { background: var(--paper); color: var(--ink); padding: clamp(16px, 2.4vw, 26px); margin: 0; }
.timecard-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
}
.timecard-title { font-family: var(--display); font-weight: 900; font-size: 1.125rem; line-height: 1; }
.timecard-period { font-size: 0.9375rem; color: var(--paper-dim); text-align: right; }
.timecard table { width: 100%; border-collapse: collapse; font-size: 1rem; font-variant-numeric: tabular-nums lining-nums; }
.timecard th,
.timecard td { padding: 10px 0 9px; text-align: right; border-bottom: 1px solid var(--paper-rule); white-space: nowrap; }
.timecard th:first-child,
.timecard td:first-child { text-align: left; }
.timecard thead th { font-weight: 400; font-size: 0.875rem; color: var(--paper-dim); padding-top: 12px; }
.timecard tbody th { font-weight: 400; }
.timecard tfoot th,
.timecard tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); padding-top: 12px; }
.timecard .ot { display: inline-block; background: var(--amber); color: var(--ink); font-weight: 700; padding: 1px 7px; margin-right: -7px; }
.timecard-reasons { margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--paper-rule); font-size: 0.9375rem; }
.timecard-reasons p { margin: 0 0 4px; max-width: none; }
.timecard-reasons .label { color: var(--paper-dim); }
.timecard figcaption { margin-top: 12px; font-size: 0.875rem; color: var(--paper-dim); }

/* Principles */

.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 6vw, 80px); }
.principles li { padding: 20px 0; border-top: 1px solid var(--rule); }
.principles h3 { margin-bottom: 0.45rem; }
.principles p { color: var(--dim); max-width: 44ch; }

/* Contact band */

.contact-line { font-family: var(--display); font-weight: 700; font-size: clamp(1rem, 2.5vw, 1.5rem); line-height: 1.3; overflow-wrap: anywhere; }

/* Footer */

.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 44px;
  padding-bottom: 44px;
}
.site-footer img { width: 180px; }
.footer-meta { color: var(--dim); font-size: 0.9375rem; text-align: right; }
.footer-meta p { margin: 0 0 8px; max-width: none; }
.footer-links { display: flex; gap: 6px 22px; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a { color: var(--paper); }

/* Small screens */

@media (max-width: 880px) {
  .hero .wrap,
  .split,
  .principles { grid-template-columns: minmax(0, 1fr); }
  .footer-meta { text-align: left; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .brand .brand-word { width: 160px; }
  .ledger > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .layers li { grid-template-columns: 1.6rem minmax(0, 1fr); }
  .layers .layer-state { grid-column: 2; }
  .timecard table { font-size: 0.875rem; }
  .timecard thead th { font-size: 0.75rem; }
  .timecard .col-out { display: none; }
  .actions .button { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}

/* Inner pages */

.page-head .wrap { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(36px, 6vw, 72px); }
.page-head h1 { margin-top: 0.9rem; max-width: 22ch; }
.page-head .lede { font-size: 1.1875rem; line-height: 1.5; margin-top: 1.3rem; max-width: 52ch; }
.page-head .product-sub { margin-top: 0.6rem; }

.section h2 + .section-lede { color: var(--dim); margin-top: 0.9rem; max-width: 34ch; }
.stack > * + * { margin-top: 1em; }
.plain-list { margin: 0; padding-left: 1.1em; color: var(--dim); max-width: var(--measure); }
.plain-list li { margin-bottom: 0.5em; }
.plain-list li::marker { color: var(--dim); }

.note {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--amber);
  padding: 18px 20px;
  max-width: 62ch;
}
.note p { color: var(--paper); }

/* Plans */

.plans { width: 100%; border-collapse: collapse; }
.plans th, .plans td { text-align: left; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.plans tr:first-child th, .plans tr:first-child td { border-top: 1px solid var(--rule); }
.plans th { font-family: var(--display); font-weight: 700; font-size: 0.9375rem; width: 8.5rem; }
.plans .price { font-family: var(--display); font-weight: 900; font-size: 1.25rem; white-space: nowrap; width: 9rem; }
.plans .terms { color: var(--dim); padding-right: 0; }
.plans-note { color: var(--dim); font-size: 0.9375rem; margin-top: 1rem; }

/* Contact */

.contact-block { padding: 22px 0; border-top: 1px solid var(--rule); }
.contact-block:last-child { border-bottom: 1px solid var(--rule); }
.contact-block p { color: var(--dim); margin-top: 0.5rem; }

/* Policy and support documents */

.doc .wrap { max-width: 820px; padding-top: clamp(40px, 7vw, 80px); padding-bottom: clamp(56px, 8vw, 104px); }
.doc h1 { max-width: none; }
.doc .updated { color: var(--dim); margin-top: 1rem; }
.doc h2 { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); margin-bottom: 0.9rem; font-size: 1.25rem; }
.doc h3 { margin-top: 1.7rem; margin-bottom: 0.5rem; }
.doc p, .doc li { color: #dcdbd3; }
.doc ul { padding-left: 1.15em; margin: 0 0 1em; max-width: var(--measure); }
.doc li { margin-bottom: 0.45em; }
.doc .summary { background: var(--paper); padding: 22px 24px; margin-top: 2rem; }
.doc .summary p, .doc .summary li { color: var(--ink); }
.doc .summary p { font-weight: 700; }
.doc .summary ul { margin-bottom: 0; }

@media (max-width: 520px) {
  .plans th, .plans td { display: block; width: auto; border: 0; padding: 0; }
  .plans tr { display: block; padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .plans tr:first-child { border-top: 1px solid var(--rule); }
  .plans tr:first-child th, .plans tr:first-child td { border-top: 0; }
  .plans .price { margin: 4px 0; }
}
