:root {
  --bg: #070b0d;
  --bg-soft: #0a1013;
  --surface: rgba(13, 20, 24, 0.76);
  --surface-strong: rgba(17, 26, 31, 0.92);
  --line: rgba(177, 217, 211, 0.18);
  --line-strong: rgba(125, 255, 225, 0.48);
  --text: #f1f4f2;
  --muted: #a8b3b0;
  --dim: #6e7a78;
  --accent: #64ead2;
  --accent-soft: rgba(100, 234, 210, 0.12);
  --max: 1280px;
  --header: 88px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(100, 234, 210, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 234, 210, 0.032) 1px, transparent 1px),
    radial-gradient(circle at 78% 12%, rgba(100, 234, 210, 0.08), transparent 32rem),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, rgba(7, 11, 13, 0.2), rgba(7, 11, 13, 0.72) 50%, rgba(7, 11, 13, 0.2));
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.site-shell {
  overflow: hidden;
  border-inline: 1px solid rgba(177, 217, 211, 0.12);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header);
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 13, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.16em;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 700;
}

.brand-dot,
.brand-accent {
  color: var(--accent);
}

.desktop-nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 3.5rem);
  align-items: center;
}

.desktop-nav a {
  position: relative;
  padding-block: 0.8rem;
  color: var(--text);
  font-size: 0.95rem;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0.35rem;
  left: 0;
  height: 1px;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after {
  transform: scaleX(1);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(160px, 0.45fr) minmax(430px, 1.25fr) minmax(360px, 1.2fr);
  min-height: calc(100svh - var(--header));
  border-bottom: 1px solid var(--line);
}

.project-index,
.hero-copy,
.ecosystem-map {
  min-height: calc(100svh - var(--header));
  border-right: 1px solid var(--line);
}

.project-index {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: clamp(2rem, 5vw, 4.4rem) clamp(1.25rem, 3vw, 3.2rem);
}

.section-label {
  position: relative;
  margin: 0;
  padding-left: 1.9rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

.section-label::before {
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 1.1rem;
  height: 1px;
  content: "";
  background: currentColor;
}

.project-index ol {
  display: grid;
  gap: 2.7rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.project-index a {
  display: grid;
  gap: 0.7rem;
  color: var(--muted);
}

.project-index span,
.project-number {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 500;
}

.project-index strong {
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.system-status {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-top: auto;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.64rem;
}

.status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 6rem) clamp(1.5rem, 4vw, 3.8rem);
}

.hero-copy h1 {
  max-width: 12.4ch;
  margin: 0;
  font-size: clamp(3.1rem, 5.6vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.no-wrap {
  white-space: nowrap;
}

.hero-copy p {
  max-width: 34rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.45rem;
  padding: 0 1.25rem;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.93rem;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.button-primary {
  border-color: var(--line-strong);
  color: var(--accent);
  background: var(--accent-soft);
}

.button:hover,
.button:focus-visible {
  border-color: var(--accent);
  background: rgba(100, 234, 210, 0.16);
  color: var(--text);
  transform: translateY(-1px);
}

.ecosystem-map {
  position: relative;
  min-height: 34rem;
  padding: 3rem;
}

.map-grid {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background:
    linear-gradient(rgba(177, 217, 211, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(177, 217, 211, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 46%, #000 24%, transparent 73%);
}

.map-core {
  position: absolute;
  top: 41%;
  left: 47%;
  display: grid;
  place-items: center;
  width: 9.5rem;
  height: 9.5rem;
  border: 1px solid var(--line);
  color: var(--accent);
  background: rgba(7, 11, 13, 0.78);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  transform: translate(-50%, -50%);
}

.map-core::before,
.map-core::after {
  position: absolute;
  content: "";
  background: var(--line);
}

.map-core::before {
  right: 100%;
  top: 50%;
  width: 8rem;
  height: 1px;
}

.map-core::after {
  left: 50%;
  top: 100%;
  width: 1px;
  height: 8rem;
}

.map-node {
  position: absolute;
  display: flex;
  gap: 1rem;
  align-items: center;
  max-width: 16rem;
  color: var(--muted);
}

.map-node strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.86rem;
}

.map-node p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.node-icon,
.project-mark,
.principle-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--accent);
  background: var(--surface);
}

.node-icon {
  width: 3.8rem;
  height: 3.8rem;
}

.node-gateway {
  top: 12%;
  right: 7%;
}

.node-agent {
  top: 41%;
  right: 2%;
}

.node-product {
  bottom: 12%;
  left: 6%;
}

.node-infra {
  right: 5%;
  bottom: 18%;
}

.projects-section,
.philosophy-section,
.relationship-section,
.site-footer {
  max-width: var(--max);
  margin-inline: auto;
}

.projects-section,
.philosophy-section {
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(9rem, 0.28fr) 1fr;
  gap: clamp(1rem, 4vw, 4rem);
  align-items: end;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-heading h2 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.9rem);
  line-height: 1;
  letter-spacing: 0;
}

.project-list {
  display: grid;
}

.project-row {
  display: grid;
  grid-template-columns: 4rem 7.2rem minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
  padding: 1.8rem 0;
  border-top: 1px solid var(--line);
}

.project-row:last-child {
  border-bottom: 1px solid var(--line);
}

.project-mark {
  width: 7.2rem;
  height: 7.2rem;
}

.project-mark svg {
  width: 3.9rem;
  height: 3.9rem;
}

.project-content h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.15;
}

.project-content p {
  max-width: 40rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.project-link {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  white-space: nowrap;
  color: var(--accent);
  font-size: 0.95rem;
}

.project-link:hover,
.project-link:focus-visible {
  color: var(--text);
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.principles article {
  min-height: 15rem;
  padding: 2rem clamp(1rem, 3vw, 2.5rem);
  border-right: 1px solid var(--line);
}

.principles article:first-child {
  padding-left: 0;
}

.principles article:last-child {
  border-right: 0;
}

.principle-icon {
  width: 3.1rem;
  height: 3.1rem;
  margin-bottom: 1.5rem;
  border-color: transparent;
  background: transparent;
}

.principle-icon svg {
  width: 2.4rem;
  height: 2.4rem;
}

.principles h3 {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
}

.principles p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.relationship-section {
  display: grid;
  grid-template-columns: minmax(10rem, 0.24fr) minmax(0, 1fr) auto;
  gap: clamp(1rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.25rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

.relationship-section h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.25;
}

.relationship-section p:not(.section-label) {
  margin: 0.7rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.site-footer {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: clamp(1.5rem, 5vw, 5rem);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3.5rem);
  color: var(--muted);
}

.site-footer .brand {
  margin-bottom: 1.1rem;
}

.site-footer p {
  max-width: 20rem;
  margin: 0;
  line-height: 1.7;
}

.site-footer nav,
.site-footer div {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.site-footer strong {
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.site-footer a:not(.brand):hover,
.site-footer a:not(.brand):focus-visible {
  color: var(--accent);
}

.copyright {
  text-align: right;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms ease, transform 620ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .hero-section {
    grid-template-columns: 13rem minmax(0, 1fr);
  }

  .ecosystem-map {
    grid-column: 1 / -1;
    min-height: 32rem;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .project-index,
  .hero-copy {
    min-height: 34rem;
  }

  .principles {
    grid-template-columns: repeat(2, 1fr);
  }

  .principles article:nth-child(2) {
    border-right: 0;
  }

  .principles article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 780px) {
  :root {
    --header: 72px;
  }

  .site-header {
    padding-inline: 1rem;
  }

  .desktop-nav {
    gap: 1rem;
  }

  .desktop-nav a {
    font-size: 0.82rem;
  }

  .hero-section {
    display: block;
  }

  .project-index {
    display: none;
  }

  .hero-copy {
    min-height: auto;
    padding: clamp(4.5rem, 13vw, 6.5rem) 1.1rem clamp(3rem, 10vw, 4.5rem);
    border-right: 0;
  }

  .hero-copy h1 {
    max-width: 10ch;
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  .button {
    width: 100%;
  }

  .ecosystem-map {
    min-height: 36rem;
    padding: 1.1rem;
  }

  .map-core {
    top: 28%;
    left: 50%;
  }

  .map-core::before,
  .map-core::after {
    display: none;
  }

  .map-node {
    right: auto;
    left: 1.1rem;
    max-width: calc(100% - 2.2rem);
  }

  .node-gateway {
    top: 48%;
  }

  .node-agent {
    top: 61%;
  }

  .node-product {
    bottom: 15%;
  }

  .node-infra {
    bottom: 2rem;
  }

  .section-heading,
  .relationship-section,
  .project-row,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .section-heading h2 {
    max-width: 100%;
  }

  .project-row {
    gap: 1rem;
  }

  .project-mark {
    width: 5.5rem;
    height: 5.5rem;
  }

  .project-link {
    justify-self: start;
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .principles article,
  .principles article:first-child {
    padding: 1.5rem 0;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .relationship-section .button {
    width: auto;
    justify-self: start;
  }

  .copyright {
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
