/* ============================================================
   KEVIN PALUK — cinematic scroll portfolio
   ink black · warm bone accent · cream type
   ============================================================ */

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

:root {
  --ink: #060807;
  --ink-2: #0b0e0c;
  --accent: #d9cfb8;
  --accent-deep: #6f6653;
  --cream: #f3eee2;
  --cream-dim: rgba(243, 238, 226, 0.55);
  --display: 'Anton', Impact, sans-serif;
  --body: 'Space Grotesk', system-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;
}

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

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__inner { text-align: center; width: min(320px, 70vw); }
.preloader__name {
  font-family: var(--display);
  font-size: 4rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}
.preloader__bar {
  height: 2px; width: 100%;
  background: rgba(243, 238, 226, 0.12);
  overflow: hidden;
}
.preloader__fill {
  height: 100%; width: 0%;
  background: var(--accent);
  transition: width 0.2s ease-out;
}
.preloader__pct {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: var(--cream-dim);
}

/* ============ GRAIN ============ */
.grain {
  position: fixed; inset: -50%; z-index: 900;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' 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(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 2.2rem;
  /* a scrim guarantees legible contrast against every video backdrop on the
     page — mix-blend-mode: difference used to do this, but it turned the
     low-opacity label/button into an illegible muddy gray */
  background: linear-gradient(to bottom, rgba(4, 6, 5, 0.7) 0%, rgba(4, 6, 5, 0.32) 65%, transparent 100%);
}
.nav__logo {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--cream);
  text-decoration: none;
}
.nav__dot { color: var(--accent); }
.nav__meta { display: flex; align-items: center; gap: 1.6rem; }
.nav__label {
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  font-weight: 600;
  color: var(--cream);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.nav__cta {
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 700;
  color: var(--cream); text-decoration: none;
  background: rgba(243, 238, 226, 0.1);
  border: 1px solid rgba(243, 238, 226, 0.65);
  padding: 0.55rem 1.1rem; border-radius: 99px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.nav__cta:hover { background: var(--cream); color: #000; border-color: var(--cream); }

/* ============ PINNED STAGES ============ */
.pin-section { position: relative; }
.pin-stage {
  position: relative;
  height: 100vh; height: 100svh; width: 100%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.seq-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  background: var(--ink);
}
.stage-vignette {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 45%, rgba(4, 6, 5, 0.75) 100%),
    linear-gradient(to bottom, rgba(4, 6, 5, 0.55) 0%, transparent 22%, transparent 78%, rgba(4, 6, 5, 0.7) 100%);
}
.stage-vignette--heavy {
  background:
    linear-gradient(to right, rgba(4, 6, 5, 0.82) 0%, rgba(4, 6, 5, 0.35) 45%, rgba(4, 6, 5, 0.1) 100%),
    linear-gradient(to bottom, rgba(4, 6, 5, 0.6) 0%, transparent 25%, transparent 75%, rgba(4, 6, 5, 0.75) 100%);
}

.section-index {
  display: inline-block;
  font-size: 0.7rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.section-index--light { color: var(--accent); }

/* ============ HERO ============ */
.hero__content {
  position: relative; z-index: 3;
  text-align: center;
  padding: 0 4vw;
}
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(4.5rem, 17vw, 15.5rem);
  line-height: 0.88;
  letter-spacing: 0.01em;
  display: flex; flex-direction: column; align-items: center;
  text-shadow: 0 10px 80px rgba(0, 0, 0, 0.6);
}
.hero__line { display: block; white-space: nowrap; }
.hero__line .char { display: inline-block; will-change: transform, opacity; }
.hero__line--accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}
.hero__sub {
  margin-top: 2.4rem;
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 34px rgba(0, 0, 0, 0.8);
}
.hero__sub em { font-style: normal; color: var(--accent); }
.hero__scrollcue {
  position: absolute; bottom: 2.4rem; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  font-size: 0.65rem; letter-spacing: 0.45em; text-transform: uppercase;
  color: var(--cream-dim);
}
.hero__scrollcue-line {
  width: 1px; height: 46px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: cue-drop 1.8s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue-drop {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(18px); opacity: 0; }
}

/* ============ STATS ============ */
.stats {
  position: relative;
  padding: clamp(6rem, 14vh, 10rem) 6vw;
  background:
    radial-gradient(60% 90% at 85% 10%, rgba(217, 207, 184, 0.06), transparent 60%),
    var(--ink-2);
}
.stats__head { margin-bottom: 4rem; }
.stats__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1;
  letter-spacing: 0.01em;
}
.stats__title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(243, 238, 226, 0.09);
  border: 1px solid rgba(243, 238, 226, 0.09);
}
.stat {
  background: var(--ink-2);
  padding: 2.6rem 2rem 2.4rem;
  transition: background 0.4s;
}
.stat:hover { background: #131211; }
.stat__value {
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  line-height: 1;
  color: var(--accent);
}
.stat__label {
  margin-top: 0.9rem;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(243, 238, 226, 0.08);
  border-bottom: 1px solid rgba(243, 238, 226, 0.08);
  background: var(--ink);
}
.marquee__track {
  display: flex; align-items: center; gap: 2.8rem;
  width: max-content;
  will-change: transform;
}
.marquee__track span {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 238, 226, 0.45);
  white-space: nowrap;
  transition: color 0.3s;
}
.marquee:hover .marquee__track span { color: var(--cream); -webkit-text-stroke-color: transparent; }
.marquee__track i {
  font-style: normal;
  color: var(--accent);
  font-size: 1.2rem;
}

/* ============ PILLARS ============ */
.pillars__content {
  position: relative; z-index: 3;
  width: 100%;
  padding: 0 6vw;
}
.pillars__list { position: relative; min-height: 60vh; display: flex; align-items: center; }
.pillar {
  position: absolute; top: 50%; left: 0;
  transform: translateY(-50%);
  max-width: min(680px, 82vw);
  opacity: 0;
  visibility: hidden;
}
.pillar__index {
  font-family: var(--display);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.pillar__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.6rem, 10vw, 9rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-shadow: 0 8px 60px rgba(0, 0, 0, 0.7);
}
.pillar__body {
  margin-top: 1.6rem;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--cream);
  max-width: 46ch;
}
.pillars__progress {
  position: absolute; right: 6vw; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 0.9rem;
}
.pillars__tick {
  width: 3px; height: 42px;
  background: rgba(243, 238, 226, 0.18);
  transition: background 0.4s;
}
.pillars__tick.is-active { background: var(--accent); box-shadow: 0 0 14px rgba(217, 207, 184, 0.7); }

/* ============ WORK ============ */
/* the talking subject sits in the left third of the frame — anchor the crop
   there so narrow screens keep him in view instead of the empty studio wall */
.work .seq-video { object-position: 30% center; }

.work__content {
  position: relative; z-index: 3;
  width: 100%;
  padding: 0 6vw;
}
.work__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 3rem;
}
.work__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.9;
  text-shadow: 0 8px 60px rgba(0, 0, 0, 0.7);
}
.work__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 300px;
  padding: 1.6rem 1.5rem;
  background: rgba(6, 8, 7, 0.62);
  border: 1px solid rgba(243, 238, 226, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-decoration: none;
  color: var(--cream);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.45s, background 0.45s;
  will-change: transform;
}
.card::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover {
  transform: translateY(-10px);
  border-color: rgba(217, 207, 184, 0.55);
  background: rgba(8, 14, 11, 0.78);
}
.card:hover::after { transform: scaleX(1); }
.card__num {
  font-size: 0.72rem; letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 1.6rem;
}
.card__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1;
  letter-spacing: 0.02em;
}
.card__pitch {
  margin-top: 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--cream-dim);
  flex: 1;
}
.card__arrow {
  align-self: flex-end;
  font-size: 1.5rem;
  color: var(--accent);
  transform: translateX(-6px);
  opacity: 0.5;
  transition: transform 0.4s, opacity 0.4s;
}
.card:hover .card__arrow { transform: translateX(0); opacity: 1; }

/* ============ FINALE ============ */
/* depth-of-field: the backdrop falls out of focus behind the CTA layer */
.finale .seq-video {
  filter: blur(7px) brightness(0.78) saturate(0.9);
  transform: scale(1.06); /* hide soft edges created by the blur */
  /* the subject sits in the left third of the frame — anchor the crop there
     so portrait screens show the desk scene instead of the empty wall */
  object-position: 26% center;
}
.finale__content {
  position: relative; z-index: 3;
  text-align: center;
  padding: 0 5vw;
}
.finale__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 8.5vw, 8rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  display: flex; flex-direction: column; align-items: center;
  text-shadow: 0 10px 80px rgba(0, 0, 0, 0.75);
}
.finale__line { display: block; }
.finale__line--accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}
.finale__ctas {
  margin-top: 3rem;
  display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap;
}
.btn {
  font-family: var(--body);
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  text-decoration: none;
  padding: 1.15rem 2.6rem;
  border-radius: 99px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.35s, color 0.35s, box-shadow 0.35s, border-color 0.35s;
}
.btn--primary {
  background: var(--accent);
  color: #14120d;
  box-shadow: 0 0 0 rgba(217, 207, 184, 0);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 44px rgba(217, 207, 184, 0.35);
}
.btn--ghost {
  border: 1px solid rgba(243, 238, 226, 0.35);
  color: var(--cream);
}
.btn--ghost:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent);
}

.footer {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem 2.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.footer__links { display: flex; align-items: center; gap: 1.4rem; }
.footer__links a {
  display: inline-flex;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.3s;
}
.footer__links a:hover { color: var(--accent); }
.footer__links svg { width: 1.2rem; height: 1.2rem; }

/* ============ SERVICE PAGE ============ */
.service { padding-top: 7rem; }

.service-hero {
  position: relative;
  padding: 2rem 6vw 5rem;
  max-width: 1100px;
}
.service-hero__back {
  display: block;
  margin-bottom: 2.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.3s;
}
.service-hero__back:hover { color: var(--accent); }
.service-hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin-bottom: 2rem;
  text-shadow: 0 8px 60px rgba(0, 0, 0, 0.5);
}
.service-hero__title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}
.service-hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.6;
  color: var(--cream);
  max-width: 62ch;
}

.service-list { border-top: 1px solid rgba(243, 238, 226, 0.09); }
.service-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  padding: 3rem 6vw;
  border-bottom: 1px solid rgba(243, 238, 226, 0.09);
  opacity: 0;
  transform: translateY(40px);
  transition: background 0.4s;
}
.service-item:hover { background: rgba(243, 238, 226, 0.03); }
.service-item__index {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--accent);
}
.service-item__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.05;
  margin-bottom: 0.9rem;
}
.service-item__body {
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  line-height: 1.65;
  color: var(--cream-dim);
  max-width: 62ch;
}

.service-cta {
  text-align: center;
  padding: clamp(6rem, 16vh, 11rem) 5vw;
  background:
    radial-gradient(60% 90% at 50% 20%, rgba(217, 207, 184, 0.07), transparent 60%),
    var(--ink-2);
}
.service-cta__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 6.5vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  display: flex; flex-direction: column; align-items: center;
}
.service-cta__body {
  margin-top: 1.6rem;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--cream-dim);
}

.footer--static { position: relative; padding: 2.4rem 2.2rem 3rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .nav__label { display: none; }
  /* stacked cards can outgrow one screen — let the stage expand instead of clipping */
  .work .pin-stage { height: auto; min-height: 100vh; min-height: 100svh; padding: 7.5rem 0 4rem; }
  /* the subject now anchors the crop on the left — ease the left-side
     darkening so he stays visible; the cards carry their own backgrounds */
  .work .stage-vignette--heavy {
    background:
      linear-gradient(to right, rgba(4, 6, 5, 0.45) 0%, rgba(4, 6, 5, 0.25) 45%, rgba(4, 6, 5, 0.1) 100%),
      linear-gradient(to bottom, rgba(4, 6, 5, 0.4) 0%, transparent 25%, transparent 75%, rgba(4, 6, 5, 0.75) 100%);
  }
}
@media (max-width: 720px) {
  .service-item { grid-template-columns: 1fr; gap: 0.8rem; }
}
@media (max-width: 560px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat { padding: 2rem 1.6rem 1.8rem; }
  .work__grid { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .pillars__progress { display: none; }
  .footer { flex-direction: column; gap: 0.8rem; }
  .nav { padding: 1.2rem 1.4rem; }
}
