/* ============================================================
   BRANDON HILL — DIGITAL AGENCY
   ink black / emerald / cream — cinematic scroll portfolio
   ============================================================ */

:root {
  --ink: #060807;
  --ink-2: #0b0e0c;
  --cream: #f2edde;
  --cream-dim: rgba(242, 237, 222, 0.55);
  --emerald: #17e88f;
  --emerald-deep: #0a5c3c;
  --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(--emerald); color: var(--ink); }

.accent { color: var(--emerald); }

/* ---------- loader ---------- */
.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.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.loader-name {
  font-family: var(--display); font-size: 64px; color: var(--cream);
  letter-spacing: 0.04em;
}
.loader-bar {
  width: 220px; height: 2px; background: rgba(242, 237, 222, 0.12);
  overflow: hidden;
}
.loader-fill { width: 0%; height: 100%; background: var(--emerald); transition: width 0.2s ease; }
.loader-pct { font-size: 11px; letter-spacing: 0.3em; color: var(--cream-dim); }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -100px; z-index: 150; 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.9' numOctaves='2'/%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); }
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 44px;
  mix-blend-mode: normal;
}
.nav-logo {
  font-family: var(--display); font-size: 26px; color: var(--cream);
  text-decoration: none; letter-spacing: 0.05em;
}
.nav-logo .tm { color: var(--emerald); font-size: 13px; vertical-align: super; }
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  color: var(--cream-dim); text-decoration: none; font-size: 13px;
  letter-spacing: 0.22em; text-transform: uppercase;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--emerald); }
.nav-cta {
  color: var(--ink); background: var(--emerald); text-decoration: none;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 22px; border-radius: 999px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(23, 232, 143, 0.35); }

/* ---------- shared ---------- */
.section-kicker {
  font-size: 12px; letter-spacing: 0.42em; color: var(--emerald);
  text-transform: uppercase; margin-bottom: 28px;
}

/* ---------- hero ---------- */
.hero { height: 500vh; position: relative; }
.hero-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
}
#orbitCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block;
}
.hero-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 40%, rgba(6, 8, 7, 0.72) 100%),
    linear-gradient(to bottom, rgba(6, 8, 7, 0.55), transparent 22%, transparent 72%, var(--ink) 100%);
}
.hero-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
}
.hero-kicker {
  font-size: 12px; letter-spacing: 0.5em; color: var(--cream-dim);
  margin-bottom: 3vh;
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(70px, 15.5vw, 250px);
  line-height: 0.88;
  text-align: center;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.hero-title .line { display: block; white-space: nowrap; }
.hero-title .char {
  display: inline-block;
  will-change: transform, opacity;
  text-shadow: 0 0 80px rgba(6, 8, 7, 0.9);
}
.hero-sub {
  margin-top: 3.4vh;
  font-size: clamp(14px, 1.6vw, 22px);
  letter-spacing: 0.85em; text-transform: uppercase;
  color: var(--cream);
  border-top: 1px solid rgba(23, 232, 143, 0.5);
  border-bottom: 1px solid rgba(23, 232, 143, 0.5);
  padding: 12px 6px 12px 18px;
}
.hero-hint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: 0.4em; color: var(--cream-dim);
}
.hint-track {
  width: 1px; height: 44px; background: rgba(242, 237, 222, 0.18);
  position: relative; overflow: hidden;
}
.hint-dot {
  position: absolute; top: -10px; left: 0; width: 1px; height: 10px;
  background: var(--emerald);
  animation: hint 1.6s ease-in-out infinite;
}
@keyframes hint { to { top: 54px; } }
.hero-coords {
  position: absolute; bottom: 34px; right: 44px;
  font-size: 10px; letter-spacing: 0.24em; color: var(--cream-dim);
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; padding: 34px 0;
  border-top: 1px solid rgba(242, 237, 222, 0.08);
  border-bottom: 1px solid rgba(242, 237, 222, 0.08);
  background: var(--ink);
}
.marquee-track {
  display: flex; white-space: nowrap; width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee-track span {
  font-family: var(--display); font-size: clamp(30px, 4.4vw, 64px);
  color: transparent; -webkit-text-stroke: 1px rgba(242, 237, 222, 0.34);
  text-transform: uppercase; letter-spacing: 0.03em;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- stats ---------- */
.stats {
  padding: 15vh 44px 16vh;
  background: var(--ink);
  text-align: center;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  max-width: 1500px; margin: 0 auto;
}
.stat {
  padding: 38px 12px;
  border-top: 1px solid rgba(242, 237, 222, 0.12);
  text-align: left;
}
.stat-num {
  font-family: var(--display);
  font-size: clamp(44px, 4.8vw, 84px);
  color: var(--cream);
  line-height: 1;
}
.stat-num .count { color: var(--emerald); }
.stat-label {
  margin-top: 16px; font-size: 13px; color: var(--cream-dim);
  letter-spacing: 0.06em; line-height: 1.5;
}

/* ---------- video sections shared ---------- */
.bg-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.video-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, rgba(6, 8, 7, 0.85) 0%, rgba(6, 8, 7, 0.35) 55%, rgba(6, 8, 7, 0.15) 100%),
    linear-gradient(to bottom, var(--ink) 0%, transparent 18%, transparent 82%, var(--ink) 100%);
}
.video-shade.heavy {
  background:
    rgba(6, 8, 7, 0.55),
    linear-gradient(to bottom, var(--ink) 0%, transparent 20%, transparent 80%, var(--ink) 100%);
}

/* ---------- pillars ---------- */
.pillars { height: 400vh; position: relative; }
.pillars-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
}
.pillars-content {
  position: absolute; inset: 0;
  padding: 0 7vw;
  display: flex; flex-direction: column; justify-content: center;
}
.pillars-kicker { position: absolute; top: 14vh; left: 7vw; margin: 0; }
.pillar {
  position: absolute; left: 7vw; right: 7vw; top: 50%;
  transform: translateY(-50%);
  max-width: 720px;
  opacity: 0; visibility: hidden;
}
.pillar-index {
  font-size: 14px; letter-spacing: 0.4em; color: var(--emerald);
  display: block; margin-bottom: 14px;
}
.pillar-title {
  font-family: var(--display);
  font-size: clamp(56px, 8.6vw, 148px);
  line-height: 0.9; text-transform: uppercase;
  text-shadow: 0 10px 60px rgba(6, 8, 7, 0.8);
}
.pillar-desc {
  margin-top: 26px; max-width: 470px;
  font-size: clamp(15px, 1.25vw, 19px); line-height: 1.65;
  color: var(--cream-dim);
}
.pillars-progress {
  position: absolute; right: 44px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 180px; background: rgba(242, 237, 222, 0.14);
}
.pillars-progress-fill {
  width: 100%; height: 0%; background: var(--emerald);
  box-shadow: 0 0 14px rgba(23, 232, 143, 0.8);
}

/* ---------- work ---------- */
.work { position: relative; }
.work-bg { position: absolute; inset: 0; overflow: hidden; }
.work-inner {
  position: relative; z-index: 2;
  padding: 18vh 7vw 20vh;
}
.work-heading {
  font-family: var(--display);
  font-size: clamp(52px, 8vw, 138px);
  line-height: 0.92; text-transform: uppercase;
  margin-bottom: 9vh;
}
.work-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.card {
  position: relative;
  background: rgba(9, 12, 10, 0.66);
  border: 1px solid rgba(242, 237, 222, 0.1);
  backdrop-filter: blur(14px);
  padding: 34px 30px 66px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.45s, background 0.45s, box-shadow 0.45s;
  will-change: transform;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-12px);
  border-color: rgba(23, 232, 143, 0.65);
  background: rgba(9, 14, 11, 0.82);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(23, 232, 143, 0.2);
}
.card-top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 44px;
}
.card-index { font-size: 12px; letter-spacing: 0.3em; color: var(--cream-dim); }
.card-tag {
  font-size: 10px; letter-spacing: 0.26em; color: var(--emerald);
  border: 1px solid rgba(23, 232, 143, 0.4); border-radius: 999px;
  padding: 6px 12px;
}
.card-title {
  font-family: var(--display);
  font-size: clamp(30px, 2.6vw, 44px);
  letter-spacing: 0.02em; line-height: 1;
  margin-bottom: 18px;
  transition: color 0.35s;
}
.card:hover .card-title { color: var(--emerald); }
.card-pitch { font-size: 14.5px; line-height: 1.65; color: var(--cream-dim); }
.card-arrow {
  position: absolute; bottom: 24px; right: 28px;
  font-size: 22px; color: var(--emerald);
  opacity: 0; transform: translateX(-14px);
  transition: opacity 0.35s, transform 0.35s;
}
.card:hover .card-arrow { opacity: 1; transform: translateX(0); }

/* ---------- finale ---------- */
.finale {
  position: relative; z-index: 2;
  background: var(--ink);
  text-align: center;
  padding: 22vh 6vw 16vh;
}
.finale-title {
  font-family: var(--display);
  font-size: clamp(58px, 10.5vw, 190px);
  line-height: 0.92; text-transform: uppercase;
}
.finale-title .fline { display: block; }
.finale-cta {
  margin-top: 8vh;
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
}
.btn {
  font-family: var(--body); font-weight: 700;
  font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; border-radius: 999px;
  padding: 20px 46px;
  transition: transform 0.35s, box-shadow 0.35s, background 0.35s, color 0.35s;
}
.btn-solid {
  background: var(--emerald); color: var(--ink);
}
.btn-solid:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 50px rgba(23, 232, 143, 0.4);
}
.btn-ghost {
  color: var(--cream); border: 1px solid rgba(242, 237, 222, 0.3);
}
.btn-ghost:hover {
  border-color: var(--emerald); color: var(--emerald);
  transform: translateY(-3px);
}

/* ---------- footer ---------- */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  padding: 34px 44px;
  border-top: 1px solid rgba(242, 237, 222, 0.09);
  background: var(--ink);
  position: relative; z-index: 2;
}
.footer-left { font-size: 12px; color: var(--cream-dim); letter-spacing: 0.08em; }
.footer-links { display: flex; gap: 26px; }
.footer-links a {
  color: var(--cream-dim); text-decoration: none;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--emerald); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .work-grid { grid-template-columns: 1fr; max-width: 620px; }
}
@media (max-width: 720px) {
  .nav { padding: 20px 22px; }
  .nav-links { display: none; }
  .stats { padding: 12vh 22px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-coords { display: none; }
  .footer { justify-content: center; text-align: center; }
}
