/* ============================================
   DESIGN SYSTEM — devangshumitra.com
   Design tokens, typography, layout, components
   ============================================ */

/* ---- Tokens -------------------------------- */
:root {
  /* Colors */
  --color-bg:        #080808;
  --color-surface:   #0f0f0f;
  --color-surface-2: #161616;
  --color-text:      #ededed;
  --color-text-muted: #666666;
  --color-accent:    #e8e8e8;
  --color-accent-dim: #333333;
  --color-border:    #1a1a1a;
  --color-highlight: #4a9eff;

  /* Legacy aliases (keep for any inline uses) */
  --color-muted: #666666;

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  /* Type scale */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.25rem;   /* 20px */
  --text-2xl:  1.5rem;    /* 24px */
  --text-3xl:  1.875rem;  /* 30px */
  --text-4xl:  2.25rem;   /* 36px */
  --text-5xl:  3rem;      /* 48px */
  --text-6xl:  3.75rem;   /* 60px */
  --text-7xl:  4.5rem;    /* 72px */
  --text-hero: clamp(4rem, 10vw, 8rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --max-width:        1100px;
  --max-width-narrow: 680px;
  --max-width-wide:   1440px;
  --nav-height:       72px;

  /* Section spacing */
  --section-padding: min(160px, 15vw);

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Transitions */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --duration-fast:   150ms;
  --duration-base:   300ms;
  --duration-slow:   500ms;
  --duration-slower: 800ms;
}

/* ---- Reset --------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ---- Typography ---------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 { font-size: var(--text-hero); font-weight: 300; }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); font-weight: 500; }
h3 { font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl)); font-weight: 500; }
h4 { font-size: var(--text-xl); font-weight: 500; }
h5 { font-size: var(--text-lg); font-weight: 500; }
h6 { font-size: var(--text-base); font-weight: 500; }

p {
  line-height: 1.75;
  color: var(--color-text);
}

.text-muted  { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-small  { font-size: var(--text-sm); }
.text-mono   { font-family: var(--font-mono); }
.text-upper  {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Eyebrow / label style */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ---- Layout -------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.container--wide {
  max-width: var(--max-width-wide);
}

.section {
  padding-block: var(--section-padding);
}

.section--sm {
  padding-block: var(--space-16);
}

.section--lg {
  padding-block: var(--section-padding);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Flex helpers */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col    { flex-direction: column; }
.gap-2       { gap: var(--space-2); }
.gap-4       { gap: var(--space-4); }
.gap-6       { gap: var(--space-6); }
.gap-8       { gap: var(--space-8); }

/* ---- Navigation ---------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  /* No border — let it float */
  transition: background-color var(--duration-base) var(--ease-out),
              backdrop-filter var(--duration-base) var(--ease-out);
}

.nav.scrolled {
  background-color: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* No border-bottom on scrolled state either */
}

.nav__inner {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
  transition: opacity var(--duration-fast);
}

.nav__logo:hover {
  opacity: 0.7;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
  position: relative;
}

.nav__link:hover,
.nav__link.active {
  color: var(--color-text);
}

/* Focus visible indicator */
.nav__link:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}

.nav__hamburger:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: transform var(--duration-base) var(--ease-out),
              opacity var(--duration-fast);
  transform-origin: center;
}

.nav__hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}

.nav__mobile.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.nav__mobile .nav__link {
  font-size: var(--text-2xl);
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .nav__links    { display: none; }
  .nav__hamburger { display: flex; }
}

/* ---- Hero Section -------------------------- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--space-24);
}

.hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Darker overlay — text always wins */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.55) 50%,
    rgba(0, 0, 0, 0.30) 100%
  );
}

/* Bottom fade for smooth transition to content */
.hero__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 280px;
  z-index: 2;
  background: linear-gradient(to top, var(--color-bg) 0%, transparent 100%);
}

.hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* Eyebrow: mono, small, muted, tracked */
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* Name: Space Grotesk 300, massive */
.hero__name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-5);
}

.hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 2.5vw, var(--text-2xl));
  font-weight: 300;
  color: var(--color-text-muted);
  height: 2em;
  display: flex;
  align-items: center;
  margin-bottom: var(--space-10);
}

.hero__subtitle-rotate {
  color: var(--color-text-muted);
  font-weight: 300;
}

/* CTA: text + arrow, no background */
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.01em;
  transition: gap var(--duration-base) var(--ease-out),
              color var(--duration-fast);
  border-bottom: 1px solid rgba(232, 232, 232, 0.25);
  padding-bottom: var(--space-1);
}

.hero__cta:hover {
  color: var(--color-text);
  gap: var(--space-4);
  border-bottom-color: var(--color-text);
}

.hero__cta:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 4px;
}

.hero__cta-arrow {
  transition: transform var(--duration-base) var(--ease-out);
}

.hero__cta:hover .hero__cta-arrow {
  transform: translateX(4px);
}

/* ---- Footer -------------------------------- */
.footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-12);
}

.footer__inner {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-8);
}

.footer__brand {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.footer__tagline {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.footer__links {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer__link {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
}

.footer__link:hover {
  color: var(--color-text);
}

.footer__link:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 4px;
  border-radius: 2px;
}

.footer__bottom {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
  padding-top: var(--space-8);
  margin-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

@media (max-width: 600px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: var(--space-2); text-align: center; }
}

/* ---- Buttons ------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: background-color var(--duration-fast),
              color var(--duration-fast),
              transform var(--duration-fast),
              opacity var(--duration-fast);
  cursor: pointer;
}

.btn:active { transform: translateY(1px); }

.btn:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 4px;
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-bg);
}
.btn--primary:hover {
  opacity: 0.88;
}

.btn--outline {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background-color: transparent;
}
.btn--outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn--ghost {
  color: var(--color-text-muted);
  background: transparent;
}
.btn--ghost:hover { color: var(--color-text); }

/* Text button with arrow — primary CTA style */
.btn--text {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: gap var(--duration-base) var(--ease-out),
              color var(--duration-fast);
}

.btn--text:hover {
  color: var(--color-text);
  gap: var(--space-3);
}

/* ---- Cards --------------------------------- */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: border-color var(--duration-base),
              transform var(--duration-base) var(--ease-out);
}

.card:hover {
  border-color: var(--color-accent-dim);
  transform: translateY(-2px);
}

.card--flat { border-radius: 0; }
.card--borderless { border: none; background: transparent; }

/* ---- Tags / Pills -------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  background-color: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.tag--accent {
  background-color: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.tag--neutral {
  background-color: var(--color-surface);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

/* ---- Divider ------------------------------- */
.divider {
  width: 48px;
  height: 1px;
  background-color: var(--color-border);
  margin-block: var(--space-8);
}

/* ---- Section heading ----------------------- */
.section-heading {
  margin-bottom: var(--space-12);
}

.section-heading__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.section-heading__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section-heading__body {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 540px;
  line-height: 1.6;
}

/* ---- Utilities ----------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.full-bleed {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

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