:root {
  --paper: #f4eee4;
  --ink: #2c241c;
  --mute: #6b6158;
  --mint: #3ad16a;
  --mint-deep: #1fa86a;
  --line: rgba(44, 36, 28, 0.12);
  --cream: #fffaf3;
  --font: "Figtree", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100%;
  background:
    radial-gradient(ellipse 70% 40% at 80% 0%, rgba(58, 209, 106, 0.12), transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
::selection { background: #c8f5d8; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.4rem;
  background: rgba(244, 238, 228, 0.86);
  backdrop-filter: blur(14px);
}

.brand {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
}

.nav nav {
  display: flex;
  gap: 1.15rem;
  color: var(--mute);
  font-weight: 650;
}

.nav nav a:hover { color: var(--ink); }

.hero,
.about,
.memes,
.clinic,
.community {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  justify-items: center;
  padding: 1.4rem 0 2.4rem;
  text-align: center;
}

.kicker {
  margin-bottom: 1.1rem;
  color: var(--mint-deep);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin-top: 1.2rem;
  font-family: var(--display);
  font-size: clamp(4.8rem, 16vw, 9rem);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: -0.05em;
}

.lede,
.story {
  max-width: 38rem;
  margin: 1rem auto 0;
  color: var(--mute);
  font-size: 1.12rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0 1.15rem;
  border-radius: 999px;
  font-weight: 750;
}

.btn.solid {
  color: #0d3d28;
  background: var(--mint);
  box-shadow: 0 8px 18px rgba(58, 209, 106, 0.28);
}

.btn.ghost {
  border: 1px solid var(--line);
  background: var(--cream);
}

.contract {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.8rem;
  width: min(100%, 640px);
  margin-top: 1.4rem;
  padding: 0.7rem 0.9rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.contract span {
  color: var(--mute);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contract code {
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.contract button {
  color: var(--mint-deep);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.coin-scene {
  perspective: 980px;
  width: min(100%, 340px);
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.coin-scene.is-grabbing { cursor: grabbing; }

.coin {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateX(18deg) rotateY(0deg);
  filter: drop-shadow(0 28px 22px rgba(20, 107, 66, 0.22));
  will-change: transform;
}

.coin-stack {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

.coin-layer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(90deg, #146b42 0%, #7dffb1 16%, #ffffff 42%, #9af0c0 68%, #0d3d28 100%);
  box-shadow: inset 0 0 0 1px rgba(13, 61, 40, 0.35);
}

.coin-layer:nth-child(odd) {
  background: linear-gradient(90deg, #0d3d28 0%, #3ad16a 20%, #f4fff8 50%, #7dffb1 78%, #145c38 100%);
}

.coin-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 16px;
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #b8f5d2 48%, #1fa86a 100%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.85), inset 0 0 0 8px rgba(31, 168, 106, 0.28);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.coin-face.front { transform: translateZ(calc(var(--thick, 48px) / 2 + 1px)); }
.coin-face.front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.coin-face.back {
  background: linear-gradient(180deg, #ffffff 0 48%, #7dffb1 52% 100%);
  color: #0d3d28;
  transform: rotateY(180deg) translateZ(calc(var(--thick, 48px) / 2 + 1px));
}

.coin-face.back strong {
  font-family: var(--display);
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 1;
}

.coin-face.back span {
  position: absolute;
  bottom: 22%;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.marquee {
  margin: 1.2rem 0;
  border-block: 1px solid var(--line);
  overflow: hidden;
  background: rgba(255, 250, 243, 0.5);
}

.marquee-row {
  overflow: hidden;
  padding: 0.85rem 0;
  color: var(--mint-deep);
  font-family: var(--display);
  font-size: 1.05rem;
  white-space: nowrap;
}

.marquee-row + .marquee-row {
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.92rem;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 2rem;
  animation: ticker 42s linear infinite;
}

.marquee-row.reverse .marquee-track {
  animation-direction: reverse;
  animation-duration: 54s;
}

.about,
.memes,
.clinic { padding: 4.4rem 0 1rem; }

.community { padding: 3.4rem 0 4.4rem; text-align: center; }

h2 {
  margin: 0.2rem 0 0.9rem;
  font-family: var(--display);
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  font-weight: 640;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.about .story,
.memes .story { margin-left: 0; }

.shots,
.frames {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.8rem 0 0;
  list-style: none;
}

.shots img,
.frames img,
.feature img {
  width: 100%;
  object-fit: cover;
  background: #fff;
  border-radius: 18px;
}

.shots img { aspect-ratio: 4 / 3; }
.frames img { aspect-ratio: 4 / 3; border-radius: 14px; }

.shots span,
.frames h3 {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--display);
  font-size: 1.2rem;
}

.frames p,
.bring p,
.tiny,
.out a {
  color: var(--mute);
  line-height: 1.55;
}

.frames p { margin-top: 0.3rem; font-size: 0.95rem; }

.feature {
  margin-top: 1.6rem;
}

.feature img { aspect-ratio: 16 / 9; }
.feature figcaption {
  margin-top: 0.7rem;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.bring {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-top: 1.8rem;
  padding: 1.2rem 1.3rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.bring h3 { font-family: var(--display); font-size: 1.4rem; }
.bring-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.monitor {
  overflow: hidden;
  margin-top: 0.5rem;
  padding: 1.1rem 1.15rem 1.2rem;
  color: #b7f7d4;
  background: linear-gradient(180deg, #10241c 0%, #0b1813 100%);
  border-radius: 28px;
}

.monitor-bar {
  display: flex;
  justify-content: space-between;
  color: #7dd9a8;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.blip::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.45rem;
  background: #3ad16a;
  border-radius: 50%;
  box-shadow: 0 0 10px #3ad16a;
  vertical-align: middle;
}

.monitor.is-live .blip::before {
  animation: live-dot 1.2s ease-in-out infinite;
}

.ekg { height: 72px; overflow: hidden; margin: 0.6rem 0 0.8rem; }
.ekg svg { display: block; width: 200%; height: 72px; animation: ekg 3.6s linear infinite; }
.ekg path {
  fill: none;
  stroke: #7dffb1;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 6px rgba(125, 255, 177, 0.55));
}

.lead-vital p {
  color: #7dd9a8;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lead-vital strong {
  display: block;
  color: #e9ffe8;
  font-family: var(--mono);
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  font-weight: 600;
  line-height: 1;
}

.lead-vital span { color: #9ee0bd; }
.lead-vital strong.flash,
.vitals b.flash { color: #7dffb1; }

.vitals {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(125, 255, 177, 0.2);
}

.vitals em {
  display: block;
  color: #7dd9a8;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-style: normal;
  letter-spacing: 0.14em;
}

.vitals b {
  display: block;
  overflow: hidden;
  color: #e9ffe8;
  font-family: var(--mono);
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vitals small { color: #6aa888; font-size: 0.68rem; }

.community .story { margin-bottom: 0.4rem; }
.community .contract { margin-left: auto; margin-right: auto; }

.out {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin: 1.1rem 0;
}

.tiny { font-size: 0.84rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  z-index: 30;
  padding: 0.7rem 1.05rem;
  color: #0d3d28;
  font-weight: 700;
  background: var(--mint);
  border-radius: 999px;
  transform: translate(-50%, 120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.35s ease;
}

.toast.on { transform: translate(-50%, 0); opacity: 1; }

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes ekg {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes live-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

@media (max-width: 800px) {
  .nav nav { display: none; }
  .shots, .frames { grid-template-columns: 1fr; }
  .vitals { grid-template-columns: 1fr 1fr; }
  .bring { flex-direction: column; align-items: start; }
  .feature img { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .ekg svg, .monitor.is-live .blip::before { animation: none; }
}
