/* MMR Labs — monochrome, technical, Palantir-inspiriert */

:root {
  --bg: #07080a;
  --bg-2: #0d0f12;
  --fg: #e9ebee;
  --fg-dim: #8a9099;
  --fg-faint: #4a5059;
  --line: rgba(233, 235, 238, 0.10);
  --line-strong: rgba(233, 235, 238, 0.22);
  --signal: #46e08a;
  --amber: #f2b84b;
  --blue: #7aa7ff;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--fg); color: var(--bg); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--fg); color: var(--bg); padding: 8px 12px; z-index: 100;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 var(--gutter);
  background: rgba(7, 8, 10, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.02em; }
.brand-mark { width: 22px; height: 22px; }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); }
.nav nav a {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--fg-dim); transition: color .2s;
}
.nav nav a:hover { color: var(--fg); }
.nav .idx { color: var(--fg-faint); margin-right: 6px; }
.nav-cta { border: 1px solid var(--line-strong); padding: 7px 14px; color: var(--fg) !important; }
.nav-cta:hover { background: var(--fg); color: var(--bg) !important; }
@media (max-width: 720px) {
  .nav nav a:not(.nav-cta) { display: none; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--gutter) 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
#field { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 30% 45%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 45%, #000 0%, transparent 70%);
  opacity: .55;
}
.hero-inner { position: relative; max-width: calc(var(--max) - 2 * var(--gutter)); width: 100%; margin: 0 auto; padding-bottom: 80px; }

.eyebrow, .label, .meta, .cap-id, .p-idx, .p-type, .p-status, .role, .telemetry dt {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
}
.eyebrow { color: var(--fg-dim); display: flex; align-items: center; gap: 10px; margin: 0 0 28px; }

.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 10px var(--signal);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

h1 {
  margin: 0; font-weight: 500;
  font-size: clamp(40px, 7.4vw, 104px); line-height: 0.98; letter-spacing: -0.035em;
  max-width: 14ch;
}
.dim { color: var(--fg-faint); }
.lede { margin: 32px 0 0; max-width: 56ch; color: var(--fg-dim); font-size: clamp(16px, 1.4vw, 19px); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 14px 22px; background: var(--fg); color: var(--bg);
  border: 1px solid var(--fg); transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--fg); }

.telemetry {
  position: relative; margin: 0 calc(var(--gutter) * -1);
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(7, 8, 10, 0.6);
}
.telemetry div { padding: 18px var(--gutter); border-right: 1px solid var(--line); min-width: 0; }
.telemetry div:last-child { border-right: 0; }
.telemetry dt { color: var(--fg-faint); font-size: 11px; }
.telemetry dd { margin: 4px 0 0; font-family: var(--mono); font-size: 14px; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
  .telemetry { grid-template-columns: 1fr 1fr; }
  .telemetry div:nth-child(2) { border-right: 0; }
  .telemetry div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ---------- SECTIONS ---------- */
.section {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(88px, 12vw, 160px) var(--gutter) 0;
}
.section-head { display: flex; align-items: center; gap: 20px; margin-bottom: 48px; }
.label { color: var(--fg); white-space: nowrap; }
.meta { color: var(--fg-faint); white-space: nowrap; }
.rule { flex: 1; height: 1px; background: var(--line-strong); }

.statement {
  margin: 0; max-width: 24ch;
  font-size: clamp(28px, 4.2vw, 56px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 500;
}
.statement em { font-style: normal; color: var(--fg-dim); }
.statement-sm { font-size: clamp(24px, 3vw, 40px); max-width: 28ch; margin-bottom: 56px; }

/* Capabilities */
.capabilities {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 72px; border: 1px solid var(--line);
}
.cap { padding: 28px 24px 32px; border-right: 1px solid var(--line); position: relative; transition: background .25s; }
.cap:last-child { border-right: 0; }
.cap:hover { background: var(--bg-2); }
.cap::before {
  content: ""; position: absolute; top: -1px; left: -1px; width: 10px; height: 10px;
  border-top: 1px solid var(--fg); border-left: 1px solid var(--fg); opacity: 0; transition: opacity .25s;
}
.cap:hover::before { opacity: 1; }
.cap-id { color: var(--fg-faint); font-size: 11px; }
.cap h3, .person h3 { margin: 40px 0 10px; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.cap p, .person p { margin: 0; color: var(--fg-dim); font-size: 15px; }
@media (max-width: 960px) {
  .capabilities { grid-template-columns: 1fr 1fr; }
  .cap:nth-child(2) { border-right: 0; }
  .cap:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .capabilities { grid-template-columns: 1fr; }
  .cap { border-right: 0; border-bottom: 1px solid var(--line); }
  .cap:last-child { border-bottom: 0; }
}

/* Projects */
.projects { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.projects li { border-bottom: 1px solid var(--line); }
.project {
  display: grid; align-items: center; gap: 24px;
  grid-template-columns: 80px 1fr 160px 160px 32px;
  padding: 28px 8px; position: relative; transition: background .25s, padding .25s;
}
.project:hover { background: var(--bg-2); padding-left: 20px; }
.p-idx { color: var(--fg-faint); }
.p-name { font-size: clamp(20px, 2.2vw, 28px); font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.p-name small { display: block; margin-top: 6px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--fg-dim); }
.p-type { color: var(--fg-dim); }
.p-status { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; }
.p-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.is-live { color: var(--signal); }
.is-beta { color: var(--blue); }
.is-dev { color: var(--amber); }
.p-arrow { color: var(--fg-faint); font-size: 18px; transition: color .2s, transform .2s; justify-self: end; }
.project:hover .p-arrow { color: var(--fg); transform: translate(3px, -3px); }
@media (max-width: 860px) {
  .project { grid-template-columns: 56px 1fr 24px; gap: 8px 16px; }
  .p-name { grid-column: 2; grid-row: 1; }
  .p-arrow { grid-column: 3; grid-row: 1; }
  .p-type, .p-status { grid-column: 2; }
  .p-type { grid-row: 2; }
  .p-status { grid-row: 3; }
}

/* Team */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); }
.person { padding: 28px 24px 36px; border-right: 1px solid var(--line); }
.person:last-child { border-right: 0; }
.avatar {
  aspect-ratio: 4 / 5; margin-bottom: 24px; position: relative;
  display: grid; place-items: center;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.avatar span { font-family: var(--mono); font-size: 40px; letter-spacing: 0.06em; color: var(--fg-dim); }
.avatar::after {
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  background:
    linear-gradient(var(--fg), var(--fg)) top left / 12px 1px,
    linear-gradient(var(--fg), var(--fg)) top left / 1px 12px,
    linear-gradient(var(--fg), var(--fg)) bottom right / 12px 1px,
    linear-gradient(var(--fg), var(--fg)) bottom right / 1px 12px;
  background-repeat: no-repeat; opacity: .5;
}
.person h3 { margin-top: 14px; }
.role { color: var(--fg-dim); margin: 0 0 14px !important; font-size: 11px !important; }
@media (max-width: 860px) {
  .team { grid-template-columns: 1fr; }
  .person { border-right: 0; border-bottom: 1px solid var(--line); }
  .avatar { aspect-ratio: 1 / 1; }
  .person:last-child { border-bottom: 0; }
}

/* Contact */
.contact { padding-bottom: clamp(88px, 12vw, 160px); }
.contact-inner { display: flex; flex-direction: column; gap: 32px; }
.contact h2 { margin: 0; font-size: clamp(36px, 6vw, 80px); font-weight: 500; letter-spacing: -0.035em; line-height: 1; max-width: 16ch; }
.mail {
  align-self: flex-start; font-family: var(--mono); font-size: clamp(16px, 2vw, 22px);
  border-bottom: 1px solid var(--line-strong); padding-bottom: 6px; transition: border-color .2s;
  overflow-wrap: anywhere;
}
.mail:hover { border-color: var(--fg); }

/* Footer */
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-faint);
}
.footer nav { display: flex; gap: 24px; }
.footer a:hover { color: var(--fg); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal, html:not(.js) .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
}

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 140px var(--gutter) 120px; }
.legal h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 48px; max-width: none; }
.legal h2 { font-size: 18px; font-weight: 500; margin: 40px 0 8px; }
.legal p, .legal li { color: var(--fg-dim); }
.legal a { border-bottom: 1px solid var(--line-strong); }
.legal a:hover { border-color: var(--fg); }
.todo { color: var(--amber); font-family: var(--mono); font-size: .9em; }
