:root {
  --bg: #f3ecdd;
  --bg-strong: #e7d7b6;
  --sand: #d7b982;
  --ink: #111111;
  --ink-soft: #463e34;
  --signal: #3fc8dd;
  --signal-soft: rgba(63, 200, 221, 0.18);
  --clay: #8f6a3a;
  --white: #fffdf7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 26%),
    radial-gradient(circle at 78% 20%, rgba(63, 200, 221, 0.14), transparent 20%),
    radial-gradient(circle at 24% 72%, rgba(215, 185, 130, 0.3), transparent 26%),
    linear-gradient(140deg, #faf6ee 0%, var(--bg) 48%, #ebe2cf 100%);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(to right, rgba(17, 17, 17, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 17, 17, 0.03) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(circle at center, black 48%, transparent 94%);
}

.shell {
  min-height: 100svh;
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
  padding: clamp(1.8rem, 4vw, 3rem);
}

.hero-copy {
  max-width: 34rem;
  padding-inline: clamp(0rem, 1vw, 1rem);
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.56);
}

h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(3.4rem, 7vw, 6.7rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.lede,
.detail,
.status {
  font-family: "SF Mono", "Menlo", monospace;
}

.lede {
  max-width: 30rem;
  margin: 1.5rem 0 0;
  font-size: clamp(1.03rem, 1.9vw, 1.24rem);
  line-height: 1.7;
  color: var(--ink-soft);
}

.detail {
  max-width: 31rem;
  margin: 1.2rem 0 0;
  font-size: 0.92rem;
  line-height: 1.8;
  color: rgba(70, 62, 52, 0.86);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.button-primary {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 14px 35px rgba(17, 17, 17, 0.18);
}

.button-primary:hover,
.button-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(17, 17, 17, 0.24);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(17, 17, 17, 0.66);
  font-size: 0.86rem;
}

.status::before {
  content: "";
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 var(--signal-soft);
  animation: pulse-dot 2.1s infinite;
}

.hero-visual {
  display: grid;
  place-items: center;
}

.scene {
  width: min(100%, 760px);
  height: auto;
  overflow: visible;
}

.ambient {
  animation: drift 9s ease-in-out infinite;
}

.ambient-b {
  animation-delay: -2.5s;
}

.ambient-c {
  animation-delay: -5s;
}

.strata {
  fill: none;
  stroke: rgba(17, 17, 17, 0.16);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 14 18;
}

.strata-b,
.strata-d {
  stroke-dashoffset: 14;
}

.signal-ring {
  fill: none;
  stroke: rgba(63, 200, 221, 0.44);
  stroke-width: 2.5;
  stroke-dasharray: 9 16;
  opacity: 0.75;
  transform-origin: center;
}

.ring-a {
  animation: sweep 4s linear infinite;
}

.ring-b {
  animation: sweep 5.2s linear infinite reverse;
}

.ring-c {
  animation: sweep 6.1s linear infinite;
}

.artifact {
  animation: float-artifact 4.4s ease-in-out infinite;
}

.artifact-outline {
  fill: rgba(255, 253, 247, 0.38);
  stroke: #1d1b18;
  stroke-width: 8;
  filter: url(#innerGlow);
}

.artifact-detail {
  fill: none;
  stroke: rgba(29, 27, 24, 0.54);
  stroke-width: 5;
  stroke-linecap: round;
}

.fracture {
  fill: none;
  stroke: rgba(17, 17, 17, 0.42);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.42;
}

.trowel {
  transform-origin: 690px 112px;
  animation: swing 2.35s infinite cubic-bezier(0.62, 0.05, 0.35, 1);
}

.trowel-image {
  filter: drop-shadow(0 14px 24px rgba(20, 16, 10, 0.18));
}

.impact-point {
  opacity: 0;
  animation: flash 2.35s infinite;
}

.chip,
.dust {
  fill: #171717;
  opacity: 0;
}

.chip-a {
  animation: chip-a 2.35s infinite;
}

.chip-b {
  animation: chip-b 2.35s infinite;
}

.chip-c {
  animation: chip-c 2.35s infinite;
}

.dust-a {
  animation: dust-a 2.35s infinite;
}

.dust-b {
  animation: dust-b 2.35s infinite;
}

.dust-c {
  animation: dust-c 2.35s infinite;
}

.telemetry-line {
  fill: none;
  stroke: rgba(17, 17, 17, 0.38);
  stroke-width: 3;
  stroke-linecap: round;
}

.telemetry-dot {
  fill: rgba(17, 17, 17, 0.62);
}

.dot-a {
  animation: blink 3s infinite;
}

.dot-b {
  animation: blink 3s infinite 0.42s;
}

.dot-c {
  animation: blink 3s infinite 0.84s;
}

@keyframes swing {
  0%,
  16% {
    transform: rotate(-24deg) translate(0, 0);
  }
  24% {
    transform: rotate(18deg) translate(10px, 22px);
  }
  27% {
    transform: rotate(-6deg) translate(4px, 8px);
  }
  36%,
  100% {
    transform: rotate(-24deg) translate(0, 0);
  }
}

@keyframes flash {
  0%,
  22%,
  100% {
    opacity: 0;
    transform: scale(0.82);
  }
  24% {
    opacity: 1;
    transform: scale(1.1);
  }
  30% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes chip-a {
  0%,
  22%,
  100% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }
  24% {
    opacity: 1;
    transform: translate(-4px, -6px) rotate(-8deg);
  }
  36% {
    opacity: 0;
    transform: translate(46px, -48px) rotate(42deg);
  }
}

@keyframes chip-b {
  0%,
  22%,
  100% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }
  24% {
    opacity: 1;
    transform: translate(-6px, 0) rotate(-14deg);
  }
  38% {
    opacity: 0;
    transform: translate(-28px, 44px) rotate(-66deg);
  }
}

@keyframes chip-c {
  0%,
  22%,
  100% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }
  24% {
    opacity: 1;
    transform: translate(0, -4px) rotate(8deg);
  }
  36% {
    opacity: 0;
    transform: translate(38px, 18px) rotate(55deg);
  }
}

@keyframes dust-a {
  0%,
  22%,
  100% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }
  24% {
    opacity: 0.5;
    transform: translate(-6px, -4px) scale(1);
  }
  40% {
    opacity: 0;
    transform: translate(26px, 20px) scale(1.45);
  }
}

@keyframes dust-b {
  0%,
  22%,
  100% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }
  24% {
    opacity: 0.45;
    transform: translate(-2px, -8px) scale(1);
  }
  40% {
    opacity: 0;
    transform: translate(12px, -22px) scale(1.38);
  }
}

@keyframes dust-c {
  0%,
  22%,
  100% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }
  24% {
    opacity: 0.4;
    transform: translate(-2px, -4px) scale(1);
  }
  40% {
    opacity: 0;
    transform: translate(24px, 22px) scale(1.28);
  }
}

@keyframes sweep {
  from {
    transform: rotate(0deg);
    stroke-dashoffset: 0;
  }
  to {
    transform: rotate(360deg);
    stroke-dashoffset: -140;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -12px, 0);
  }
}

@keyframes float-artifact {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -8px, 0);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.22;
  }
  30% {
    opacity: 0.92;
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--signal-soft);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(63, 200, 221, 0);
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }

  .hero-copy {
    max-width: none;
    order: 2;
  }

  .hero-visual {
    order: 1;
  }

  .scene {
    width: min(100%, 640px);
  }
}

@media (max-width: 560px) {
  .hero {
    gap: 1.25rem;
    padding: 1.1rem 1rem 2rem;
  }

  .lede {
    font-size: 0.97rem;
  }

  .detail,
  .status {
    font-size: 0.82rem;
  }

  .button {
    width: 100%;
  }

  .actions {
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
