:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #f3f0e8;
  background: #0a0c0d;
  --gold: #e8c88d;
  --muted: #acafac;
  --line: rgb(232 200 141 / 20%);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }

.landing {
  width: min(100% - clamp(2rem, 8vw, 8rem), 91rem);
  min-height: 100svh;
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.header, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.header {
  min-height: clamp(4.5rem, 8vw, 6.4rem);
  justify-content: center;
}

.brand {
  display: inline-grid;
  justify-items: center;
  gap: .18rem;
  padding-block: .6rem;
  color: var(--gold);
  font: 500 clamp(.67rem, 1vw, .82rem) / 1.2 Georgia, serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.brand img { display: block; width: clamp(10rem, 16.25vw, 13.75rem); height: auto; }
.footer {
  width: min(100%, 90vh, 72rem);
  min-height: 5rem;
  margin-inline: auto;
  justify-content: center;
}
.footer a {
  padding: .85rem .5rem;
  color: #c8ae7e;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: .025em;
  text-decoration: none;
}
.footer a:hover, .footer a:focus-visible { color: #ffe2a7; }
@media (max-width: 40rem) { .footer a { font-size: 1rem; } }

.hero { display: grid; align-content: center; padding: 2rem 0; }
h1 { margin: 0; text-align: center; font-size: clamp(2.9rem, 8.5vw, 8.25rem); letter-spacing: -.065em; line-height: 1.04; }
h1 em { color: var(--gold); font-family: Georgia, serif; font-weight: 400; }

.landing { align-content: center; grid-template-rows: auto auto auto; }
.header { flex-direction: column; gap: .45rem; padding-top: clamp(1rem, 4vh, 3rem); }
.brand { padding-block: 0; }
h1 { font-family: Georgia, serif; font-weight: 400; font-size: clamp(2.52rem, 6.03vw, 5.58rem); letter-spacing: -.06em; }
.hero { padding-block: .6rem 1.5rem; }

.stage {
  position: relative;
  width: min(100%, 90vh, 72rem);
  margin: 0 auto;
  aspect-ratio: 3 / 2;

  background: radial-gradient(ellipse, #44331b38, transparent 68%);
  isolation: isolate;
}
.assembly-image { width: 100%; height: 100%; object-fit: contain; display: block; opacity: 0; }
.object-piece { position: absolute; inset: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.object-piece span { position: absolute; inset: 0; background: url("assets/assembly.webp") center / contain no-repeat; pointer-events: none; }
.brain { clip-path: inset(0 67% 0 0); }
.chip { clip-path: inset(0 33% 0 33%); }
.iris { clip-path: inset(0 0 0 67%); }
.object-piece[aria-pressed=true] span { filter: brightness(1.22) drop-shadow(0 0 13px #cba76b77); }
.object-piece:hover span { filter: brightness(1.15); }
.object-piece:focus-visible span { filter: brightness(1.3) drop-shadow(0 0 9px #e8c88d); }
@media (prefers-reduced-motion: no-preference) {
  .object-piece span { transition: filter .4s ease; }

}
@media (max-width: 40rem) {
  .landing { width: calc(100% - 2rem); }
  .stage { max-height: none; width: 100%; aspect-ratio: 3 / 2; }
}

/* Keep every image layer aligned while the assembly moves. */
@media (prefers-reduced-motion: no-preference) {
  .stage {
    animation: assembly-float 7s ease-in-out infinite;
    transform: translate(var(--shift-x, 0px), var(--shift-y, 0px));
    transition: transform 650ms ease-out;
  }
  .stage::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 40%, #ffe6ad99 49%, #fff4d6cc 50%, transparent 60%);
    background-size: 300% 100%;
    mask: url("assets/assembly.webp") center / contain no-repeat;
    mix-blend-mode: screen;
    animation: signal-sweep 8s ease-in-out infinite;
  }
  @keyframes assembly-float {
    0%, 100% { translate: 0 3px; rotate: -.25deg; }
    50% { translate: 0 -7px; rotate: .25deg; }
  }
  @keyframes signal-sweep {
    0%, 15% { background-position: 100% 0; opacity: 0; }
    25% { opacity: .7; }
    70% { opacity: .7; }
    85%, 100% { background-position: 0% 0; opacity: 0; }
  }
}

.discovery { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stage::after { display: none; }
