/* ============================================
   TOKENS
   ============================================ */
:root {
  --bg: #161a17;
  --bg-raised: #1e2320;
  --tag-cream: #f3eee0;
  --ink: #201d16;
  --ink-soft: #504a3c;
  --denim: #3b5ba5;
  --denim-deep: #29406f;
  --stamp-red: #a63333;
  --line: rgba(243, 238, 224, 0.14);

  --font-display: "Anton", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --wrap: 1080px;
}

* { box-sizing: border-box; }

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 {
  margin: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(243, 238, 224, 0.05) 1px, transparent 0) 0 0/22px 22px,
    var(--bg);
  color: var(--tag-cream);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 2px solid var(--denim);
  outline-offset: 3px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(22, 26, 23, 0.86);
  backdrop-filter: blur(8px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  width: 18px;
  height: 18px;
  color: var(--denim);
  animation: swingIcon 3.2s ease-in-out infinite;
  transform-origin: 50% 10%;
}

@keyframes swingIcon {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

.header-link {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.header-link:hover {
  border-color: var(--denim);
  background: rgba(59, 91, 165, 0.15);
  transform: translateY(-1px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--line);
}

.hero-row { position: relative; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 96px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 0 0 22px;
  max-width: 16ch;
}

.line-wrap {
  display: block;
  overflow: hidden;
}

.line {
  display: block;
  transform: translateY(110%);
  animation: lineUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.line-wrap:nth-child(1) .line { animation-delay: 0.1s; }
.line-wrap:nth-child(2) .line { animation-delay: 0.28s; }

@keyframes lineUp {
  to { transform: translateY(0); }
}

.hero-sub {
  font-size: 17px;
  color: rgba(243, 238, 224, 0.72);
  max-width: 46ch;
  margin: 0;
  opacity: 0;
}

.reveal-fade {
  animation: fadeUp 0.7s ease 0.55s forwards;
}

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

.stamp {
  position: absolute;
  top: -6px;
  right: 0;
  width: 92px;
  height: 92px;
  border: 3px solid var(--stamp-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stamp-red);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-align: center;
  line-height: 1.3;
  opacity: 0;
  transform: scale(2.2) rotate(11deg);
  animation: stampDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.75s forwards;
}

@keyframes stampDown {
  0% { opacity: 0; transform: scale(2.4) rotate(11deg); }
  60% { opacity: 1; transform: scale(0.92) rotate(11deg); }
  100% { opacity: 0.9; transform: scale(1) rotate(11deg); }
}

@media (max-width: 640px) {
  .stamp { position: static; margin-bottom: 18px; }
}

/* ============================================
   MARQUEE
   ============================================ */
.marquee {
  background: var(--denim);
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--denim-deep);
}

.marquee-track {
  display: inline-flex;
  animation: marqueeScroll 22s linear infinite;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--tag-cream);
  padding: 10px 0;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   SECTION LABELS + ROPE DIVIDER
   ============================================ */
.rail-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: rgba(243, 238, 224, 0.55);
  margin: 56px 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.rail-label span {
  color: var(--denim);
  font-weight: 600;
}

.rope {
  display: block;
  width: 100%;
  height: 28px;
  color: rgba(243, 238, 224, 0.3);
  margin-bottom: 4px;
}

.rope-path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: ropeDraw 1.4s ease forwards 0.2s;
}

@keyframes ropeDraw {
  to { stroke-dashoffset: 0; }
}

/* ============================================
   TAG GRID
   ============================================ */
.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 44px 28px;
  padding: 12px 0 8px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tag-card.reveal {
  transform: rotate(var(--tilt, -2deg)) translateY(20px);
}

.tag-card.reveal.is-visible {
  transform: rotate(var(--tilt, -2deg));
}

.tag-card {
  position: relative;
  background: var(--tag-cream);
  color: var(--ink);
  border-radius: 4px 14px 4px 14px;
  padding: 18px 18px 20px;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28);
  animation: sway 4.5s ease-in-out infinite;
  animation-delay: var(--sway-delay, 0s);
  transform-origin: 24px -6px;
}

@keyframes sway {
  0%, 100% { transform: rotate(calc(var(--tilt, -2deg) - 1.5deg)); }
  50% { transform: rotate(calc(var(--tilt, -2deg) + 1.5deg)); }
}

.tag-card:hover {
  animation-play-state: paused;
  transform: rotate(0deg) translateY(-6px) scale(1.015);
  box-shadow: 0 22px 34px rgba(0, 0, 0, 0.36);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tag-pin {
  position: absolute;
  top: -25px;
  left: 16px;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.35));
}

.tag-photo {
  position: relative;
  aspect-ratio: 5 / 6;
  overflow: hidden;
  border-radius: 2px 10px 2px 10px;
  margin-bottom: 14px;
  margin-top: 8px;
  background: var(--bg-raised);
}

.tag-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tag-card:hover .tag-photo img {
  transform: scale(1.06);
}

.sold-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  border: 3px solid var(--stamp-red);
  color: var(--stamp-red);
  background: rgba(243, 238, 224, 0.88);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.12em;
  padding: 4px 14px;
  border-radius: 4px;
}

.is-sold .tag-photo img { filter: grayscale(0.6) brightness(0.85); }

.tag-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 6px;
}

.tag-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.tag-dot { margin: 0 5px; }

.tag-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dashed rgba(32, 29, 22, 0.25);
  padding-top: 12px;
  flex-wrap: wrap;
}

.tag-price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
}

.tag-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--tag-cream);
  background: var(--denim);
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tag-btn:hover { background: var(--denim-deep); transform: translateY(-1px); }

.tag-btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(32, 29, 22, 0.25);
}

.tag-btn--ghost:hover {
  background: rgba(32, 29, 22, 0.06);
}

.tag-btn--disabled {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid rgba(32, 29, 22, 0.3);
  cursor: not-allowed;
}

/* ============================================
   ORDER INFO
   ============================================ */
.order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 20px;
  background: var(--bg-raised);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.order-card:hover {
  border-color: rgba(59, 91, 165, 0.5);
  transform: translateY(-3px);
}

.order-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--denim);
  color: var(--tag-cream);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 14px;
}

.order-card h3 {
  font-family: var(--font-body);
  font-size: 16px;
  margin: 0 0 8px;
}

.order-card p {
  margin: 0;
  font-size: 14px;
  color: rgba(243, 238, 224, 0.7);
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--tag-cream);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
  max-width: 90vw;
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  margin-top: 64px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(243, 238, 224, 0.5);
}

/* ============================================
   DISCLAIMER MODAL
   ============================================ */
.disclaimer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 24px;
}

.disclaimer-box {
  background: var(--tag-cream);
  color: var(--ink);
  width: 100%;
  max-width: 640px;
  padding: 32px;
  border-radius: 16px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.disclaimer-box h2,
.disclaimer-box h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.disclaimer-box p {
  margin: 0 0 14px 0;
  color: var(--ink-soft);
}

.disclaimer-box p:last-of-type {
  margin-bottom: 24px;
}

.disclaimer-box button {
  display: block;
  margin: 0 auto;
  background: var(--denim);
  color: var(--tag-cream);
  border: none;
  padding: 11px 28px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.disclaimer-box button:hover {
  background: var(--denim-deep);
  transform: translateY(-1px);
}
