/* MirraNET website – single stylesheet, no external requests. */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/outfit.woff2") format("woff2");
}

:root {
  --night: #0c0f16;
  --night-2: #090b11;
  --surface: #131823;
  --raised: #1a2130;
  --line: #1f2635;
  --text: #e9ebf1;
  --muted: #9ba3b4;
  --red: #e23744;
  --orange: #ee7a46;
  --amber: #f6b44c;
  --grad: linear-gradient(110deg, var(--red) 0%, var(--orange) 55%, var(--amber) 100%);

  --freex: #f0974a;
  --ondura: #5b78e6;
  --parla: #7ccb1a;
  --obsidia: #60cdff;

  --radius-card: 12px;
  --radius-control: 999px;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);

  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--night);
  -webkit-text-size-adjust: 100%;
}

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

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

body {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.7;
  font-weight: 300;
  letter-spacing: 0.005em;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(238, 122, 70, 0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(226, 55, 68, 0.05), transparent 60%),
    var(--night);
  background-repeat: no-repeat;
}

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

a { color: var(--amber); text-underline-offset: 0.18em; }
a:hover { color: #ffd08a; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 400; letter-spacing: -0.005em; }
p { margin: 0; }
strong { font-weight: 500; }

code, pre {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
}
:not(pre) > code {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.4em;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--text);
  color: var(--night);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(12, 15, 22, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(37, 45, 62, 0.7);
}
.top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 200;
  letter-spacing: 0.02em;
}
.brand:hover { color: var(--text); }
.top__end { display: flex; align-items: center; gap: 18px; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.nav a:hover { color: var(--text); }
.nav .nav__cta {
  color: var(--text);
  border: 1px solid #343d52;
  padding: 5px 15px;
  border-radius: var(--radius-control);
  font-weight: 400;
}
.nav .nav__cta:hover { color: var(--text); border-color: var(--orange); }

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 2px;
}
.lang a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 400;
  padding: 2px 9px;
  border-radius: var(--radius-control);
}
.lang a[aria-current="true"] { background: var(--raised); color: var(--text); }

@media (max-width: 860px) {
  .nav a:not(.nav__cta) { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-control);
  font-weight: 400;
  font-size: 0.97rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter 0.15s, background 0.15s, border-color 0.15s;
}
.btn--primary { background: var(--grad); color: #160c08; font-weight: 500; }
.btn--primary:hover { color: #160c08; filter: brightness(1.06); }
.btn--ghost { border-color: #2c3446; color: var(--text); background: transparent; }
.btn--ghost:hover { color: var(--text); border-color: #4a5570; background: rgba(26, 33, 48, 0.5); }

/* ---------- Hero ---------- */

.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 7vw, 90px); overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.7rem, 6vw, 4.6rem);
  font-weight: 200;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.hero h1 .grad { font-weight: 400; }
.hero__lede {
  margin-top: 26px;
  font-size: clamp(1.08rem, 1.5vw, 1.22rem);
  color: #b3bac8;
  max-width: 36em;
  font-weight: 300;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.orbit {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
  margin-inline: auto;
}
.orbit::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(238, 122, 70, 0.16), transparent 68%);
  filter: blur(10px);
}
.orbit__lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit__lines path {
  stroke: #2a3243;
  stroke-width: 1;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
  fill: none;
}
.orbit__lines .orbit__pulse {
  stroke: var(--amber);
  stroke-width: 1.4;
  stroke-dasharray: 14 400;
  stroke-dashoffset: 0;
  animation: pulse 3.2s linear infinite;
}
.orbit__lines .orbit__pulse:nth-of-type(7) { animation-delay: 0.64s; }
.orbit__lines .orbit__pulse:nth-of-type(8) { animation-delay: 1.28s; }
.orbit__lines .orbit__pulse:nth-of-type(9) { animation-delay: 1.92s; }
.orbit__lines .orbit__pulse:nth-of-type(10) { animation-delay: 2.56s; }
@keyframes pulse {
  from { stroke-dashoffset: 0; opacity: 1; }
  70% { opacity: 1; }
  to { stroke-dashoffset: -170; opacity: 0; }
}
.orbit__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 18px rgba(238, 122, 70, 0.22));
}
.orbit__node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--muted);
  transform: translate(-50%, -50%);
}
.orbit__node img {
  width: 48px;
  height: 48px;
  padding: 5px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.orbit__node--1 { left: 50%; top: 10%; }
.orbit__node--2 { left: 88%; top: 37%; }
.orbit__node--3 { left: 74%; top: 84%; }
.orbit__node--4 { left: 26%; top: 84%; }
.orbit__node--5 { left: 12%; top: 37%; }

@media (prefers-reduced-motion: reduce) {
  .orbit__lines .orbit__pulse { display: none; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .orbit { width: min(100%, 360px); }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 120px) 0; scroll-margin-top: 60px; }
.section--band {
  background: linear-gradient(180deg, var(--night-2), #0f131c);
  border-block: 1px solid var(--line);
}
.section__title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 300; }
.section__intro {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 44em;
}
.section__intro strong { color: var(--text); font-weight: 400; }

/* ---------- Projects ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 44px;
}
@media (max-width: 760px) { .projects { grid-template-columns: 1fr; } }

.project {
  --accent: var(--orange);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.project::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--accent);
  opacity: 0.8;
}
.project::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.04;
  filter: blur(40px);
  pointer-events: none;
}
.project:hover { border-color: #2f384c; }

.project--stem { --accent: var(--grad); }
.project--stem::after { background: var(--red); }
.project--freex { --accent: var(--freex); }
.project--ondura { --accent: var(--ondura); }
.project--parla { --accent: var(--parla); }
.project--obsidia { --accent: var(--obsidia); }

/* STEM is the core of MirraNET, so its card spans the full row. */
@media (min-width: 761px) { .project--stem { grid-column: 1 / -1; } }

.project__head { display: flex; align-items: center; gap: 16px; }
.project__head img { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.project h3 { font-size: 1.35rem; font-weight: 400; }
.project__kind { color: var(--muted); font-size: 0.92rem; margin-top: 3px; }
.project > p:not(.project__meta) { color: #b8bfcc; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 2px 10px;
}

.project__meta { font-size: 0.85rem; color: #8790a2; min-height: 1.4em; }
.project__meta:empty { display: none; }
.project__meta .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 8px;
  vertical-align: 1px;
}

.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: auto;
  padding-top: 6px;
}
.project__links a { font-weight: 400; text-decoration: none; font-size: 0.97rem; }
.project__links a::after { content: " →"; }
.project__links a:hover { text-decoration: underline; }

/* ---------- STEM ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 44px;
}
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.split__col {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.split__col h3 { font-size: 1.25rem; font-weight: 400; margin-bottom: 18px; }

.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 22px; color: #b8bfcc; }
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.code {
  margin: 20px 0 0;
  background: #0a0d13;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.code figcaption {
  padding: 10px 18px;
  font-size: 0.85rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.code pre { margin: 0; padding: 18px; overflow-x: auto; line-height: 1.7; color: #d5d9e3; }
.c-k { color: var(--amber); }
.c-v { color: #ff8a8a; }
.c-n { color: #9ddcff; }
.c-s { color: #a6e3a1; }
.c-c { color: #6b7488; }

.inline-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- Libraries ---------- */

.libs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 44px;
}
.lib {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.lib:hover { color: var(--text); border-color: #2f384c; background: #151b27; }
.lib h3 { font-size: 0.98rem; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-weight: 500; letter-spacing: 0; }
.lib p { color: var(--muted); font-size: 0.93rem; }
.lib__meta { margin-top: auto; font-size: 0.82rem; color: #7b8496; }
.lib--more {
  grid-column: 1 / -1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  border-style: dashed;
  border-color: #2c3446;
  background: transparent;
}
.lib--more .lib__meta { margin-top: 0; }
.lib--more .lib__meta { color: var(--amber); }
.lib--more .lib__meta::before { display: none; }
.lib__meta::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b07219;
  margin-right: 7px;
  vertical-align: 0;
}

/* ---------- Infrastructure ---------- */

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
@media (max-width: 960px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pipeline { grid-template-columns: 1fr; } }
.pipeline li {
  position: relative;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.pipeline__step {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pipeline h3 { font-size: 1.12rem; font-weight: 400; margin-bottom: 8px; }
.pipeline p { color: var(--muted); font-size: 0.93rem; }

.maven { margin-top: 32px; }
.maven > p { color: var(--muted); margin-bottom: 10px; }
.maven > .maven__after { margin: 10px 0 0; font-size: 0.93rem; }
.maven__box {
  position: relative;
  background: #0a0d13;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.maven__box pre { margin: 0; padding: 18px 110px 18px 18px; overflow-x: auto; color: #d5d9e3; line-height: 1.6; }
.copy {
  position: absolute;
  right: 12px;
  top: 12px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 6px 14px;
  cursor: pointer;
}
.copy:hover { border-color: #3a4459; }

/* ---------- CTA ---------- */

.cta__box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.cta__box > * { min-width: 0; }
.cta h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 300; }
.cta p { color: var(--muted); margin-top: 8px; }
.cta__links { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 860px) {
  .cta__box { grid-template-columns: 1fr; text-align: left; }
}

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--line); padding: 36px 0 44px; background: var(--night-2); }
.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.foot__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.foot ul { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.foot ul a { color: var(--muted); text-decoration: none; }
.foot ul a:hover { color: var(--text); }
.foot__fine { margin-top: 22px; font-size: 0.86rem; color: #6f788b; max-width: 60em; }
.foot__fine a { color: inherit; }

/* ---------- Legal pages ---------- */

.legal { padding: clamp(40px, 7vw, 80px) 0; }
.legal__body { max-width: 760px; }
.legal h1 { font-size: clamp(1.9rem, 3.6vw, 2.4rem); font-weight: 300; margin-bottom: 28px; }
.legal h2 { font-size: 1.1rem; font-weight: 400; margin: 30px 0 10px; }
.legal p, .legal address { color: #b8bfcc; font-style: normal; }
.legal .btn { margin-top: 18px; margin-right: 8px; }

/* The FreeX icon has no tile of its own. */
.project--freex .project__head img { background: var(--raised); border: 1px solid var(--line); padding: 8px; }

/* On narrow screens the copy button sits above the code instead of over it. */
@media (max-width: 600px) {
  .maven__box pre { padding: 54px 18px 18px; }
}
.maven__after code { white-space: nowrap; }
