/* ============ Rossie Cortes — Portfolio ============ */

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

:root {
  --ink: #060606;
  --ink-2: #0b0b0d;
  --cream: #f3ecdd;
  --cream-dim: rgba(243, 236, 221, 0.55);
  --cream-faint: rgba(243, 236, 221, 0.16);
  --accent: #e96a1e;
  --accent-soft: rgba(233, 106, 30, 0.35);
  --display: 'Anton', Impact, sans-serif;
  --body: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
}

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

html { scrollbar-width: thin; scrollbar-color: var(--accent) var(--ink); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

html, body { overflow-x: clip; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; max-width: 100%; }

/* ============ Preloader ============ */
.loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__inner { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.loader__brand { font-family: var(--display); font-size: 1rem; letter-spacing: 0.42em; color: var(--cream-dim); }
.loader__pct {
  font-family: var(--display); font-size: clamp(5rem, 16vw, 12rem);
  line-height: 1; color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.loader__pct::after { content: '%'; font-size: 0.25em; color: var(--accent); margin-left: 0.1em; }
.loader__bar { width: min(320px, 60vw); height: 2px; background: var(--cream-faint); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0%; background: var(--accent); transition: width 0.25s ease; }
.loader__hint { font-size: 0.65rem; letter-spacing: 0.4em; color: var(--cream-dim); }

/* ============ Grain ============ */
.grain {
  position: fixed; inset: -100px; z-index: 120; pointer-events: none;
  opacity: 0.07; mix-blend-mode: overlay;
  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 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-40px, 30px); }
  50% { transform: translate(30px, -50px); }
  75% { transform: translate(-30px, -20px); }
  100% { transform: translate(0, 0); }
}

/* ============ Cursor ============ */
.cursor { position: fixed; inset: 0; z-index: 190; pointer-events: none; }
.cursor__dot, .cursor__ring {
  position: absolute; top: 0; left: 0; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor__dot { width: 6px; height: 6px; background: var(--accent); }
.cursor__ring {
  width: 34px; height: 34px; border: 1px solid var(--accent-soft);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; border-color: var(--accent); }
@media (hover: none) { .cursor { display: none; } }

/* ============ Header ============ */
.head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.6rem 2.2rem;
  mix-blend-mode: difference;
}
.head__brand { font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.05em; }
.head__brand sup { color: var(--accent); font-size: 0.55em; }
.head__nav { display: flex; gap: 2rem; }
.head__nav a {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase;
  position: relative; padding-bottom: 3px;
}
.head__nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--cream); transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.head__nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.chword { display: inline-block; white-space: nowrap; }

.kicker {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.45em;
  color: var(--accent); text-transform: uppercase;
}

.section-head {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.8rem, 7vw, 7rem); line-height: 0.92;
  letter-spacing: 0.01em; color: var(--cream);
  overflow: hidden;
}
.section-head .ch { display: inline-block; }
.section-head--overlay {
  position: absolute; top: 5.5rem; left: 6vw; z-index: 3;
  text-shadow: 0 14px 60px rgba(6, 6, 6, 0.85);
}

/* ============ Hero ============ */
.hero { height: 520vh; position: relative; }
.hero__stick { position: sticky; top: 0; height: 100vh; overflow: hidden; }
#orbit { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--ink); }
.hero__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(6,6,6,0.82) 100%),
    linear-gradient(180deg, rgba(6,6,6,0.5) 0%, transparent 18%, transparent 78%, rgba(6,6,6,0.85) 100%);
}

.hero__type {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  text-align: center; pointer-events: none; z-index: 3;
  padding: 0 5vw max(7.5rem, 13vh);
}
.hero__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3.8rem, 14.5vw, 16rem);
  line-height: 0.84; letter-spacing: 0.01em;
  text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center;
}
.hero__line { display: block; overflow: hidden; padding: 0.04em 0.05em; }
.hero__line--2 { color: transparent; -webkit-text-stroke: 2px var(--cream); }
.hero__line .ch { display: inline-block; will-change: transform; }

.hero__subwrap { overflow: hidden; margin-top: 1.6rem; }
.hero__sub {
  font-size: clamp(0.95rem, 1.8vw, 1.35rem); font-weight: 700;
  letter-spacing: 0.55em; text-transform: uppercase; color: var(--accent);
}
.hero__para {
  margin-top: 1.3rem; max-width: 44rem;
  font-size: clamp(1.05rem, 1.7vw, 1.4rem); line-height: 1.5;
  color: var(--cream); font-weight: 500;
  text-shadow: 0 2px 24px rgba(6, 6, 6, 0.9);
  opacity: 0;
}

.hero__hud {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 1.6rem 2.2rem;
  font-size: 0.62rem; letter-spacing: 0.3em; color: var(--cream-dim);
  font-variant-numeric: tabular-nums;
}
.hud__frame { color: var(--accent); }
.hud__scroll { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.hud__scroll i { width: 1px; height: 42px; background: var(--cream-dim); display: block; animation: scrollhint 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes scrollhint { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ============ Marquee ============ */
.marquee { padding: 5rem 0 4rem; overflow: hidden; border-block: 1px solid var(--cream-faint); }
.marquee__track { display: flex; white-space: nowrap; will-change: transform; }
.marquee__track span {
  font-family: var(--display); font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1; color: var(--accent);
  text-transform: uppercase; flex-shrink: 0;
}

/* ============ Statement ============ */
.statement { padding: 10rem 6vw 2rem; display: flex; justify-content: center; }
.statement__text {
  font-family: var(--body); font-weight: 500;
  font-size: clamp(1.5rem, 2.7vw, 2.5rem); line-height: 1.45;
  max-width: 58rem; color: var(--cream);
  text-align: center;
}
.statement__text .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.statement__text .w > i { display: inline-block; font-style: normal; transform: translateY(110%); }

/* ============ Signals ============ */
.signals { padding: 8rem 6vw 12rem; }
.signals .section-head { margin-bottom: 5rem; }
.signals__list { list-style: none; }
.sig {
  position: relative;
  display: flex; align-items: baseline; gap: 3vw;
  padding: 3.2rem 0;
}
.sig__num {
  font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: var(--accent); font-variant-numeric: tabular-nums; min-width: 2.2em;
}
.sig__text {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(1.7rem, 5.2vw, 4.6rem); line-height: 1.04;
  letter-spacing: 0.01em;
}
.sig__text .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.sig__text .w > i { display: inline-block; font-style: normal; transform: translateY(110%); }
.sig__rule {
  position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--cream-faint); transform: scaleX(0); transform-origin: left;
}

/* ============ Pillars ============ */
.pillars { height: 420vh; position: relative; background: var(--ink-2); }
.pillars__stick { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.pillars__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pillars__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(6,6,6,0.75), rgba(6,6,6,0.25) 30%, rgba(6,6,6,0.25) 70%, rgba(6,6,6,0.85)),
    radial-gradient(ellipse 90% 70% at 50% 50%, transparent 40%, rgba(6,6,6,0.6) 100%);
}
.pillar {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; text-align: center; padding: 0 4vw;
  visibility: hidden;
}
.pillar__name {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3rem, 11vw, 12rem); line-height: 0.9; letter-spacing: 0.01em;
  text-shadow: 0 20px 80px rgba(6,6,6,0.8);
}
.pillar__name { overflow: hidden; }
.pillar__name .ch { display: inline-block; }

/* ============ Work ============ */
.work { position: relative; }
.work__bg { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.work__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work__shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6,6,6,0.92) 0%, rgba(6,6,6,0.72) 45%, rgba(6,6,6,0.35) 100%);
}
.work__fg {
  position: relative; z-index: 2;
  margin-top: -100vh;
  padding: 9rem 6vw 10rem;
}
.work__title { margin: 0 0 4.5rem; }

.cards { list-style: none; display: flex; flex-direction: column; gap: 1.1rem; max-width: 62rem; }
.card {
  display: flex; align-items: center; gap: 2.2rem;
  padding: 2rem 2.4rem;
  border: 1px solid var(--cream-faint);
  background: rgba(6, 6, 6, 0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.45s ease, background 0.45s ease, box-shadow 0.45s ease;
  will-change: transform;
}
.card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  background: rgba(26, 14, 6, 0.72);
  box-shadow: 0 24px 60px -20px rgba(233, 106, 30, 0.35);
}
.card__idx { font-family: var(--display); color: var(--accent); font-size: 1.1rem; }
.card__body { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.card__name {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(1.5rem, 3.4vw, 2.7rem); line-height: 1;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.card__name em { font-style: normal; color: var(--accent); }
.card:hover .card__name { transform: translateX(10px); }
.card__pitch { color: var(--cream); font-size: 1.02rem; max-width: 42rem; }
.card__arrow {
  font-size: 1.6rem; color: var(--cream-dim);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), color 0.45s ease;
}
.card:hover .card__arrow { transform: translate(6px, -6px); color: var(--accent); }

/* ============ Finale ============ */
.finale {
  padding: 14rem 6vw 10rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--ink);
  position: relative; z-index: 2;
}
.finale__title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3rem, 10.5vw, 11.5rem); line-height: 0.9;
  margin: 1.6rem 0 2.8rem;
  display: flex; flex-direction: column; align-items: center;
}
.finale__line { display: block; overflow: hidden; padding: 0.04em 0.05em; }
.finale__line .ch { display: inline-block; }
.finale__line--accent { color: transparent; -webkit-text-stroke: 2px var(--accent); }
.finale__para { max-width: 40rem; color: var(--cream-dim); font-size: clamp(0.9rem, 1.3vw, 1.05rem); }
.finale__cta { display: flex; gap: 1.2rem; margin-top: 3.4rem; flex-wrap: wrap; justify-content: center; }

.btn {
  position: relative; overflow: hidden;
  font-family: var(--body); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.28em; text-transform: uppercase;
  padding: 1.25rem 2.6rem;
  border: 1px solid var(--accent);
  transition: color 0.4s ease;
}
.btn span { position: relative; z-index: 1; }
.btn::before {
  content: ''; position: absolute; inset: 0; background: var(--accent);
  transform: translateY(101%); transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.btn--solid::before { transform: translateY(0); }
.btn--solid { color: var(--cream); }
.btn--solid:hover::before { transform: translateY(-101%); }
.btn--solid:hover { color: var(--accent); }
.btn--ghost { color: var(--cream); }
.btn--ghost:hover::before { transform: translateY(0); }
.btn--ghost:hover { color: var(--cream); }

/* ============ Footer ============ */
.foot { border-top: 1px solid var(--cream-faint); overflow: hidden; }
.foot__marquee { padding: 3.5rem 0 2.5rem; overflow: hidden; }
.foot__track { display: flex; white-space: nowrap; animation: footmarquee 26s linear infinite; }
.foot__track span {
  font-family: var(--display); font-size: clamp(4rem, 12vw, 13rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--cream-faint);
  text-transform: uppercase; flex-shrink: 0;
}
@keyframes footmarquee { to { transform: translateX(-50%); } }
.foot__row {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.8rem 2.2rem 2.4rem; flex-wrap: wrap;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream-dim);
}
.foot__links { display: flex; gap: 1.8rem; }
.foot__links a { transition: color 0.3s ease; }
.foot__links a:hover { color: var(--accent); }

/* ============ Small screens ============ */
@media (max-width: 720px) {
  .sig { flex-direction: column; gap: 0.6rem; }
  .card { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .card__arrow { align-self: flex-end; }
  .hud__loc { display: none; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .grain, .hud__scroll i, .foot__track { animation: none; }
  html { scroll-behavior: auto; }
}
