/* $BYCOCKET — shared design system
   Tokens: bg #DEFE00 (mandated acid chartreuse), ink #101409,
   forest #1F4D2C (from hat felt), leather #9C5F2E (from hat band),
   cream #FFF9E8 (ticket panel), deep #A6BE00 (shadow/border tint) */

:root {
  --bg: #DEFE00;
  --bg-deep: #A6BE00;
  --ink: #101409;
  --forest: #1F4D2C;
  --forest-dark: #0F2C19;
  --leather: #9C5F2E;
  --cream: #FFF9E8;
  --shadow-tint: 16, 20, 9;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  margin: 0;
  position: relative;
  overflow-x: hidden;
}

/* ambient watermark: the hat emblem itself, tiled as a solid-color silhouette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
  background-color: var(--forest);
  -webkit-mask-image: url("logobycocket.png");
  -webkit-mask-repeat: repeat;
  -webkit-mask-size: 130px 130px;
  mask-image: url("logobycocket.png");
  mask-repeat: repeat;
  mask-size: 130px 130px;
}

/* grain texture for depth on the flat acid field */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.wrap main {
  flex: 1 0 auto;
}

::selection {
  background: var(--forest);
  color: var(--cream);
}

/* focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
  border-radius: 4px;
}

.font-cursive {
  font-family: 'Rouge Script', cursive;
}

.font-mono {
  font-family: 'Space Mono', monospace;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 12px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.nav-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(var(--shadow-tint), 0.25));
}

.nav-brand span {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  transition: transform 180ms cubic-bezier(.34,1.56,.64,1), background-color 180ms ease, color 180ms ease;
}

.nav-pill:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-2px);
}

.nav-pill:active { transform: translateY(0); }

.nav-pill.solid {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
}
.nav-pill.solid:hover {
  background: var(--forest-dark);
  border-color: var(--forest-dark);
  color: var(--cream);
}

/* ---------- Buttons (shared) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 30px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.34,1.56,.64,1), box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
  will-change: transform;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 5px 5px 0 rgba(var(--shadow-tint), 0.9);
}
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(var(--shadow-tint), 0.9);
}
.btn-primary:active {
  transform: translate(0, 0);
  box-shadow: 3px 3px 0 rgba(var(--shadow-tint), 0.9);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  transform: translate(-2px, -2px);
  background: rgba(16, 20, 9, 0.06);
}
.btn-ghost:active { transform: translate(0, 0); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 12px;
  font-weight: 700;
  color: var(--forest-dark);
  background: rgba(16, 20, 9, 0.08);
  padding: 8px 16px;
  border-radius: 999px;
  margin: 0 0 28px;
  opacity: 0;
  animation: rise 700ms cubic-bezier(.16,1,.3,1) 60ms forwards;
}

.hero-logo {
  width: min(300px, 62vw);
  filter: drop-shadow(10px 14px 0 rgba(var(--shadow-tint), 0.85));
  margin-bottom: 20px;
  opacity: 0;
  animation: rise 800ms cubic-bezier(.16,1,.3,1) 160ms forwards;
}

.ticker {
  font-weight: 700;
  font-size: clamp(28px, 6vw, 44px);
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  padding: 6px 22px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  transform: rotate(-1.5deg);
  opacity: 0;
  animation: rise 800ms cubic-bezier(.16,1,.3,1) 260ms forwards;
}

.tagline {
  font-family: 'Rouge Script', cursive;
  font-weight: 400;
  font-size: clamp(40px, 9vw, 68px);
  line-height: 1.1;
  margin: 6px 0 8px;
  color: var(--forest-dark);
  opacity: 0;
  animation: rise 800ms cubic-bezier(.16,1,.3,1) 360ms forwards;
}

.tagline-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.robin-mark {
  height: 0.72em;
  width: auto;
  transform: translateY(0.02em);
}

.subline {
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.6;
  max-width: 46ch;
  color: var(--ink);
  opacity: 0;
  margin: 4px 0 34px;
  animation: rise 800ms cubic-bezier(.16,1,.3,1) 440ms forwards;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  opacity: 0;
  animation: rise 800ms cubic-bezier(.16,1,.3,1) 520ms forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Contract Address ticket ---------- */
.ca-section {
  max-width: 780px;
  margin: 40px auto 0;
  padding: 0 24px;
}

.ticket {
  position: relative;
  background: var(--forest);
  border-radius: 26px;
  padding: 34px 40px;
  box-shadow: 10px 10px 0 rgba(var(--shadow-tint), 0.9), 0 30px 60px -20px rgba(15, 44, 25, 0.55);
}

.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  background: var(--bg);
  border-radius: 50%;
  transform: translateY(-50%);
}
.ticket::before { left: -17px; }
.ticket::after { right: -17px; }

.ca-label {
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 700;
  color: var(--cream);
  opacity: 0.75;
  margin: 0 0 14px;
  text-align: center;
}

.ca-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--cream);
  border-radius: 14px;
  padding: 16px 18px;
  border: 2px dashed rgba(16, 20, 9, 0.25);
}

.ca-value {
  font-family: 'Space Mono', monospace;
  font-size: clamp(13px, 3vw, 17px);
  color: var(--ink);
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--cream);
  background: var(--ink);
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.34,1.56,.64,1), background-color 220ms ease;
}
.copy-btn:hover { transform: translateY(-2px); }
.copy-btn:active { transform: translateY(0); }
.copy-btn.copied {
  background: var(--leather);
}

/* ---------- Socials ---------- */
.socials {
  max-width: 780px;
  margin: 56px auto 0;
  padding: 0 24px;
  text-align: center;
}

.socials-label {
  font-family: 'Rouge Script', cursive;
  font-size: clamp(28px, 5vw, 38px);
  color: var(--forest-dark);
  margin: 0 0 18px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 13px 26px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 180ms cubic-bezier(.34,1.56,.64,1), box-shadow 180ms ease;
  box-shadow: 4px 4px 0 rgba(var(--shadow-tint), 0.8);
}
.social-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(var(--shadow-tint), 0.8);
}
.social-link:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 rgba(var(--shadow-tint), 0.8);
}

/* ---------- Disclaimer / Footer ---------- */
.disclaimer {
  margin-top: 72px;
  background: var(--ink);
  color: rgba(222, 254, 0, 0.55);
  padding: 30px 24px 34px;
}

.disclaimer-inner {
  max-width: 780px;
  margin: 0 auto;
}

.disclaimer p {
  font-size: 12px;
  line-height: 1.7;
  margin: 0 0 10px;
}

.disclaimer .foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(222, 254, 0, 0.18);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(222, 254, 0, 0.4);
}

/* ---------- PFP generator page ---------- */
.pfp-hero {
  max-width: 680px;
  margin: 0 auto;
  padding: 30px 24px 8px;
  text-align: center;
}

.pfp-hero h1 {
  font-family: 'Rouge Script', cursive;
  font-weight: 400;
  font-size: clamp(38px, 7vw, 56px);
  color: var(--forest-dark);
  margin: 10px 0 12px;
}

.pfp-hero p {
  font-size: 16px;
  line-height: 1.6;
  max-width: 44ch;
  margin: 0 auto;
}

.pfp-tool {
  max-width: 560px;
  margin: 30px auto 0;
  padding: 0 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.upload-zone {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 380px;
  background: var(--cream);
  border: 3px dashed rgba(16, 20, 9, 0.35);
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background-color 180ms ease;
  box-shadow: 8px 8px 0 rgba(var(--shadow-tint), 0.85);
  position: relative;
  overflow: hidden;
}

.upload-zone:hover {
  border-color: var(--forest);
}

.upload-zone.drag-over {
  border-color: var(--forest);
  background: #FFFDF6;
  transform: scale(1.01);
}

.upload-empty {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.upload-empty img {
  width: 68px;
  opacity: 0.85;
  margin-bottom: 6px;
}

.upload-empty p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.browse-link {
  color: var(--forest-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.upload-empty .hint {
  font-size: 12px;
  font-weight: 400;
  color: rgba(16, 20, 9, 0.55);
  font-family: 'Space Mono', monospace;
}

.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.status {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  text-align: center;
  color: var(--forest-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.status.is-error {
  color: #A2312A;
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(16, 20, 9, 0.25);
  border-top-color: var(--forest-dark);
  animation: spin 800ms linear infinite;
}

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

.result-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: rise 600ms cubic-bezier(.16,1,.3,1) forwards;
}

.result-label {
  font-family: 'Rouge Script', cursive;
  font-size: 30px;
  color: var(--forest-dark);
  margin: 0;
}

.result-img {
  width: 100%;
  max-width: 380px;
  border-radius: 22px;
  box-shadow: 10px 10px 0 rgba(var(--shadow-tint), 0.9);
}

@media (max-width: 640px) {
  /* bigger, full-width, more thumb-friendly buttons */
  .btn {
    padding: 20px 30px;
    font-size: 18px;
    width: 100%;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .social-link {
    padding: 16px 26px;
    font-size: 16px;
  }

  .copy-btn {
    padding: 15px 20px;
    font-size: 15px;
  }

  /* bigger, more prominent PFP upload zone */
  .pfp-tool {
    gap: 26px;
  }

  .upload-zone {
    max-width: 460px;
    padding: 28px;
    border-width: 4px;
  }

  .upload-empty {
    gap: 14px;
  }

  .upload-empty img {
    width: 96px;
  }

  .upload-empty p {
    font-size: 18px;
  }

  .upload-empty .hint {
    font-size: 13px;
  }

  #generate-btn {
    max-width: 460px;
  }

  .result-img {
    max-width: 460px;
  }
}

@media (max-width: 480px) {
  .nav { padding-top: 20px; }
  .nav-links { gap: 6px; }
  .nav-pill { padding: 11px 16px; font-size: 14px; }
  .ticket { padding: 28px 22px; }
  .ticket::before, .ticket::after { display: none; }
  .ca-row { flex-wrap: wrap; }
  .ca-value { flex-basis: 100%; white-space: normal; word-break: break-all; overflow-x: visible; }
  .copy-btn { flex: 1; justify-content: center; }
}
