/* ------------------------------------------------------------
   mirari.sh - direction B (technical mono / terminal lab)
   single typeface (Geist Mono), pure black on near-white,
   visible 8px subgrid, restrained to the point of severity.
   ------------------------------------------------------------ */

:root {
  color-scheme: light;
  --bg: #f0f0eb;
  --bg-soft: #e9e9e3;
  --bg-deep: #e3e3dc;
  --fg: #0a0a0a;
  --fg-strong: #000;
  --fg-muted: #6b6b65;
  --fg-faint: #a8a89f;
  --rule: rgba(10, 10, 10, 0.14);
  --rule-soft: rgba(10, 10, 10, 0.07);
  --rule-strong: rgba(10, 10, 10, 0.62);
  --hl: #0a0a0a;
  --col: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-feature-settings: "tnum" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(90deg, rgba(10, 10, 10, 0.035) 1px, transparent 1px);
  background-size: var(--col) 100%;
  background-position: 0 0;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* ------------------------ layout shell ------------------------ */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}
main.wrap {
  flex: 1 0 auto;
  width: 100%;
}

/* ------------------------ hero ------------------------ */
.hero {
  padding: 116px 0 0;
}
.eyebrow {
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 36px;
}
.eyebrow .arrow { color: var(--fg-faint); margin: 0 6px; }
.hero-lockup {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.hero-title {
  margin: 0;
  font-size: 48px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
  max-width: 18ch;
  text-transform: lowercase;
}
.hero-subtitle {
  margin: 0;
  color: var(--fg-muted);
  font-size: 18px;
  font-style: italic;
  font-weight: 300;
  line-height: 1.35;
}
.hero-description {
  max-width: 54ch;
  margin: 28px 0 0;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.65;
}
.hero-contact {
  max-width: 54ch;
  margin: 14px 0 0;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.65;
}
.hero-socials {
  display: flex;
  gap: 12px;
  margin: 14px 0 0;
  line-height: 1;
}
.hero-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--fg);
}
.hero-socials a:hover {
  color: var(--fg-muted);
}
.hero-socials svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.copy-email {
  display: inline;
  position: relative;
  color: inherit;
  border-bottom: 1px solid var(--fg);
  line-height: inherit;
  vertical-align: baseline;
}
.copy-email:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 3px;
}
.copy-email::after {
  content: "copied";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  padding: 3px 6px;
  color: var(--bg);
  background: var(--fg);
  font-size: 10px;
  font-style: normal;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(2px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}
.copy-email.is-copied::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.hero-separator {
  margin-top: 28px;
  border-top: 1px solid var(--rule);
}

/* ------------------------ signal section ------------------------ */
.signal {
  padding: 24px 0 80px;
}
.project-title {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.35;
  max-width: 64ch;
}
.project-abstract {
  max-width: 92ch;
  margin: 12px 0 42px;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.65;
}
.project-intro {
  max-width: 92ch;
  margin: -20px 0 48px;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.75;
}
.project-takeaway {
  max-width: 92ch;
  margin: 48px 0 0;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.75;
}
.signal-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 32px;
  align-items: end;
}
.section-tag {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.section-tag .num {
  color: var(--fg);
  font-weight: 500;
}

/* ------------------------ article metrics ------------------------ */
.article-flow {
  display: grid;
  gap: 72px;
}
.article-section {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.article-copy {
  max-width: 82ch;
}
.article-copy h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.45;
}
.article-copy p {
  margin: 0;
  color: var(--fg);
  font-size: 12.5px;
  line-height: 1.7;
}
.metric-display,
.market-display {
  grid-column: 2;
}

.metric-display {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
.metric-hero span {
  display: block;
  color: var(--fg);
  font-size: 132px;
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: 0;
}
.metric-hero small,
.market-label {
  display: block;
  margin-top: 12px;
  color: var(--fg-muted);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.metric-ledger {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
}
.metric-ledger div {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 0;
}
.metric-ledger dt {
  margin: 0;
  color: var(--fg-muted);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}
.metric-ledger dd {
  margin: 0;
  color: var(--fg);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}
.metric-note {
  max-width: 82ch;
  margin: 0;
  color: var(--fg-muted);
  font-size: 10px;
  line-height: 1.55;
}

.market-display {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.75fr);
  gap: 42px;
  align-items: end;
  margin-top: 28px;
}
.market-block {
  min-width: 0;
}
.market-value {
  color: var(--fg);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: 0;
}
.market-block-demand .market-value {
  font-size: 118px;
}
.market-block-platform .market-value {
  font-size: 58px;
}
.market-block .metric-ledger {
  margin-top: 20px;
}

/* ------------------------ footer ------------------------ */
footer {
  margin-top: auto;
  border-top: 1px solid var(--fg);
  padding: 22px 0 32px;
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}
.foot-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
}
.foot-right { text-align: right; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.social-link:hover { color: var(--fg-muted); }

/* ------------------------ responsive ------------------------ */
@media (max-width: 920px) {
  .signal-head { grid-template-columns: 1fr; gap: 16px; }
  .project-title { font-size: 20px; }
  .project-abstract { margin-bottom: 34px; }
  .project-intro { margin-top: -14px; margin-bottom: 42px; font-size: 12.5px; }
  .project-takeaway { margin-top: 42px; font-size: 12.5px; }
  .article-section {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .metric-display,
  .market-display {
    grid-column: 1;
  }
  .metric-hero span {
    font-size: 112px;
  }
  .market-display {
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
  }
  .market-block-demand .market-value {
    font-size: 96px;
  }
  .market-block-platform .market-value {
    font-size: 58px;
  }
  .hero-title { font-size: 40px; }
  .hero-subtitle { font-size: 17px; }
  .hero-description { font-size: 12.5px; }
  .hero-contact { font-size: 12.5px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 76px 0 0; }
  .hero-separator { margin-top: 24px; }
  .signal { padding-top: 20px; }
  .hero-lockup {
    display: block;
  }
  .hero-title { font-size: 32px; }
  .hero-subtitle { margin-top: 10px; font-size: 16px; }
  .hero-description { margin-top: 22px; font-size: 12px; }
  .hero-contact { font-size: 12px; }
  .project-title { font-size: 18px; }
  .project-abstract { margin-top: 10px; margin-bottom: 30px; font-size: 12px; }
  .project-intro { margin-top: -12px; margin-bottom: 36px; font-size: 12px; }
  .project-takeaway { margin-top: 36px; font-size: 12px; }
  .article-flow { gap: 40px; }
  .article-section { padding-top: 26px; }
  .article-copy h3 { font-size: 16px; }
  .article-copy p { font-size: 12px; }
  .metric-display,
  .market-display {
    margin-top: 22px;
  }
  .metric-hero span {
    font-size: 82px;
  }
  .metric-hero small,
  .market-label {
    margin-top: 10px;
  }
  .metric-ledger {
    display: flex;
    gap: 9px 16px;
  }
  .metric-ledger div {
    display: inline-flex;
  }
  .metric-ledger dd {
    font-size: 15px;
  }
  .market-block-demand .market-value {
    font-size: 66px;
  }
  .market-block-platform .market-value {
    font-size: 46px;
  }
}

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