/* ═══════════════════════════════════════════════
   KG TRADERS — Ethnic Wear · Ahmedabad
   Palette drawn from the KG product line:
   olive-gold tissue, deep plum, ivory, mustard
   ═══════════════════════════════════════════════ */

:root {
  --bg: #0e0b07;
  --bg-soft: #17120b;
  --ink: #f2e8d5;
  --ink-dim: #b7a98c;
  --gold: #c9a24b;
  --gold-bright: #e8cf8f;
  --olive: #8a8440;
  --plum: #6b2f4e;
  --mustard: #d9a422;
  --line: rgba(201, 162, 75, 0.22);
  --serif: 'Marcellus', 'Cormorant Garamond', serif;
  --sans: 'Jost', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--bg); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─────────── Preloader ─────────── */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-inner { text-align: center; }
.preloader-mono { width: 110px; height: 110px; overflow: visible; }
.preloader-mono .mono-frame {
  fill: none; stroke: var(--gold); stroke-width: 1.5;
  stroke-dasharray: 420; stroke-dashoffset: 420;
  animation: draw 1.6s var(--ease) forwards;
}
.preloader-mono .mono-text {
  font-family: var(--serif); font-size: 30px; fill: var(--gold-bright);
  letter-spacing: 2px; opacity: 0; animation: fadeUp 0.8s 0.9s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.preloader-tag {
  margin-top: 18px; font-size: 11px; letter-spacing: 5px; color: var(--ink-dim);
  opacity: 0; animation: fadeUp 0.8s 1.2s var(--ease) forwards;
}
.preloader-bar {
  width: 160px; height: 1px; background: rgba(201,162,75,0.18);
  margin: 22px auto 0; overflow: hidden;
}
.preloader-bar span {
  display: block; height: 100%; width: 0; background: var(--gold);
  transition: width 0.3s ease;
}

/* ─────────── Nav ─────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 4vw;
  transition: background 0.5s, backdrop-filter 0.5s, padding 0.5s, border-color 0.5s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(14, 11, 7, 0.82);
  backdrop-filter: blur(14px);
  padding: 12px 4vw;
  border-bottom-color: var(--line);
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-logo { width: 38px; height: 38px; }
.nav-name { font-family: var(--serif); font-size: 19px; letter-spacing: 3px; }
.nav-name em { font-style: normal; color: var(--gold); }
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--ink-dim); position: relative; transition: color 0.3s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -5px; height: 1px; width: 0;
  background: var(--gold); transition: width 0.4s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-burger span { display: block; width: 26px; height: 2px; background: var(--gold); margin: 5px 0; transition: 0.35s var(--ease); }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: rgba(14,11,7,0.97);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px;
  opacity: 0; visibility: hidden; transition: 0.5s var(--ease);
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a { font-family: var(--serif); font-size: 30px; color: var(--ink); }

/* ─────────── Buttons ─────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: 2.5px; text-transform: uppercase;
  padding: 15px 30px; border: 1px solid var(--gold);
  transition: 0.4s var(--ease); cursor: pointer; will-change: transform;
}
.btn span { transition: transform 0.35s var(--ease); }
.btn:hover span { transform: translateX(5px); }
.btn-gold { background: linear-gradient(120deg, var(--gold), #a37f2e); color: #14100a; border: none; }
.btn-gold:hover { box-shadow: 0 8px 32px rgba(201,162,75,0.35); }
.btn-ghost { color: var(--gold-bright); background: transparent; }
.btn-ghost:hover { background: rgba(201,162,75,0.1); }
.nav-cta { padding: 11px 22px; }

/* ─────────── Hero ─────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 6vw 80px;
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 30% 45%, transparent 30%, rgba(14,11,7,0.75) 100%),
    linear-gradient(to top, var(--bg) 0%, transparent 22%);
}
.hero-content { position: relative; z-index: 2; max-width: 820px; }
.hero-kicker span {
  font-size: 12px; letter-spacing: 6px; color: var(--gold);
  padding-left: 54px; position: relative; display: inline-block;
}
.hero-kicker span::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 40px; height: 1px; background: var(--gold);
}
.hero-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(46px, 8.2vw, 108px);
  line-height: 1.04; margin: 26px 0 28px; letter-spacing: 1px;
}
.hero-title em { font-style: italic; font-family: 'Cormorant Garamond', serif; color: var(--gold-bright); }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; }
.hero-sub { max-width: 560px; color: var(--ink-dim); font-size: 17px; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

.hero-mono {
  position: absolute; right: 5vw; top: 50%; transform: translateY(-50%);
  width: clamp(220px, 26vw, 420px); opacity: 0.5; z-index: 1; pointer-events: none;
}
.hero-mono svg { width: 100%; overflow: visible; animation: monoFloat 7s ease-in-out infinite; }
.hero-mono rect { fill: none; stroke: var(--gold); stroke-width: 0.8; }
.hero-mono text { font-family: var(--serif); font-size: 32px; fill: rgba(232,207,143,0.9); letter-spacing: 3px; }
@keyframes monoFloat { 0%,100% { transform: translateY(-10px) rotate(-1deg); } 50% { transform: translateY(12px) rotate(1.5deg); } }

.scroll-hint {
  position: absolute; bottom: 34px; left: 6vw; z-index: 2;
  font-size: 10px; letter-spacing: 4px; color: var(--ink-dim);
  display: flex; align-items: center; gap: 14px;
}
.scroll-hint span {
  width: 1px; height: 48px; background: var(--line); position: relative; overflow: hidden;
}
.scroll-hint span::after {
  content: ''; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: var(--gold); animation: scrollDrop 2s var(--ease) infinite;
}
@keyframes scrollDrop { to { top: 110%; } }

/* ─────────── Marquee ─────────── */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 22px 0; overflow: hidden; background: var(--bg-soft);
}
.marquee-track {
  display: flex; gap: 48px; width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--serif); font-size: 22px; letter-spacing: 3px;
  color: var(--ink-dim); white-space: nowrap; text-transform: uppercase;
}
.marquee-track i { color: var(--gold); font-style: normal; font-size: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ─────────── Sections shared ─────────── */
.section { padding: 130px 6vw; position: relative; }
.section-head { max-width: 760px; margin-bottom: 70px; }
.eyebrow {
  font-size: 12px; letter-spacing: 6px; color: var(--gold); margin-bottom: 18px;
}
.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 4.6vw, 58px); line-height: 1.12;
}
.section-title em { font-style: italic; font-family: 'Cormorant Garamond', serif; color: var(--gold-bright); }
.section-sub { color: var(--ink-dim); margin-top: 18px; max-width: 540px; }

/* ─────────── About ─────────── */
.about { background: var(--bg); }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 70px; align-items: start; }
.about-lead {
  font-family: 'Cormorant Garamond', serif; font-size: 25px; line-height: 1.5;
  color: var(--ink); margin-bottom: 22px;
}
.about-copy p:not(.about-lead) { color: var(--ink-dim); }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--bg-soft); padding: 34px 26px; }
.stat b {
  display: block; font-family: var(--serif); font-weight: 400;
  font-size: 44px; color: var(--gold-bright); line-height: 1;
}
.stat span { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-dim); display: block; margin-top: 10px; }

/* ─────────── Collections / Cards ─────────── */
.collections { background: var(--bg-soft); }
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  perspective: 1400px;
}
.card {
  position: relative; background: #131009;
  border: 1px solid var(--line);
  transform-style: preserve-3d;
  transition: border-color 0.4s;
  will-change: transform;
  overflow: hidden;
}
.card:hover { border-color: rgba(201,162,75,0.55); }
.card-media {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  transform: translateZ(30px);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.6s;
  filter: saturate(0.92);
}
.card:hover .card-media img { transform: scale(1.06); filter: saturate(1.05); }

/* CSS art fallback shown when no product photo is present */
.card-art {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
}
.card.no-img .card-art { display: flex; }
.card-art svg { width: 52%; opacity: 0.9; }
.card-art .silhouette { fill: none; stroke-width: 1.2; }
.card-art .motif { fill: none; stroke-width: 1; }
.card[data-theme="olive"] .card-art { background: radial-gradient(circle at 50% 30%, #3a3517, #17120b 75%); }
.card[data-theme="olive"] .silhouette, .card[data-theme="olive"] .motif { stroke: #c9bd6a; }
.card[data-theme="plum"] .card-art { background: radial-gradient(circle at 50% 30%, #47203a, #150a11 75%); }
.card[data-theme="plum"] .silhouette, .card[data-theme="plum"] .motif { stroke: #e0a0c4; }
.card[data-theme="ivory"] .card-art { background: radial-gradient(circle at 50% 30%, #58503c, #17130c 75%); }
.card[data-theme="ivory"] .silhouette, .card[data-theme="ivory"] .motif { stroke: #f2e8d5; }
.card[data-theme="mustard"] .card-art { background: radial-gradient(circle at 50% 30%, #59430e, #170f04 75%); }
.card[data-theme="mustard"] .silhouette, .card[data-theme="mustard"] .motif { stroke: #ecc558; }

.card-body { padding: 26px 26px 30px; transform: translateZ(40px); }
.card-num {
  font-family: var(--serif); font-size: 13px; color: var(--gold);
  letter-spacing: 3px; display: block; margin-bottom: 8px;
}
.card-body h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin-bottom: 8px; }
.card-body p { font-size: 14px; color: var(--ink-dim); }

.card-shine {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(232,207,143,0.14), transparent 45%);
  transition: opacity 0.4s;
}
.card:hover .card-shine { opacity: 1; }

/* ─────────── Craft strip ─────────── */
.craft {
  padding: 110px 6vw;
  background:
    linear-gradient(rgba(14,11,7,0.88), rgba(14,11,7,0.88)),
    radial-gradient(ellipse at 20% 50%, #3a2c10 0%, transparent 55%),
    radial-gradient(ellipse at 80% 50%, #47203a 0%, transparent 55%),
    var(--bg-soft);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  text-align: center;
}
.craft blockquote {
  font-family: 'Cormorant Garamond', serif; font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.35; max-width: 900px; margin: 0 auto; position: relative;
}
.craft blockquote em { color: var(--gold-bright); }
.q-mark {
  display: block; font-family: var(--serif); font-size: 80px; line-height: 0.5;
  color: var(--gold); margin-bottom: 24px;
}
.craft-note { margin-top: 30px; font-size: 12px; letter-spacing: 4px; text-transform: uppercase; color: var(--ink-dim); }

/* ─────────── Sizes ─────────── */
.size-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.size-group h4 {
  font-family: var(--sans); font-weight: 500; font-size: 13px;
  letter-spacing: 3px; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 22px;
}
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  font-family: var(--serif); font-size: 19px;
  min-width: 62px; padding: 14px 18px; text-align: center;
  border: 1px solid var(--line); color: var(--ink);
  transition: 0.35s var(--ease); cursor: default;
}
.chip:hover {
  border-color: var(--gold); color: var(--bg);
  background: var(--gold-bright); transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(201,162,75,0.25);
}

/* ─────────── Wholesale ─────────── */
.wholesale { background: var(--bg-soft); }
.wholesale-card {
  position: relative; max-width: 900px; margin: 0 auto; text-align: center;
  border: 1px solid var(--line); padding: 90px 8vw; background: var(--bg);
  overflow: hidden;
}
.wholesale-card::before, .wholesale-card::after {
  content: '✦'; position: absolute; color: var(--gold); font-size: 14px; opacity: 0.7;
}
.wholesale-card::before { top: 18px; left: 22px; }
.wholesale-card::after { bottom: 18px; right: 22px; }
.wholesale-mono { width: 74px; margin: 0 auto 28px; opacity: 0.85; }
.wholesale-mono rect { fill: none; stroke: var(--gold); stroke-width: 1.2; }
.wholesale-mono text { font-family: var(--serif); font-size: 30px; fill: var(--gold-bright); letter-spacing: 2px; }
.wholesale-copy { color: var(--ink-dim); max-width: 560px; margin: 22px auto 40px; }
.wholesale-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.wholesale-fine { margin-top: 36px; font-size: 12px; letter-spacing: 3px; color: var(--ink-dim); text-transform: uppercase; }

/* ─────────── Footer ─────────── */
.footer { border-top: 1px solid var(--line); padding: 70px 6vw 30px; background: var(--bg); }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px;
  padding-bottom: 50px; border-bottom: 1px solid rgba(201,162,75,0.12);
}
.footer-brand { display: flex; gap: 18px; align-items: flex-start; }
.footer-brand img { width: 52px; }
.footer-brand b { font-family: var(--serif); font-weight: 400; letter-spacing: 3px; font-size: 18px; }
.footer-brand p { color: var(--ink-dim); font-size: 14px; margin-top: 8px; }
.footer-col h5 {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px; font-weight: 500;
}
.footer-col a { display: block; color: var(--ink-dim); font-size: 14px; margin-bottom: 10px; transition: color 0.3s, transform 0.3s; }
.footer-col a:hover { color: var(--gold-bright); transform: translateX(4px); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding-top: 24px; font-size: 12px; color: var(--ink-dim); letter-spacing: 1px;
}

/* ─────────── Reveal helpers (GSAP hooks) ─────────── */
.gs-reveal { opacity: 0; transform: translateY(50px); }

/* ─────────── Responsive ─────────── */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 46px; }
  .size-groups { grid-template-columns: 1fr; gap: 34px; }
  .hero-mono { opacity: 0.18; }
}
@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: block; }
  .cards { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 90px 6vw; }
  .wholesale-card { padding: 60px 8vw; }
  .hero { padding-top: 140px; }
}

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