/* ============================================================
   KT Resells — design system
   Clean, dark, premium streetwear look. No HUD/scanline gimmicks,
   no dashed rules — just tight type, soft motion, real contrast.
   Tailwind (CDN) handles layout utilities; everything bespoke
   (cards, buttons, the modal, the checker texture) lives here.
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #141414;
  --border: #242424;
  --border-soft: #1b1b1b;
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --text-dim: #6b6b6b;
  --accent: #ffffff;
  --danger: #ef4444;
  --danger-bg: #2a1414;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

/* Tailwind's CDN build compiles classes asynchronously after first paint, so
   anything that depends purely on its `.hidden` utility (every modal, empty
   state, and the admin login/dashboard toggle) would otherwise flash
   visible for a moment on every load. Defining it here, in a stylesheet the
   browser parses before paint, removes that flash entirely. */
.hidden { display: none; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  animation: page-fade-in 0.5s ease both;
}
@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}

::selection { background: #fff; color: #0a0a0a; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

.font-display {
  font-family: 'Anton', 'Inter', sans-serif;
  letter-spacing: 0.015em;
}

.text-gradient {
  background: linear-gradient(180deg, #ffffff 0%, #9b9b9b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- film grain (used as a cinematic texture accent) ---------- */
.bg-grain {
  position: relative;
}
.bg-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- header ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
#site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.92);
  border-bottom-color: var(--border);
}

.nav-link {
  position: relative;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  transition: color 0.2s ease;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: #fff;
  transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link.is-active { color: #fff; }
.nav-link:hover::after,
.nav-link.is-active::after { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.icon-btn:hover { color: #fff; border-color: #4a4a4a; transform: translateY(-1px); }

#mobile-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(84vw, 340px);
  background: #0c0c0c;
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}
#mobile-nav.is-open { transform: translateX(0); }
body.nav-open { overflow: hidden; }
.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

/* ---------- hero (cinematic) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 88svh;
  display: flex;
  align-items: center;
  background: #060606;
  border-bottom: 1px solid var(--border);
}

/* slow-drifting ambient light, the main source of "depth" in the hero */
.hero__aurora {
  position: absolute;
  inset: -15%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 22% 26%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(42% 42% at 80% 20%, rgba(140, 140, 165, 0.1), transparent 70%),
    radial-gradient(55% 55% at 50% 90%, rgba(255, 255, 255, 0.045), transparent 70%);
  filter: blur(30px);
  animation: aurora-drift 24s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(1.5%, -2.5%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 1.5%, 0) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__aurora { animation: none; }
}

/* mouse-follow spotlight; --spot-x/--spot-y set by main.js on pointer move */
.hero__spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(560px circle at var(--spot-x, 50%) var(--spot-y, 28%), rgba(255, 255, 255, 0.055), transparent 62%);
}
.hero:hover .hero__spotlight { opacity: 1; }
@media (hover: none) {
  .hero__spotlight { display: none; }
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(120% 85% at 50% 38%, transparent 45%, rgba(0, 0, 0, 0.7) 100%);
}

.hero__content {
  position: relative;
  z-index: 3;
  will-change: transform;
}

.hero-logo {
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  opacity: 0.8;
}
.scroll-cue span {
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
}
.scroll-cue svg { animation: scroll-cue-bob 2.2s ease-in-out infinite; }
@keyframes scroll-cue-bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue svg { animation: none; }
}
@media (max-width: 640px) {
  .scroll-cue { display: none; }
}

/* ---------- sub-page intro header (lighter version of the hero treatment,
   used on /shop/, /about/, /contact/ so they feel cut from the same cloth
   as the homepage instead of dropping into flat black) ---------- */
.page-intro {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 75% at 50% 0%, rgba(255, 255, 255, 0.055), transparent 70%);
  pointer-events: none;
}
.page-intro::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  pointer-events: none;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.page-intro > * {
  position: relative;
  z-index: 1;
}

/* brand marquee */
.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.marquee span {
  font-family: 'Anton', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0.9rem 1.5rem;
  white-space: nowrap;
}
.marquee .dot { color: #3a3a3a; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary { background: #fff; color: #0a0a0a; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(255, 255, 255, 0.35); }
.btn--primary:active { transform: translateY(0) scale(0.97); }
.btn--ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: #fff; transform: translateY(-2px); }
.btn--ghost:active { transform: translateY(0) scale(0.97); }
.btn--block {
  width: 100%;
  border-radius: 10px;
  background: #fff;
  color: #0a0a0a;
  padding: 0.7rem 1rem;
  font-size: 0.72rem;
}
.btn--block:hover { background: #e8e8e8; }
.btn--block:active:not(:disabled) { transform: scale(0.97); }
.btn--block.btn--disabled,
.btn--block:disabled {
  background: var(--border);
  color: var(--text-dim);
  cursor: not-allowed;
  box-shadow: none;
}
.btn--block.btn--disabled:hover,
.btn--block:disabled:hover { transform: none; background: var(--border); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #dc2626; transform: translateY(-2px); }
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.68rem; }

/* ---------- product cards ---------- */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
  border-color: #3f3f3f;
  transform: translateY(-5px);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.7);
}
.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #050505;
  overflow: hidden;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.product-card:hover .product-card__media img { transform: scale(1.06); }
.product-card--sold .product-card__media img { filter: grayscale(0.7) brightness(0.5); }
.product-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: 'Anton', sans-serif;
  font-size: 2.75rem;
  color: #333;
  background: linear-gradient(135deg, #161616, #080808);
}
.tag {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}
.tag--sold { background: #0a0a0a; color: #fff; border: 1px solid #3a3a3a; }
.tag--sale { background: #fff; color: #0a0a0a; }
.product-card__body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.product-card__category {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
}
.product-card__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.35;
}
.product-card__price { display: flex; align-items: baseline; gap: 0.55rem; margin: 0.1rem 0 0.75rem; }
.price { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.price--original { font-size: 0.8rem; color: var(--text-dim); text-decoration: line-through; font-weight: 500; }

/* ---------- reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- feature bar ---------- */
.feature-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; padding: 1.75rem 1rem; }
.feature-item__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: #fff;
  background: var(--bg-card);
}
.feature-item__label { font-weight: 700; font-size: 0.85rem; }
.feature-item__sub { font-size: 0.78rem; color: var(--text-dim); }

/* ---------- form fields (shop search, admin forms, contact) ---------- */
.field-input,
.field-select,
.field-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-input::placeholder,
.field-textarea::placeholder { color: var(--text-dim); }
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.field-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a3a3a3' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}
.field-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 700; margin-bottom: 0.4rem; }

/* category chips */
.chip {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.chip:hover { border-color: #555; color: #fff; }
.chip--active { background: #fff; color: #0a0a0a; border-color: #fff; }

/* ---------- claim modal ---------- */
#claim-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0;
}
/* #claim-modal's own `display: flex` is an ID rule, which outranks the
   plain `.hidden` class on specificity alone — without this, toggling
   `.hidden` on the modal would never actually hide it. */
#claim-modal.hidden { display: none; }
@media (min-width: 640px) {
  #claim-modal { align-items: center; padding: 1rem; }
}
.modal-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  animation: modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 640px) {
  .modal-panel { border-radius: var(--radius-lg); }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* three-across contact buttons (Call/Text, Snapchat, TikTok) used in the
   claim modal and on the contact page */
.contact-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  padding: 0.9rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-align: center;
  transition: all 0.2s ease;
}
.contact-option:hover { border-color: #4a4a4a; color: #fff; transform: translateY(-2px); }
.contact-option__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: inherit;
}
.contact-option__label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.contact-option__detail { font-size: 0.7rem; color: var(--text-dim); }
body.modal-open { overflow: hidden; }

/* ---------- misc ---------- */
.hairline { height: 1px; background: var(--border); border: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-dim);
}
.badge .dot { width: 6px; height: 6px; border-radius: 999px; background: #22c55e; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, #1d1d1d 37%, var(--bg-card) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------- admin ---------- */
.admin-shell { min-height: 100vh; background: var(--bg); }
.stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
}
.stat-tile__value { font-family: 'Anton', sans-serif; font-size: 2.1rem; }
.stat-tile__label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); font-weight: 700; }

.admin-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.2s ease;
}
.admin-row:hover { background: #121212; }
.admin-row__thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #050505;
  flex-shrink: 0;
}
.admin-row__thumb img { width: 100%; height: 100%; object-fit: cover; }

.admin-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100vw, 460px);
  background: #0c0c0c;
  border-left: 1px solid var(--border);
  z-index: 70;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.admin-panel.is-open { transform: translateX(0); }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #fff;
  color: #0a0a0a;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.6);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.toast--error { background: var(--danger); color: #fff; }

.shake { animation: shake 0.4s ease; }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
