/* ═════════════════════════════════════════════════════════════
   ARYAN SINGH — "THE NIGHT SHIFT" (award-tier one-pager)
   Palette: dark ink · ivory paper · molten amber. No neon.
   ═════════════════════════════════════════════════════════════ */

:root {
  --ink: #0a0a0c;
  --ink-2: #101013;
  --ink-3: #17171b;
  --paper: #ece9e2;
  --paper-dim: #b7b2a8;
  --dim: #8b867c;
  --amber: #e6a24c;
  --amber-hi: #ffcd8a;
  --line: rgba(236, 233, 226, 0.14);
  --serif: "Fraunces", "Georgia", serif;
  --mono: "Space Mono", "Courier New", monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(1.25rem, 4vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
@media (pointer: fine) { body.hide-native-cursor, body.hide-native-cursor * { cursor: none !important; } }

::selection { background: var(--amber); color: var(--ink); }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.amber { color: var(--amber); }
em { font-style: italic; }

/* ── Grain ──────────────────────────────────────────────── */
.grain {
  position: fixed; inset: -50%; z-index: 9000; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: 0.055; mix-blend-mode: overlay;
  animation: grainShift 0.9s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1.5%); }
  50% { transform: translate(1.5%, -2%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ── Scroll progress ────────────────────────────────────── */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: var(--amber); transform-origin: 0 50%; transform: scaleX(0);
  z-index: 9500; pointer-events: none;
}

/* ── Custom cursor ──────────────────────────────────────── */
.cursor { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; display: none; }
@media (pointer: fine) { .cursor { display: block; } }
.cursor__dot {
  position: fixed; width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber); top: 0; left: 0; transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}
.cursor__ring {
  position: fixed; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(236, 233, 226, 0.6); top: 0; left: 0;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  display: grid; place-items: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              background-color 0.35s, border-color 0.35s;
}
.cursor__label {
  font: 700 0.55rem/1 var(--mono); letter-spacing: 0.18em; color: var(--paper);
  opacity: 0; transition: opacity 0.25s;
}
body.cursor-grow .cursor__ring { width: 64px; height: 64px; border-color: var(--amber); background: rgba(230, 162, 76, 0.12); }
body.cursor-view .cursor__ring { width: 92px; height: 92px; background: rgba(230, 162, 76, 0.9); border-color: transparent; mix-blend-mode: normal; }
body.cursor-view .cursor__label { opacity: 1; }
body.cursor-view .cursor__dot { opacity: 0; }

/* ── Top bar ────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 8000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad);
  mix-blend-mode: difference; color: var(--paper);
}
.topbar__brand { font-weight: 700; color: var(--paper); }
.topbar__nav { display: flex; gap: 2rem; }
.topbar__nav a { position: relative; color: var(--paper); padding: 4px 2px; display: inline-block; }
.topbar__nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%;
  background: var(--paper); transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform 0.45s var(--ease-out);
}
.topbar__nav a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
@media (max-width: 720px) {
  .topbar { padding: 0.9rem var(--pad); }
  .topbar__status { display: none; }
  .topbar__nav { gap: 1.1rem; }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; display: inline-block;
  padding: 1rem 1.6rem; border-radius: 999px;
  border: 1px solid var(--line);
  transition: background-color 0.4s var(--ease-out), color 0.4s, border-color 0.4s, transform 0.2s;
  will-change: transform;
}
.btn--solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--solid:hover { background: var(--amber); border-color: var(--amber); }
.btn--ghost { color: var(--paper); }
.btn--ghost:hover { background: rgba(236, 233, 226, 0.08); border-color: rgba(236, 233, 226, 0.4); }

/* ── Eyebrow ────────────────────────────────────────────── */
.eyebrow { color: var(--amber-hi); display: flex; align-items: center; gap: 0.75rem; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--amber); }

/* ═══════════════ HERO ═══════════════════════════════════ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -3; }
.hero__video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06); filter: brightness(0.82) saturate(1.05);
  will-change: transform, filter;
}
.hero__shade {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(to right, rgba(10, 10, 12, 0.72) 0%, rgba(10, 10, 12, 0.25) 42%, rgba(10, 10, 12, 0) 65%),
    linear-gradient(to bottom, rgba(10, 10, 12, 0.5) 0%, rgba(10, 10, 12, 0) 30%, rgba(10, 10, 12, 0.14) 70%, var(--ink) 100%);
}
.hero__content {
  position: relative; z-index: 2;
  padding: clamp(5rem, 14vh, 8rem) var(--pad) clamp(4.5rem, 9vh, 6.5rem);
  width: 100%; max-width: 1400px;
}
.hero__name {
  font-family: var(--serif); font-variation-settings: "opsz" 144;
  font-size: clamp(4rem, 15.5vw, 13.5rem);
  line-height: 0.88; letter-spacing: -0.03em;
  margin: 1.4rem 0 1.2rem; display: block;
}
.hero__line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__line--two { display: flex; align-items: flex-start; }
.hero__line .split, .hero__line .char { display: inline-block; }
.split { font-weight: 300; font-style: italic; color: var(--paper); }
.split--bold { font-weight: 900; font-style: normal; text-transform: uppercase; }
.hero__dot { font-weight: 900; line-height: 0.9; }
html.js .hero__name .char { opacity: 0; }
html.js [data-intro] { opacity: 0; }

.hero__role {
  font-family: var(--serif); font-weight: 350; font-size: clamp(1.25rem, 2.6vw, 2rem);
  letter-spacing: -0.01em; color: var(--paper);
}
.hero__role em { color: var(--amber-hi); }
.hero__sub { margin-top: 1.1rem; line-height: 1.9; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.9rem; }

.hero__cue {
  position: absolute; z-index: 2; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.7rem; color: var(--dim);
}
.hero__cue-line { display: block; width: 46px; height: 1px; background: var(--dim); overflow: hidden; position: relative; }
.hero__cue-line::after {
  content: ""; position: absolute; inset: 0; background: var(--amber);
  transform: translateX(-100%); animation: cueSlide 2.2s var(--ease-out) infinite;
}
@keyframes cueSlide { 55% { transform: translateX(0); } 100% { transform: translateX(101%); } }

@media (max-width: 900px) {
  .hero__content { padding-bottom: 6rem; }
  .hero__role { max-width: 80%; }
}
@media (max-width: 520px) {
  .hero__name { font-size: clamp(3.4rem, 17vw, 6rem); }
}

/* ── Marquee ────────────────────────────────────────────── */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 1.05rem 0; background: var(--ink);
  position: relative; z-index: 3;
}
.marquee__track { display: flex; white-space: nowrap; width: max-content; animation: marquee 26s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--paper-dim);
}
.marquee--amber { background: var(--amber); border-color: var(--amber); }
.marquee--amber .marquee__track span { color: var(--ink); font-weight: 700; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Generic section chrome ─────────────────────────────── */
.section { padding: clamp(5rem, 11vh, 8.5rem) var(--pad); position: relative; }
.sec-head {
  display: flex; align-items: center; gap: 1.4rem;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem); color: var(--dim);
}
.sec-head .rule { flex: 1; height: 1px; background: var(--line); }
html.js [data-rise] { opacity: 0; transform: translateY(40px); }

/* ═══════════ ORIGIN ════════════════════════════════════ */
.about { background: var(--ink); }
.about__grid {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: start;
}
.about__text {
  font-family: var(--serif); font-weight: 350; letter-spacing: -0.01em;
  font-size: clamp(1.7rem, 3.6vw, 3.1rem); line-height: 1.28;
  text-wrap: balance;
}
.about__text .word { will-change: opacity; }
.about__facts { display: flex; flex-direction: column; border-top: 1px solid var(--line); position: sticky; top: 6rem; }
.fact {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.95rem 0; border-bottom: 1px solid var(--line);
}
.fact span:first-child { color: var(--dim); }
.fact span:last-child { color: var(--paper); text-align: right; }
@media (max-width: 820px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__facts { position: static; }
}

/* ═══════════ STATS — EMBER STRIP ═══════════════════════ */
.stats {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(5rem, 11vh, 8rem) var(--pad);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stats__media { position: absolute; inset: 0; z-index: -2; }
.stats__video { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.stats::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, var(--ink) 0%, rgba(10, 10, 12, 0.35) 40%, rgba(10, 10, 12, 0.35) 60%, var(--ink) 100%);
}
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  max-width: 1400px;
}
.stat { border-left: 1px solid var(--line); padding-left: 1.4rem; }
.stat__num {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.6rem, 5.4vw, 5rem); line-height: 1;
  color: var(--amber); letter-spacing: -0.02em;
}
.stat__suffix { font-size: 0.45em; color: var(--dim); font-weight: 400; }
.stat__label { margin-top: 0.9rem; line-height: 1.8; max-width: 22ch; }
@media (max-width: 900px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 3rem; }
}
@media (max-width: 480px) { .stats__grid { grid-template-columns: 1fr; } }

/* ═══════════ INTERSTITIAL — BUILD TO LAST ══════════════ */
.inter { position: relative; height: 220vh; }
.inter__pin {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden; display: grid; place-items: center; isolation: isolate;
}
.inter__media { position: absolute; inset: 0; z-index: -2; }
.inter__video { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.inter__shade {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(10, 10, 12, 0.35) 0%, rgba(10, 10, 12, 0.82) 100%);
}
.inter__quote { text-align: center; padding: 0 var(--pad); will-change: transform, filter; }
.inter__pre { display: block; color: var(--amber-hi); margin-bottom: 1.6rem; }
.inter__big {
  display: block; font-family: var(--serif); font-weight: 900; letter-spacing: -0.03em;
  font-size: clamp(3.4rem, 10.5vw, 9.5rem); line-height: 0.95;
}
.inter__big em { font-weight: 300; color: var(--amber-hi); }
.inter__sub { display: block; margin-top: 1.8rem; color: var(--paper-dim); }

/* ═══════════ WORK ══════════════════════════════════════ */
.work { background: var(--ink); }
.work__list { list-style: none; border-top: 1px solid var(--line); }
.work__row {
  position: relative; display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) auto 2.5rem;
  align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.6rem, 3.4vh, 2.6rem) 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s;
  cursor: default;
}
.work__row:hover { background: rgba(236, 233, 226, 0.025); }
.work__idx { transition: color 0.35s; }
.work__row:hover .work__idx { color: var(--amber); }
.work__name {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(2.1rem, 5.6vw, 4.6rem); line-height: 1;
  transition: transform 0.5s var(--ease-out), color 0.4s;
}
.work__row:hover .work__name { transform: translateX(18px); color: var(--amber-hi); }
.work__meta {
  display: flex; flex-direction: column; gap: 0.35rem; text-align: right;
  min-width: 180px;
}
.work__metric { color: var(--paper); }
.work__arrow {
  font-size: 1.6rem; color: var(--dim); justify-self: end;
  transition: transform 0.5s var(--ease-out), color 0.4s;
}
.work__row:hover .work__arrow { transform: rotate(0deg) translate(4px, 0); color: var(--amber); transform: rotate(45deg); }
.work__row:hover .work__arrow { color: var(--amber); }
.work__badge {
  position: absolute; top: 0; right: 0; transform: translateY(-55%);
  background: var(--ink); border: 1px solid var(--amber); border-radius: 99px;
  padding: 0.3rem 0.8rem; letter-spacing: 0.2em;
}
.work__list li:first-child { border-top: none; }
.work__lab, .work__note { margin-top: 2.6rem; line-height: 2; max-width: 900px; }
.work__lab b { color: var(--paper); font-weight: 700; }
.work__note a { color: var(--amber); border-bottom: 1px solid rgba(230, 162, 76, 0.4); }
.work__note a:hover { border-bottom-color: var(--amber); }

@media (max-width: 720px) {
  .work__row { grid-template-columns: 2.4rem minmax(0, 1fr) 2rem; }
  .work__meta { display: none; }
}

/* ═══════════ TOOLBOX ═══════════════════════════════════ */
.tools__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.tool {
  background: var(--ink); padding: 1.6rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.8rem;
  transition: background-color 0.4s;
}
.tool:hover { background: var(--ink-2); }
.tool__cat { color: var(--amber); }
.tool span:last-child { color: var(--paper); line-height: 1.9; }
@media (max-width: 860px) { .tools__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tools__grid { grid-template-columns: 1fr; } }

/* ═══════════ CONTACT — FIRST LIGHT ═════════════════════ */
.contact {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(6rem, 14vh, 9rem) var(--pad) 0;
}
.contact__media { position: absolute; inset: 0; z-index: -3; }
.contact__video { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.8) saturate(1.08); }
.contact__shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(to right, rgba(10, 10, 12, 0.78) 0%, rgba(10, 10, 12, 0.3) 50%, rgba(10, 10, 12, 0.05) 80%),
    linear-gradient(to bottom, var(--ink) 0%, rgba(10, 10, 12, 0.2) 30%, rgba(10, 10, 12, 0.1) 70%, var(--ink) 100%);
}
.contact__content { position: relative; z-index: 2; max-width: 1100px; }
.contact__title {
  font-family: var(--serif); font-weight: 900; letter-spacing: -0.03em;
  font-size: clamp(3rem, 8.6vw, 7.5rem); line-height: 0.98;
  margin: 1.4rem 0 1.1rem;
}
.contact__title em { font-weight: 300; color: var(--amber-hi); }
.contact__sub { margin-bottom: 2.2rem; line-height: 1.9; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
html.js [data-intro-contact] { opacity: 0; }


.footer {
  position: relative; z-index: 2; margin-top: clamp(4rem, 10vh, 7rem);
  border-top: 1px solid var(--line); padding: 1.3rem 0 1.6rem;
  display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; color: var(--dim);
}
.footer__line { width: 24px; height: 1px; background: var(--dim); }

/* ── Peek panel (work hover) ────────────────────────────── */
.peek {
  position: fixed; top: 0; left: 0; z-index: 8500; pointer-events: none;
  width: 300px; padding: 1.5rem 1.4rem;
  background: rgba(16, 16, 19, 0.92); backdrop-filter: blur(10px);
  border: 1px solid rgba(230, 162, 76, 0.35); border-radius: 16px;
  opacity: 0; visibility: hidden; overflow: hidden;
}
.peek__glow {
  position: absolute; top: -60%; right: -40%; width: 140%; height: 160%;
  background: radial-gradient(circle at center, rgba(230, 162, 76, 0.16), transparent 60%);
  pointer-events: none;
}
.peek__mm {
  color: var(--amber); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.3em;
  border: 1px solid rgba(230, 162, 76, 0.4); border-radius: 8px;
  display: inline-block; padding: 0.35rem 0.6rem; margin-bottom: 0.9rem; position: relative;
}
.peek__metric {
  font-family: var(--serif); font-weight: 700; font-size: 1.9rem;
  letter-spacing: -0.02em; color: var(--paper); position: relative;
}
.peek__desc { margin-top: 0.6rem; line-height: 1.8; color: var(--paper-dim); text-transform: none; letter-spacing: 0.02em; position: relative; }

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  translate: -50% 0; opacity: 0;
  will-change: transform;
  z-index: 9600; background: var(--amber); color: var(--ink); font-weight: 700;
  padding: 0.9rem 1.5rem; border-radius: 99px; letter-spacing: 0.14em;
}

/* ── Reduced motion fallbacks ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .grain, .marquee__track span, .hero__cue-line::after, .pulse { animation: none !important; }
  .marquee__track { animation: none; flex-wrap: wrap; width: 100%; }
  html, body { scroll-behavior: smooth; }
}
