:root {
  --bg-ink: #0B0F1C;
  --bg-mid: #171A2B;
  --lav: #B9A7FF;
  --aqua: #62FFE2;
  --gold: #FFD76B;
  --text: #EAEAF5;
  --muted: #9AA0B4;
  --motion-enabled: 1;
  /* 0 = no motion */
}

/* Respect system reduce motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-enabled: 0;
  }
}

html[data-reduce-motion="true"] {
  --motion-enabled: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  overscroll-behavior: none;
  scroll-behavior: smooth;
}

/* Corner logo (minimal header) */
.corner-logo {
  position: fixed;
  top: 12px;
  left: 12px;
  right: auto;
  z-index: 10000;
  pointer-events: none;
}

.corner-logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
  opacity: 0.95;
}

@media (max-width: 640px) {
  .corner-logo {
    top: 8px;
    left: 8px;
  }

  .corner-logo img {
    width: 48px;
    height: 48px;
  }
}

html {
  scroll-padding-top: 72px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Safe area support for mobile devices with notches */
@supports (padding: max(0px)) {
  .site-header {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .corner-logo {
    left: max(12px, env(safe-area-inset-left));
    top: max(12px, env(safe-area-inset-top));
  }

  .sc-wrap {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
}

/* Minimalistic Header */
.site-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(11, 15, 28, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 14px 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.header-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.header-link:nth-child(1) .header-icon,
.header-link:nth-child(2) .header-icon {
  filter: brightness(0) saturate(100%) invert(1);
}

@media (max-width: 640px) {
  .site-header {
    top: 12px;
    padding: 8px 16px;
    border-radius: 40px;
  }

  .header-nav {
    gap: 12px;
  }

  .header-link {
    padding: 8px 12px;
    border-radius: 20px;
  }

  .header-icon {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .site-header {
    top: 8px;
    padding: 6px 12px;
    left: 8px;
    right: 8px;
    transform: none;
    max-width: calc(100vw - 16px);
  }

  .header-nav {
    gap: 8px;
    justify-content: space-between;
  }

  .header-link {
    padding: 6px 10px;
    min-width: 0;
    flex: 1;
    justify-content: center;
  }
}

h1,
h2,
h3 {
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
  line-height: 1.15;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
}

h2 {
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  margin: 0 0 0.75rem;
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  margin: 0 0 0.25rem;
}

p {
  margin: 0.5rem 0 0.75rem;
  color: var(--text);
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  padding: 8px 12px;
  z-index: 9999;
  background: #11131e;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

.section {
  position: relative;
  min-height: 100vh;
  overflow: clip;
  isolation: isolate;
  background: radial-gradient(120% 120% at 50% -10%, rgba(98, 255, 226, 0.05), rgba(185, 167, 255, 0.05)),
    linear-gradient(180deg, rgba(11, 15, 28, .98), rgba(23, 26, 43, .96));
}

.section--hero {
  display: grid;
  grid-auto-rows: min-content;
  justify-items: center;
  align-content: center;
  text-align: center;
  min-height: 100svh;
  padding: 72px 16px 20px;
  gap: 12px;
}

@media (max-width: 640px) {
  .section--hero {
    padding: 64px 12px 16px;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .section--hero {
    padding: 56px 8px 12px;
    gap: 8px;
  }
}

.hero-image {
  width: min(88vw, 1200px);
  max-height: 90vh;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.45));
}

/* Ensure hero image does not add extra offset when section has padding */
.section--hero .hero-image {
  margin-top: 0;
  max-height: 54svh;
}

@media (max-width: 640px) {
  .section--hero .hero-image {
    max-height: 48svh;
  }
}

@media (max-width: 480px) {
  .section--hero .hero-image {
    max-height: 44svh;
  }
}

@media (max-width: 640px) {
  .hero-image {
    width: min(95vw, 400px);
    max-height: 70vh;
    margin-top: 60px;
  }
}

@media (max-width: 480px) {
  .hero-image {
    width: min(90vw, 350px);
    max-height: 60vh;
    margin-top: 80px;
  }
}

.section--cta .content--center {
  text-align: center;
}

.layer {
  position: absolute;
  inset: 0;
  will-change: transform, opacity;
}

.layer--bg {
  background-size: cover;
  background-position: center;
  filter: saturate(0.9) brightness(0.9);
}

.overlay {
  background: radial-gradient(80% 60% at 50% 30%, rgba(11, 15, 28, 0) 0%, rgba(11, 15, 28, 0.4) 55%, rgba(11, 15, 28, 0.85) 100%);
  mix-blend-mode: normal;
}

.logo {
  width: min(36vw, 320px);
  height: auto;
  margin: auto;
  inset: auto;
  top: 12vh;
}

.aura {
  width: min(60vw, 640px);
  height: auto;
  opacity: 0.6;
  filter: blur(0.3px) saturate(1.1);
  margin: auto;
  inset: 10vh 0 auto;
}

.title {
  inset: auto;
  top: 46vh;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 24px rgba(185, 167, 255, 0.35);
}

.subtitle {
  inset: auto;
  top: calc(46vh + 72px);
  color: var(--muted);
  max-width: 72ch;
  margin: 0 auto;
  padding: 0 6vw;
}

.actions {
  inset: auto;
  top: calc(46vh + 140px);
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.btn--primary {
  background: radial-gradient(100% 100% at 50% 0, var(--aqua), var(--lav));
  color: #0B0F1C;
  box-shadow: 0 10px 30px rgba(98, 255, 226, 0.22), 0 6px 16px rgba(185, 167, 255, 0.18);
}

.btn--primary:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 2px;
}

.btn--ghost {
  border: 1px solid rgba(185, 167, 255, .6);
  color: var(--text);
  background: transparent;
}

.btn--ghost:hover {
  background: rgba(185, 167, 255, 0.08);
}

.motion-toggle {
  position: absolute;
  right: 10px;
  top: 10px;
  background: #11131e;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.motion-toggle:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 2px;
}

.content {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 14vh 6vw;
}

.content--center {
  padding: 18vh 6vw;
}

/* About + Community sections */
.sc-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 56px;
}

@media (max-width: 640px) {
  .sc-wrap {
    padding: 16px 12px 40px;
  }
}

@media (max-width: 480px) {
  .sc-wrap {
    padding: 12px 8px 32px;
  }
}

.sc-about,
.sc-community {
  background: linear-gradient(180deg, rgba(11, 15, 28, 0.72), rgba(11, 15, 28, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  padding: 28px 22px;
  color: var(--text);
}

@media (max-width: 640px) {

  .sc-about,
  .sc-community {
    padding: 20px 16px;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {

  .sc-about,
  .sc-community {
    padding: 16px 12px;
    border-radius: 10px;
  }
}

.sc-community {
  margin-top: 22px;
  padding: 18px 18px 28px;
}

.sc-about h2,
.sc-community h2 {
  margin: 0 0 10px;
  text-align: center;
  font-size: clamp(1.4rem, 3.6vw, 2rem);
  font-weight: 800;
  letter-spacing: .2px;
}

.sc-about p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.about-grid {
  display: grid;
  gap: 22px;
  align-items: start;
  margin-top: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 820px) {
  .about-grid {
    grid-template-columns: 1.2fr .8fr;
  }
}

.about-text {
  padding: 6px 4px;
}

.about-images {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 14px;
}

.hero-cat {
  width: 300px;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.secondary-cat {
  width: 200px;
  max-width: 90%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  justify-self: end;
}

@media (max-width: 819px) {
  .secondary-cat {
    justify-self: center;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
  align-items: stretch;
}

@media (max-width: 720px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .card-grid {
    gap: 10px;
  }
}

.comm-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 8px;
  padding: 18px 16px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

@media (max-width: 640px) {
  .comm-card {
    padding: 16px 14px;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .comm-card {
    padding: 14px 12px;
    border-radius: 10px;
    gap: 6px;
  }
}

.comm-card:hover,
.comm-card:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.comm-card:active {
  transform: translateY(0) scale(0.98);
  background: rgba(255, 255, 255, 0.08);
}

@media (hover: none) and (pointer: coarse) {
  .comm-card:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

.comm-card--left {
  justify-self: start;
}

.comm-card--right {
  justify-self: end;
}

.comm-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

@media (max-width: 640px) {
  .comm-icon {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  .comm-icon {
    width: 48px;
    height: 48px;
  }
}

.comm-card--x .comm-icon,
.comm-card--xc .comm-icon {
  filter: brightness(0) saturate(100%) invert(1);
}

.comm-label {
  font-weight: 800;
  letter-spacing: .2px;
}

.popup {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 8px);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 2;
}

.pop-img {
  display: block;
  height: 150px;
  width: auto;
  border-radius: 0;
  mix-blend-mode: normal;
  filter: none;
  background: transparent;
}

.comm-card:hover .popup,
.comm-card:focus-visible .popup,
.comm-card[data-show="true"] .popup {
  opacity: 1;
  transform: translate(-50%, -6px);
}

/* Storytelling About variant */
.sc-contract {
  margin-top: 18px;
  padding: 18px;
}

.contract-box {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-items: center;
  justify-items: start;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background .2s ease, transform .2s ease;
}

@media (max-width: 640px) {
  .contract-box {
    padding: 14px 16px;
    border-radius: 12px;
    gap: 8px 12px;
  }
}

@media (max-width: 480px) {
  .contract-box {
    padding: 12px 14px;
    border-radius: 10px;
    gap: 6px 10px;
  }
}

.contract-box:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.contract-box:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.08);
}

@media (hover: none) and (pointer: coarse) {
  .contract-box:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.03);
  }
}

.contract-label {
  font-weight: 800;
  letter-spacing: .2px;
  opacity: .9;
}

.contract-address {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95rem;
  opacity: .95;
  grid-column: 1 / -1;
  word-break: break-all;
}

@media (max-width: 640px) {
  .contract-address {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .contract-address {
    font-size: 0.75rem;
  }
}

.copy-toast {
  grid-column: 1 / -1;
  font-size: .9rem;
  color: var(--muted);
  min-height: 1.2em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sc-about--story {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.sc-about--story .story {
  height: 100vh;
  position: relative;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  overscroll-behavior: contain;
  padding-top: 72px;
  -webkit-overflow-scrolling: touch;
}

.sc-about--story .story::-webkit-scrollbar {
  display: none;
}

.story-step {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 0 4vw;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  will-change: opacity, transform;
}

.story-step.is-current {
  opacity: 1;
  transform: none;
  z-index: 1;
}

.story-step.is-visible {
  opacity: 1;
  transform: none;
}

.story-heading {
  margin: 0;
  font-size: clamp(1.8rem, 7vw, 6.6rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .1px;
  text-align: center;
  white-space: normal;
  max-width: 92vw;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

@media (max-width: 640px) {
  .story-heading {
    font-size: clamp(1.5rem, 6vw, 3.5rem);
    line-height: 1.15;
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .story-heading {
    font-size: clamp(1.3rem, 5.5vw, 2.8rem);
    line-height: 1.2;
    padding: 0 0.5rem;
  }
}

.story-step--image {
  align-items: center;
}

.story-step--pair {
  display: grid;
  grid-template-columns: 1.2fr min(42vw, 560px);
  gap: 28px;
  align-items: center;
  padding: 0 6vw;
}

.story-step--pair .story-heading {
  text-align: left;
  justify-self: start;
  max-width: 56vw;
  margin-left: 3vw;
}

@media (max-width: 900px) {
  .story-step--pair {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 4vw;
  }

  .story-step--pair .story-heading {
    text-align: center;
    max-width: 90vw;
    margin-left: 0;
  }

  .story-step--pair .story-image {
    width: min(70vw, 420px);
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .story-step--pair {
    gap: 16px;
    padding: 0 2vw;
  }

  .story-step--pair .story-image {
    width: min(80vw, 350px);
  }
}

@media (max-width: 480px) {
  .story-step--pair {
    gap: 12px;
    padding: 0 1vw;
  }

  .story-step--pair .story-image {
    width: min(85vw, 300px);
  }
}

.story-image {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 220px);
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  transform: scale(.97);
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  justify-self: end;
  object-fit: contain;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Enlarge mogcat.png step specifically (data-idx="3") */
.story-step--pair[data-idx="3"] {
  grid-template-columns: 1fr min(48vw, 680px);
}

@media (max-width: 900px) {
  .story-step--pair[data-idx="3"] .story-image {
    width: min(80vw, 520px);
  }
}

.story-step--image.is-visible .story-image,
.story-step--pair.is-current .story-image {
  transform: scale(1);
}

/* Per-line reveal for story headings */
.story-heading .word {
  display: inline-block;
}

.story-heading .line {
  display: block;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .7s ease, transform .7s ease;
}

.story-heading.is-revealed .line {
  opacity: 1;
  transform: none;
}

/* Text readability on dark panels */
.sc-about h2,
.sc-community h2,
.sc-about p {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}



.spine {
  background-size: contain;
  background-repeat: repeat-y;
  background-position: center top;
  opacity: 0.2;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 22px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
  border-left: 2px dashed rgba(255, 255, 255, 0.15);
  padding-left: 12px;
}

.timeline-item:nth-child(even) {
  border-left-style: solid;
}

.stamp {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 6px 16px rgba(185, 167, 255, 0.35));
}

.noise {
  background: radial-gradient(100% 120% at 50% 0%, rgba(185, 167, 255, 0.1), rgba(23, 26, 43, 0.95)),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.06"/></svg>');
  background-size: cover, 200px 200px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: var(--text);
  margin-right: 8px;
}

.badge:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sticker--weird {
  right: 4vw;
  bottom: 8vh;
  width: 140px;
  transform: rotate(6deg);
}

.seal {
  inset: auto;
  top: 20vh;
  height: 260px;
  width: 260px;
  margin: 0 auto;
  background: conic-gradient(from 180deg at 50% 50%, rgba(98, 255, 226, 0.4), rgba(185, 167, 255, 0.4), rgba(255, 215, 107, 0.35), rgba(98, 255, 226, 0.4));
  border-radius: 50%;
  box-shadow: inset 0 0 60px rgba(185, 167, 255, 0.25), 0 20px 60px rgba(0, 0, 0, 0.45);
  opacity: 0.75;
}

.disclaimer {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 12px;
}

/* small brand icon next to Dexscreener heading */
.brand-icon {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  margin-right: 8px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.site-footer,
.site-footer--links,
.footer-links,
.footer-link,
.footer-icon {
  display: none;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: transform .7s ease, opacity .7s ease;
}

.is-revealed {
  opacity: 1;
  transform: none;
}

/* Contract Address in Hero */
.contract-address-hero {
  margin-top: 0.75rem;
  text-align: center;
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
  padding: 0 1rem;
}

.contract-address-hero .contract-label {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.contract-address-hero .contract-address-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: clamp(0.7rem, 2.2vw, 1rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.1px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  word-break: break-all;
  line-height: 1.3;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.contract-address-hero .contract-address-text:hover {
  background: rgba(255, 255, 255, 0.08);
}

.contract-address-hero .contract-address-text:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.12);
}

.copy-toast-hero {
  display: block;
  font-size: 0.8rem;
  color: var(--aqua);
  margin-top: 4px;
  min-height: 1em;
  font-weight: 600;
}

@media (max-width: 480px) {
  .contract-address-hero {
    margin-top: 0.5rem;
    padding: 0 0.5rem;
  }

  .contract-address-hero .contract-address-text {
    font-size: 0.68rem;
    padding: 5px 8px;
  }
}

@media (max-width: 480px) {
  .cta h3 {
    font-size: 1.25rem;
  }

  .generate-pfp {
    padding: 12px 24px;
    font-size: 1.1rem;
  }
}

/* Reduced motion overrides */
html[data-reduce-motion="true"] .reveal {
  transition: none;
  opacity: 1;
  transform: none;
}

/* Parallax transform is managed by JS. Disable when motion is off */
html[data-reduce-motion="true"] [data-depth] {
  transform: none !important;
}

/* Performance optimizations */
.hero-image,
.story-image,
.comm-icon {
  contain: layout;
  content-visibility: auto;
}

/* Prevent repaints during animations */
.story-step.is-current,
.story-step.is-visible {
  contain: layout style paint;
}

/* Optimize scroll containers */
.sc-about--story .story {
  contain: strict;
}

/* Mobile-first optimizations */
@media (max-width: 768px) {

  /* Improve scroll performance on mobile */
  .section {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
  }

  /* Better touch targets */
  .header-link,
  .comm-card,
  .contract-box,
  .contract-address-text {
    min-height: 44px;
    min-width: 44px;
  }

  /* Prevent zoom on input focus */
  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  /* Optimize animations for mobile */
  .story-step,
  .story-image,
  .hero-image,
  .comm-card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  /* Better mobile scrolling */
  html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* Reduce motion blur on mobile */
  .story-image,
  .hero-image,
  .comm-icon {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
  }
  
  /* Disable scroll snap on mobile for smoother scrolling */
  .sc-about--story .story {
    scroll-snap-type: none;
  }
  
  .story-step {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }
}

/* Small mobile screens */
@media (max-width: 480px) {

  /* Optimize spacing for small screens */
  .site-header {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  /* Improve story section for mobile */
  .sc-about--story .story {
    padding-top: 60px;
    scroll-behavior: auto; /* Disable smooth scroll on small screens for better performance */
  }

  .story-step {
    padding: 0 1rem;
    min-height: calc(100vh - 60px);
  }

  /* Better popup positioning on mobile */
  .popup {
    position: fixed;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 9999;
    background: rgba(11, 15, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 90vw;
    max-height: 90vh;
  }

  .comm-card:hover .popup,
  .comm-card:focus-visible .popup,
  .comm-card[data-show="true"] .popup {
    opacity: 1;
    transform: translate(-50%, -50%) !important;
  }
  
  /* Prevent layout shifts */
  .hero-image,
  .story-image {
    contain: layout style paint;
  }
}

/* Ultra-small screens */
@media (max-width: 360px) {
  .sc-wrap {
    padding: 8px 4px 24px;
  }

  .sc-about,
  .sc-community {
    padding: 12px 8px;
  }

  .comm-card {
    padding: 10px 8px;
  }

  .contract-box {
    padding: 10px 12px;
  }

  .story-heading {
    font-size: clamp(1.1rem, 5vw, 2.2rem);
    padding: 0 0.25rem;
  }

  .hero-image {
    margin-top: 100px;
  }

  .contract-address-hero {
    padding: 0 0.25rem;
  }
}

@media (max-width: 880px) {
  .logo {
    top: 10vh;
  }

  .title {
    top: 40vh;
  }

  .subtitle {
    top: calc(40vh + 64px);
  }

  .actions {
    top: calc(40vh + 132px);
  }

  .figure {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 0 auto;
    display: block;
  }
}

/* Center CTA block and tighten spacing */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cta h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

@keyframes generate-pfp-animation {
  0%, 100% {
    background: #40c8d8;
    transform: scale(1);
  }
  50% {
    background: #6de9f7;
    transform: scale(1.05);
  }
}

.generate-pfp {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  background: #40c8d8;
  color: var(--bg-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0;
  position: relative;
  transition: all 0.15s ease-in-out;
  animation: generate-pfp-animation 2s ease-in-out infinite;
}

.generate-pfp:hover {
  transform: translateY(-3px) scale(1.05);
}
