/* ============================================================
   AMINE HAMOUCHI — cinematic scroll portfolio
   ink black · emerald accent · cream type
   ============================================================ */

:root {
  --ink: #070806;
  --ink-2: #0c0e0b;
  --ink-3: #11140f;
  --cream: #f4efe3;
  --cream-dim: rgba(244, 239, 227, 0.55);
  --cream-faint: rgba(244, 239, 227, 0.22);
  --emerald: #16e07d;
  --emerald-deep: #0a7a44;
  --emerald-glow: rgba(22, 224, 125, 0.35);
  --display: 'Anton', Impact, sans-serif;
  --body: 'Archivo', 'Helvetica Neue', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-width: thin; scrollbar-color: var(--emerald-deep) var(--ink); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--emerald); color: var(--ink); }

a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--emerald); }

/* ---------- preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.preloader__inner { text-align: center; }
.preloader__name {
  display: block;
  font-family: var(--display);
  font-size: 1.4rem; letter-spacing: 0.35em;
  color: var(--cream-dim);
}
.preloader__count {
  display: block;
  font-family: var(--display);
  font-size: clamp(5rem, 18vw, 12rem);
  line-height: 1;
  color: var(--emerald);
  font-variant-numeric: tabular-nums;
}
.preloader__hint {
  display: block; margin-top: 0.8rem;
  font-size: 0.65rem; letter-spacing: 0.45em;
  color: var(--cream-faint);
}

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -100%; z-index: 90;
  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.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.055;
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 4%); }
  40% { transform: translate(4%, -2%); }
  60% { transform: translate(-2%, -4%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 95;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--emerald);
  pointer-events: none;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
  opacity: 0;
}
.cursor.is-active { opacity: 1; }
.cursor.is-hover { width: 52px; height: 52px; }
@media (hover: none) { .cursor { display: none; } }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 96;
  width: 100%; height: 2px;
  background: var(--emerald);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 2rem;
  mix-blend-mode: difference;
}
.nav__logo {
  font-family: var(--display);
  font-size: 1.3rem; letter-spacing: 0.2em;
}
.tm { color: var(--emerald); }
.nav__links { display: flex; gap: 1.8rem; align-items: center; }
.nav__links a {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  opacity: 0.75; transition: opacity 0.25s ease;
}
.nav__links a:hover { opacity: 1; }
.nav__cta {
  border: 1px solid var(--cream-faint);
  padding: 0.55em 1.1em; border-radius: 100px;
}
.nav__burger {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.nav__burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 5px auto;
  background: currentColor;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 8, 6, 0.94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-menu__inner {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: center;
}
.mobile-menu__link {
  font-family: var(--display);
  font-size: clamp(2.2rem, 9vw, 4rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mobile-menu__link--cta { color: var(--emerald); }

body.is-modal {
  overflow: hidden;
}
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow: hidden;
}
.modal.is-open { display: block; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 8, 6, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(840px, calc(100% - 2rem));
  max-height: calc(100dvh - 6rem);
  margin: 3rem auto;
  padding: 1.4rem 1.4rem 1.8rem;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(12, 14, 11, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(244, 239, 227, 0.14);
  border-radius: 16px;
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.85), 0 0 40px -10px rgba(22, 224, 125, 0.15);
  scrollbar-width: thin;
  scrollbar-color: var(--emerald-deep) rgba(7, 8, 6, 0.4);
}
.modal__dialog:focus {
  outline: none;
}
.modal__dialog::-webkit-scrollbar {
  width: 6px;
}
.modal__dialog::-webkit-scrollbar-track {
  background: rgba(7, 8, 6, 0.4);
  border-radius: 8px;
}
.modal__dialog::-webkit-scrollbar-thumb {
  background: var(--emerald-deep);
  border-radius: 8px;
}
.modal__dialog::-webkit-scrollbar-thumb:hover {
  background: var(--emerald);
}
.modal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 8, 6, 0.55);
  color: var(--cream);
  font-size: 1.6rem;
  line-height: 1;
}
.modal__video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #000;
}
.modal__copy { padding: 1.3rem 0.6rem 0.2rem; }
.modal__num {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--emerald);
}
.modal__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.2rem);
  text-transform: uppercase;
  line-height: 0.95;
  margin: 0.35em 0 0.45em;
}
.modal__lead {
  max-width: 62ch;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--cream-dim);
}
.modal__points {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.modal__points li {
  padding-left: 1rem;
  border-left: 2px solid var(--emerald-deep);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--cream);
}
.modal__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.2rem;
}
.modal__pills span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream);
  border: 1px solid rgba(244, 239, 227, 0.22);
  border-radius: 100px;
  padding: 0.4em 0.8em;
}
.modal__link {
  display: inline-block;
  margin-top: 1.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--emerald);
  border-radius: 100px;
  padding: 0.9em 1.4em;
}
.modal__link:hover { background: var(--cream); }
.modal__tag {
  display: inline-block;
  margin-top: 1.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--emerald);
  border: 1px solid rgba(22, 224, 125, 0.35);
  background: rgba(22, 224, 125, 0.08);
  border-radius: 100px;
  padding: 0.8em 1.3em;
}
.card__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: auto;
}
.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.6rem;
}
.modal__action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.85em 1.6em;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.modal__action:hover {
  transform: translateY(-2px);
}
.modal__action--primary {
  background: var(--emerald);
  color: var(--ink);
}
.modal__action--primary:hover {
  background: var(--cream);
  color: var(--ink);
}
.modal__action--secondary {
  border: 1px solid rgba(244, 239, 227, 0.25);
  color: var(--cream);
  background: rgba(244, 239, 227, 0.05);
}
.modal__action--secondary:hover {
  border-color: var(--emerald);
  color: var(--emerald);
  background: rgba(22, 224, 125, 0.1);
}
.card__detail { display: none; }
.modal__copy .card__detail { display: block; }

/* ---------- hero ---------- */
.hero { height: 420vh; position: relative; }
.hero__pin {
  position: sticky; top: 0;
  height: 100vh; overflow: hidden;
}
#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero__vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, transparent 40%, rgba(7, 8, 6, 0.75) 100%),
    linear-gradient(to bottom, rgba(7, 8, 6, 0.5) 0%, transparent 22%, transparent 72%, var(--ink) 100%);
  pointer-events: none;
}
.hero__content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 1rem;
}
.hero__eyebrow {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.55em;
  color: var(--emerald);
  margin-bottom: 1.6rem;
}
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.6rem, 15.5vw, 15rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.hero__line { display: block; overflow: hidden; }
.hero__line--accent {
  -webkit-text-stroke: 2px var(--cream);
  color: transparent;
}
.hero__sub {
  margin-top: 2rem;
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--cream-dim);
  max-width: 34em;
}
.hero__scrollhint {
  position: absolute; bottom: 2.2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  font-size: 0.6rem; letter-spacing: 0.5em; color: var(--cream-faint);
}
.hero__scrollbar {
  width: 1px; height: 46px;
  background: var(--cream-faint);
  position: relative; overflow: hidden;
}
.hero__scrollbar-fill {
  position: absolute; inset: 0;
  background: var(--emerald);
  transform: translateY(-100%);
  animation: scrollhint 1.8s ease-in-out infinite;
}
@keyframes scrollhint {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* split chars */
.split .char { display: inline-block; will-change: transform; }

/* ---------- stats ---------- */
.stats {
  position: relative; z-index: 2;
  background: var(--ink);
  padding: clamp(5rem, 12vh, 9rem) 2rem;
  border-top: 1px solid rgba(244, 239, 227, 0.07);
}
.stats__strip {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  max-width: 1400px; margin: 0 auto;
}
.stat { text-align: center; min-width: 130px; }
.stat__num {
  display: block;
  font-family: var(--display);
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: 1;
  color: var(--emerald);
  font-variant-numeric: tabular-nums;
}
.stat__suffix, .stat__prefix { font-size: 0.55em; }
.stat__label {
  display: block; margin-top: 0.8rem;
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--cream-dim);
  max-width: 16em; margin-left: auto; margin-right: auto;
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; white-space: nowrap;
  padding: 1.6rem 0;
  border-top: 1px solid rgba(244, 239, 227, 0.07);
  border-bottom: 1px solid rgba(244, 239, 227, 0.07);
  background: var(--ink);
  position: relative; z-index: 2;
}
.marquee__track {
  display: inline-flex;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  letter-spacing: 0.06em;
  color: transparent;
  -webkit-text-stroke: 1px var(--cream-faint);
  will-change: transform;
}

/* ---------- shared bg video ---------- */
.bgvid {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.bgvid__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, var(--ink) 0%, rgba(7, 8, 6, 0.35) 18%, rgba(7, 8, 6, 0.45) 82%, var(--ink) 100%),
    radial-gradient(ellipse 80% 60% at 50% 50%, transparent 30%, rgba(7, 8, 6, 0.6) 100%);
}
.bgvid__shade--work {
  background:
    linear-gradient(to bottom, var(--ink) 0%, rgba(7, 8, 6, 0.72) 30%, rgba(7, 8, 6, 0.82) 100%);
}
.section-eyebrow {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.55em; color: var(--emerald);
  text-transform: uppercase;
}

/* ---------- pillars ---------- */
.pillars { height: 400vh; position: relative; }
.pillars__pin {
  position: sticky; top: 0;
  height: 100vh; overflow: hidden;
}
.pillars__head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  padding: 6rem 3rem 0;
}
.pillars__counter {
  font-family: var(--display);
  font-size: 1.1rem; letter-spacing: 0.15em;
  color: var(--cream);
}
.pillars__counter .dim { color: var(--cream-faint); }
.pillars__stage {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
}
.pillar {
  grid-area: 1 / 1;
  text-align: center;
  padding: 0 1.5rem;
  opacity: 0;
  visibility: hidden;
}
.pillar__index {
  display: block;
  font-family: var(--display);
  font-size: 1rem; letter-spacing: 0.4em;
  color: var(--emerald);
  margin-bottom: 1.2rem;
}
.pillar__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 8.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.pillar__list {
  list-style: none;
  margin-top: 1.8rem;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.6rem 1rem;
}
.pillar__list li {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--cream-dim);
  border: 1px solid rgba(244, 239, 227, 0.18);
  border-radius: 100px;
  padding: 0.55em 1.2em;
  backdrop-filter: blur(4px);
}

/* ---------- work ---------- */
.work {
  position: relative;
  padding: clamp(6rem, 14vh, 11rem) 2rem;
  overflow: hidden;
}
.work__pin { position: relative; }
.work__viewport { min-width: 0; }
.work__inner {
  position: relative; z-index: 2;
  max-width: 1400px; margin: 0 auto;
}
/* Page scroll drives the track, then the section releases. */
.work--scrub {
  padding: 0;
  overflow: visible;
}
.work--scrub .work__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 4.75rem clamp(1.25rem, 4vw, 3rem) 1.6rem;
}
.work--scrub .work__inner { width: 100%; }
.work--scrub .work__title {
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  margin: 0.16em 0 0.32em;
}
.work--scrub .work__viewport {
  overflow: hidden;
  margin-right: calc(50% - 50vw);
}
.work--scrub .work__track {
  width: max-content;
  overflow: visible;
  scroll-snap-type: none;
  cursor: default;
  will-change: transform;
}
.work--scrub .card.is-current {
  border-color: rgba(22, 224, 125, 0.55);
}
.work--scrub .work__controls { margin-top: 0.85rem; }
.work__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 7.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0.4em 0 1em;
}
.work__carousel { position: relative; }
.work__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
  padding-bottom: 0.25rem;
}
.work__track::-webkit-scrollbar { display: none; }
.work__track.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.work__controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.1rem;
}
.work__arrow {
  border: 1px solid rgba(244, 239, 227, 0.25);
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.85em 1.3em;
  border-radius: 100px;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.work__arrow:hover {
  border-color: var(--emerald);
  color: var(--emerald);
  transform: translateY(-2px);
}
.card {
  position: relative;
  flex: 0 0 min(82vw, 640px);
  min-height: 440px;
  display: flex;
  scroll-snap-align: start;
  padding: 1.6rem 1.6rem 1.8rem;
  background: #0c0e0b;
  border: 1px solid rgba(244, 239, 227, 0.1);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.card:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}
.card:hover {
  border-color: rgba(22, 224, 125, 0.45);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.75), 0 0 32px -8px rgba(22, 224, 125, 0.2);
}
.card--illustrated { flex-direction: column; }
.card__image {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  pointer-events: none;
}
.card--illustrated .card__body { margin-top: 0.8rem; }
.modal__image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #0c0e0b;
  border-radius: 12px 12px 0 0;
}
.card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transform: scale(1.005);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .card__video {
  transform: scale(1.035);
}
.card__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to top,
      rgba(7, 8, 6, 0.96) 0%,
      rgba(7, 8, 6, 0.85) 25%,
      rgba(7, 8, 6, 0.5) 55%,
      rgba(7, 8, 6, 0.15) 78%,
      transparent 100%
    );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.95) 28%,
    rgba(0, 0, 0, 0.5) 58%,
    rgba(0, 0, 0, 0.1) 78%,
    transparent 90%
  );
  -webkit-mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.95) 28%,
    rgba(0, 0, 0, 0.5) 58%,
    rgba(0, 0, 0, 0.1) 78%,
    transparent 90%
  );
  transition: backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease;
}
.card:hover .card__shade {
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.card__shade::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(22, 224, 125, 0.05) 0%,
    rgba(22, 224, 125, 0.02) 40%,
    transparent 70%
  );
  pointer-events: none;
}
.card__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.85rem;
  width: 100%;
  margin-top: auto;
}
.card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.card__pills span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream);
  border: 1px solid rgba(244, 239, 227, 0.22);
  border-radius: 100px;
  padding: 0.4em 0.8em;
  background: rgba(7, 8, 6, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.card:hover .card__pills span {
  border-color: rgba(22, 224, 125, 0.35);
  background: rgba(7, 8, 6, 0.65);
}
.card__num {
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--emerald);
  text-shadow: 0 0 14px rgba(22, 224, 125, 0.45);
}
.card__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85);
}
.card__pitch {
  font-size: 0.95rem; line-height: 1.55;
  color: var(--cream-dim);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.75);
}
.card__tag {
  margin-top: auto;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--cream-faint);
  transition: color 0.35s ease;
}
.card:hover .card__tag { color: var(--emerald); }
.card__glow {
  position: absolute; inset: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), var(--emerald-glow), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card:hover .card__glow { opacity: 1; }

/* ---------- tech stack ---------- */
.stack {
  position: relative;
  background: var(--ink);
  padding: clamp(6rem, 14vh, 10rem) 1.25rem clamp(5rem, 12vh, 8rem);
  border-top: 1px solid rgba(244, 239, 227, 0.07);
  scroll-margin-top: 4.5rem;
}
.stack__inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.stack__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 7.5rem);
  line-height: 0.92;
  text-transform: uppercase;
  margin: 0.35em 0 0.85em;
  overflow: hidden;
}
.stack__pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.stack__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 100%;
}
.stack__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 6.15rem;
  height: 4.85rem;
  border-radius: 14px;
  border: 1px solid rgba(244, 239, 227, 0.1);
  background: rgba(12, 14, 11, 0.72);
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    box-shadow 0.45s ease;
}
.stack__tile img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.15) brightness(1.45);
  transition: filter 0.35s ease;
}
.stack__tile span {
  max-width: 100%;
  padding: 0 0.35rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cream-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}
.stack__tile:hover {
  transform: translateY(-8px);
  border-color: var(--emerald);
  box-shadow: 0 16px 40px rgba(22, 224, 125, 0.22);
}
.stack__tile:hover img { filter: none; }
.stack__tile:hover span { color: var(--cream); }

/* ---------- finale ---------- */
.finale {
  position: relative;
  background: var(--ink);
  padding: clamp(7rem, 18vh, 13rem) 2rem 0;
  text-align: center;
  border-top: 1px solid rgba(244, 239, 227, 0.07);
}
.finale__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 12.5vw, 12rem);
  line-height: 0.92;
  text-transform: uppercase;
}
.finale__line { display: block; overflow: hidden; }
.finale__line--accent { color: var(--emerald); }
.finale__cta {
  margin-top: 3.2rem;
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.btn {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  padding: 1.15em 2.4em;
  border-radius: 100px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn--solid {
  background: var(--emerald);
  color: var(--ink);
}
.btn--solid:hover { background: var(--cream); }
.btn--ghost {
  border: 1px solid rgba(244, 239, 227, 0.25);
  color: var(--cream);
}
.btn--ghost:hover { border-color: var(--emerald); color: var(--emerald); }

/* ---------- footer ---------- */
.footer {
  margin-top: clamp(5rem, 12vh, 9rem);
  padding: 2.2rem 2rem 2.6rem;
  border-top: 1px solid rgba(244, 239, 227, 0.07);
  display: flex; flex-direction: column; gap: 1.1rem; align-items: center;
}
.footer__links { display: flex; gap: 2.2rem; flex-wrap: wrap; justify-content: center; }
.footer__links a {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--cream-dim);
  transition: color 0.25s ease;
}
.footer__links a:hover { color: var(--emerald); }
.footer__note {
  font-size: 0.68rem; letter-spacing: 0.08em;
  color: var(--cream-faint);
}

/* ---------- reveals ---------- */
.reveal { opacity: 0; transform: translateY(30px); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .hero__scrollbar-fill { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .nav { padding: 1.1rem 1.2rem; }
  .nav__links a:not(.nav__cta) { display: none; }
  .nav__burger { display: inline-block; }
  .pillars__head { padding: 5rem 1.4rem 0; }
  .stats__strip { gap: 2.2rem; }
  .stack__tile { width: 5.35rem; height: 4.5rem; }
  .work--scrub .work__pin { padding-top: 4.25rem; }
  .card--illustrated { padding: 1rem; }
  .card--illustrated .card__image { height: clamp(110px, 18vh, 150px); }
  .card--illustrated .card__body { gap: 0.65rem; margin-top: 0.65rem; }
  .card--illustrated .card__title { font-size: 1.55rem; }
  .card--illustrated .card__pitch { font-size: 0.85rem; line-height: 1.5; }
}
@media (max-width: 640px) and (max-height: 780px) {
  .card--illustrated .card__image { height: 110px; }
}
