:root {
  --bg: #110f0e;
  --panel: rgba(23, 24, 21, 0.8);
  --panel-strong: rgba(33, 35, 31, 0.94);
  --line: rgba(244, 228, 193, 0.18);
  --text: #f4ebd6;
  --muted: #bcae8f;
  --gold: #d7b06a;
  --amber: #ffcb6b;
  --mud: #59452e;
  --mud-deep: #261c13;
  --danger: #a44f39;
  --warning: #b87a34;
  --healthy: #6fa06c;
  --sky: #1a2429;
  --sky-bright: #334952;
  --water: #364853;
  --water-high: #6b4a3f;
  --grid: min(1180px, calc(100vw - 2.5rem));
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --ring-progress: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(95, 125, 113, 0.16), transparent 30%),
    linear-gradient(180deg, #1a1714 0%, #110f0e 56%, #0b0a09 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.02) 50%, transparent 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 30%);
  mix-blend-mode: screen;
}

body[data-state="healthy"] {
  --sky: #22342f;
  --sky-bright: #3c655c;
  --water: #2d4650;
  --gold: #e1c68a;
}

body[data-state="warning"] {
  --sky: #2c2822;
  --sky-bright: #5d4a31;
  --water: #5d4a35;
  --gold: #d7b06a;
}

body[data-state="danger"] {
  --sky: #2a1e1b;
  --sky-bright: #703c30;
  --water: #6a4038;
  --gold: #df9f78;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 4px 4px;
  mask-image: radial-gradient(circle at center, black 55%, transparent 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.inline-link {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

button {
  font: inherit;
}

.site-header,
.hero,
.indicator,
.explain {
  width: var(--grid);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 1.4rem 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-kicker,
.eyebrow,
.status-label,
.ring-label,
.metric-label,
.logic-step,
.caption-label,
.header-pill {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.brand-kicker,
.eyebrow,
.status-label,
.metric-label,
.logic-step,
.caption-label,
.header-pill {
  color: var(--muted);
}

.brand-name,
h1,
h2,
h3,
#health-score,
#market-state {
  font-family: "Cinzel", serif;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.header-pill {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.hero {
  padding: 4.5rem 0 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  gap: 2rem;
  align-items: center;
}

.hero-copy {
  max-width: 38rem;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 0.8rem;
  font-size: clamp(3rem, 5vw, 5.4rem);
  line-height: 0.94;
  max-width: 11ch;
}

.lede,
.panel-summary,
.metric-change,
.logic-grid p,
.wallet-footnote {
  font-size: clamp(1.02rem, 1.5vw, 1.12rem);
  line-height: 1.7;
  color: #ddd0b2;
}

.lede {
  margin-top: 1.3rem;
  max-width: 34rem;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.95rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--gold), #8f6743);
  color: #171311;
  font-weight: 800;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: var(--line);
}

.status-strip {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.status-strip > div {
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  min-height: 102px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.55rem;
}

.status-strip strong {
  font-size: 1.05rem;
}

.hero-scene {
  position: relative;
  min-height: 42rem;
  display: grid;
  place-items: center;
}

.scene-glow {
  position: absolute;
  inset: 15% 12% 8%;
  background: radial-gradient(circle, rgba(215, 176, 106, 0.14), transparent 70%);
  filter: blur(30px);
}

.battle-card {
  position: relative;
  width: min(100%, 540px);
  aspect-ratio: 0.86;
  border-radius: 2rem;
  border: 1px solid rgba(244, 228, 193, 0.16);
  overflow: hidden;
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 205, 129, 0.08), transparent 28%),
    linear-gradient(180deg, var(--sky-bright) 0%, var(--sky) 46%, #191512 100%);
}

.battle-sky,
.battle-ground,
.water,
.battle-rain,
.battle-flares,
.scene-hud,
.scene-caption,
.soldier {
  position: absolute;
}

.scene-hud {
  top: 1rem;
  left: 1rem;
  right: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(244, 228, 193, 0.16);
  border-radius: 1rem;
  background: rgba(12, 11, 10, 0.44);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 2;
}

.scene-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.scene-hud-score {
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
}

.scene-health-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.scene-health-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--danger), var(--warning), var(--healthy));
  box-shadow: 0 0 18px rgba(255, 214, 152, 0.28);
  transition: width 500ms ease;
}

.battle-sky {
  inset: 0 0 45% 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 214, 152, 0.18), transparent 18%),
    radial-gradient(circle at 78% 18%, rgba(255, 214, 152, 0.12), transparent 20%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.25));
}

.battle-ground {
  left: -5%;
  right: -5%;
  bottom: -3%;
  height: 43%;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.05), transparent 18%),
    radial-gradient(circle at 60% 15%, rgba(255, 255, 255, 0.04), transparent 15%),
    linear-gradient(180deg, #533e2e 0%, var(--mud) 38%, var(--mud-deep) 100%);
  clip-path: polygon(0 22%, 8% 14%, 17% 20%, 31% 9%, 46% 18%, 55% 13%, 70% 22%, 81% 10%, 100% 18%, 100% 100%, 0 100%);
}

.water {
  left: 0;
  right: 0;
  bottom: 0;
  transform-origin: bottom;
  transition: height 500ms ease, background 500ms ease;
}

.water-back {
  height: 16%;
  background: linear-gradient(180deg, rgba(112, 149, 163, 0.24), rgba(40, 54, 62, 0.58));
  opacity: 0.4;
}

.water-front {
  height: 22%;
  background:
    radial-gradient(circle at 20% 35%, rgba(255, 255, 255, 0.14), transparent 12%),
    radial-gradient(circle at 65% 30%, rgba(255, 255, 255, 0.11), transparent 14%),
    linear-gradient(180deg, rgba(141, 186, 197, 0.4), rgba(43, 62, 72, 0.78) 42%, rgba(21, 27, 30, 0.92));
}

.water-front::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 48px);
  opacity: 0.6;
  animation: shimmer 5.5s linear infinite;
}

.battle-rain {
  inset: 0;
  opacity: 0.55;
}

.battle-rain span {
  position: absolute;
  top: -20%;
  width: 2px;
  height: 38%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(230, 241, 255, 0.5), rgba(255, 255, 255, 0));
  animation: rain 1.4s linear infinite;
}

.battle-rain span:nth-child(1) {
  left: 12%;
  animation-delay: -0.2s;
}

.battle-rain span:nth-child(2) {
  left: 28%;
  animation-delay: -0.75s;
}

.battle-rain span:nth-child(3) {
  left: 42%;
  animation-delay: -1.15s;
}

.battle-rain span:nth-child(4) {
  left: 58%;
  animation-delay: -0.5s;
}

.battle-rain span:nth-child(5) {
  left: 74%;
  animation-delay: -1s;
}

.battle-rain span:nth-child(6) {
  left: 88%;
  animation-delay: -0.35s;
}

.battle-flares {
  inset: 0;
}

.battle-flares span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 211, 126, 0.85);
  box-shadow: 0 0 20px rgba(255, 211, 126, 0.8);
  animation: pulse 2.8s ease-in-out infinite;
}

.battle-flares span:nth-child(1) {
  left: 16%;
  top: 20%;
}

.battle-flares span:nth-child(2) {
  left: 76%;
  top: 16%;
  animation-delay: -1s;
}

.battle-flares span:nth-child(3) {
  left: 62%;
  top: 28%;
  animation-delay: -1.8s;
}

.soldier {
  left: 50%;
  bottom: 14%;
  width: 210px;
  height: 380px;
  transform: translateX(-50%);
  transition: transform 500ms ease, filter 500ms ease;
  animation: sway 3.8s ease-in-out infinite;
}

.soldier div {
  position: absolute;
}

.helmet {
  left: 67px;
  top: 26px;
  width: 76px;
  height: 35px;
  border-radius: 55px 55px 18px 18px;
  background: linear-gradient(180deg, #7c8362, #3f4736);
  z-index: 3;
}

.head {
  left: 79px;
  top: 48px;
  width: 52px;
  height: 58px;
  border-radius: 26px 26px 22px 22px;
  background: linear-gradient(180deg, #ccb394, #9b7b60);
  z-index: 2;
}

.torso {
  left: 55px;
  top: 96px;
  width: 104px;
  height: 132px;
  border-radius: 38px 38px 24px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #667055, #434a3c 45%, #2e332b 100%);
}

.torso::before,
.torso::after {
  content: "";
  position: absolute;
  top: 28px;
  width: 18px;
  height: 48px;
  border-radius: 10px;
  background: rgba(23, 20, 17, 0.35);
}

.torso::before {
  left: 28px;
}

.torso::after {
  right: 28px;
}

.arm {
  width: 26px;
  height: 114px;
  border-radius: 22px;
  background: linear-gradient(180deg, #59624a, #353b2f);
  top: 104px;
}

.arm-left {
  left: 36px;
  transform: rotate(18deg);
}

.arm-right {
  right: 36px;
  transform: rotate(-10deg);
}

.leg {
  width: 34px;
  height: 142px;
  border-radius: 24px;
  background: linear-gradient(180deg, #7c6744, #443421);
  top: 210px;
}

.leg-left {
  left: 72px;
  transform: rotate(6deg);
}

.leg-right {
  right: 70px;
  transform: rotate(-3deg);
}

.boot {
  width: 64px;
  height: 28px;
  border-radius: 20px 20px 14px 12px;
  background: linear-gradient(180deg, #2b241d, #120f0d);
  bottom: 8px;
}

.boot-left {
  left: 54px;
}

.boot-right {
  right: 50px;
}

.rifle {
  left: 144px;
  top: 110px;
  width: 12px;
  height: 210px;
  border-radius: 8px;
  background: linear-gradient(180deg, #8f6a43, #3e2d1d);
  transform: rotate(14deg);
  opacity: 0.9;
}

.scene-caption {
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(244, 228, 193, 0.14);
  border-radius: 1rem;
  background: rgba(17, 15, 14, 0.52);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.indicator,
.explain {
  padding: 3.25rem 0 1rem;
}

.section-heading {
  max-width: 46rem;
}

h2 {
  margin-top: 0.8rem;
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  line-height: 1.05;
}

.indicator-layout {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.85fr);
  gap: 1.2rem;
}

.health-panel,
.metric-block,
.logic-grid article {
  border: 1px solid var(--line);
  border-radius: 1.8rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--panel);
  box-shadow: var(--shadow);
}

.health-panel {
  padding: 1.6rem;
}

.health-ring {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 310px;
}

.ring-svg {
  width: min(100%, 280px);
  transform: rotate(-90deg);
}

.ring-track,
.ring-progress {
  fill: none;
  stroke-width: 16;
}

.ring-track {
  stroke: rgba(255, 255, 255, 0.08);
}

.ring-progress {
  stroke: url(#ringGradient);
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-dasharray: 452.39;
  stroke-dashoffset: calc(452.39 - (452.39 * var(--ring-progress)) / 100);
  transition: stroke-dashoffset 500ms ease, stroke 500ms ease;
}

.ring-copy {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

#health-score {
  font-size: clamp(3rem, 6vw, 4.6rem);
  line-height: 1;
}

.temperature-bar {
  margin-top: 1rem;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.temperature-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--danger), var(--warning), var(--healthy));
  transition: width 500ms ease;
}

.panel-summary {
  margin-top: 1rem;
}

.metric-column {
  display: grid;
  gap: 1rem;
}

.metric-block {
  padding: 1.35rem 1.4rem;
  min-height: 166px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.7rem;
}

.metric-value {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  line-height: 1;
}

.token-ca {
  word-break: break-all;
}

.metric-state {
  min-height: 2.75rem;
}

.wallet-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
}
.wallet-actions {
  margin-top: 0;
}

.wallet-footnote {
  margin-top: auto;
}

.logic-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.logic-grid article {
  padding: 1.3rem;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.9rem;
}

.logic-grid h3 {
  font-size: 1.4rem;
}

body[data-state="healthy"] .ring-progress,
body[data-state="healthy"] .metric-state {
  stroke: var(--healthy);
  color: #afd2a4;
}

body[data-state="warning"] .ring-progress,
body[data-state="warning"] .metric-state {
  stroke: var(--warning);
  color: #e2ba7d;
}

body[data-state="danger"] .ring-progress,
body[data-state="danger"] .metric-state {
  stroke: var(--danger);
  color: #f0a58f;
}

body[data-state="healthy"] #soldier-art {
  transform: translateX(-50%) translateY(-8px) scale(1.02);
  filter: drop-shadow(0 28px 34px rgba(58, 102, 79, 0.22));
}

body[data-state="warning"] #soldier-art {
  transform: translateX(-50%) translateY(8px) rotate(-2deg);
}

body[data-state="danger"] #soldier-art {
  transform: translateX(-50%) translateY(18px) rotate(-6deg);
  filter: drop-shadow(0 25px 34px rgba(140, 47, 34, 0.26));
}

body[data-state="danger"] .battle-rain {
  opacity: 0.85;
}

body[data-state="healthy"] .battle-rain {
  opacity: 0.25;
}

@keyframes rain {
  from {
    transform: translateY(-12%) rotate(18deg);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  to {
    transform: translateY(170%) rotate(18deg);
    opacity: 0;
  }
}

@keyframes sway {
  0%,
  100% {
    transform: translateX(-50%) rotate(0deg);
  }

  50% {
    transform: translateX(-50%) rotate(1.5deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

@keyframes shimmer {
  from {
    transform: translateX(-10%);
  }

  to {
    transform: translateX(10%);
  }
}

@media (max-width: 980px) {
  .hero,
  .indicator-layout,
  .logic-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-scene {
    min-height: 32rem;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --grid: min(100vw - 1.25rem, 100%);
  }

  .site-header {
    padding-top: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    gap: 1.4rem;
  }

  h1 {
    font-size: clamp(2.3rem, 12vw, 3.35rem);
  }

  .battle-card {
    border-radius: 1.4rem;
  }

  .soldier {
    width: 170px;
    height: 310px;
  }

  .helmet {
    left: 54px;
    width: 64px;
  }

  .head {
    left: 64px;
    width: 44px;
    height: 50px;
  }

  .torso {
    left: 40px;
    width: 88px;
    height: 112px;
  }

  .arm {
    top: 98px;
    height: 96px;
  }

  .arm-left {
    left: 24px;
  }

  .arm-right {
    right: 24px;
  }

  .leg {
    top: 186px;
    height: 116px;
  }

  .leg-left {
    left: 54px;
  }

  .leg-right {
    right: 52px;
  }

  .boot {
    width: 52px;
    height: 24px;
  }

  .boot-left {
    left: 38px;
  }

  .boot-right {
    right: 36px;
  }

  .rifle {
    left: 116px;
    top: 102px;
    height: 170px;
  }
}
