/* ==========================================================
   Our Works page — Kalpokotha
   ========================================================== */
:root {
  --bg: #000;
  --text: #d4d4d8;
  --bright: #e4e4e7;
  --muted: #a1a1aa;
  --border: #26262c;
  --accent: #6366f1;
  --pad-x: clamp(20px, 7vw, 100px);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
  overflow-x: hidden;
}

/* ---------- 1. Hero (bridge only, no text) ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
}
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
          mask-image: linear-gradient(to bottom, #000 72%, transparent);
}

/* quote in the empty sky, left of the bridge */
.hero-quote {
  position: absolute;
  z-index: 2;
  top: 16%;
  left: var(--pad-x);
  max-width: min(520px, 42vw);
  animation: quoteIn 1.2s .3s both;
}
.hero-quote blockquote {
  color: var(--bright);
  font-size: clamp(26px, 2.9vw, 42px);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -.015em;
}
.hero-quote figcaption { margin-top: 20px; }
.hero-quote figcaption b { display: block; color: #a5b4fc; font-size: 16px; font-weight: 500; }
.hero-quote figcaption span { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; }
@keyframes quoteIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.page { position: relative; z-index: 2; }

h2 {
  text-align: center;
  color: var(--text);
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 500;
  letter-spacing: -.02em;
}

/* ---------- 2. Our Shorts (two rows of 9) ---------- */
.shorts { padding: clamp(40px, 6vw, 80px) 0 clamp(70px, 9vw, 120px); }
.shorts h2 { margin-bottom: clamp(30px, 5vw, 56px); }

.reel {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding: 6px var(--pad-x) 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #26262c transparent;
}
.reel::-webkit-scrollbar { height: 6px; }
.reel::-webkit-scrollbar-thumb { background: #26262c; border-radius: 6px; }

.clip {
  flex: 1 0 118px;                 /* 9 cards share the row; below ~118px they scroll sideways */
  scroll-snap-align: start;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(14, 14, 18, .8);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease, border-color .3s;
  transition-delay: var(--d, 0s);
}
.clip.show { opacity: 1; transform: none; }
.clip.show:hover { transform: translateY(-4px); border-color: #3b3b8f; transition-delay: 0s; }

.clip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 768 / 1376;
  object-fit: cover;
  border-radius: 9px;
  background: #0e0e12;
}

/* ---------- 3. Our work (social cards) ---------- */
.work { padding: 0 var(--pad-x); }
.work h2 { margin-bottom: clamp(26px, 4vw, 44px); }

.socials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.5vw, 20px);
  max-width: 1000px;
  margin: 0 auto;
}
.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 26px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(14, 14, 18, .75);
  text-decoration: none;
  text-align: center;
  transition: transform .3s, border-color .3s;
}
.tool:hover { transform: translateY(-4px); border-color: #3b3b8f; }
.tool .ico { width: 34px; height: 34px; margin-bottom: 20px; color: #a5b4fc; }
.tool h3 { color: var(--bright); font-size: 19px; font-weight: 500; }

/* ---------- 4. Back button ---------- */
.back-wrap { padding: clamp(70px, 9vw, 110px) 0; text-align: center; }
.back {
  display: inline-block;
  padding: 14px 34px;
  border: 1px solid #2a2a30;
  border-radius: 14px;
  background: rgba(24, 24, 28, .8);
  color: var(--bright);
  font-size: 16px;
  text-decoration: none;
  transition: border-color .3s, background .3s, transform .3s;
}
.back:hover { border-color: #3b3b8f; background: rgba(40, 40, 80, .5); transform: translateY(-2px); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero-quote { top: 10%; left: 20px; right: 20px; max-width: none; text-align: center; }
  .hero-quote blockquote { font-size: clamp(19px, 5.2vw, 24px); }
  .hero-quote figcaption { margin-top: 12px; }
  .hero-quote figcaption b { font-size: 14px; }
  .hero-quote figcaption span { font-size: 12.5px; }

  .clip { flex-basis: 112px; padding: 5px; border-radius: 12px; }
  .clip img { border-radius: 8px; }
  .socials { grid-template-columns: repeat(2, 1fr); }
  .tool { min-height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .clip { opacity: 1; transform: none; transition: none; }
  .hero-quote { animation: none; }
  html { scroll-behavior: auto; }
}