/* ============================================================
   VARY YONG — cinematic scroll portfolio
   ink black / oxblood accent / cream type / condensed display
   ============================================================ */

@font-face {
  font-family: 'Anton';
  src: url('../assets/fonts/anton.woff2') format('woff2');
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/spacegrotesk.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ink: #070707;
  --ink-soft: #0d0d0e;
  --red: #6e1423;        /* oxblood — large fields & display type */
  --red-lift: #8e2c3c;   /* lifted oxblood — thin lines & small accents */
  --red-deep: #45060f;   /* shadows & glows */
  --cream: #f2ede0;
  --cream-dim: rgba(242, 237, 224, 0.55);
  --display: 'Anton', 'Arial Narrow', sans-serif;
  --body: 'Space Grotesk', 'Segoe UI', sans-serif;
}

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

html { background: 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;
  cursor: default;
}

::selection { background: var(--red); color: var(--cream); }

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.2rem;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__mark {
  font-family: var(--display);
  font-size: 3rem; color: var(--red-lift); letter-spacing: 0.05em;
}
.preloader__count {
  font-family: var(--display);
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 1; color: var(--cream);
}
.preloader__count::after { content: '%'; font-size: 0.35em; color: var(--red-lift); margin-left: 0.1em; }
.preloader__bar {
  width: min(320px, 60vw); height: 2px; background: rgba(242,237,224,0.15);
  overflow: hidden;
}
.preloader__bar span { display: block; width: 0%; height: 100%; background: var(--red-lift); }
.preloader__hint {
  font-size: 0.65rem; letter-spacing: 0.45em; color: var(--cream-dim);
}

/* ============ CHROME ============ */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: var(--red-lift);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem 2.2rem;
  mix-blend-mode: difference;
}
.nav__mark {
  font-family: var(--display);
  font-size: 1.5rem; color: var(--cream); text-decoration: none; letter-spacing: 0.04em;
}
.nav__dot { color: var(--red-lift); }

.grain {
  position: fixed; inset: -100%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 260 260' xmlns='http://www.w3.org/2000/svg'%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.8s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

.cursor {
  position: fixed; z-index: 95; pointer-events: none;
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--red-lift);
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background 0.25s, opacity 0.3s;
  opacity: 0;
  will-change: left, top;
}
.cursor.on { opacity: 1; }
.cursor.hot { width: 44px; height: 44px; background: rgba(142, 44, 60, 0.16); }
@media (pointer: coarse) { .cursor { display: none; } }

/* ============ SHARED ============ */
.section-kicker {
  font-size: 0.7rem; letter-spacing: 0.5em; text-transform: uppercase;
  color: var(--cream-dim);
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.6rem;
}
.section-kicker--center { justify-content: center; }
.section-kicker__index {
  font-family: var(--display);
  color: var(--red-lift); font-size: 0.9rem; letter-spacing: 0.1em;
}

/* ============ HERO ============ */
.hero {
  position: relative; height: 100vh; overflow: hidden;
  background: var(--ink);
}
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block;
}
.hero__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(7,7,7,0.72) 100%),
    linear-gradient(to bottom, rgba(7,7,7,0.55), transparent 22%, transparent 72%, rgba(7,7,7,0.85));
}
.hero__content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
  padding: 0 1.5rem 4vh;
}
.hero__title {
  font-family: var(--display);
  font-size: clamp(5.2rem, 17.5vw, 19rem);
  line-height: 0.86;
  letter-spacing: 0.015em;
  text-align: center;
  color: var(--cream);
  text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center;
}
.hero__word { display: block; white-space: nowrap; }
.hero__word--offset { color: var(--red); -webkit-text-stroke: 0; }
.hero__word .ltr {
  display: inline-block;
  will-change: transform, opacity;
}
.hero__sub {
  margin-top: 2rem;
  font-size: clamp(0.85rem, 1.4vw, 1.1rem);
  letter-spacing: 0.14em; line-height: 1.75;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-align: center;
}
.hero__cta {
  margin-top: 2.6rem;
  pointer-events: auto;
}
.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-dim);
  text-align: center;
}
.hero__scrollline {
  width: 1px; height: 44px; background: rgba(242,237,224,0.25);
  position: relative; overflow: hidden;
}
.hero__scrollline::after {
  content: ''; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%; background: var(--red-lift);
  animation: scrollline 1.6s ease-in-out infinite;
}
@keyframes scrollline {
  0% { top: -50%; } 100% { top: 110%; }
}

/* ============ STATS ============ */
.stats {
  position: relative; z-index: 2;
  background: var(--ink);
  border-top: 1px solid rgba(242,237,224,0.08);
  border-bottom: 1px solid rgba(242,237,224,0.08);
  padding: clamp(4rem, 10vh, 7rem) 2rem;
}
.stats__inner {
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem;
}
.stat { text-align: center; }
.stat__num {
  font-family: var(--display);
  font-size: clamp(4rem, 9vw, 8.5rem);
  line-height: 1; color: var(--cream);
  display: flex; align-items: baseline; justify-content: center; gap: 0.08em;
}
.stat__suffix { color: var(--red-lift); font-size: 0.42em; }
.stat__label {
  margin-top: 1.1rem;
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cream-dim); line-height: 1.8;
  max-width: 260px; margin-left: auto; margin-right: auto;
}

/* ============ MARQUEE ============ */
.marquee {
  position: relative; z-index: 2;
  overflow: hidden; padding: 1.6rem 0;
  background: var(--red);
}
.marquee__track {
  display: flex; white-space: nowrap; width: max-content;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  color: var(--cream);
  letter-spacing: 0.06em;
}

/* ============ ABOUT ============ */
.about { position: relative; background: var(--ink); }
.about__media {
  position: absolute; inset: 0; overflow: hidden;
}
.about__video, .work__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.about__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(7,7,7,0.92) 0%, rgba(7,7,7,0.62) 46%, rgba(7,7,7,0.18) 100%),
    linear-gradient(to bottom, rgba(7,7,7,0.6), transparent 25%, transparent 75%, rgba(7,7,7,0.8));
}
.about__content {
  position: relative; z-index: 2;
  min-height: 100vh;
  max-width: 1200px; margin: 0 auto;
  padding: 16vh 2.4rem 14vh;
  display: flex; flex-direction: column; justify-content: center;
}
.about__heading {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  line-height: 0.95; text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 3.2rem;
}
.about__heading .ltr { display: inline-block; will-change: transform, opacity; }
.about__body { max-width: 680px; }
.about__line {
  font-size: clamp(1.05rem, 1.9vw, 1.45rem);
  line-height: 1.65;
  color: var(--cream);
  margin-bottom: 1.15em;
  will-change: opacity, transform;
}
.about__line--accent {
  font-weight: 600;
}
.about__line--accent .hl,
.about__line--accent {
  background: var(--red);
  color: var(--cream);
  display: inline;
  padding: 0.08em 0.25em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ============ WORK ============ */
.work { position: relative; background: var(--ink); }
.work__media { position: absolute; inset: 0; overflow: hidden; }
.work__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(7,7,7,0.82) 0%, rgba(7,7,7,0.5) 35%, rgba(7,7,7,0.88) 100%);
}
.work__content {
  position: relative; z-index: 2;
  min-height: 100vh;
  max-width: 1300px; margin: 0 auto;
  padding: 16vh 2.4rem 14vh;
  display: flex; flex-direction: column; justify-content: center;
}
.work__heading {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  line-height: 0.95; text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 3.4rem;
}
.work__cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.card {
  position: relative;
  display: block;
  padding: 2rem 1.8rem 4.4rem;
  min-height: 300px;
  background: rgba(13, 13, 14, 0.66);
  border: 1px solid rgba(242,237,224,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none; color: var(--cream);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
}
.card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--red-lift);
  transform: scaleY(0); transform-origin: 0 100%;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.card:hover {
  border-color: rgba(142, 44, 60, 0.85);
  background: rgba(13, 13, 14, 0.85);
  box-shadow: 0 24px 60px -18px rgba(110, 20, 35, 0.55);
}
.card:hover::before { transform: scaleY(1); }
.card__index {
  font-family: var(--display);
  font-size: 0.9rem; color: var(--red-lift); letter-spacing: 0.12em;
}
.card__title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.04; text-transform: uppercase;
  margin: 1.1rem 0 1rem;
}
.card__pitch {
  font-size: 0.95rem; line-height: 1.65; color: var(--cream-dim);
}
.card__arrow {
  position: absolute; left: 1.8rem; bottom: 1.6rem;
  font-size: 1.5rem; color: var(--red-lift);
  transform: translateX(-8px); opacity: 0.55;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.card:hover .card__arrow { transform: translateX(6px); opacity: 1; }

/* ============ FINALE ============ */
.finale {
  position: relative; z-index: 2;
  background: var(--ink);
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14vh 2rem 0;
  border-top: 1px solid rgba(242,237,224,0.08);
}
.finale__title {
  font-family: var(--display);
  font-size: clamp(4.4rem, 15vw, 16rem);
  line-height: 0.88; text-transform: uppercase;
  text-align: center; color: var(--cream);
  display: flex; flex-direction: column; align-items: center;
}
.finale__word { display: block; white-space: nowrap; }
.finale__word:last-child { color: var(--red); }
.finale__word .ltr { display: inline-block; will-change: transform, opacity; }
.finale__actions {
  margin-top: 3.4rem;
  display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center;
}
.btn {
  font-family: var(--body);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 1.25rem 2.6rem;
  border: 1px solid var(--red-lift);
  position: relative; overflow: hidden;
  transition: color 0.35s ease;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: var(--red);
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}
.btn:hover::before { transform: scaleX(1); transform-origin: 0 50%; }
.btn--solid { background: var(--red); color: var(--cream); }
.btn--solid::before { background: var(--cream); }
.btn--solid:hover { color: var(--ink); }
.btn--ghost { background: transparent; color: var(--cream); z-index: 1; }
.btn--ghost:hover { color: var(--cream); }
.footer {
  margin-top: auto;
  padding: 3rem 0 2rem;
  display: flex; gap: 1rem; align-items: center;
  font-size: 0.62rem; letter-spacing: 0.3em; color: rgba(242,237,224,0.35);
  text-transform: uppercase;
}
.footer__sep { color: var(--red-lift); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .stats__inner { grid-template-columns: 1fr; gap: 3.6rem; }
  .work__cards { grid-template-columns: 1fr; }
  .card { min-height: 0; padding-bottom: 4rem; }
  .about__content, .work__content { padding-top: 20vh; }
  .finale__actions { flex-direction: column; width: 100%; }
  .finale__actions .btn { width: 100%; }
  .footer { flex-direction: column; align-items: center; text-align: center; gap: 0.6rem; }
  .footer__sep { display: none; }
}
