:root {
  --paper: #f3efe5;
  --ink: #18211e;
  --muted: #68736c;
  --line: rgba(24, 33, 30, 0.18);
  --orange: #ef663d;
  --acid: #d7e66f;
  --blue: #8bb9bb;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --sans: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 83% 12%, rgba(215, 230, 111, 0.5), transparent 24rem),
    linear-gradient(120deg, rgba(139, 185, 187, 0.16), transparent 40%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.26;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  width: max-content;
  text-decoration: none;
}

.wordmark span {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.wordmark small,
.status,
.eyebrow,
.project-index,
.project-state,
.site-footer {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 2.25rem;
}

nav a {
  position: relative;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: -0.45rem;
  left: 0;
  height: 2px;
  content: "";
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

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

.status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(239, 102, 61, 0.14);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: clamp(3rem, 7vw, 8rem);
  align-items: center;
  min-height: min(760px, calc(100vh - 92px));
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.eyebrow {
  margin: 0 0 2rem;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 2.25rem;
  font-family: var(--display);
  font-size: clamp(4rem, 8.5vw, 9.5rem);
  font-weight: 500;
  line-height: 0.78;
  letter-spacing: -0.075em;
}

h1 em {
  color: var(--orange);
  font-weight: 500;
}

.intro {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.5;
}

.playfield {
  position: relative;
  aspect-ratio: 1 / 1.04;
  overflow: hidden;
  border: 1px solid rgba(24, 33, 30, 0.55);
  border-radius: 50% 50% 8% 8%;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(24, 33, 30, 0.15) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(24, 33, 30, 0.15) 50%, transparent 50.2%),
    var(--blue);
  box-shadow: 18px 18px 0 rgba(24, 33, 30, 0.08);
}

.playfield::after {
  position: absolute;
  inset: 9%;
  content: "";
  border: 1px dashed rgba(24, 33, 30, 0.25);
  border-radius: 50%;
}

.coordinate {
  position: absolute;
  z-index: 2;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.coordinate-a { top: 8%; left: 14%; }
.coordinate-b { right: 12%; bottom: 8%; }

.orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(24, 33, 30, 0.48);
  border-radius: 50%;
}

.orbit-a { inset: 18%; }
.orbit-b { inset: 34%; }

.player {
  position: absolute;
  z-index: 3;
  width: 12%;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.player i {
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: var(--ink);
}

.player-one {
  top: 23%;
  left: 26%;
  background: var(--acid);
  animation: drift-one 5s ease-in-out infinite alternate;
}

.player-two {
  right: 24%;
  bottom: 22%;
  background: var(--orange);
  animation: drift-two 6s ease-in-out infinite alternate;
}

.portal {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 24%;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  transform: translate(-50%, -50%);
}

.portal span {
  position: absolute;
  inset: 19%;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.field-note {
  position: absolute;
  right: 8%;
  bottom: 16%;
  z-index: 4;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-size: clamp(0.55rem, 1vw, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.25;
  transform: rotate(-4deg);
}

.work {
  padding: clamp(5rem, 10vw, 9rem) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 0.75fr 1.5fr 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: 3rem;
}

.section-heading .eyebrow,
.section-heading p {
  margin: 0;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.5vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.section-heading > p:last-child {
  max-width: 22rem;
  color: var(--muted);
  line-height: 1.55;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1rem;
}

.project-card {
  min-height: 440px;
  border: 1px solid rgba(24, 33, 30, 0.5);
  background: rgba(255, 255, 255, 0.24);
}

.project-card-main {
  display: grid;
  grid-template-rows: 1fr auto;
}

.project-visual {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  background: var(--orange);
}

.visual-coop::before,
.visual-coop::after {
  position: absolute;
  content: "";
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.visual-coop::before {
  top: -30%;
  left: 14%;
  width: 58%;
  aspect-ratio: 1;
}

.visual-coop::after {
  right: -9%;
  bottom: -38%;
  width: 70%;
  aspect-ratio: 1;
}

.tile {
  position: absolute;
  z-index: 2;
  width: clamp(42px, 6vw, 82px);
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}

.tile-a { top: 26%; left: 17%; background: var(--acid); transform: rotate(7deg); }
.tile-b { top: 48%; left: 47%; background: var(--paper); transform: rotate(-9deg); }
.tile-c { top: 20%; right: 14%; background: var(--blue); transform: rotate(15deg); }

.path {
  position: absolute;
  top: 50%;
  left: 21%;
  width: 61%;
  height: 2px;
  background: var(--ink);
  transform: rotate(-8deg);
}

.project-copy {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem;
}

.project-copy h3 {
  margin-bottom: 0.35rem;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.project-copy p {
  max-width: 29rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.project-state {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--ink);
  white-space: nowrap;
}

.project-card-note {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--ink);
  color: var(--paper);
}

.project-card-note .project-copy {
  grid-template-columns: auto 1fr;
}

.project-card-note .project-state {
  grid-column: 2;
  justify-self: start;
  margin-top: 1rem;
  border-color: var(--paper);
}

.project-card-note .project-copy p {
  color: rgba(243, 239, 229, 0.66);
}

.signal-lines {
  display: flex;
  align-items: end;
  gap: 7%;
  height: 180px;
  padding: 0 1.5rem 1.5rem;
}

.signal-lines i {
  flex: 1;
  height: 30%;
  background: var(--acid);
}

.signal-lines i:nth-child(2) { height: 68%; }
.signal-lines i:nth-child(3) { height: 42%; }
.signal-lines i:nth-child(4) { height: 88%; }
.signal-lines i:nth-child(5) { height: 57%; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer p:last-child {
  justify-self: end;
}

.reveal {
  opacity: 0;
  animation: reveal 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-1 { animation-delay: 80ms; }
.reveal-2 { animation-delay: 180ms; }
.reveal-3 { animation-delay: 300ms; }

.not-found {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.not-found-card {
  width: min(760px, 100%);
  padding: clamp(2rem, 6vw, 5rem);
  border: 1px solid var(--ink);
  background: var(--acid);
  box-shadow: 18px 18px 0 var(--ink);
}

.not-found-card strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(6rem, 20vw, 13rem);
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.not-found-card h1 {
  margin: 2rem 0 1rem;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.9;
}

.not-found-card p {
  max-width: 34rem;
  color: rgba(24, 33, 30, 0.68);
  line-height: 1.55;
}

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drift-one {
  to { transform: translate(22%, 12%); }
}

@keyframes drift-two {
  to { transform: translate(-18%, -15%); }
}

@media (max-width: 900px) {
  .page-shell { width: min(100% - 30px, 760px); }
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .playfield { width: min(620px, 100%); justify-self: center; }
  .section-heading { grid-template-columns: 1fr; gap: 1rem; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 390px; }
}

@media (max-width: 560px) {
  .site-header { min-height: 76px; }
  .status { font-size: 0.58rem; }
  .hero { gap: 3rem; padding: 4rem 0 5rem; }
  h1 { font-size: clamp(3.6rem, 20vw, 5.5rem); }
  .intro { font-size: 1.08rem; }
  .playfield { border-radius: 50% 50% 5% 5%; }
  .work { padding: 5rem 0; }
  .project-copy { grid-template-columns: auto 1fr; }
  .project-state { grid-column: 2; justify-self: start; margin-top: 0.75rem; }
  .site-footer { grid-template-columns: 1fr auto; gap: 0.75rem; }
  .site-footer p:nth-child(2) { display: none; }
}

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