/* Homepage: tacky crypto scratch ticket only */

body.page-home {
  animation: none;
  background-position: 50% 50%;
  overflow-x: hidden;
}

.page-home .site-header .logo {
  animation: none;
}

.page-home .main-content {
  max-width: 1100px;
}

.scratch-hero-wrap {
  margin: 20px auto 48px;
}

.scratch-intro {
  text-align: center;
  margin-bottom: 22px;
}

.scratch-intro h2 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(1.35rem, 4vw, 2.4rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff48a;
  text-shadow:
    0 0 0 #1a0500,
    2px 2px 0 #c41212,
    4px 4px 0 #006b3c,
    6px 6px 0 #7b0099,
    8px 8px 18px rgba(0, 0, 0, 0.85);
  line-height: 1.15;
  margin-bottom: 10px;
}

.scratch-intro .scratch-sub {
  font-size: 1.05rem;
  color: #ffb8f3;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.scratch-intro .scratch-micro {
  margin-top: 12px;
  font-size: 0.82rem;
  color: #c9d4ff;
  font-style: italic;
  max-width: 42em;
  margin-left: auto;
  margin-right: auto;
}

/* —— The ticket: Taj-meets-failed-empire chrome —— */
.crypto-scratch-ticket {
  position: relative;
  z-index: 1;
  isolation: isolate;
  padding: clamp(14px, 2.5vw, 26px);
  border-radius: 6px;
  overflow: visible;
  background:
    linear-gradient(
      118deg,
      rgba(255, 255, 255, 0.65) 0%,
      rgba(255, 255, 255, 0) 38%,
      rgba(255, 255, 255, 0.5) 49%,
      rgba(255, 255, 255, 0) 62%,
      rgba(255, 248, 220, 0.25) 100%
    ),
    repeating-linear-gradient(
      135deg,
      rgba(212, 175, 55, 0.09) 0,
      rgba(212, 175, 55, 0.09) 2px,
      transparent 2px,
      transparent 9px
    ),
    radial-gradient(ellipse 95% 70% at 50% -15%, rgba(254, 243, 199, 0.65), transparent 58%),
    radial-gradient(ellipse 70% 45% at 100% 100%, rgba(20, 184, 166, 0.35), transparent 55%),
    radial-gradient(ellipse 55% 40% at 0% 85%, rgba(127, 29, 29, 0.45), transparent 50%),
    linear-gradient(
      165deg,
      #115e59 0%,
      #14b8a6 14%,
      #0f766e 28%,
      #78350f 48%,
      #b45309 62%,
      #ca8a04 76%,
      #fde047 88%,
      #fefce8 100%
    );
  box-shadow:
    0 0 0 2px #0c4a6e,
    0 0 0 5px #fecaca,
    0 0 0 8px #1e40af,
    0 0 0 11px #fef9c3,
    0 0 0 14px #b91c1c,
    0 0 0 17px #fcd34d,
    0 0 0 21px #14532d,
    0 0 0 25px #86efac,
    0 0 0 29px #7f1d1d,
    0 0 0 34px rgba(253, 224, 71, 0.95),
    0 0 0 38px #134e4a,
    0 0 28px 8px rgba(251, 191, 36, 0.55),
    0 22px 55px rgba(0, 0, 0, 0.72),
    inset 0 2px 3px rgba(255, 255, 255, 0.85),
    inset 0 -14px 36px rgba(120, 53, 15, 0.35);
  filter: saturate(1.12);
}

.crypto-scratch-ticket::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  background: repeating-linear-gradient(
    90deg,
    #bf1e2e 0px,
    #bf1e2e 12px,
    #ffffff 12px,
    #ffffff 24px,
    #1e3a5f 24px,
    #1e3a5f 36px,
    #ffffff 36px,
    #ffffff 48px
  );
}

.crypto-scratch-ticket::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
  box-shadow:
    inset 0 0 40px rgba(252, 211, 77, 0.35),
    inset 0 0 80px rgba(20, 184, 166, 0.12);
}

.ticket-inner {
  position: relative;
  z-index: 2;
  isolation: isolate;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.55) 0%, transparent 42%),
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 255, 255, 0.75), transparent 65%),
    linear-gradient(185deg, #fffefb 0%, #fef9c3 12%, #fff7ed 35%, #fafaf9 72%, #f5f5f4 100%);
  border: 5px solid #c2410c;
  border-radius: 8px;
  padding: clamp(12px, 2vw, 20px);
  box-shadow:
    inset 0 0 0 3px #fde047,
    inset 0 0 0 7px #57534e,
    inset 0 0 0 10px rgba(253, 224, 71, 0.55),
    inset 0 2px 24px rgba(254, 243, 199, 0.85),
    inset 0 -16px 40px rgba(180, 83, 9, 0.08),
    0 8px 28px rgba(0, 0, 0, 0.28);
}

.ticket-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 31px,
      rgba(212, 175, 55, 0.07) 31px,
      rgba(212, 175, 55, 0.07) 32px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(212, 175, 55, 0.07) 31px,
      rgba(212, 175, 55, 0.07) 32px
    );
  opacity: 0.9;
}

.ticket-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    108deg,
    transparent 38%,
    rgba(255, 255, 255, 0.55) 47%,
    rgba(255, 255, 255, 0.75) 50%,
    rgba(255, 255, 255, 0.45) 53%,
    transparent 62%
  );
  background-size: 180% 100%;
  animation: ticket-gleam 5s ease-in-out infinite;
  mix-blend-mode: soft-light;
}

.ticket-inner > * {
  position: relative;
  z-index: 1;
}

@keyframes ticket-gleam {
  0%,
  100% {
    background-position: 140% 0;
    opacity: 0.35;
  }
  45% {
    opacity: 0.85;
  }
  50% {
    background-position: -40% 0;
    opacity: 0.9;
  }
  55% {
    opacity: 0.55;
  }
}

.ticket-banner-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 4px solid #0a0a0a;
  box-shadow: 0 3px 0 -1px #fde047;
}

.ticket-logo-text {
  font-family: Impact, "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.35rem, 4vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: #fefce8;
  -webkit-text-stroke: 2px #15803d;
  text-shadow:
    3px 3px 0 #0a0a0a,
    -1px -1px 0 #0a0a0a,
    1px -1px 0 #0a0a0a,
    -1px 1px 0 #0a0a0a,
    0 0 14px rgba(234, 179, 8, 0.65);
}

.ticket-logo-text small {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 14px;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.42em;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fafafa;
  background: #171717;
  border: 2px solid #000;
  -webkit-text-fill-color: #fafafa;
  -webkit-text-stroke: 0;
  filter: none;
}

.ticket-slogan {
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  font-stretch: condensed;
  color: #0a0a0a;
  max-width: 280px;
  text-transform: uppercase;
  line-height: 1.35;
  letter-spacing: 0.03em;
}

.ticket-slogan em {
  display: block;
  font-style: normal;
  color: #b91c1c;
  font-size: 1.05em;
}

.ticket-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.btn-scratch-reveal {
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  border: 3px solid #000;
  border-radius: 4px;
  background: linear-gradient(180deg, #fef08a 0%, #eab308 40%, #ca8a04 100%);
  color: #171717;
  cursor: pointer;
  box-shadow:
    3px 3px 0 #14532d,
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-scratch-reveal:hover {
  transform: translate(-1px, -1px);
  box-shadow:
    4px 4px 0 #14532d,
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.btn-scratch-reveal:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #14532d;
}

.ticket-hint {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #14532d;
}

/* Grid */
.scratch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 2vw, 14px);
}

@media (max-width: 720px) {
  .scratch-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .scratch-grid {
    grid-template-columns: 1fr;
  }
}

.scratch-cell {
  position: relative;
  min-height: 200px;
  border: 3px solid #0a0a0a;
  border-radius: 4px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.35) 0%, transparent 45%),
    linear-gradient(165deg, #ecfccb 0%, #d9f99d 35%, #fef08a 70%, #fde047 100%);
  overflow: hidden;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.65),
    4px 4px 0 #14532d;
}

.scratch-cell-label {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  z-index: 1;
  font-family: ui-monospace, "Courier New", Courier, monospace;
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(10, 10, 10, 0.45);
  pointer-events: none;
  text-align: center;
}

.scratch-reveal {
  position: relative;
  z-index: 0;
  height: 100%;
  min-height: 200px;
  padding: 38px 11px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: center;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(0, 0, 0, 0.02) 3px,
      rgba(0, 0, 0, 0.02) 4px
    ),
    linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
}

.scratch-play-title {
  font-family: "Arial Narrow", "Helvetica Neue Condensed Bold", "Franklin Gothic Medium", Impact, Arial, sans-serif;
  font-size: clamp(0.78rem, 2.1vw, 0.98rem);
  font-weight: 900;
  font-stretch: condensed;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.scratch-microcode {
  font-family: ui-monospace, "Courier New", Courier, monospace;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #171717;
  text-transform: uppercase;
  margin: -2px 0 2px;
  line-height: 1.2;
}

.scratch-reveal p {
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  font-stretch: condensed;
  line-height: 1.38;
  color: #262626;
  margin: 0;
}

.scratch-reveal .scratch-avatar {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.scratch-reveal .scratch-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.scratch-reveal--nft {
  padding-top: 32px;
}

.scratch-nft-hitarea {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  width: 100%;
  max-width: 100%;
}

.scratch-nft-hitarea:hover .scratch-nft-cta {
  text-decoration: underline;
}

.scratch-nft-thumb {
  width: 100%;
  max-width: 200px;
  border-radius: 4px;
  overflow: hidden;
  border: 3px solid #0a0a0a;
  box-shadow:
    0 0 0 2px #fde047,
    0 6px 14px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.scratch-nft-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.scratch-nft-cta {
  font-family: ui-monospace, "Courier New", Courier, monospace;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #14532d;
  margin-top: 4px;
}

.scratch-film {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: grab;
  touch-action: none;
  border-radius: 3px;
}

.scratch-film:active {
  cursor: grabbing;
}

.scratch-cell.revealed .scratch-film {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.scratch-cell.revealed .scratch-cell-label {
  opacity: 0;
}

.scratch-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .ticket-inner::after {
    animation: none !important;
    opacity: 0.28;
    background-position: 60% 0;
  }
}
