/* ============================================================
   Abanoub® — Digital Designer
   ============================================================ */

:root {
  --bg: #0d0d0e;
  --bg-soft: #131315;
  --ink: #f2f0ec;
  --ink-dim: #8a8880;
  --line: rgba(242, 240, 236, 0.12);
  --accent: #c8f04e;
  --font-display: "Syne", sans-serif;
  --font-body: "Inter", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: initial; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

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

::selection { background: var(--accent); color: #0d0d0e; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; }

@media (pointer: fine) {
  body, a, button { cursor: none; }
}

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem;
}
.preloader__inner {
  display: flex; align-items: baseline; gap: 1.5rem;
  overflow: hidden;
}
.preloader__brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.2rem);
}
.preloader__brand sup { color: var(--accent); font-size: 0.5em; }
.preloader__count {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.preloader__hint {
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-dim);
}

/* ============ CURSOR ============ */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 150;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.cursor-follower {
  position: fixed; top: 0; left: 0; z-index: 149;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(242, 240, 236, 0.35);
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              background-color 0.35s, border-color 0.35s;
}
.cursor-follower span {
  font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: #0d0d0e; opacity: 0; transition: opacity 0.25s;
}
.cursor-follower.is-hover { width: 72px; height: 72px; background: var(--accent); border-color: var(--accent); }
.cursor-follower.is-hover span { opacity: 1; }
@media (pointer: coarse) { .cursor, .cursor-follower { display: none; } }

/* ============ HEADER ============ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem clamp(1.2rem, 4vw, 3rem);
  mix-blend-mode: normal;
}
.header__logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; letter-spacing: 0.01em;
}
.header__logo sup { color: var(--accent); }
.header__logo-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #e8ffb0 0%, var(--accent) 35%, #253312 80%, #0d0d0e 100%);
  box-shadow: 0 0 24px rgba(200, 240, 78, 0.35);
}

.view-toggle {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.8rem;
}
.view-toggle__btn {
  font-size: 0.85rem; letter-spacing: 0.04em;
  color: var(--ink-dim);
  transition: color 0.3s;
  padding: 0.4rem 0.2rem;
}
.view-toggle__btn.is-active { color: var(--ink); }
.view-toggle__btn:hover { color: var(--ink); }
.view-toggle__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-dim); }

.menu-btn {
  display: flex; align-items: center; gap: 0.55rem;
  background: var(--ink); color: #0d0d0e;
  padding: 0.65rem 1.2rem; border-radius: 99px;
  font-size: 0.85rem; font-weight: 500;
  transition: transform 0.3s var(--ease-out);
}
.menu-btn__dot { width: 6px; height: 6px; border-radius: 50%; background: #0d0d0e; }

/* ============ MENU OVERLAY ============ */
.menu {
  position: fixed; inset: 0; z-index: 120;
  visibility: hidden; pointer-events: none;
}
.menu.is-open { visibility: visible; pointer-events: auto; }
.menu__bg {
  position: absolute; inset: 0;
  background: var(--accent);
  transform: translateY(-100%);
  border-radius: 0 0 50% 50% / 0 0 8% 8%;
}
.menu__inner {
  position: relative; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(1.5rem, 8vw, 8rem);
  color: #0d0d0e;
}
.menu__list { display: flex; flex-direction: column; }
.menu__link {
  display: flex; align-items: baseline; gap: 1.5rem;
  padding: 0.5rem 0;
  overflow: hidden;
  /* hover motion lives here — GSAP owns .menu__word's transform */
  transition: transform 0.5s var(--ease-out);
}
.menu__link:hover { transform: translateX(1.5rem); }
.menu__index { font-size: 0.85rem; font-weight: 500; opacity: 0.5; }
.menu__word {
  display: inline-block;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3rem, 9vw, 7rem); line-height: 1.05;
  text-transform: uppercase;
  transition: opacity 0.4s;
}
.menu__link:hover .menu__word { opacity: 0.55; }
.menu__footer {
  position: absolute; bottom: 2.5rem; left: clamp(1.5rem, 8vw, 8rem); right: clamp(1.5rem, 8vw, 8rem);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.85rem; font-weight: 500;
}
.menu__footer a { border-bottom: 1px solid currentColor; }

/* ============ HERO ============ */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: var(--bg);
}
.hero__grid-bg {
  position: absolute; inset: -2%;
  background-image:
    linear-gradient(rgba(242,240,236,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242,240,236,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 2;
}
.hero__content {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 9.5rem);
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--ink);
}
.hero__title-line { display: block; overflow: hidden; }
.hero__title-line span { display: inline-block; will-change: transform; }
.hero__title-line--right { margin-left: clamp(1.5rem, 6vw, 6rem); }

.hero__chip {
  position: absolute; z-index: 5;
  left: 50%; bottom: 7vh;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.7rem;
  background: rgba(255, 255, 255, 0.96);
  color: #0d0d0e;
  padding: 0.45rem 1.1rem 0.45rem 0.45rem;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.45);
}
.hero__chip-thumb {
  width: 40px; height: 40px; border-radius: 10px;
  background-color: #ddd;
  background-size: cover; background-position: center;
}
.hero__chip-name { font-size: 0.9rem; font-weight: 500; min-width: 70px; }

.hero__meta--left {
  position: absolute; z-index: 5;
  left: clamp(1.2rem, 4vw, 3rem); bottom: 6vh;
  font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--ink-dim);
}
.hero__scroll-hint {
  position: absolute; z-index: 5;
  right: clamp(1.2rem, 4vw, 3rem); bottom: 6vh;
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--ink-dim);
}
.hero__scroll-line {
  width: 48px; height: 1px; background: var(--ink-dim);
  transform-origin: left center;
  animation: scrollPulse 2.2s var(--ease-out) infinite;
}
@keyframes scrollPulse {
  0% { transform: scaleX(0); opacity: 0; }
  40% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1) translateX(20px); opacity: 0; }
}

/* ============ SECTIONS SHARED ============ */
.section {
  position: relative; z-index: 10;
  background: var(--bg);
  padding: clamp(6rem, 14vh, 10rem) clamp(1.2rem, 5vw, 4rem);
}
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem; margin-bottom: 3rem;
}
.section__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  text-transform: uppercase; letter-spacing: -0.01em;
}
.section__count { color: var(--ink-dim); font-size: 0.95rem; }

/* ============ INTRO ============ */
.intro { border-top: 1px solid var(--line); }
.intro__eyebrow {
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 2.5rem;
}
.intro__statement {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.6rem, 4.2vw, 3.4rem);
  line-height: 1.25;
  max-width: 20ch;
  max-width: min(1100px, 95%);
}
.intro__statement .split-word { display: inline-block; }
.intro__row {
  display: flex; gap: clamp(2rem, 8vw, 7rem); flex-wrap: wrap;
  margin-top: 5rem;
}
.intro__stat { display: flex; flex-direction: column; gap: 0.4rem; }
.intro__stat-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.intro__stat-label { font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-dim); }

/* ============ WORK LIST ============ */
.work__list { border-top: 1px solid var(--line); }
.work-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto 4rem;
  align-items: center; gap: 1.5rem;
  padding: 1.6rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s, padding-left 0.35s var(--ease-out);
  position: relative;
}
.work-row:hover { background: var(--bg-soft); padding-left: 1.4rem; }
.work-row__index { font-size: 0.8rem; color: var(--ink-dim); }
.work-row__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  transition: color 0.3s;
}
.work-row:hover .work-row__name { color: var(--accent); }
.work-row__tag { font-size: 0.8rem; color: var(--ink-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.work-row__year { font-size: 0.85rem; color: var(--ink-dim); text-align: right; }

.work__preview {
  position: fixed; z-index: 90;
  width: 300px; height: 210px;
  border-radius: 12px; overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9);
  background: #1a1a1c;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}
.work__preview img { width: 100%; height: 100%; object-fit: cover; }

/* ============ SERVICES ============ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card {
  background: var(--bg);
  padding: 2.4rem 2rem 3rem;
  display: flex; flex-direction: column; gap: 1.2rem;
  transition: background-color 0.4s;
}
.service-card:hover { background: var(--bg-soft); }
.service-card__num { font-size: 0.8rem; color: var(--accent); }
.service-card h4 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.5rem;
}
.service-card p { color: var(--ink-dim); line-height: 1.65; font-size: 0.95rem; }

/* ============ FOOTER ============ */
.footer {
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.footer__marquee {
  overflow: hidden; white-space: nowrap;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0 2rem;
}
.footer__marquee-track {
  display: inline-flex;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3rem, 9vw, 8rem);
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242,240,236,0.4);
  will-change: transform;
}
.footer__cta {
  display: flex; align-items: center; justify-content: center; gap: 1.5rem;
  margin: 5rem auto;
  width: min(560px, 90%);
  padding: 2.2rem 2rem;
  border-radius: 99px;
  background: var(--accent);
  color: #0d0d0e;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 2rem);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
  box-shadow: 0 0 0 rgba(200,240,78,0);
}
.footer__cta:hover { box-shadow: 0 0 60px rgba(200,240,78,0.35); }
.footer__cta-arrow { transition: transform 0.35s var(--ease-out); }
.footer__cta:hover .footer__cta-arrow { transform: translateX(10px); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  font-size: 0.8rem; color: var(--ink-dim);
}
.footer__links { display: flex; gap: 1.5rem; }
.footer__links a { transition: color 0.3s; }
.footer__links a:hover { color: var(--accent); }

/* ============ REVEAL HELPERS ============ */
.reveal-line { opacity: 0; transform: translateY(24px); }

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  .hero__title-line--right { margin-left: 0; }
  .work-row { grid-template-columns: 2rem 1fr 3.4rem; }
  .work-row__tag { display: none; }
  .view-toggle { position: static; transform: none; }
  .header { gap: 0.5rem; }
  .hero__meta--left { display: none; }
  .hero__scroll-hint { display: none; }
  .work__preview { display: none; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .hero__scroll-line { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
