:root {
  --bg: #05060a;
  --navy: #0b0f19;
  --fg: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.62);
  --line: rgba(244, 241, 234, 0.16);
  --salmon: #e0766c;
  --blue: #5f8fd6;
  --pad: clamp(16px, 2.6vw, 40px);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", system-ui, sans-serif;
  --v: 0; /* tốc độ cuộn, main.js cập nhật để tạo vệt nhòe */
}

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

html { background: var(--bg); }

body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
canvas, svg { display: block; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Chữ dùng chung ---------- */
.title {
  font-family: var(--serif);
  font-size: clamp(44px, 6.4vw, 104px);
  font-style: italic;
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-shadow:
    0 calc(var(--v) * 1px) 0 rgba(95, 143, 214, 0.65),
    0 calc(var(--v) * -1px) 0 rgba(244, 241, 234, 0.3);
}

/* Tiêu đề chớp sang nét graffiti một nhịp khi vừa vào màn hình */
.title.graffiti {
  font-family: "Rock Salt", var(--serif);
  font-size: clamp(30px, 4.2vw, 68px);
  font-style: normal;
  letter-spacing: -0.04em;
}

.small {
  color: var(--fg);
  font-size: clamp(11px, 0.85vw, 14px);
  font-weight: 600;
  line-height: 1.4;
}

.oval {
  display: inline-block;
  padding: 0.75em 2.4em;
  border: 1px solid var(--fg);
  border-radius: 50%;
  background: none;
  color: var(--fg);
  font: 600 clamp(10px, 0.75vw, 12px) var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.oval:focus-visible,
.top a:focus-visible,
.menu a:focus-visible,
.home-link:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* ---------- Khung cố định ---------- */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  padding: var(--pad);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  mix-blend-mode: difference;
}

.top > :last-child { justify-self: end; }

.logo {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.logo strong {
  font: italic 400 30px/1 var(--serif);
}

.home-link {
  position: fixed;
  left: var(--pad);
  bottom: var(--pad);
  z-index: 20;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 12px;
  font-weight: 600;
}

.menu-btn {
  position: fixed;
  left: 50%;
  bottom: var(--pad);
  z-index: 31;
  display: grid;
  gap: 4px;
  width: 44px;
  height: 44px;
  place-content: center;
  border: 0;
  background: none;
  transform: translateX(-50%);
  cursor: pointer;
  mix-blend-mode: difference;
}

.menu-btn span {
  width: 22px;
  height: 2px;
  background: #fff;
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  background: rgba(5, 6, 10, 0.94);
}

.menu[hidden] { display: none; }

.menu a {
  font: italic 400 clamp(36px, 6vw, 72px)/1.1 var(--serif);
  text-transform: uppercase;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: none;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 1px solid #fff;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 800;
  pointer-events: none;
  mix-blend-mode: difference;
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease;
}

.cursor.is-big {
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
}

@media (hover: hover) and (pointer: fine) {
  .cursor { display: grid; }
  .oval:hover { background: var(--fg); color: var(--bg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(180deg, #05060a 8%, #1a1016 38%, #6e3a44 72%, var(--salmon) 100%);
}

.hero-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-lines path,
.hero-lines circle {
  fill: none;
  stroke: rgba(244, 241, 234, 0.14);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.hero-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 0 var(--pad);
  text-align: center;
}

.hero-title { text-shadow: 0 2px 24px rgba(40, 14, 16, 0.55); }

.hero-copy .small {
  font-size: clamp(10px, 0.8vw, 13px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Tranh ---------- */
.art {
  position: relative;
  overflow: hidden;
  background: #171318;
}

.art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art.round {
  aspect-ratio: 1;
  border-radius: 50%;
}

.art .subject {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  width: var(--s);
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5));
}

.plinth {
  position: absolute;
  left: 38%;
  right: 6%;
  top: 70%;
  bottom: 0;
  background: linear-gradient(90deg, #6d4a2c, #c49a68 45%, #4b3220);
}

/* ---------- Dải ảnh ngang ---------- */
.gallery {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: var(--bg);
}

.gallery-line {
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: var(--line);
}

.gallery-track {
  display: flex;
  width: max-content;
  height: 100%;
  will-change: transform;
}

.chapter {
  position: relative;
  flex: none;
  width: 125vw;
  height: 100%;
}

.chapter:last-child { width: 95vw; }

.chapter > * {
  position: absolute;
  left: var(--x);
  top: var(--y);
}

.chapter > .art {
  width: var(--w);
  height: var(--h);
  transform: skewX(calc(var(--v) * -0.12deg));
}

.chapter > .small { width: var(--w); }

.chapter > .title {
  z-index: 2;
  white-space: nowrap;
  text-shadow:
    calc(var(--v) * 1px) 0 0 rgba(95, 143, 214, 0.65),
    calc(var(--v) * -1px) 0 0 rgba(244, 241, 234, 0.3);
}

.float-cupid {
  z-index: 3;
  width: var(--w);
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
}

/* ---------- Mystery Box ---------- */
.mystery {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: linear-gradient(180deg, var(--blue) 0%, #1c2b48 28%, var(--bg) 52%);
}

.mystery-title {
  position: absolute;
  inset: 26% 0 auto;
  z-index: 1;
  text-align: center;
}

.mystery-title .o { color: #f3c9a8; }

/* Dải răng cưa: clip-path do main.js dựng, mở rộng dần thành tranh toàn màn hình */
.band {
  position: absolute;
  inset: 0;
  z-index: 2;
  will-change: clip-path;
}

.fresco {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #cfe0ee;
}

.fresco img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pillar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6%;
  background:
    repeating-linear-gradient(180deg, transparent 0 44px, rgba(60, 28, 10, 0.4) 44px 48px),
    linear-gradient(90deg, #6e3f18, #e8b878 30%, #fbe7c0 50%, #c98f4e 72%, #5c3212);
}

.pillar.left { left: 0; }
.pillar.right { right: 0; }

.band-cells {
  position: absolute;
  inset: 0;
  display: flex;
}

.band-cells i {
  flex: 1;
  background: var(--blue);
  transform-origin: 50% 50%;
}

.mystery-copy {
  position: absolute;
  left: 50%;
  top: 66%;
  z-index: 1;
  width: min(420px, calc(100% - 2 * var(--pad)));
  transform: translateX(-50%);
}

/* ---------- Find it at my price ---------- */
.price {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 100svh;
  padding: 12vh var(--pad);
  background: linear-gradient(90deg, var(--salmon) 0%, #b85c5d 32%, #2b1518 62%, var(--bg) 82%);
}

.price-cupid {
  justify-self: end;
  width: min(280px, 60%);
  height: auto;
  margin-right: 4vw;
  filter: drop-shadow(0 14px 24px rgba(60, 10, 10, 0.5));
}

.price-copy {
  display: grid;
  gap: 18px;
  max-width: 420px;
}

.price-input {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.price-input input {
  width: 100%;
  accent-color: var(--fg);
}

/* ---------- Top Sneakers ---------- */
.sneakers {
  padding: 16vh var(--pad) 8vh;
  background: var(--navy);
  text-align: center;
}

.sneaker-stage {
  display: grid;
  grid-template-columns: 1fr 2.4fr 1fr;
  align-items: end;
  gap: 24px;
  margin-top: 40px;
  text-align: left;
}

.sneaker-list {
  display: grid;
  gap: 4px;
  padding: 0;
  list-style: none;
}

.sneaker-list button {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 13px var(--sans);
  text-align: left;
  cursor: pointer;
}

.sneaker-list button[aria-pressed="true"] { color: var(--fg); }

.sneaker-card {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border-inline: 6px dotted rgba(244, 241, 234, 0.4);
  background: linear-gradient(180deg, var(--blue) 0%, #2a3f66 46%, var(--navy) 100%);
}

.sneaker-shoe {
  width: 78%;
  height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.5));
}

.sneaker-num {
  position: absolute;
  right: 3%;
  bottom: 3%;
  color: transparent;
  font: italic 400 clamp(44px, 6vw, 88px)/1 var(--serif);
  -webkit-text-stroke: 1px var(--muted);
}

/* ---------- Auctions ---------- */
.auctions {
  padding: 14vh var(--pad);
  background: var(--navy);
  text-align: center;
}

.auctions .title { text-align: left; margin-left: 10vw; }

.auction-wrap {
  position: relative;
  margin: 36px 0 44px;
}

.auction-arrow {
  position: absolute;
  left: 0;
  top: 30%;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--fg);
  font-size: 30px;
  cursor: pointer;
}

.auction-arrow.next { left: auto; right: 0; }

.auction-row {
  display: flex;
  gap: clamp(20px, 3vw, 48px);
  padding: 0 10vw 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  text-align: left;
}

.auction-row::-webkit-scrollbar { display: none; }

.lot {
  flex: 0 0 clamp(220px, 20vw, 300px);
  display: grid;
  align-content: start;
  gap: 10px;
}

.lot-art {
  width: 72%;
  height: auto;
  aspect-ratio: 200 / 220;
  margin: 0 auto;
  object-fit: contain;
}

.lot-glow {
  height: 6px;
  width: 60%;
  margin: 8px auto;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 18px 4px rgba(255, 255, 255, 0.6);
}

.lot-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.lot-name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.lot-time {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lot-bid { font-size: 11px; font-weight: 600; }
.lot-bid b { color: #ff5a4f; }

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

.pill {
  padding: 7px 14px;
  border: 0;
  border-radius: 99px;
  background: #1c2a44;
  color: var(--fg);
  font: 600 10px var(--sans);
  text-transform: uppercase;
  cursor: pointer;
}

.pill.solid { background: var(--fg); color: var(--bg); }

/* ---------- Latest ---------- */
.latest {
  padding: 12vh 10vw;
  background: var(--navy);
}

.latest .title { text-align: center; }

.latest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  margin-top: 36px;
}

.latest-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.latest-table th,
.latest-table td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line);
}

.latest-table th { font-weight: 800; text-transform: uppercase; }

.art.static { aspect-ratio: 16 / 10; }

/* ---------- Đăng ký và chân trang ---------- */
.signup {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 16vh var(--pad) 12vh;
  background: var(--navy);
  text-align: center;
}

.signup-title {
  font: 400 clamp(20px, 2vw, 28px) var(--serif);
  text-transform: uppercase;
}

.signup-form {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.signup-form input {
  width: min(280px, 80vw);
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--fg);
  font: 500 14px var(--sans);
  text-align: center;
}

.signup-note { min-height: 1.4em; }

.foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 24px;
  padding: 24px var(--pad) 96px;
  background: var(--navy);
  font-size: 11px;
  font-weight: 600;
}

.foot ul {
  display: grid;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.foot-social {
  display: flex !important;
  justify-content: end;
  gap: 16px !important;
}

.foot-mark {
  font: 400 clamp(14px, 1.4vw, 20px) var(--serif);
  text-transform: uppercase;
}

/* ---------- Màn hình nhỏ ---------- */
@media (max-width: 760px) {
  .chapter { width: 240vw; }
  .chapter:last-child { width: 170vw; }
  .chapter .subject { width: calc(var(--s) * 1.6); }
  .home-link span { display: none; }
  .price { grid-template-columns: 1fr; justify-items: center; background: linear-gradient(180deg, var(--salmon), #2b1518 62%, var(--bg)); }
  .price-cupid { justify-self: center; margin: 0; }
  .sneaker-stage { grid-template-columns: 1fr; }
  .sneaker-stage > .sneaker-card { order: -1; }
  .auctions .title { margin-left: 0; }
  .auction-row { padding-inline: 32px; }
  .latest { padding-inline: var(--pad); }
  .latest-grid { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
  .foot-social { justify-content: start; }
}

@media (prefers-reduced-motion: reduce) {
  .auction-row { scroll-behavior: auto; }
  .oval, .cursor { transition: none; }
}
