:root {
  --bg: #050609;
  --bg-2: #0b1020;
  --ink: #f6fbff;
  --muted: #a5b6ca;
  --cyan: #50f7ff;
  --pink: #ff4fba;
  --acid: #d6ff55;
  --amber: #ffb85c;
  --line: rgba(255, 255, 255, 0.16);
  --glass: rgba(8, 14, 30, 0.62);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 79, 186, 0.2), transparent 27rem),
    radial-gradient(circle at 86% 8%, rgba(80, 247, 255, 0.18), transparent 28rem),
    linear-gradient(135deg, #050609 0%, #09111a 38%, #14091b 72%, #06080d 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

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

button {
  font: inherit;
}

.cosmos {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.rift {
  position: absolute;
  width: 42vmax;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 44% 56% 58% 42%;
  filter: blur(0.2px) drop-shadow(0 0 28px rgba(80, 247, 255, 0.24));
  animation: drift 24s linear infinite;
}

.rift::before,
.rift::after {
  position: absolute;
  inset: 10%;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: inherit;
}

.rift::after {
  inset: 22%;
  border-color: rgba(255, 79, 186, 0.26);
}

.rift-a {
  top: 14%;
  left: -12%;
}

.rift-b {
  right: -18%;
  bottom: 12%;
  animation-duration: 32s;
  animation-direction: reverse;
}

.scanline {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background: repeating-linear-gradient(to bottom, transparent 0 7px, rgba(255, 255, 255, 0.04) 8px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin: 0 auto;
  padding: 18px clamp(16px, 3.4vw, 44px);
  backdrop-filter: blur(18px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  background:
    conic-gradient(from 90deg, var(--cyan), var(--pink), var(--acid), var(--cyan));
  border-radius: 50%;
  box-shadow: 0 0 32px rgba(80, 247, 255, 0.52);
}

.nav {
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 999px;
}

.nav a {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: clamp(28px, 6vw, 78px);
  width: 100%;
  min-height: calc(74svh - 84px);
  margin: 0 auto;
  padding: 18px clamp(16px, 3.4vw, 44px) 42px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  letter-spacing: 0;
  line-height: 0.96;
}

h1 {
  font-size: clamp(2.7rem, 5.35vw, 5.15rem);
  max-width: 13.5ch;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.1rem, 4.5vw, 4.8rem);
  text-wrap: balance;
}

.hero-text {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
  line-height: 1.65;
}

.hero-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 430px);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.hero-orbit canvas {
  width: 82%;
  height: 82%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  box-shadow:
    0 0 80px rgba(80, 247, 255, 0.34),
    inset 0 0 42px rgba(255, 255, 255, 0.14);
  transform: rotate(-5deg);
}

.orbit-ring {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 43% 57% 48% 52%;
  animation: spin 18s linear infinite;
}

.ring-two {
  inset: 2%;
  border-color: rgba(255, 79, 186, 0.3);
  animation-duration: 28s;
  animation-direction: reverse;
}

.hero-chip {
  position: absolute;
  right: 1%;
  bottom: 14%;
  max-width: 210px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(5, 6, 9, 0.76);
  border-radius: 999px;
  box-shadow: var(--shadow);
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.signal-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  margin: -18px auto 88px;
  border-block: 1px solid var(--line);
}

.signal-band div {
  padding: 24px clamp(14px, 3vw, 36px);
  border-inline-end: 1px solid var(--line);
}

.signal-band div:last-child {
  border-inline-end: 0;
}

.signal-band strong {
  display: block;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 1;
}

.signal-band span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.gallery-section,
.process {
  width: 100%;
  margin: 0 auto;
}

.gallery-section {
  padding: 0 clamp(16px, 3.4vw, 44px);
}

.section-heading {
  display: block;
  margin-bottom: 34px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.art-card {
  position: relative;
  grid-column: span 4;
  min-height: 420px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  isolation: isolate;
}

.art-card:nth-child(1),
.art-card:nth-child(8) {
  grid-column: span 8;
}

.art-card:nth-child(5) {
  grid-column: span 5;
}

.art-card:nth-child(6) {
  grid-column: span 7;
}

.art-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 58%),
    radial-gradient(circle at var(--mx, 50%) var(--my, 35%), rgba(255, 255, 255, 0.2), transparent 13rem);
  opacity: 0.9;
  transition: opacity 180ms ease;
}

.art-card canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.art-card:hover::before,
.art-card:focus-visible::before {
  opacity: 0.64;
}

.art-card:hover .card-meta,
.art-card:focus-visible .card-meta {
  transform: translateY(-8px);
}

.art-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.card-meta {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 2;
  display: grid;
  gap: 12px;
  text-align: left;
  transition: transform 180ms ease;
}

.card-kicker {
  color: var(--acid);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-title {
  max-width: 12ch;
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.6rem, 2.8vw, 3rem);
  line-height: 0.96;
}

.card-hint {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(4, 7, 14, 0.68);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.process {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(280px, 0.64fr);
  gap: clamp(24px, 5vw, 74px);
  padding: 108px clamp(16px, 3.4vw, 44px);
}

.process-copy p:not(.eyebrow) {
  max-width: 670px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

.prompt-specimen {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 320px;
  padding: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(80, 247, 255, 0.08), rgba(255, 79, 186, 0.08)),
    rgba(255, 255, 255, 0.035);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.prompt-specimen span {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #dce9f6;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  width: 100%;
  margin: 0 auto;
  padding: 28px clamp(16px, 3.4vw, 44px) 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.footer address {
  max-width: 720px;
  font-style: normal;
  line-height: 1.55;
}

.prompt-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgba(5, 6, 9, 0.94);
  border-radius: 0;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.68);
  color: var(--ink);
  z-index: 100;
}

.prompt-dialog::backdrop {
  background: rgba(2, 3, 6, 0.72);
  backdrop-filter: blur(18px);
}

.prompt-dialog[open] {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

.close-dialog {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.48);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dialog-art {
  min-height: 100vh;
  overflow: hidden;
  background: #050609;
}

.dialog-art canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.dialog-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 100vh;
  padding: clamp(24px, 5vw, 54px);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 100% 0%, rgba(80, 247, 255, 0.12), transparent 20rem),
    rgba(4, 6, 12, 0.88);
}

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

.dialog-copy pre {
  max-height: 300px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  color: #dffcff;
  font-family: "Space Grotesk", Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

@keyframes drift {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

  .hero,
  .process,
  .prompt-dialog[open] {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  h1 {
    max-width: 12ch;
  }

  .hero-orbit {
    max-width: 440px;
  }

  .signal-band {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .signal-band div {
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }

  .signal-band div:last-child {
    border-bottom: 0;
  }

  .art-card,
  .art-card:nth-child(1),
  .art-card:nth-child(5),
  .art-card:nth-child(6),
  .art-card:nth-child(8) {
    grid-column: span 12;
  }

  .art-card {
    min-height: 360px;
  }

  .dialog-art {
    min-height: 52vh;
  }

  .dialog-copy {
    min-height: 48vh;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    gap: 18px;
    padding-top: 28px;
    padding-bottom: 30px;
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 3rem);
    line-height: 1.02;
  }

  .hero-text {
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-orbit {
    max-width: 200px;
  }

  .hero-chip {
    max-width: 118px;
    padding: 8px 9px;
    font-size: 0.62rem;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .nav a {
    flex: 1;
    text-align: center;
  }

  .hero-chip {
    right: 50%;
    bottom: 4%;
    transform: translateX(50%);
  }

  .art-card {
    min-height: 330px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
