/* ============================================================
   Adame Benbaraka — Portfolio
   Cinematic dark theme, warm film-amber accent
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-2: #101012;
  --surface: #16161a;
  --text: #f4f1ea;
  --muted: #9a978f;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #ff5a1f;
  --accent-2: #ffb347;
  --accent-grad: linear-gradient(105deg, #ff5a1f 0%, #ffb347 100%);
  --radius: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Manrope", system-ui, sans-serif;
  --display: "Syne", "Manrope", sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

body.no-scroll { overflow: hidden; }

img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader__inner { text-align: center; width: min(320px, 70vw); }
.loader__name {
  font-family: var(--display); font-weight: 800;
  letter-spacing: .28em; font-size: .8rem; color: var(--muted);
  display: block; margin-bottom: 1.2rem;
}
.loader__bar { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--accent-grad); }
.loader__pct { display: block; margin-top: .8rem; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Custom cursor ---------- */
.cursor, .cursor-follow { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9000; border-radius: 50%; mix-blend-mode: difference; }
.cursor { width: 7px; height: 7px; background: #fff; transform: translate(-50%, -50%); transition: transform .18s var(--ease); }
.cursor-follow { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.6); transform: translate(-50%, -50%); transition: transform .25s var(--ease), width .25s var(--ease), height .25s var(--ease); }
.cursor-follow.hovering { width: 64px; height: 64px; background: rgba(255,255,255,.08); }
.cursor.hovering { transform: translate(-50%, -50%) scale(0); }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-follow { display: none; } }

/* ---------- Scroll progress ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent-grad); z-index: 8000; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 3.5rem);
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10,10,11,.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding-top: .9rem; padding-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}
.nav__logo { display: flex; align-items: center; gap: .7rem; font-weight: 700; }
.nav__logo-mark {
  font-family: var(--display); font-weight: 800;
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; background: var(--accent-grad); color: #100b06;
  font-size: .95rem; letter-spacing: .02em;
}
.nav__logo-text { font-size: .98rem; letter-spacing: .01em; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a { font-size: .92rem; color: var(--muted); transition: color .3s; position: relative; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--accent); transition: width .3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  padding: .55rem 1.2rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--text) !important; transition: background .3s, border-color .3s, color .3s;
}
.nav__cta:hover { background: var(--accent); border-color: var(--accent); color: #100b06 !important; }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; width: 34px; height: 34px; flex-direction: column; justify-content: center; gap: 6px; }
.nav__burger span { display: block; height: 2px; width: 26px; background: var(--text); transition: transform .35s var(--ease), opacity .3s; }
.nav__burger.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(1.2rem, 5vw, 5rem); overflow: hidden; }
.hero__video-wrap { position: absolute; inset: 0; z-index: -2; }
.hero__video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); }
.hero__overlay { position: absolute; inset: 0; background:
  radial-gradient(120% 90% at 20% 10%, rgba(10,10,11,.35), transparent 60%),
  linear-gradient(180deg, rgba(10,10,11,.55) 0%, rgba(10,10,11,.35) 40%, rgba(10,10,11,.92) 100%); }
.hero__grain { position: absolute; inset: 0; opacity: .06; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%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)'/%3E%3C/svg%3E"); }

.hero__content { max-width: 900px; }
.hero__eyebrow { font-size: .8rem; letter-spacing: .34em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 1.4rem; font-weight: 600; }
.hero__title { font-family: var(--display); font-weight: 800; line-height: .96; font-size: clamp(2.9rem, 10vw, 8.2rem); letter-spacing: -0.02em; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; transform: translateY(110%); }
.hero__title .accent > span { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { max-width: 540px; margin: 1.8rem 0 2.4rem; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__scroll { position: absolute; bottom: 2rem; right: clamp(1.2rem, 5vw, 5rem); display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; }
.hero__scroll-line { width: 1px; height: 54px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll-line i { position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--accent); animation: scrollLine 2s var(--ease) infinite; }
@keyframes scrollLine { 0% { top: -50%; } 100% { top: 100%; } }

.hero__marquee { position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem 0; border-top: 1px solid var(--line); background: rgba(10,10,11,.35); overflow: hidden; }
.marquee__track { display: flex; align-items: center; gap: 2rem; white-space: nowrap; width: max-content; animation: marquee 26s linear infinite; }
.marquee__track span { font-family: var(--display); font-weight: 700; font-size: clamp(1rem, 2vw, 1.4rem); color: rgba(244,241,234,.55); }
.marquee__track em { color: var(--accent); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .95rem; transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s; }
.btn svg { transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--accent-grad); color: #140c05; }
.btn--primary:hover { transform: translateY(-3px); }
.btn--ghost { border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); transform: translateY(-3px); }
.btn--lg { padding: 1.15rem 2rem; font-size: 1.02rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.stat { background: var(--bg); padding: clamp(2rem, 5vw, 3.4rem) 1.5rem; text-align: center; }
.stat__num { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.6rem); background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--muted); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 11vw, 9rem) clamp(1.2rem, 5vw, 5rem); }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); flex-wrap: wrap; }
.section__eyebrow { font-size: .78rem; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: .9rem; }
.section__title { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -0.02em; }
.section__desc { max-width: 420px; color: var(--muted); font-size: 1rem; }
.accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Work grid ---------- */
.work__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(.8rem, 1.6vw, 1.4rem); }
.work__item {
  position: relative; grid-column: span 2; border-radius: var(--radius); overflow: hidden;
  cursor: pointer; background: var(--surface); border: 1px solid var(--line);
  aspect-ratio: 4/5; opacity: 0; transform: translateY(40px);
  transition: transform .8s var(--ease), opacity .8s var(--ease), border-color .4s;
}
.work__item.in { opacity: 1; transform: none; }
.work__item.feature { grid-column: span 4; aspect-ratio: 16/10; }
.work__item.wide { grid-column: span 3; aspect-ratio: 16/11; }
.work__item:hover { border-color: rgba(255,90,31,.5); }
.work__item video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .5s; filter: saturate(.9) brightness(.85); }
.work__item:hover video { transform: scale(1.06); filter: saturate(1.05) brightness(1); }
.work__grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,11,.05) 0%, rgba(10,10,11,.15) 45%, rgba(10,10,11,.92) 100%); z-index: 1; }
.work__info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(1.1rem, 2.2vw, 1.8rem); display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.work__info h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.05rem, 1.8vw, 1.5rem); line-height: 1.1; }
.work__cat { color: var(--accent-2); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: .4rem; display: block; }
.work__play { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.1); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; transition: background .3s, transform .3s var(--ease); }
.work__play svg { margin-left: 2px; }
.work__item:hover .work__play { background: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.work__badge { position: absolute; top: 1rem; left: 1rem; z-index: 2; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; background: rgba(10,10,11,.55); backdrop-filter: blur(6px); border: 1px solid var(--line); padding: .35rem .7rem; border-radius: 999px; color: var(--text); }

/* ---------- Featured ---------- */
.featured__frame { display: block; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; box-shadow: 0 40px 120px -40px rgba(255,90,31,.25); transition: transform .5s var(--ease), border-color .4s, box-shadow .5s; }
.featured__frame:hover { transform: translateY(-4px); border-color: rgba(255,90,31,.5); box-shadow: 0 50px 140px -40px rgba(255,90,31,.4); }
.featured__ratio { position: relative; padding-top: 56.25%; }
.featured__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .5s; }
.featured__frame:hover .featured__poster { transform: scale(1.04); filter: brightness(1.05); }
.featured__veil { position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 45%, rgba(0,0,0,.15), rgba(0,0,0,.55)); }
.featured__play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem; z-index: 2; }
.featured__play-btn { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #140c05; background: var(--accent-grad); box-shadow: 0 12px 40px -8px rgba(255,90,31,.6); transition: transform .4s var(--ease); }
.featured__play-btn svg { margin-left: 4px; }
.featured__frame:hover .featured__play-btn { transform: scale(1.1); }
.featured__caption { text-align: center; }
.featured__label { font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-2); }
.featured__name { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 3.5vw, 2.6rem); margin-top: .25rem; }
.featured__yt { position: absolute; top: 1.1rem; right: 1.2rem; z-index: 3; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.about__media { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/5; background: var(--surface); }
.about__video { width: 100%; height: 100%; object-fit: cover; filter: saturate(1) brightness(.92); }
.about__media-tag { position: absolute; bottom: 1rem; left: 1rem; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; background: rgba(10,10,11,.6); backdrop-filter: blur(6px); border: 1px solid var(--line); padding: .45rem .9rem; border-radius: 999px; }
.about__title { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 1.4rem; letter-spacing: -0.02em; }
.about__text p { color: var(--muted); margin-bottom: 1.1rem; font-size: 1.04rem; }
.about__list { list-style: none; margin-top: 2rem; display: grid; gap: .2rem; }
.about__list li { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); font-weight: 500; }
.about__list li:last-child { border-bottom: 1px solid var(--line); }
.about__list span { font-family: var(--display); color: var(--accent); font-weight: 700; font-size: .9rem; }

/* ---------- Gear ---------- */
.gear__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2.5vw, 1.8rem); }
.gear__card { position: relative; display: flex; gap: 1.4rem; align-items: flex-start; padding: clamp(1.6rem, 3vw, 2.6rem); border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, var(--surface), var(--bg-2)); transition: transform .4s var(--ease), border-color .4s; overflow: hidden; }
.gear__card:hover { transform: translateY(-6px); border-color: rgba(255,90,31,.4); }
.gear__card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 100% 0%, rgba(255,90,31,.14), transparent 70%); opacity: 0; transition: opacity .5s; }
.gear__card:hover::after { opacity: 1; }
.gear__icon { flex-shrink: 0; width: 62px; height: 62px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--accent-2); }
.gear__card h3 { font-family: var(--display); font-size: 1.4rem; font-weight: 700; margin-bottom: .5rem; }
.gear__card p { color: var(--muted); font-size: .98rem; }
.gear__label { position: absolute; top: 1.4rem; right: 1.4rem; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { text-align: center; position: relative; }
.contact__inner { max-width: 780px; margin: 0 auto; }
.contact__title { font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 8vw, 6rem); line-height: .98; letter-spacing: -0.02em; margin-bottom: 1.4rem; }
.contact__sub { color: var(--muted); font-size: 1.1rem; max-width: 480px; margin: 0 auto 2.4rem; }
.contact__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.contact__email { display: inline-block; font-family: var(--display); font-weight: 700; font-size: clamp(1.1rem, 2.4vw, 1.6rem); margin-bottom: 2.4rem; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; transition: opacity .3s; }
.contact__email:hover { opacity: .8; }
.contact__socials { display: flex; gap: 2rem; justify-content: center; }
.contact__socials a { color: var(--muted); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; transition: color .3s; position: relative; }
.contact__socials a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { display: flex; justify-content: space-between; align-items: center; padding: 2rem clamp(1.2rem, 5vw, 5rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; gap: 1rem; flex-wrap: wrap; }
.footer__mid { letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 7000; background: rgba(5,5,6,.94); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: clamp(1rem, 4vw, 3rem); opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__stage { width: min(1100px, 100%); transform: scale(.96); transition: transform .5s var(--ease); }
.lightbox.open .lightbox__stage { transform: scale(1); }
.lightbox__video { width: 100%; max-height: 78vh; border-radius: 14px; background: #000; box-shadow: 0 40px 120px -30px rgba(0,0,0,.8); }
.lightbox__meta { margin-top: 1.2rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.lightbox__meta h3 { font-family: var(--display); font-weight: 700; font-size: 1.4rem; }
.lightbox__meta p { color: var(--accent-2); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }
.lightbox__close { position: absolute; top: 1.4rem; right: 1.4rem; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background .3s, transform .3s var(--ease); }
.lightbox__close:hover { background: var(--accent); transform: rotate(90deg); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about__grid { grid-template-columns: 1fr; }
  .gear__grid { grid-template-columns: 1fr; }
  .work__item, .work__item.feature, .work__item.wide { grid-column: span 3; }
}
@media (max-width: 760px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 1.6rem; padding: 2rem 2.2rem; background: var(--bg-2);
    border-left: 1px solid var(--line);
    transform: translateX(100%); transition: transform .5s var(--ease); z-index: 400;
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { font-size: 1.3rem; color: var(--text); }
  .nav__burger { display: flex; z-index: 500; }
  .stats { grid-template-columns: 1fr 1fr; }
  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .work__item, .work__item.feature, .work__item.wide { grid-column: span 2; aspect-ratio: 4/5; }
  .section__head { align-items: flex-start; }
  .footer { justify-content: center; text-align: center; }
}
@media (max-width: 460px) {
  .work__grid { grid-template-columns: 1fr; }
  .work__item, .work__item.feature, .work__item.wide { grid-column: span 1; }
  .stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal, .work__item, .hero__title .line > span { opacity: 1 !important; transform: none !important; }
}
