/* SLM Labs landing. Dark only by design: the studio's ground is black, shared with shivam.slmlabs.in. */
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ground: #101010;
  --raised: #171717;
  --line: #2b2b2b;
  --text: #f2f2f2;
  --muted: #a3a3a3;
  --soft: #6f6f6f;
  --accent: #e0823d; /* saffron, shared with Ghost of Sahyadri */
  --radius: 14px;
  --pill: 999px;
  --gutter: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 30;
  background: var(--text); color: var(--ground); padding: 10px 16px; border-radius: var(--pill);
}
.skip:focus { top: 12px; }

.soft { color: var(--soft); }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 var(--gutter);
  background: rgb(16 16 16 / 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; background: var(--text); color: var(--ground);
  font-size: 13px; font-weight: 800; letter-spacing: -0.04em;
}
.nav-links { display: flex; gap: clamp(16px, 3vw, 36px); font-size: 15px; color: var(--muted); }
.nav-links a { padding: 10px 0; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: var(--pill);
  font-weight: 650; font-size: 16px; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .2s;
}
.btn-primary { background: var(--text); color: #111; }
.btn-primary:hover { background: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.text-link { position: relative; color: var(--muted); font-weight: 600; padding: 12px 2px; transition: color .2s; }
.text-link:hover { color: var(--accent); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1440px; margin: 0 auto;
  min-height: calc(100dvh - 68px);
  padding: clamp(32px, 6vh, 80px) var(--gutter) clamp(40px, 8vh, 96px);
}
.hero h1 {
  font-size: clamp(44px, 5.6vw, 88px);
  line-height: 0.98; letter-spacing: -0.045em; font-weight: 700;
}
.hero-sub { margin-top: 28px; max-width: 34ch; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); }
.hero-copy > div { margin-top: 36px; }
.hero-art { margin: 0; justify-self: end; width: min(100%, 640px); }
.hero-art img { width: 100%; -webkit-mask-image: radial-gradient(75% 70% at 55% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(75% 70% at 55% 50%, #000 55%, transparent 100%); }

/* Section shared */
.section-title { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; }
.lead { margin-top: 16px; max-width: 52ch; color: var(--muted); }

/* Projects bento */
.projects { max-width: 1440px; margin: 0 auto; padding: clamp(64px, 10vw, 140px) var(--gutter) 0; }
.bento {
  display: grid; grid-template-columns: 7fr 5fr; gap: 20px; margin-top: 44px;
}
.tile {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); background: var(--raised);
  border: 1px solid rgb(255 255 255 / 0.06);
  transition: border-color .3s, transform .4s var(--ease);
}
.tile:hover { border-color: rgb(255 255 255 / 0.18); transform: translateY(-4px); }
.tile-media { position: relative; overflow: hidden; aspect-ratio: 16 / 11; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile:hover .tile-media img { transform: scale(1.035); }
.tile-profile .tile-media { background: #101010; }
.tile-profile .tile-media img { object-fit: contain; padding: 4% 8% 0; -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent); mask-image: linear-gradient(180deg, #000 78%, transparent); }
.tile-game .tile-media { aspect-ratio: auto; flex: 1; min-height: 320px; }
.tile-body { padding: 26px 28px 30px; }
.tile-host { font-size: 14px; color: var(--soft); }
.tile h3 { margin-top: 6px; font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -0.03em; line-height: 1.1; }
.tile-body > p:not(.tile-host) { margin-top: 10px; color: var(--muted); max-width: 46ch; }
.tile-go { display: inline-block; margin-top: 20px; font-weight: 650; color: var(--text); transition: color .2s; }
.tile:hover .tile-go { color: var(--accent); }

/* Art slot fallback: monsoon ridgelines in mist, used until real key art exists */
.art-slot {
  background:
    radial-gradient(120% 60% at 70% 18%, rgb(224 130 61 / 0.30), transparent 60%),
    linear-gradient(172deg, transparent 52%, #1c2322 52.4%, #1c2322 64%, transparent 64.4%),
    linear-gradient(186deg, transparent 60%, #141a19 60.4%),
    linear-gradient(180deg, #2a3331 0%, #1a201f 55%, #0f1312 100%);
}
.art-slot.is-empty img { display: none; }

/* AI work rail */
.work { max-width: 1440px; margin: 0 auto; padding: clamp(80px, 12vw, 160px) 0 0; }
.work-head { padding: 0 var(--gutter); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 31%);
  gap: 20px; margin-top: 40px; padding: 4px var(--gutter) 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.rail-item { scroll-snap-align: start; }
.rail-item a { display: block; }
.rail-item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius);
  filter: grayscale(1); border: 1px solid rgb(255 255 255 / 0.06);
  transition: filter .5s, transform .6s var(--ease);
}
.rail-item a:hover img { filter: grayscale(0); transform: translateY(-4px); }
.rail-item h3 { margin-top: 18px; font-size: 22px; letter-spacing: -0.02em; }
.rail-item p { margin-top: 6px; color: var(--muted); font-size: 16px; max-width: 38ch; }

/* Contact close */
.contact { max-width: 1440px; margin: 0 auto; padding: clamp(100px, 14vw, 200px) var(--gutter) clamp(80px, 10vw, 140px); }
.contact-title { font-size: clamp(44px, 7vw, 104px); line-height: 1; letter-spacing: -0.045em; font-weight: 700; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 44px; }

/* Footer */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  padding: 28px var(--gutter) 36px; border-top: 1px solid var(--line);
  color: var(--soft); font-size: 14px;
}
.footer ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a:hover { color: var(--text); }

/* Motion: entrance on load, reveal on scroll. Both off for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .enter { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms + 80ms); }
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Tablet and phone */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; }
  .hero-art { justify-self: center; width: min(100%, 520px); }
  .bento { grid-template-columns: 1fr; }
  .tile-game .tile-media { aspect-ratio: 4 / 3; min-height: 0; flex: none; }
  .rail { grid-auto-columns: minmax(260px, 78%); }
}
@media (max-width: 560px) {
  .nav-links li:nth-child(2) { display: none; }
  .tile-body { padding: 22px 20px 24px; }
}
