/* MIRAGE Pages philosophy: restrained technical documentation, high contrast,
   no decorative imagery, and direct paths from claims to repository evidence. */
:root {
  color-scheme: light;
  --ink: #14222f;
  --muted: #4d5b66;
  --line: #d7dee3;
  --paper: #f8fafb;
  --white: #ffffff;
  --navy: #102938;
  --teal: #0b6b73;
  --teal-soft: #e1f0f0;
  --amber: #bd720d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--teal);
  text-underline-offset: 0.18em;
}
a:hover {
  color: #064f55;
}

.site-header,
main,
footer {
  width: min(100% - 2rem, 1100px);
  margin-inline: auto;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--amber) 0 42%,
    var(--teal) 42% 68%,
    var(--navy) 68%
  );
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}
nav a,
.repository-link {
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}
.repository-link {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.42rem 0.72rem;
}

main {
  padding-block: 4rem 5rem;
}
section {
  margin-top: 4.5rem;
}

.intro {
  max-width: 800px;
  margin-top: 0;
}
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.15;
}
h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  letter-spacing: -0.055em;
}
h2 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  letter-spacing: -0.04em;
}
h3 {
  margin: 0;
  font-size: 1.08rem;
}
.lead {
  max-width: 720px;
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: 1.13rem;
}
.section-intro {
  max-width: 720px;
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.8rem;
}
.button {
  display: inline-block;
  border-radius: 4px;
  padding: 0.7rem 0.95rem;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}
.button.primary {
  color: var(--white);
  background: var(--navy);
}
.button.primary:hover {
  color: var(--white);
  background: #1c4158;
}
.button.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
}

.scope {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.scope div {
  padding: 1.2rem;
  background: var(--white);
}
.scope strong,
.scope span {
  display: block;
}
.scope strong {
  color: var(--navy);
}
.scope span {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.use-case-grid article {
  min-height: 190px;
  padding: 1.3rem;
  border: 1px solid var(--line);
  background: var(--white);
}
.use-case-grid p {
  margin: 0.75rem 0 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}
.tag {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 720;
}

.contract-table-wrap {
  overflow-x: auto;
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  background: var(--white);
}
table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  text-align: left;
}
th,
td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--navy);
  background: #f1f5f7;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
td {
  color: var(--muted);
  font-size: 0.9rem;
}
td:first-child {
  color: var(--ink);
  font-weight: 700;
}
tr:last-child td {
  border-bottom: 0;
}

.workflow {
  padding: 2rem;
  border-left: 4px solid var(--amber);
  background: var(--white);
}
.workflow ol {
  max-width: 850px;
  margin: 1.3rem 0 0;
  padding-left: 1.25rem;
}
.workflow li {
  margin-block: 0.75rem;
  color: var(--muted);
}
.workflow strong {
  color: var(--ink);
}

.resources ul {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.resources li {
  padding-block: 0.75rem;
  border-top: 1px solid var(--line);
}
.resources li:last-child {
  border-bottom: 1px solid var(--line);
}
.resources a {
  font-weight: 650;
}

footer {
  padding: 1.6rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}
footer p {
  max-width: 800px;
  margin: 0 0 0.5rem;
}
footer strong {
  color: var(--ink);
}

@media (max-width: 760px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding-block: 1rem;
  }
  nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }
  .repository-link {
    margin-left: auto;
  }
  main {
    padding-block: 2.8rem 3.5rem;
  }
  section {
    margin-top: 3.25rem;
  }
  .scope,
  .use-case-grid {
    grid-template-columns: 1fr;
  }
  .workflow {
    padding: 1.3rem;
  }
}

@media (max-width: 440px) {
  .site-header,
  main,
  footer {
    width: min(100% - 1.25rem, 1100px);
  }
  .repository-link {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
  }
  nav {
    gap: 0.9rem;
  }
  nav a {
    font-size: 0.82rem;
  }
}
