/* design tokens, sampled directly off the approved avatar/banner pixels
   sky #78adbf, water #2e6b8a, rock #a07e45, suit #1c2735, tie #cc2f18 */
:root {
  --sky-a: #b7d9e4;
  --sky-b: #78adbf;
  --water-a: #2e6b8a;
  --water-b: #163344;
  --navy: #1c2735;
  --cream: #f4ead9;
  --red: #cc2f18;
  --rock: #a07e45;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--sky-b);
  color: var(--navy);
  font-family: 'Fragment Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}

@font-face {
  font-family: 'Anton';
  src: url('fonts/anton-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fragment Mono';
  src: url('fonts/fragment-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

#boot-error {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #7a1210;
  color: #fff;
  font-family: 'Fragment Mono', monospace;
  font-size: 13px;
  padding: 8px 12px;
  z-index: 999;
}

.scene {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(18px, 3vh, 40px);
  padding: clamp(20px, 3.5vh, 44px) clamp(16px, 4vw, 56px);
  background: linear-gradient(
    to bottom,
    var(--sky-a) 0%,
    var(--sky-b) 40%,
    var(--water-a) 62%,
    var(--water-b) 100%
  );
  position: relative;
  overflow: hidden;
}

/* faint low-poly facet texture over the CSS sky/water, tying the chrome
   to the rendered scene's own faceted-3D look */
.scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.05) 0 40px, rgba(255,255,255,0) 40px 82px),
    repeating-linear-gradient(65deg, rgba(0,0,0,0.04) 0 60px, rgba(0,0,0,0) 60px 118px);
  pointer-events: none;
}

.hud {
  position: relative;
  z-index: 2;
  text-align: center;
}

.status-line {
  margin: 0;
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: clamp(28px, 6vw, 58px);
  line-height: 1.02;
  color: var(--navy);
  text-transform: uppercase;
}

.status-sub {
  margin: 0.5em 0 0;
  font-size: clamp(12px, 1.6vw, 16px);
  color: var(--navy);
  opacity: 0.82;
}

.ticker-row {
  margin-top: clamp(14px, 2.2vh, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ticker {
  font-family: 'Fragment Mono', monospace;
  font-size: clamp(13px, 1.8vw, 17px);
  letter-spacing: 0.06em;
  color: var(--navy);
  background: rgba(244, 234, 217, 0.55);
  border: 1px solid rgba(28, 39, 53, 0.35);
  padding: 6px 12px;
}

.ca {
  font-family: 'Fragment Mono', monospace;
  font-size: clamp(12px, 1.7vw, 16px);
  letter-spacing: 0.02em;
  color: var(--cream);
  background: var(--navy);
  border: 1px solid rgba(244, 234, 217, 0.4);
  padding: 6px 12px;
  cursor: pointer;
  max-width: 90vw;
  overflow-wrap: anywhere;
}

.ca:hover, .ca:focus-visible {
  background: #263548;
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

.scene-wrap {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

.scene-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3 / 1;
  align-self: center;
  overflow: visible;
}

.scene-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tanker-lane {
  position: absolute;
  left: 0;
  right: 0;
  top: 61%;
  height: 17%;
  overflow: visible;
  pointer-events: none;
}

.tanker-sprite {
  position: absolute;
  bottom: 6%;
  left: -30%;
  width: 11%;
  height: auto;
  animation: cross-strait 40s linear infinite;
  will-change: left;
}

@keyframes cross-strait {
  from { left: -30%; }
  to { left: 130%; }
}

@media (prefers-reduced-motion: reduce) {
  .tanker-sprite {
    animation: none;
    left: 38%;
  }
}

.chrome {
  position: relative;
  z-index: 2;
  text-align: center;
}

.chrome-label {
  display: block;
  font-family: 'Fragment Mono', monospace;
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: 0.16em;
  color: var(--cream);
  opacity: 0.75;
  margin-bottom: 10px;
}

.chrome-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 18px);
  flex-wrap: wrap;
}

.buy-btn {
  font-family: 'Anton', Impact, sans-serif;
  font-size: clamp(15px, 2vw, 19px);
  letter-spacing: 0.05em;
  color: var(--cream);
  background: var(--red);
  border: 1px solid rgba(244, 234, 217, 0.5);
  padding: 9px 22px;
  text-decoration: none;
  text-transform: uppercase;
}

.buy-btn:hover, .buy-btn:focus-visible {
  background: #e2432a;
}

.chrome-link {
  font-family: 'Fragment Mono', monospace;
  font-size: clamp(12px, 1.6vw, 15px);
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 8px 4px;
}

.counter {
  font-family: 'Fragment Mono', monospace;
  font-size: clamp(11px, 1.5vw, 14px);
  color: var(--cream);
  opacity: 0.85;
  letter-spacing: 0.04em;
}

@media (max-width: 520px) {
  .scene { gap: 16px; }
  .status-sub { max-width: 34ch; margin-left: auto; margin-right: auto; }
}
