/* mybadge.id - Neomorphic personal badge reliquary */
:root {
  --warm-chalk: #E8E4DE;
  --kiln-shadow: #B8B2A8;
  --parchment-glow: #FEFCF8;
  --seal-vermillion: #C4533A;
  --soot: #2C2926;
  --graphite: #7A756D;
  --kiln-interior: #D9D4CC;
  --patina-teal: #5B8A7A;
  --neo-raised: 6px 6px 12px #B8B2A8, -6px -6px 12px #FEFCF8;
  --neo-inset: inset 6px 6px 12px #B8B2A8, inset -6px -6px 12px #FEFCF8;
  --neo-pressed: inset 3px 3px 6px #B8B2A8, inset -3px -3px 6px #FEFCF8;
}

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

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

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }

::selection {
  background: var(--seal-vermillion);
  color: var(--parchment-glow);
}

body {
  background: var(--warm-chalk);
  color: var(--soot);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 400;
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  line-height: 1.65;
}

/* Zones */
.zone { position: relative; }

/* Zone 1: The Seal */
.zone-seal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}

.seal-well {
  width: min(50vw, 400px);
  height: min(50vw, 400px);
  border-radius: 50%;
  box-shadow: var(--neo-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: sealReveal 1.2s ease-in-out 0.4s forwards;
}

@keyframes sealReveal {
  0% { opacity: 0; box-shadow: inset 0 0 0 var(--kiln-shadow), inset 0 0 0 var(--parchment-glow); }
  100% { opacity: 1; box-shadow: var(--neo-inset); }
}

.seal-svg {
  width: 80%;
  height: 80%;
  animation: slowRotate 720s linear infinite;
}
.seal-svg circle, .seal-svg text {
  stroke: var(--kiln-shadow);
  fill: none;
}
.seal-text {
  font-family: 'DM Serif Display', serif;
  fill: none;
  stroke: var(--kiln-shadow);
  stroke-width: 0.5;
}
.seal-ring text {
  fill: var(--kiln-shadow);
  stroke: none;
  font-family: 'Inconsolata', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
}

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

/* Debossed title */
.debossed-title {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 7rem);
  letter-spacing: 0.04em;
  color: var(--warm-chalk);
  text-shadow: 1px 1px 2px var(--kiln-shadow), -1px -1px 2px var(--parchment-glow);
  opacity: 0;
  animation: debossReveal 1.6s ease-in-out 1.2s forwards;
}
@keyframes debossReveal {
  0% { opacity: 0; text-shadow: 0 0 0 transparent, 0 0 0 transparent; }
  100% { opacity: 1; text-shadow: 1px 1px 2px var(--kiln-shadow), -1px -1px 2px var(--parchment-glow); }
}

/* Wax Drip */
.wax-drip {
  display: flex;
  justify-content: center;
  margin: -2rem 0 2rem;
  position: relative;
  z-index: 2;
}
.drip-svg {
  width: 120px;
  height: 60px;
  filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.2));
}

/* Zone 2: The Collection */
.zone-collection {
  min-height: 200vh;
  padding: max(4vw, 32px);
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Badge Wells */
.badge-well {
  border-radius: 24px;
  box-shadow: inset 0 0 0 transparent;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: translateY(20px);
  transition: box-shadow 0.8s ease-in-out, opacity 0.6s ease, transform 0.6s ease;
}
.badge-well.visible {
  box-shadow: var(--neo-inset);
  opacity: 1;
  transform: translateY(0);
}
.badge-well.warm { background: var(--warm-chalk); }
.badge-well.cool { background: color-mix(in srgb, var(--warm-chalk) 97%, var(--patina-teal)); }

/* Badge Disc */
.badge-disc {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--warm-chalk), var(--kiln-interior));
  box-shadow: var(--neo-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.85);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, filter 0.3s ease;
}
.badge-well.visible .badge-disc {
  transform: scale(1);
}
.badge-disc:hover {
  transform: scale(1.04);
  box-shadow: none;
  filter: drop-shadow(0 8px 24px rgba(44,41,38,0.15));
}

.badge-emblem {
  width: 60px;
  height: 60px;
}
.badge-emblem * {
  stroke: var(--kiln-shadow);
}

/* Serial strip */
.serial-strip {
  background: var(--warm-chalk);
  box-shadow: var(--neo-raised);
  border-radius: 8px;
  padding: 6px 16px;
  width: 100%;
  text-align: center;
}
.serial {
  font-family: 'Inconsolata', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--graphite);
}

.badge-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--soot);
  text-align: center;
}

/* Debossing lines */
.zone-collection::before {
  content: '';
  display: block;
  width: 80%;
  max-width: 600px;
  margin: 0 auto 3rem;
  border-bottom: 1px solid var(--kiln-shadow);
  border-top: 1px solid var(--parchment-glow);
  height: 0;
}

/* Zone 3: The Forge */
.zone-forge {
  min-height: 60vh;
  padding: max(4vw, 32px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.forge-well {
  width: 75%;
  max-width: 900px;
  border-radius: 24px;
  box-shadow: var(--neo-pressed);
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.forge-svg {
  width: 100%;
  max-width: 600px;
  height: auto;
}
.forge-path {
  stroke: var(--kiln-shadow);
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: forgeTrace 4s ease-in-out infinite;
}
.forge-path-2 { animation-delay: 1.5s; }
.forge-path-3 { animation-delay: 3s; stroke-dasharray: 300; stroke-dashoffset: 300; }

@keyframes forgeTrace {
  0% { stroke-dashoffset: 500; }
  40% { stroke-dashoffset: 0; }
  60% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -500; }
}

.forge-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  color: var(--graphite);
  text-align: center;
  max-width: 40ch;
}

/* Scroll indicator */
.scroll-indicator {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: var(--neo-raised);
  z-index: 100;
  transition: box-shadow 0.3s ease;
}

/* Fingerprint watermark */
.fingerprint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  max-width: 500px;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}
.fingerprint-svg {
  width: 100%;
  height: auto;
}
.fingerprint-svg ellipse {
  stroke: var(--soot);
  fill: none;
}

@media (max-width: 768px) {
  .zone-seal { min-height: 80vh; }
  .badge-grid { gap: 20px; }
  .forge-well { width: 90%; padding: 24px; }
}
