:root {
  color-scheme: dark;
  --ink: #0a1b24;
  --paper: #f4f2e9;
  --muted: #91a7ad;
  --gold: #e6bb6d;
  --line: rgba(179, 208, 208, 0.14);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  background: var(--ink);
  color: var(--paper);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 280px;
  background:
    radial-gradient(ellipse at 82% 48%, rgba(33, 81, 80, 0.26), transparent 46%),
    radial-gradient(ellipse at 0 0, rgba(28, 67, 73, 0.22), transparent 55%),
    var(--ink);
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }

.page {
  width: min(100% - 112px, 1328px);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

.masthead {
  min-height: 117px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.brand-mark { width: 26px; height: 32px; color: var(--gold); }
.masthead-note { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }

.main {
  flex: 1;
  display: grid;
  grid-template-columns: 1.13fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 56px 0 64px;
}

.intro { position: relative; z-index: 1; padding-left: 10px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 29px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.status-dot { flex: 0 0 5px; width: 5px; height: 5px; background: var(--gold); border-radius: 50%; }

h1 {
  margin: 0;
  font-size: clamp(54px, 6.4vw, 91px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.065em;
}

h1 span { display: block; color: var(--gold); }

.description {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.015em;
}

.intro-rule { display: flex; margin-top: 47px; width: 112px; height: 2px; background: var(--line); }
.intro-rule span { width: 34px; background: var(--gold); }

.construction {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1;
  max-width: 570px;
  justify-self: end;
}

.scene-grid {
  position: absolute;
  z-index: -2;
  inset: 7% 0 5%;
  opacity: 0.34;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.ground-glow {
  position: absolute;
  z-index: -1;
  left: 17%;
  right: 12%;
  bottom: 14%;
  height: 14%;
  border-radius: 50%;
  background: #071218;
  filter: blur(19px);
  opacity: 0.7;
}

.worker {
  position: absolute;
  inset: 0;
  background-image: url("./assets/miner-v3/frame-00.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
}

.worksite-rock {
  position: absolute;
  z-index: 2;
  width: 34%;
  height: auto;
  left: 60%;
  top: 70%;
  pointer-events: none;
  user-select: none;
}

.corner { position: absolute; width: 23px; height: 23px; opacity: 0.43; }
.worker.is-rendered { background-image: none; }
.worker canvas { display: block; width: 100%; height: 100%; }
.corner-top-left { top: 9%; left: 3%; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.corner-bottom-right { bottom: 9%; right: 2%; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.scene-coordinate { position: absolute; bottom: 3%; left: 8%; color: var(--muted); opacity: 0.56; font-size: 8px; letter-spacing: 0.19em; }
.scene-cross { position: absolute; top: 13%; right: 8%; color: var(--gold); opacity: 0.58; font-size: 20px; font-weight: 300; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.035em;
}

.motion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 0 10px 12px;
  gap: 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.015em;
  transition: color 150ms ease;
}

.motion-toggle[hidden] { display: none; }
.motion-toggle:hover { color: var(--paper); }
.motion-toggle svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.motion-toggle .play-icon { display: none; }
.motion-toggle[aria-pressed="true"] .pause-icon { display: none; }
.motion-toggle[aria-pressed="true"] .play-icon { display: block; }
.motion-toggle:focus-visible, .wordmark:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }

@media (min-width: 1600px) {
  .main { gap: 80px; }
  h1 { font-size: 102px; }
}

@media (max-width: 1000px) and (min-width: 761px) {
  .page { width: calc(100% - 72px); }
  .main { gap: 0; grid-template-columns: 1.15fr 1fr; }
  h1 { font-size: 6.45vw; }
  .description { font-size: 15px; }
  .intro { padding-left: 0; }
}

@media (max-width: 760px) {
  .page { width: calc(100% - 48px); }
  .masthead { min-height: 86px; }
  .wordmark { font-size: 12px; gap: 10px; }
  .brand-mark { width: 23px; height: 27px; }
  .masthead-note { display: none; }
  .main { grid-template-columns: 1fr; gap: 12px; padding: 45px 0 26px; align-content: center; }
  .intro { padding-left: 0; }
  .eyebrow { margin-bottom: 22px; font-size: 9px; }
  h1 { font-size: clamp(42px, 12.9vw, 76px); line-height: 1.05; }
  .description { margin-top: 21px; font-size: 15px; line-height: 1.6; }
  .intro-rule { display: none; }
  .construction { width: min(100%, 365px, 43svh); min-width: 210px; justify-self: center; }
  .scene-coordinate { font-size: 7px; }
  .footer { min-height: 72px; padding-block: 12px; font-size: 10px; }
  .motion-toggle { font-size: 10px; }
}

@media (max-height: 850px) and (min-width: 761px) {
  .masthead { min-height: 88px; }
  .main { padding: 28px 0; }
  .construction { max-width: min(570px, calc(100svh - 216px)); }
  .footer { min-height: 72px; padding-block: 12px; }
}

@media (max-height: 650px) and (min-width: 761px) {
  .masthead { min-height: 82px; }
  .main { padding: 25px 0; }
  .construction { max-width: min(65vh, calc(100svh - 200px)); }
  .eyebrow { margin-bottom: 20px; }
  h1 { font-size: clamp(46px, 6vw, 76px); }
  .description { margin-top: 20px; }
  .intro-rule { margin-top: 28px; }
  .footer { min-height: 68px; }
}

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