*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #d4a017;
  --gold-light: #f0c040;
  --gold-dark: #8b6914;
  --black: #0a0a0a;
  --black-soft: #141414;
  --black-card: #1a1a1a;
  --white: #f5f0e8;
  --gray: #888;
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'Courier Prime', 'Courier New', monospace;
  --font-impact: Impact, 'Arial Black', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

code {
  font-family: var(--font-body);
  font-size: 0.85em;
  color: var(--gold-light);
}

a {
  color: var(--gold);
  transition: color 0.2s;
}

a:hover {
  color: var(--gold-light);
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: transparent;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-decoration: none;
  justify-self: start;
}

.nav-ca {
  justify-self: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}

.btn-3d-ca {
  font-family: var(--font-body);
  font-size: clamp(0.55rem, 1.1vw, 0.72rem);
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 0.5rem 0.85rem;
  white-space: normal;
  word-break: break-all;
  text-align: center;
  text-shadow: none;
  line-height: 1.3;
}

.nav-ca-short {
  display: none;
}

.btn-label-short {
  display: none;
}

.btn-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: linear-gradient(180deg, #2a1f06 0%, #120d02 100%);
  border: 2px solid var(--gold-dark);
  padding: 0.55rem 1.25rem;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  line-height: 1;
  box-shadow:
    0 1px 0 #c4941a,
    0 2px 0 #b08618,
    0 3px 0 #9c7816,
    0 4px 0 #745c12,
    0 5px 0 #4c400e,
    0 5px 10px rgba(0, 0, 0, 0.55);
  transform: translateY(0);
  transition: transform 0.1s ease, box-shadow 0.1s ease, color 0.15s ease;
  text-shadow: 0 1px 0 #8b6914, 0 2px 0 #604e10;
}

.btn-3d:hover {
  color: var(--gold-light);
}

.btn-3d:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #745c12, 0 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-3d-sm {
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  flex-shrink: 0;
}

.btn-3d-lg {
  font-size: 1.2rem;
  padding: 0.75rem 2rem;
}

.btn-3d-icon {
  padding: 0.55rem 0.85rem;
}

.btn-3d-icon svg {
  display: block;
}

.btn-3d.copied {
  color: var(--gold-light);
  border-color: var(--gold);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  padding: clamp(5rem, 12vh, 8rem) 1.5rem 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(10, 10, 10, 0.35), rgba(10, 10, 10, 0.55)),
    radial-gradient(ellipse at 50% 30%, rgba(212, 160, 23, 0.08) 0%, transparent 60%),
    url('assets/hero-bg.png') center / cover no-repeat;
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: min(40vh, 320px);
  background: linear-gradient(to bottom, transparent 0%, rgba(10, 10, 10, 0.4) 35%, var(--black) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(5rem, 22vw, 14rem);
  letter-spacing: 0.06em;
  color: var(--gold);
  line-height: 1;
  text-transform: none;
  transform: perspective(800px) rotateX(8deg);
  text-shadow:
    0 1px 0 #c4941a,
    0 2px 0 #b08618,
    0 3px 0 #9c7816,
    0 4px 0 #886a14,
    0 5px 0 #745c12,
    0 6px 0 #604e10,
    0 7px 0 #4c400e,
    0 8px 0 #38320c,
    0 12px 20px rgba(0, 0, 0, 0.7),
    0 20px 40px rgba(212, 160, 23, 0.25);
}

/* Sections */
.section {
  padding: 5rem 1.5rem;
  position: relative;
}

.section-blend {
  margin-top: -min(20vh, 160px);
  padding-top: calc(5rem + min(12vh, 100px));
  background: var(--black);
}

.section {
  background: var(--black);
}

.section-fade-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(25vh, 200px);
  background: linear-gradient(to bottom, var(--black) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--gray);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

/* About */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.about-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gray);
  margin-bottom: 0.25rem;
}

.about-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  letter-spacing: 0.08em;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 1.5rem;
  text-shadow:
    0 1px 0 #c4941a,
    0 2px 0 #9c7816,
    0 3px 0 #745c12,
    0 4px 0 #4c400e;
}

.about-image {
  width: 100%;
  max-width: 360px;
  display: block;
  background: transparent;
  border: none;
  filter: contrast(1.05) saturate(0.95);
}

.about-text-3d {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  letter-spacing: 0.04em;
  color: var(--gold);
  line-height: 1.35;
  margin-bottom: 1.5rem;
  text-shadow:
    0 1px 0 #c4941a,
    0 2px 0 #b08618,
    0 3px 0 #9c7816,
    0 4px 0 #886a14,
    0 5px 0 #745c12,
    0 6px 0 #604e10,
    0 8px 16px rgba(0, 0, 0, 0.6);
}

.about-text-3d strong {
  color: var(--gold-light);
}

.about-text-3d a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-text-3d a:hover {
  color: #fff;
}

/* Contract Address */
.ca-box {
  background: var(--black-card);
  border: 2px solid rgba(212, 160, 23, 0.2);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.ca-box-inline {
  margin-top: 2.5rem;
  margin-bottom: 0;
}

.ca-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray);
  margin-bottom: 0.75rem;
}

.ca-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.ca-address {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  font-size: clamp(0.75rem, 2.5vw, 1rem);
  color: var(--gold-light);
  line-height: 1.5;
}

/* Chart */
.chart-wrap {
  border: 2px solid rgba(212, 160, 23, 0.15);
  border-radius: 4px;
  overflow: hidden;
  background: var(--black-card);
  min-height: 500px;
}

.chart-wrap iframe {
  display: block;
  width: 100%;
  height: 500px;
  border: none;
}

/* Meme scroll */
.meme-scroll {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.meme-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: meme-scroll 40s linear infinite;
}

.meme-track:hover {
  animation-play-state: paused;
}

.meme-item {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
  border: 2px solid rgba(212, 160, 23, 0.2);
  overflow: hidden;
  background: var(--black-card);
}

.meme-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05) saturate(0.9);
}

@keyframes meme-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* How to Buy */
.buy-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.buy-step {
  background: linear-gradient(180deg, #2a1f06 0%, #120d02 100%);
  border: 2px solid var(--gold-dark);
  padding: 1.75rem;
  box-shadow:
    0 1px 0 #c4941a,
    0 2px 0 #b08618,
    0 3px 0 #9c7816,
    0 4px 0 #745c12,
    0 5px 0 #4c400e,
    0 5px 12px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease;
}

.buy-step:hover {
  transform: translateY(-3px);
}

.buy-step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-dark);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.5rem;
}

.buy-step h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.buy-step p {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.7;
}

.buy-cta {
  text-align: center;
}

/* Generator */
.generator-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 480px;
  margin: 0 auto;
}

.demotivational {
  display: inline-block;
}

.poster-frame {
  background: #000;
  border: 3px solid #222;
  padding: 8px;
  max-width: 400px;
  box-shadow:
    0 0 0 1px #111,
    0 20px 60px rgba(0, 0, 0, 0.8),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.poster-image-wrap {
  overflow: hidden;
  background: #1a1208;
}

.poster-image {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  object-fit: cover;
  filter: contrast(1.1) saturate(0.9);
}

.poster-caption {
  font-family: var(--font-impact);
  font-size: clamp(0.9rem, 2.5vw, 1.4rem);
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 400px;
  line-height: 1.35;
}

.generator-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.generator-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
}

.generator-controls input {
  font-family: var(--font-body);
  background: var(--black-card);
  border: 1px solid #333;
  color: var(--white);
  padding: 0.75rem;
  font-size: 0.9rem;
}

.generator-controls input:focus {
  outline: none;
  border-color: var(--gold);
}

.generator-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.generator-btns .btn-3d {
  flex: 1;
  min-width: 140px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid #222;
  background: var(--black);
}

.footer p {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

.footer-small {
  font-family: var(--font-body) !important;
  font-size: 0.75rem !important;
  color: #555 !important;
  letter-spacing: 0 !important;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #1a1408 0%, #0a0a0a 100%);
  border: 2px solid var(--gold-dark);
  padding: 2rem 2rem 2.25rem;
  box-shadow:
    0 1px 0 #c4941a,
    0 4px 0 #745c12,
    0 8px 0 #38320c,
    0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--gray);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--gold);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.75rem;
  padding-right: 2rem;
}

.modal-lead {
  color: var(--gold-light);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.modal-body p {
  color: #bbb;
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.fees-list {
  list-style: none;
  margin-bottom: 1.25rem;
}

.fees-list li {
  color: #aaa;
  font-size: 0.85rem;
  line-height: 1.7;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fees-list li:last-child {
  border-bottom: none;
}

.fees-list strong {
  display: block;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
  font-weight: normal;
}

.modal-footer-text {
  font-style: italic;
  color: var(--gray) !important;
  font-size: 0.85rem !important;
  margin-bottom: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 7rem;
  }

  .nav {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    padding: 0.65rem 1rem;
    padding-top: max(0.65rem, env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    gap: 0.55rem;
  }

  .nav-logo {
    grid-column: 1;
    grid-row: 1;
    font-size: 1.35rem;
    justify-self: start;
  }

  .nav-ca {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 0.55rem 0.75rem;
    word-break: normal;
  }

  .nav-ca-full {
    display: none;
  }

  .nav-ca-short {
    display: inline;
  }

  .nav-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 0.4rem;
    flex-wrap: nowrap;
  }

  .btn-3d {
    font-size: 0.78rem;
    padding: 0.45rem 0.65rem;
    letter-spacing: 0.08em;
  }

  .btn-3d-icon {
    padding: 0.45rem 0.6rem;
  }

  .btn-3d-icon svg {
    width: 15px;
    height: 15px;
  }

  .btn-3d-lg {
    font-size: 1rem;
    padding: 0.65rem 1.5rem;
    width: 100%;
    max-width: 320px;
  }

  .hero {
    min-height: 100svh;
    padding: clamp(7.5rem, 18vh, 9rem) 1rem 2rem;
  }

  .hero-title {
    font-size: clamp(3.5rem, 16vw, 6rem);
    transform: none;
    text-shadow:
      0 1px 0 #c4941a,
      0 2px 0 #9c7816,
      0 3px 0 #745c12,
      0 4px 0 #4c400e,
      0 8px 16px rgba(0, 0, 0, 0.7);
  }

  .section {
    padding: 3rem 1rem;
  }

  .section-blend {
    margin-top: -3rem;
    padding-top: 4rem;
  }

  .section-title {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .section-desc {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .about-left {
    text-align: center;
  }

  .about-image {
    max-width: min(100%, 280px);
    margin: 0 auto;
  }

  .about-text-3d {
    font-size: clamp(1.15rem, 4.5vw, 1.5rem);
    margin-bottom: 1.25rem;
  }

  .ca-box {
    padding: 1rem;
  }

  .ca-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .ca-row .btn-3d-sm {
    width: 100%;
  }

  .chart-wrap {
    min-height: 360px;
  }

  .chart-wrap iframe {
    height: 360px;
  }

  .meme-item {
    width: 200px;
    height: 200px;
  }

  .generator-simple {
    gap: 1.5rem;
    max-width: 100%;
  }

  .poster-frame,
  .poster-image,
  .poster-caption {
    max-width: 100%;
  }

  .generator-btns {
    flex-direction: column;
  }

  .generator-btns .btn-3d {
    width: 100%;
    min-width: 0;
  }

  .buy-steps {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .buy-step {
    padding: 1.35rem;
  }

  .modal {
    padding: 1rem;
    align-items: flex-end;
  }

  .modal-panel {
    max-height: 90svh;
    padding: 1.5rem 1.25rem 1.75rem;
    border-radius: 4px 4px 0 0;
  }

  .modal-title {
    font-size: 1.65rem;
  }
}

@media (max-width: 400px) {
  .btn-label-long {
    display: none;
  }

  .btn-label-short {
    display: inline;
  }

  .nav-actions {
    gap: 0.3rem;
  }

  .btn-3d {
    font-size: 0.72rem;
    padding: 0.42rem 0.55rem;
  }

  .meme-item {
    width: 170px;
    height: 170px;
  }

  .hero-title {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }
}
