/* ================================================================
   YANNI HACHOUR — cinematic scroll portfolio
   ink black / #FDE050 / cream / condensed display
   ================================================================ */

:root {
  --ink: #070707;
  --ink-2: #0d0d0c;
  --accent: #FDE050;
  --cream: #f4eddc;
  --cream-dim: rgba(244, 237, 220, 0.55);
  --cream-faint: rgba(244, 237, 220, 0.22);
  --display: "Anton", Impact, sans-serif;
  --body: "Space Grotesk", "Helvetica Neue", sans-serif;
}

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

html { scrollbar-width: thin; scrollbar-color: rgba(253, 224, 80, .5) #000; }
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);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}
@media (hover: none) { body { cursor: auto; } }

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

.accent { color: var(--accent); }
.accent-text, .accent-text .char { color: var(--accent) !important; }

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

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s cubic-bezier(.77, 0, .18, 1), visibility .8s;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { text-align: center; }
.preloader-name {
  font-family: var(--display);
  font-size: clamp(64px, 10vw, 140px);
  color: var(--accent);
  line-height: 1;
  letter-spacing: .02em;
}
.preloader-count {
  margin-top: 18px;
  font-size: 13px; letter-spacing: .35em;
  color: var(--cream-dim);
  font-variant-numeric: tabular-nums;
}
.preloader-bar {
  margin: 14px auto 0; width: 180px; height: 2px;
  background: rgba(244, 237, 220, .12);
  overflow: hidden;
}
.preloader-bar-fill {
  width: 0%; height: 100%;
  background: var(--accent);
  transition: width .2s ease-out;
}

/* ============ GRAIN ============ */
.grain {
  position: fixed; inset: -100px; z-index: 120;
  pointer-events: none;
  opacity: .07;
  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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-38px, 22px); }
  50% { transform: translate(24px, -30px); }
  75% { transform: translate(-14px, -18px); }
  100% { transform: translate(0, 0); }
}

/* ============ CURSOR ============ */
.cursor, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 150;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
}
.cursor {
  width: 8px; height: 8px;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid rgba(253, 224, 80, .55);
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s, border-color .25s;
}
.cursor-ring.is-hover { width: 64px; height: 64px; border-color: var(--accent); }
@media (hover: none) { .cursor, .cursor-ring { display: none; } }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(20px, 4vw, 56px);
  mix-blend-mode: difference;
}
.nav-logo {
  font-family: var(--display);
  font-size: 26px; letter-spacing: .04em;
  color: var(--cream);
}
.nav-links { display: flex; gap: clamp(16px, 3vw, 40px); align-items: center; }
.nav-links a {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--cream-dim);
  transition: color .3s;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--cream-faint);
  padding: 10px 18px; border-radius: 999px;
  color: var(--cream) !important;
}
.nav-cta:hover { border-color: var(--accent); }

/* ============ SECTION LABEL ============ */
.section-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .4em; text-transform: uppercase;
  color: var(--cream-dim);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ============ HERO ============ */
.hero { height: 560vh; position: relative; }
.hero-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: var(--ink);
}
#orbit-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(7, 7, 7, .78) 100%),
    linear-gradient(to bottom, rgba(7, 7, 7, .55), transparent 22%, transparent 72%, rgba(7, 7, 7, .85));
  pointer-events: none;
}

.hero-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  pointer-events: none;
  z-index: 3;
}
.hero-eyebrow {
  margin-bottom: clamp(10px, 2vh, 26px);
  justify-content: center;
  font-size: 12px; letter-spacing: .5em;
  color: var(--cream-dim);
  display: flex;
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(72px, 16.5vw, 300px);
  line-height: .88;
  letter-spacing: .01em;
  color: var(--cream);
  text-transform: uppercase;
}
.hero-line { display: block; }
.hero-line-2 .char { color: var(--accent); }
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%) rotate(6deg);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}
.chars-in .char { opacity: 1; transform: translateY(0) rotate(0deg); }
.hero-sub {
  margin-top: clamp(16px, 3vh, 34px);
  font-size: clamp(14px, 1.4vw, 19px);
  font-weight: 300;
  letter-spacing: .06em;
  line-height: 1.7;
  color: var(--cream-dim);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease .9s, transform 1s cubic-bezier(.16, 1, .3, 1) .9s;
}
.chars-in ~ .hero-sub, .hero-sub.in { opacity: 1; transform: none; }

.hero-hud {
  position: absolute; left: 0; right: 0; bottom: 34px;
  display: flex; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  font-size: 11px; letter-spacing: .3em;
  color: var(--cream-dim);
  z-index: 4;
  font-variant-numeric: tabular-nums;
}
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: .5em; color: var(--cream-dim);
  z-index: 4;
  transition: opacity .5s;
}
.scroll-cue-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: cue 1.8s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ============ STATS ============ */
.stats {
  position: relative;
  padding: clamp(90px, 16vh, 180px) clamp(20px, 4vw, 56px);
  background: var(--ink);
}
.stats-grid {
  margin-top: clamp(40px, 7vh, 80px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(244, 237, 220, .12);
}
.stat {
  padding: clamp(28px, 4vw, 56px) clamp(16px, 2vw, 32px);
  border-right: 1px solid rgba(244, 237, 220, .12);
  border-bottom: 1px solid rgba(244, 237, 220, .12);
  position: relative;
  overflow: hidden;
  transition: background .4s;
}
.stat:hover { background: rgba(253, 224, 80, .045); }
.stat::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.77, 0, .18, 1);
}
.stat:hover::after { transform: scaleX(1); }
.stat-value {
  font-family: var(--display);
  font-size: clamp(44px, 5.6vw, 96px);
  line-height: 1;
  color: var(--cream);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stat-prefix, .stat-suffix { color: var(--accent); }
.stat-label {
  margin-top: 16px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--cream-dim);
}

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden;
  padding: clamp(18px, 3vh, 34px) 0;
  border-top: 1px solid rgba(244, 237, 220, .1);
  border-bottom: 1px solid rgba(244, 237, 220, .1);
  background: var(--ink);
}
.marquee-track {
  display: flex; white-space: nowrap;
  will-change: transform;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 64px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 237, 220, .35);
}
.marquee-track span { padding-right: 12px; }

/* ============ PILLARS ============ */
.pillars { height: 480vh; position: relative; }
.pillars-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: var(--ink-2);
}
.bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.pillars-shade {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(7, 7, 7, .92) 0%, rgba(7, 7, 7, .55) 45%, rgba(7, 7, 7, .25) 100%);
}
.pillars-label { position: absolute; top: 110px; left: clamp(20px, 4vw, 56px); z-index: 3; }

.pillar {
  position: absolute;
  left: clamp(20px, 4vw, 56px);
  right: clamp(20px, 4vw, 56px);
  top: 50%;
  transform: translateY(-42%);
  opacity: 0;
  visibility: hidden;
  z-index: 2;
  transition: opacity .55s ease, transform .55s cubic-bezier(.16, 1, .3, 1), visibility .55s;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.pillar.active {
  opacity: 1; visibility: visible;
  transform: translateY(-50%);
}
.pillar-index {
  font-size: 13px; letter-spacing: .5em;
  color: var(--accent);
  margin-bottom: 18px;
}
.pillar-title {
  font-family: var(--display);
  font-size: clamp(46px, 8.4vw, 150px);
  line-height: .92;
  text-transform: uppercase;
  color: var(--cream);
}
.pillar-title > span { display: block; }
.pillar-title > span:last-child { color: var(--accent); }
.pillar-title > span:last-child .char { color: var(--accent); }
.pillar-copy {
  margin: 26px auto 0;
  max-width: 480px;
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--cream-dim);
}
.pillar-progress {
  position: absolute; right: clamp(20px, 4vw, 56px); top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 180px;
  background: rgba(244, 237, 220, .15);
  z-index: 3;
}
.pillar-progress-fill {
  width: 100%; height: 0%;
  background: var(--accent);
}

/* ============ WORK ============ */
.work { position: relative; }
.work-bg-wrap {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  margin-bottom: -100vh;
  margin-bottom: -100svh;
}
.work-video { filter: saturate(.85); }
.work-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(7, 7, 7, .97) 0%, rgba(7, 7, 7, .72) 30%, rgba(7, 7, 7, .78) 100%);
}
.work-content {
  position: relative; z-index: 2;
  padding: clamp(100px, 18vh, 200px) clamp(20px, 4vw, 56px) clamp(90px, 14vh, 160px);
}
.work-heading {
  margin-top: 22px;
  font-family: var(--display);
  font-size: clamp(60px, 11vw, 200px);
  line-height: .9;
  text-transform: uppercase;
}
.work-grid {
  margin-top: clamp(46px, 8vh, 90px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  gap: 22px;
  padding: clamp(26px, 3vw, 44px);
  background: rgba(13, 13, 12, .72);
  border: 1px solid rgba(244, 237, 220, .12);
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  transform: translateY(0) rotate(0.001deg);
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), border-color .4s, background .4s;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(253, 224, 80, .09), transparent 45%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.card:hover { transform: translateY(-10px); border-color: rgba(253, 224, 80, .55); background: rgba(13, 13, 12, .88); }
.card:hover::before { opacity: 1; }
.card-logo {
  width: 54px; height: 54px;
  border: 1px solid rgba(244, 237, 220, .18);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--cream);
  transition: color .4s, border-color .4s, transform .5s cubic-bezier(.16, 1, .3, 1);
}
.card-logo svg { width: 26px; height: 26px; }
.card:hover .card-logo { color: var(--accent); border-color: var(--accent); transform: rotate(-6deg) scale(1.06); }
.card-body h3 {
  font-family: var(--display);
  font-size: clamp(26px, 2.6vw, 42px);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--cream);
  transition: color .3s;
}
.card:hover .card-body h3 { color: var(--accent); }
.card-body p {
  margin-top: 12px;
  font-size: 14.5px; font-weight: 300;
  line-height: 1.7;
  color: var(--cream-dim);
  max-width: 420px;
}
.card-tag {
  margin-top: auto;
  font-size: 10.5px; letter-spacing: .34em;
  color: var(--cream-faint);
  transition: color .3s;
}
.card:hover .card-tag { color: var(--accent); }

/* ============ FINALE ============ */
.finale {
  position: relative;
  padding: clamp(110px, 20vh, 220px) clamp(20px, 4vw, 56px) 40px;
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.finale-title {
  margin-top: 30px;
  font-family: var(--display);
  font-size: clamp(52px, 10.5vw, 190px);
  line-height: .92;
  text-transform: uppercase;
}
.finale-line { display: block; }
.finale-actions {
  margin-top: clamp(40px, 7vh, 70px);
  display: flex; gap: 18px; flex-wrap: wrap; justify-content: center;
}
.btn {
  font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
  padding: 20px 42px;
  border-radius: 999px;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1), background .3s, color .3s, border-color .3s;
}
.btn-solid { background: var(--accent); color: var(--ink); font-weight: 600; }
.btn-solid:hover { transform: translateY(-4px) scale(1.03); background: #ffe97a; }
.btn-ghost { border: 1px solid rgba(244, 237, 220, .3); color: var(--cream); }
.btn-ghost:hover { transform: translateY(-4px) scale(1.03); border-color: var(--accent); color: var(--accent); }

.footer {
  margin-top: clamp(90px, 16vh, 170px);
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid rgba(244, 237, 220, .12);
  font-size: 11px; letter-spacing: .26em;
  color: var(--cream-dim);
}
.footer-right { display: flex; gap: 30px; flex-wrap: wrap; }
.footer-right a:hover { color: var(--accent); }

/* ============ SCROLL REVEALS ============ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s cubic-bezier(.16, 1, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: 1fr; }
  .hero { height: 420vh; }
  .pillars { height: 400vh; }
  .nav-links a:not(.nav-cta) { display: none; }
  .pillar-progress { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .char { transition-duration: .01s; }
}
