@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Syne:wght@500;600;700;800&display=swap");

:root {
  --accent: #caff4a;
  --accent-2: #ff8157;
  --surface: #11130f;
  --ink: #f4f5eb;
  --muted: #a0a79b;
  --line: rgba(244, 245, 235, 0.16);
  --panel: rgba(20, 23, 18, 0.88);
  --panel-solid: #171a15;
  --danger: #ff8068;
  --mono: "DM Mono", "SFMono-Regular", Menlo, monospace;
  --display: "Syne", "Helvetica Neue", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: #0c0e0b;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 2%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 32rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #0c0e0b;
  background-size: auto, 36px 36px, 36px 36px, auto;
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  content: "";
  background:
    linear-gradient(105deg, #0c0e0b 0%, rgba(12, 14, 11, 0.94) 48%, rgba(12, 14, 11, 0.55) 100%),
    url("/preview.svg") center / cover no-repeat;
  opacity: 0.44;
  filter: saturate(0.7);
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  color: #111;
  background: var(--accent);
}

.boot {
  display: grid;
  min-height: 100vh;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.fatal {
  max-width: 640px;
  margin: 12vh auto;
  padding: 32px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
}

.fatal h1 {
  margin-top: 0;
  font-size: clamp(30px, 6vw, 58px);
}

.site-head {
  position: relative;
  z-index: 20;
  display: grid;
  max-width: 1280px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin: 0 auto;
  padding: 24px 28px;
}

.brand {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  clip-path: polygon(0 0, 78% 0, 100% 22%, 100% 100%, 22% 100%, 0 78%);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand small {
  max-width: 260px;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.wallet-button {
  justify-self: end;
  min-width: 142px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.wallet-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  position: relative;
  z-index: 2;
}

.hero {
  display: grid;
  max-width: 1280px;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  align-items: center;
  gap: clamp(36px, 8vw, 112px);
  min-height: calc(100vh - 90px);
  margin: 0 auto;
  padding: 42px 28px 96px;
}

.eyebrow,
.section-label,
.mint-panel small,
.state-head,
.cost-block small,
.quantity-row > span,
.agent-note,
.project-foot,
.site-head small {
  font-family: var(--mono);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent);
  animation: breathe 2.8s ease-in-out infinite;
}

.hero h1 {
  max-width: 900px;
  margin: 22px 0 24px;
  font-size: clamp(64px, 10.2vw, 156px);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.8;
  text-transform: uppercase;
  text-wrap: balance;
}

.lede {
  max-width: 680px;
  margin: 0;
  color: #c7ccc2;
  font-size: clamp(16px, 1.55vw, 21px);
  line-height: 1.6;
}

.fact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 36px 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.fact-strip span {
  flex: 1 1 120px;
  padding: 13px 15px;
  color: var(--muted);
  background: rgba(12, 14, 11, 0.86);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fact-strip b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 15px 19px;
  color: #0d0f0c;
  background: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 180ms ease;
}

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

.primary-link span {
  font-size: 20px;
}

.hero-art {
  position: relative;
  justify-self: center;
  width: min(100%, 470px);
}

.preview-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, transparent), transparent 55%),
    var(--panel-solid);
  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.018),
    0 38px 100px rgba(0, 0, 0, 0.48);
  transform: rotate(2.2deg);
}

.preview-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 65%, rgba(0, 0, 0, 0.48));
  pointer-events: none;
}

.preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.corner-note {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 13px;
  padding: 6px 8px;
  color: #0d0f0c;
  background: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.orbit-line {
  position: absolute;
  z-index: -1;
  top: 6%;
  left: -10%;
  width: 122%;
  aspect-ratio: 1;
  border: 1px dashed color-mix(in srgb, var(--accent-2) 45%, transparent);
  border-radius: 50%;
  animation: spin 36s linear infinite;
}

.mint-section,
.gallery-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 92px 28px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.section-label span {
  color: var(--accent);
}

.section-label::after {
  width: 80px;
  height: 1px;
  content: "";
  background: var(--line);
}

.mint-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.mint-panel,
.state-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
}

.mint-panel {
  padding: clamp(24px, 4vw, 48px);
}

.mint-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.mint-panel small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.mint-panel h2 {
  margin: 9px 0 0;
  font-size: clamp(30px, 4.2vw, 60px);
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-transform: uppercase;
}

.chain-badge {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.mint-tabs {
  display: flex;
  gap: 5px;
  margin: 34px 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.mint-tab {
  padding: 8px 14px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.mint-tab.active {
  border-color: var(--line);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.quantity-row > span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
}

.quantity-control button {
  width: 44px;
  height: 44px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

.quantity-control button:hover:not(:disabled) {
  color: #111;
  background: var(--accent);
}

.quantity-control button:disabled,
.mint-button:disabled,
.utility-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.quantity-control output {
  min-width: 48px;
  text-align: center;
  font-family: var(--mono);
  font-size: 18px;
}

.cost-block {
  display: grid;
  gap: 5px;
  margin: 28px 0 20px;
}

.cost-block > span {
  color: var(--accent);
  font-size: clamp(40px, 6vw, 74px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
}

.cost-block small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.mint-button {
  width: 100%;
  min-height: 54px;
  padding: 13px 18px;
  border: 1px solid var(--accent);
  color: #0d0f0c;
  background: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    filter 160ms ease,
    transform 160ms ease;
}

.mint-button:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.agent-pane {
  display: grid;
  gap: 12px;
}

.agent-pane label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #0d0f0c;
}

.agent-input:focus-within {
  border-color: var(--accent);
}

.agent-input input {
  min-width: 0;
  flex: 1;
  padding: 14px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 13px;
}

.agent-input span {
  padding-right: 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}

.agent-note {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

#agent-prompt {
  max-height: 180px;
  overflow: auto;
  margin: 6px 0 0;
  padding: 13px;
  border: 1px solid var(--line);
  color: #b9c0b3;
  background: #0b0d0a;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.ghost-button,
.utility-button {
  padding: 10px 13px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.ghost-button:hover,
.utility-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.status {
  min-height: 18px;
  margin: 14px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.6;
}

.status.ok {
  color: var(--accent);
}

.status.error {
  color: var(--danger);
}

.advanced-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.state-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 3vw, 38px);
}

.state-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.state-head i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5a6056;
}

.state-head i.live {
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent);
}

.state-panel dl {
  margin: 34px 0;
}

.state-panel dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.state-panel dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.state-panel dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}

.state-panel dd.state-open {
  color: var(--accent);
}

.meter {
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 500ms ease;
}

.state-panel > p {
  margin: 24px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.7;
}

.gallery-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: end;
  gap: 50px;
}

.gallery-head h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 86px);
  letter-spacing: -0.06em;
  line-height: 0.94;
  text-transform: uppercase;
}

.gallery-head p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.75;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 48px;
}

.gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-solid);
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 400ms ease;
}

.gallery figure:hover img {
  transform: scale(1.025);
}

.gallery figcaption {
  padding: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.gallery-placeholder {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 48%),
    var(--panel-solid);
}

.gallery-placeholder span {
  align-self: start;
  justify-self: start;
  padding: 11px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.gallery-placeholder b {
  grid-area: 1 / 1;
  color: var(--accent);
  font-size: clamp(36px, 5vw, 74px);
}

.protocol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 48px;
  border: 1px solid var(--line);
  background: var(--line);
}

.protocol-grid article {
  padding: 26px;
  background: #0e100d;
}

.protocol-grid span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
}

.protocol-grid h3 {
  margin: 28px 0 10px;
  font-size: 20px;
  text-transform: uppercase;
}

.protocol-grid p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.7;
}

footer {
  display: flex;
  max-width: 1280px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin: 0 auto;
  padding: 32px 28px 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.7;
}

footer strong,
footer span {
  display: block;
}

footer strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
  text-transform: uppercase;
}

#footer-contract {
  max-width: 520px;
  overflow-wrap: anywhere;
  text-align: right;
}

dialog {
  width: min(92vw, 500px);
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--ink);
  background: #11140f;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.64);
}

dialog::backdrop {
  background: rgba(5, 7, 4, 0.78);
  backdrop-filter: blur(8px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

dialog h3 {
  margin: 0;
  font-size: 25px;
  text-transform: uppercase;
}

.dialog-head button {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.wallet-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.wallet-list button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.wallet-list button:hover {
  border-color: var(--accent);
}

.wallet-list img,
.wallet-fallback {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
}

.wallet-fallback {
  color: #111;
  background: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
}

.result-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 50%;
  color: #111;
  background: var(--accent);
  font-size: 25px;
}

#result-copy {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.dialog-actions a,
.dialog-actions button {
  padding: 11px 13px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
  text-decoration: none;
  cursor: pointer;
}

.dialog-actions a {
  border-color: var(--accent);
  color: #111;
  background: var(--accent);
}

@keyframes breathe {
  50% {
    box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 4%, transparent);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .site-head {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 50px;
  }

  .hero-art {
    width: min(100%, 560px);
    order: -1;
  }

  .hero h1 {
    font-size: clamp(56px, 15vw, 104px);
  }

  .mint-grid,
  .gallery-head {
    grid-template-columns: 1fr;
  }

  .gallery-head {
    gap: 24px;
  }

  .protocol-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-head {
    padding: 17px 16px;
  }

  .brand small {
    max-width: 160px;
  }

  .wallet-button {
    min-width: 0;
    padding: 10px 12px;
  }

  .hero,
  .mint-section,
  .gallery-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero {
    gap: 30px;
    padding-bottom: 70px;
  }

  .hero h1 {
    margin-top: 16px;
    letter-spacing: -0.065em;
  }

  .fact-strip span {
    flex-basis: calc(50% - 1px);
  }

  .mint-panel,
  .state-panel {
    padding: 22px;
  }

  .mint-panel-head {
    display: grid;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  footer {
    display: grid;
    padding-right: 16px;
    padding-left: 16px;
  }

  #footer-contract {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
