:root {
  color-scheme: dark;
  font-family: "Arial", "Helvetica Neue", sans-serif;
  color: #f4f3ef;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

html, body { background: #000; }

body {
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.masthead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
}

.brand-mark { display: block; width: 42px; height: 42px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #bcb8b0;
  font-family: "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-light {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffb627;
  box-shadow: 0 0 10px #ff9b3280;
}

.hero {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  isolation: isolate;
}

.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
  height: clamp(210px, 38svh, 400px);
  margin-bottom: -12px;
}

.hero-copy {
  width: 100%;
  padding: 0 22px 24px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 8.7vw, 112px);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.wordmark {
  display: block;
  width: min(100%, 680px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 12px #ff9d221c);
}

h1 span {
  display: block;
  margin-top: 15px;
  padding-left: 0.42em;
  color: #b9b5ad;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.description {
  max-width: 680px;
  margin: 27px auto 0;
  color: #aaa8a3;
  font-size: 14px;
  line-height: 1.7;
  text-wrap: pretty;
}

.contact {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 4px 0;
  color: #eeece7;
  border-bottom: 1px solid #65523a;
  text-decoration: none;
  font-size: 14px;
  transition: color 160ms ease, border-color 160ms ease;
}

.contact span { color: #ffc15c; font-size: 19px; }
.contact:hover { color: #ffc15c; border-color: #ffc15c; }
.contact:focus-visible { outline: 2px solid #ffc15c; outline-offset: 7px; }

footer {
  padding: 20px 22px 24px;
  color: #89867f;
  font-size: 11px;
  text-align: center;
}

@media (min-width: 700px) {
  .masthead { padding: 22px 40px; }
  .brand-mark { width: 48px; height: 48px; }
  .status { font-size: 11px; letter-spacing: 0.12em; }
  h1 span { font-size: 14px; }
  .description { font-size: 15px; }
  footer { padding-bottom: 26px; }
}

/* Nested transforms let the assembly breathe independently of cursor depth. */
.assembly {
  position: relative;
  width: min(100%, calc(clamp(210px, 38svh, 400px) * 1080 / 804));
  aspect-ratio: 1080 / 804;
  animation: assembly-float 7s ease-in-out infinite;
}

.assembly img { display: block; width: 100%; height: 100%; }
.logo-layer, .parallax-layer, .breath-layer { position: absolute; inset: 0; }
.left .breath-layer { animation: breathe-left 7s ease-in-out infinite; }
.right .breath-layer { animation: breathe-right 7s ease-in-out infinite; }
.star .breath-layer {
  transform-origin: 50% 48%;
  animation: breathe-star 7s ease-in-out infinite;
}

.star-energy, .star-flare { position: absolute; inset: 0; opacity: 0; mix-blend-mode: screen; }
.star-energy { animation: energy 7s ease-in-out infinite; }
.star-flare { animation: star-flare 9s ease-in-out infinite; }
.metal-glint { position: absolute; inset: 0; overflow: hidden; }
.left .metal-glint { clip-path: polygon(23.5% 29%, 42% 12%, 42% 40.5%, 34.4% 47.9%, 42% 55.5%, 42% 85.5%, 23.5% 67%); }
.right .metal-glint { clip-path: polygon(58% 12%, 76.5% 29%, 76.5% 67%, 58% 85.5%, 58% 55.5%, 65.6% 47.9%, 58% 40.5%); }
.metal-glint i {
  position: absolute;
  inset: -20% auto -20% -25%;
  width: 19%;
  background: linear-gradient(90deg, transparent, #fff8, transparent);
  transform: translateX(0) skewX(-22deg);
  opacity: 0;
  animation: metal-sweep 9s ease-in-out infinite;
}

@keyframes assembly-float { 50% { transform: translateY(-2px); } }
@keyframes breathe-left { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-1.8%); } }
@keyframes breathe-right { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(1.8%); } }
@keyframes breathe-star { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes energy { 0%, 100% { opacity: 0; } 50% { opacity: .08; } }
@keyframes metal-sweep {
  0%, 60% { transform: translateX(0) skewX(-22deg); opacity: 0; }
  64%, 81% { opacity: .45; }
  87%, 100% { transform: translateX(790%) skewX(-22deg); opacity: 0; }
}
@keyframes star-flare { 0%, 70%, 84%, 100% { opacity: 0; } 76% { opacity: .5; } }

/* Draw perspective directly in SVG: no minified texture or rotating hairlines.
   Rails and rows share the same square floor-plane projection. */
.grid-floor {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  left: 0;
  right: 0;
  top: 72%;
  bottom: -20px;
  overflow: hidden;
  color: #ffb13c;
  opacity: .24;
  mask-image: linear-gradient(transparent 8%, #000 46%, #000 72%, transparent), linear-gradient(90deg, transparent, #000 24%, #000 76%, transparent);
  mask-composite: intersect;
}

.grid-floor svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.grid-floor path { fill: none; stroke: currentColor; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.grid-rails { opacity: .75; }
.grid-row { opacity: .65; }

@media (prefers-reduced-motion: reduce) {
  .assembly, .assembly .breath-layer, .star-energy, .star-flare, .metal-glint i { animation: none; }
  .parallax-layer { transform: none !important; }
  .star-energy, .star-flare, .metal-glint { opacity: 0; }
  .contact { transition: none; }
}
