/*
 * itsarihant.com - Design System
 * Single source of truth for tokens, base styles, shared components.
 * Import this on every page BEFORE your page-specific <style> block.
 *
 * What lives here:      tokens · reset · base · cursor · nav · footer
 *                       buttons · layout primitives · reveal · animations
 * What stays per-page:  hero/section layout · canvas/node graph
 *                       page-specific animations · easter eggs
 */


/* ─────────────────────────────────────────────────────────────
   TOKENS
   ───────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-top: #0c0c0b;
  --bg-bottom: #0e0d14;
  --bg2: #16151e;
  /* card / surface lift */

  /* Foregrounds */
  --fg: #eceae4;
  /* primary text */
  --fg2: #85837c;
  /* secondary text */
  --fg3: #2e2d38;
  /* borders */
  --fg-muted: #7a7974;
  /* muted accessible text */

  /* Accent - blue-grey */
  --accent: #9ba8c9;
  --accent-dim: #5a6482;

  /* Beyond page amber (scoped override, not global) */
  --amber: #c9a96e;
  --amber-dim: #8a6e3e;

  /* Typography */
  --serif: 'Syne', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, sans-serif;

  /* Spacing scale */
  --sp-xs: 8px;
  --sp-sm: 16px;
  --sp-md: 28px;
  --sp-lg: 56px;
  --sp-xl: 88px;
  --sp-2xl: 128px;

  /* Z-index layers */
  --z-canvas: 0;
  --z-content: 1;
  --z-nav: 100;
  --z-overlay: 300;
  --z-toast: 500;
  --z-cursor: 9999;
}


/* ─────────────────────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  cursor: none;
  /* desktop: custom cursor replaces system default */
}

/* Accessibility: Ensure focus is always visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}


/* ─────────────────────────────────────────────────────────────
   CURSOR
   ───────────────────────────────────────────────────────────── */
.cursor {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: var(--z-cursor);
  transition: transform 0.2s ease;
  animation: cursorPulse 2.8s ease-in-out infinite;
}

@keyframes cursorPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(155, 168, 201, 0);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(155, 168, 201, 0.12);
  }
}


/* ─────────────────────────────────────────────────────────────
   NAVIGATION
   ───────────────────────────────────────────────────────────── */
/* ── SLIM FLOATING NAV ── */
.slim-nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-nav);
  background: rgba(14, 13, 20, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.slim-nav {
  display: flex;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  padding: 0 40px;
}

.slim-nav a {
  text-decoration: none;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.3s;
  position: relative;
}

.slim-nav a:hover {
  color: var(--fg);
}

.slim-nav .nav-logo {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  text-transform: none;
  letter-spacing: 0.02em;
  margin-right: auto;
}

.slim-nav a:not(.nav-logo)::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.slim-nav a:hover::after,
.slim-nav a.active::after {
  width: 100%;
}

.slim-nav a.active {
  color: var(--fg);
}


/* ─────────────────────────────────────────────────────────────
   PAGE HERO  (inner pages: work / writing / now / beyond)
   ───────────────────────────────────────────────────────────── */
.page-hero {
  padding: 140px 0 72px;
  position: relative;
}

.page-hero-eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 0.3s;
}

.page-hero-title {
  font-family: var(--serif);
  font-size: clamp(48px, 6.5vw, 96px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.03em;
  max-width: 720px;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 0.5s;
}

.page-hero-title strong {
  font-weight: 700;
  color: var(--accent);
}

/* "Last updated" badge used on /now */
.updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-top: 32px;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 0.7s;
}

.updated-badge::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}


/* ─────────────────────────────────────────────────────────────
   LAYOUT PRIMITIVES
   ───────────────────────────────────────────────────────────── */

/* Full-width 0.5px divider */
.rule {
  width: 100%;
  height: 0.5px;
  background: var(--fg3);
}

/* Standard section wrapper */
.section {
  padding: var(--sp-xl) var(--sp-lg);
}

/* Section header row: number + name on left, "see all" link on right */
.section-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 56px;
}

.section-id {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-right: 14px;
  font-family: var(--serif);
}

.section-name {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg2);
}

.section-more {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.section-more::after {
  content: '→';
  transition: transform 0.2s;
}

.section-more:hover {
  color: var(--accent);
}

.section-more:hover::after {
  transform: translateX(3px);
}


/* ─────────────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────────────── */

/* Filled CTA - accent background */
.btn-fill {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0c0c0b;
  background: var(--accent);
  padding: 14px 30px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.25s, transform 0.25s;
}

.btn-fill:hover {
  background: var(--fg);
  transform: translateY(-2px);
}

/* Ghost text link with arrow */
.btn-line {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.btn-line::after {
  content: '→';
  transition: transform 0.2s;
}

.btn-line:hover {
  color: var(--fg);
}

.btn-line:hover::after {
  transform: translateX(4px);
}


/* ─────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────── */
footer {
  padding: var(--sp-xl) var(--sp-lg) 52px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 80px;
  align-items: end;
  border-top: 0.5px solid var(--fg3);
}

.footer-heading {
  font-family: var(--serif);
  font-size: clamp(44px, 6vw, 80px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 32px;
}

.footer-sub {
  font-size: 14px;
  color: var(--fg2);
  max-width: 380px;
  line-height: 1.85;
  margin-bottom: 36px;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg2);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 20px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.footer-nav a {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--fg2);
}

.footer-copy {
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  margin-top: 8px;
}


/* ─────────────────────────────────────────────────────────────
   SCROLL REVEAL
   ───────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger helpers - add class alongside .reveal */
.reveal.d1 {
  transition-delay: 0.1s;
}

.reveal.d2 {
  transition-delay: 0.2s;
}

.reveal.d3 {
  transition-delay: 0.3s;
}

.reveal.d4 {
  transition-delay: 0.4s;
}

.reveal.d5 {
  transition-delay: 0.5s;
}


/* ─────────────────────────────────────────────────────────────
   KEYFRAMES
   ───────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}


/* ─────────────────────────────────────────────────────────────
   MOBILE  (≤ 768px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Restore system cursor */
  body {
    cursor: auto;
  }

  .cursor {
    display: none;
  }

  /* V2 Slim Navigation */
  .slim-nav-wrap {
    height: 70px;
    padding: 0;
  }

  .slim-nav {
    gap: 14px;
    padding: 0 20px;
    width: 100%;
    justify-content: space-between;
  }

  .slim-nav a {
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .slim-nav .nav-logo {
    font-size: 14px;
    margin-right: auto;
  }

  /* Page hero */
  .page-hero {
    padding: 120px 24px 56px;
  }

  .page-hero-title {
    font-size: clamp(40px, 12vw, 72px);
  }

  /* V2 Global Mobile Spacing */
  .v2-container {
    padding: 0 16px !important;
  }

  .precision-card {
    padding: 32px 20px !important;
  }

  /* Sections */
  .section {
    padding: 48px 16px;
  }

  /* Footer */
  footer {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 24px 36px;
  }

  .footer-right {
    align-items: flex-start;
  }

  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }
}