:root {
  --ink: #11131c;
  --quiet: #6f7480;
  --hairline: rgba(17, 19, 28, 0.2);
  --paper: #fff;
}

* { box-sizing: border-box; }

html { background: var(--paper); scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "Space Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - clamp(2rem, 7vw, 8rem), 1680px);
  margin-inline: auto;
  padding-top: clamp(1.5rem, 3.5vw, 3rem);
}

.mini-mark { text-decoration: none; }

.mini-mark {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(20rem, 0.72fr) minmax(34rem, 1.28fr);
  align-items: center;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
}

.hero-copy {
  z-index: 4;
  width: min(100%, 42rem);
  margin-left: max(clamp(1rem, 7vw, 8rem), calc((100vw - 1680px) / 2));
  padding: 7rem 0 6rem;
}

.specimen-id,
.specimen figcaption,
.site-footer {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
}

.specimen-id {
  margin: 0 0 clamp(1.5rem, 4vh, 3.5rem);
  color: var(--quiet);
  font-size: clamp(0.62rem, 0.65vw, 0.76rem);
  letter-spacing: 0.16em;
  opacity: 0;
  animation: copy-in 700ms 80ms ease-out forwards;
}

h1 {
  margin: 0;
  font-size: clamp(5.2rem, 11vw, 12rem);
  font-weight: 500;
  letter-spacing: -0.085em;
  line-height: 0.76;
  opacity: 0;
  animation: copy-in 800ms 150ms cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
}

.subtitle {
  margin: clamp(1.6rem, 3vw, 3rem) 0 0;
  font-size: clamp(1.7rem, 2.9vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
  opacity: 0;
  animation: copy-in 800ms 240ms ease-out forwards;
}

.intro {
  max-width: 25rem;
  margin: 1.65rem 0 0;
  color: var(--quiet);
  font-size: clamp(0.95rem, 1.15vw, 1.2rem);
  line-height: 1.5;
  opacity: 0;
  animation: copy-in 800ms 310ms ease-out forwards;
}

.specimen {
  position: relative;
  z-index: 1;
  align-self: stretch;
  min-width: 0;
  margin: 0;
  opacity: 0;
  animation: bloom-in 1.25s 180ms cubic-bezier(0.16, 0.8, 0.2, 1) forwards;
}

.specimen::after {
  position: absolute;
  inset: 50% auto auto 54%;
  z-index: -1;
  width: min(40vw, 42rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(174, 213, 255, 0.14), transparent 68%);
  content: "";
  transform: translate(-50%, -50%);
}

.specimen img {
  position: absolute;
  top: 50%;
  left: 47%;
  width: min(79vw, 80rem);
  max-width: none;
  height: auto;
  mix-blend-mode: multiply;
  transform: translate(-50%, -50%);
  animation: bloom-float 12s 1.5s ease-in-out infinite alternate;
  filter: saturate(0.88) contrast(0.97);
}

.specimen-network {
  position: absolute;
  inset: 9% 4% 11% 2%;
  z-index: 3;
  width: 94%;
  height: 80%;
  overflow: visible;
  pointer-events: none;
}

.network-lines,
.network-nodes,
.network-squares {
  fill: none;
  stroke: rgba(17, 19, 28, 0.42);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.network-lines {
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: network-in 1.8s 780ms cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
}

.network-lines path {
  animation: line-current 9s 2.2s linear infinite;
}

.network-nodes {
  fill: #fff;
  stroke-width: 1.3;
}

.network-nodes circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: node-core 3.8s ease-in-out infinite;
}

.network-nodes circle:nth-child(2n) { animation-delay: -1.4s; }
.network-nodes circle:nth-child(3n) { animation-delay: -2.7s; }

.node-rings {
  fill: none;
  stroke: rgba(111, 118, 217, 0.55);
  stroke-width: 1;
  pointer-events: none;
}

.node-rings circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: node-ring 4.6s cubic-bezier(0.22, 0.7, 0.25, 1) infinite;
}

.node-rings circle:nth-child(2) { animation-delay: -1.1s; }
.node-rings circle:nth-child(3) { animation-delay: -2.4s; }
.node-rings circle:nth-child(4) { animation-delay: -3.5s; }
.node-rings circle:nth-child(5) { animation-delay: -0.6s; }
.node-rings circle:nth-child(6) { animation-delay: -3s; }
.node-rings circle:nth-child(7) { animation-delay: -1.8s; }
.node-rings circle:nth-child(8) { animation-delay: -4.1s; }
.node-rings circle:nth-child(9) { animation-delay: -2.1s; }
.node-rings circle:nth-child(10) { animation-delay: -0.2s; }

.signal-points circle {
  fill: #fff;
  stroke: #7078dd;
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(111, 118, 217, 0.65));
}

.network-squares rect:nth-child(1) { fill: rgba(227, 218, 255, 0.2); }
.network-squares rect:nth-child(2) { fill: rgba(201, 236, 242, 0.22); }
.network-squares rect:nth-child(3) { fill: rgba(255, 217, 228, 0.2); }

.network-squares rect {
  transform-box: fill-box;
  transform-origin: center;
  animation: cell-scan 6s ease-in-out infinite;
}

.network-squares rect:nth-child(2) { animation-delay: -2s; }
.network-squares rect:nth-child(3) { animation-delay: -4s; }

.scan-flashes {
  pointer-events: none;
  mix-blend-mode: screen;
}

.scan-flashes rect {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(111, 118, 217, 0.85);
  stroke-width: 1;
  opacity: 0;
  filter: drop-shadow(0 0 9px rgba(143, 151, 255, 0.68));
  transform-box: fill-box;
  transform-origin: center;
  animation: crop-flash 5.8s linear infinite;
}

.scan-flashes rect:nth-child(2) {
  fill: rgba(232, 255, 255, 0.94);
  stroke: rgba(81, 184, 200, 0.78);
  animation-duration: 7.1s;
  animation-delay: -2.35s;
}

.scan-flashes rect:nth-child(3) {
  fill: rgba(255, 237, 246, 0.95);
  stroke: rgba(214, 111, 166, 0.76);
  animation-duration: 6.4s;
  animation-delay: -4.1s;
}

.data-tag {
  position: absolute;
  z-index: 4;
  padding: 0.38rem 0.48rem;
  border: 1px solid rgba(17, 19, 28, 0.42);
  background: rgba(255, 255, 255, 0.75);
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(0.48rem, 0.53vw, 0.62rem);
  letter-spacing: 0.04em;
  line-height: 1;
  opacity: 0;
  backdrop-filter: blur(4px);
  animation: tag-in 500ms 1.3s ease-out forwards;
}

.data-tag--one { top: 31%; left: 25%; }
.data-tag--two { top: 43%; left: 54%; }
.data-tag--three { top: 24%; right: 10%; }

.specimen-frame {
  position: absolute;
  inset: 15% 10% 15% 8%;
  z-index: 2;
  pointer-events: none;
}

.specimen-frame::before,
.specimen-frame::after {
  position: absolute;
  width: 3.25rem;
  height: 3.25rem;
  content: "";
}

.specimen-frame::before {
  top: 0;
  left: 0;
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}

.specimen-frame::after {
  right: 0;
  bottom: 0;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.specimen figcaption {
  position: absolute;
  right: clamp(1.5rem, 4vw, 5rem);
  bottom: clamp(5.25rem, 9vh, 7.5rem);
  z-index: 3;
  display: grid;
  gap: 0.45rem;
  padding-left: 1rem;
  border-left: 1px solid var(--hairline);
  color: var(--quiet);
  font-size: 0.57rem;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

.site-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  width: min(100% - clamp(2rem, 7vw, 8rem), 1680px);
  min-height: 4.5rem;
  margin-inline: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  color: var(--quiet);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.site-footer a { text-decoration: none; }

@keyframes copy-in {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bloom-in {
  from { opacity: 0; transform: scale(0.94) rotate(1.5deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes bloom-float {
  from { transform: translate(-50%, -50%) rotate(-0.6deg) scale(1); }
  to { transform: translate(-49%, -51.25%) rotate(0.65deg) scale(1.018); }
}

@keyframes network-in {
  to { stroke-dashoffset: 0; }
}

@keyframes line-current {
  0%, 100% { stroke: rgba(17, 19, 28, 0.38); }
  50% { stroke: rgba(111, 118, 217, 0.62); }
}

@keyframes node-core {
  0%, 100% { fill: #fff; stroke: rgba(17, 19, 28, 0.48); transform: scale(1); }
  45% { fill: #aeb3ff; stroke: #626ad1; transform: scale(1.5); }
}

@keyframes node-ring {
  0% { opacity: 0; transform: scale(0.4); }
  12% { opacity: 0.75; }
  70%, 100% { opacity: 0; transform: scale(4.2); }
}

@keyframes cell-scan {
  0%, 100% { opacity: 0.58; transform: scale(1); }
  45% { opacity: 1; transform: scale(1.055); stroke: rgba(111, 118, 217, 0.78); }
}

@keyframes crop-flash {
  0%, 12%, 18%, 46%, 52%, 77%, 85%, 100% {
    opacity: 0;
    transform: scale(0.98);
  }
  13% {
    opacity: 0.4;
    transform: scale(1.01);
  }
  14.5%, 48%, 79% {
    opacity: 0.9;
    transform: scale(1.045);
  }
  16%, 50%, 82% {
    opacity: 0.18;
    transform: scale(1);
  }
  83% {
    opacity: 0.72;
    transform: scale(1.025);
  }
}

@keyframes tag-in {
  from { opacity: 0; transform: translateY(0.35rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .site-header { position: relative; }

  .hero { display: block; min-height: auto; overflow: visible; }

  .hero-copy {
    width: auto;
    margin: 0;
    padding: 5.5rem 1.25rem 1.5rem;
  }

  h1 { font-size: clamp(5.4rem, 27vw, 9rem); }
  .subtitle { font-size: clamp(1.7rem, 8vw, 2.55rem); }

  .specimen {
    min-height: min(80vw, 35rem);
    overflow: hidden;
  }

  .specimen img {
    top: 47%;
    left: 53%;
    width: min(145vw, 54rem);
  }

  .specimen-frame { inset: 8% 7% 12%; }

  .specimen figcaption {
    right: 1.25rem;
    bottom: 1.25rem;
  }

  .specimen-network {
    inset: 6% 2% 12%;
    width: 96%;
    height: 82%;
  }

  .data-tag--one { top: 27%; left: 12%; }
  .data-tag--two { top: 51%; left: 55%; }
  .data-tag--three { display: none; }

  .site-footer {
    position: relative;
    width: calc(100% - 2.5rem);
    min-height: 5.25rem;
  }
}

@media (max-width: 520px) {
  .specimen-id { margin-bottom: 2rem; }
  .intro { max-width: 18rem; }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .signal-points,
  .node-rings,
  .scan-flashes { display: none; }
}
