/* ============================================================
   brandonhotka.com
   Dark cinematic. Signature: The Constellation.
   Display: Fraunces (editorial serif) + Space Grotesk (name/mono-adjacent)
   Data/labels: JetBrains Mono
   ============================================================ */

:root {
  --bg: #07070a;
  --bg-2: #0b0b10;
  --ink: #f5f3ee;
  --ink-dim: #9d9a93;
  --ink-faint: #63615c;
  --line: rgba(245, 243, 238, 0.08);
  --line-strong: rgba(245, 243, 238, 0.16);
  --gold: #cba25a;
  --gold-bright: #e2c079;
  --gold-soft: rgba(203, 162, 90, 0.12);
  --ice: #96b4dc;
  --live: #66c78e;
  --scaling: #cba25a;
  --building: #7ba7d8;
  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.8s ease;
  cursor: none;
}
body.loaded { opacity: 1; }

/* keep the native cursor on touch / no-JS */
@media (hover: none) { body { cursor: auto; } }
html:not(.js) body { cursor: auto; opacity: 1; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }

a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* ---------- BACKDROP LAYERS ---------- */
#field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.atmosphere {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(90% 60% at 50% -8%, rgba(203, 162, 90, 0.10), transparent 62%),
    radial-gradient(80% 55% at 85% 12%, rgba(150, 180, 220, 0.06), transparent 60%),
    radial-gradient(120% 80% at 50% 118%, rgba(203, 162, 90, 0.05), transparent 60%);
  mix-blend-mode: screen;
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .nav, .footer { position: relative; z-index: 2; }

/* ---------- SCROLL PROGRESS ---------- */
.progress-track {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: transparent;
}
#progress {
  height: 100%; width: 100%; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  box-shadow: 0 0 12px rgba(203, 162, 90, 0.6);
}

/* ---------- CUSTOM CURSOR ---------- */
#cursor, #cursorRing {
  position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none;
  border-radius: 50%; will-change: transform;
  transform: translate(-100px, -100px);
}
#cursor {
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--gold-bright);
}
#cursorRing {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(245, 243, 238, 0.4);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), border-color 0.3s ease, background 0.3s ease;
}
#cursorRing.grow {
  width: 62px; height: 62px; margin: -31px 0 0 -31px;
  border-color: var(--gold); background: rgba(203, 162, 90, 0.08);
}
@media (hover: none) { #cursor, #cursorRing { display: none; } }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease,
    transform 0.9s var(--ease), opacity 0.9s var(--ease);
  border-bottom: 1px solid transparent;
}
html.js .nav { transform: translateY(-100%); opacity: 0; }
body.loaded .nav { transform: translateY(0); opacity: 1; transition-delay: 0.2s; }
.nav.scrolled {
  background: rgba(7, 7, 10, 0.7);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.mark {
  font-family: "Fraunces", serif; font-weight: 600; font-size: 22px;
  letter-spacing: 0.04em; display: inline-block; will-change: transform;
}
.nav-links { display: flex; gap: 38px; }
.nav-links a {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim);
  position: relative; transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--gold); transition: width 0.32s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 150px 0 90px;
}
.hero-inner { }

/* hero cold-open: elements rise as part of the load sequence, gated on body.loaded */
html.js .hero .eyebrow,
html.js .hero-lead,
html.js .hero-meta,
html.js .scroll-cue {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
body.loaded .hero .eyebrow { opacity: 1; transform: none; transition-delay: 0.1s; }
body.loaded .hero-lead   { opacity: 1; transform: none; transition-delay: 0.5s; }
body.loaded .hero-meta   { opacity: 1; transform: none; transition-delay: 0.66s; }
body.loaded .scroll-cue  { opacity: 1; transform: translateX(-50%); transition-delay: 0.9s; }
/* the scroll-cue uses translateX(-50%) for centering — preserve it */
html.js .scroll-cue { transform: translate(-50%, 22px); }
body.loaded .scroll-cue { transform: translate(-50%, 0); }
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 34px;
}

/* name: per-line mask reveal, orchestrated on load */
.hero-name {
  font-family: "Space Grotesk", sans-serif; font-weight: 600;
  font-size: clamp(66px, 13.5vw, 200px); line-height: 0.9;
  letter-spacing: -0.03em; text-transform: uppercase;
  margin-bottom: 42px;
}
.nline { display: block; overflow: hidden; }
.nline-in {
  display: block; transform: translateY(112%);
  transition: transform 1.05s var(--ease);
}
.hero-name .nline:nth-child(1) .nline-in { transition-delay: 0.15s; }
.hero-name .nline:nth-child(2) .nline-in {
  transition-delay: 0.28s;
  background: linear-gradient(180deg, var(--ink) 26%, var(--gold) 150%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
body.loaded .nline-in { transform: translateY(0); }
/* no-JS / reduced motion: name is simply present */
html:not(.js) .nline-in { transform: none; }

.hero-lead {
  font-family: "Fraunces", serif; font-weight: 300;
  font-size: clamp(19px, 2.35vw, 27px); line-height: 1.48;
  color: var(--ink-dim); max-width: 720px; margin-bottom: 62px;
}
.hero-lead em { color: var(--ink); }

.hero-meta { display: flex; gap: 62px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num {
  font-family: "Fraunces", serif; font-weight: 400; font-size: clamp(40px, 5vw, 58px);
  line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums;
}
.stat-inf { color: var(--gold); }
.stat-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint);
}

.scroll-cue {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.cue-word {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-faint);
}
.cue-rail { width: 1px; height: 54px; background: var(--line-strong); position: relative; overflow: hidden; }
.cue-bead {
  position: absolute; top: 0; left: 0; width: 1px; height: 18px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  animation: bead 2.2s var(--ease-in-out) infinite;
}
@keyframes bead { 0% { transform: translateY(-20px); } 100% { transform: translateY(54px); } }

/* ---------- ETHOS ---------- */
.ethos {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 100px 0; background: rgba(11, 11, 16, 0.4);
}
.ethos-line {
  font-family: "Fraunces", serif; font-weight: 300;
  font-size: clamp(30px, 5.2vw, 62px); line-height: 1.16; letter-spacing: -0.02em;
  max-width: 960px;
}

/* per-word mask reveal (data-split) */
.wmask { display: inline-block; overflow: hidden; vertical-align: top; }
.wword {
  display: inline-block; transform: translateY(105%);
  transition: transform 0.75s var(--ease);
}
[data-split].in .wword { transform: translateY(0); }
/* accent the closer of the ethos line: last word gold via nth is fragile w/ split,
   so we tint the whole line's final clause through a subtle gradient instead */
.ethos-line .wmask:last-of-type .wword { color: var(--gold); }

/* ---------- SECTION SCAFFOLD ---------- */
.kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); display: inline-block; margin-bottom: 26px;
}
.section-title {
  font-family: "Fraunces", serif; font-weight: 400;
  font-size: clamp(40px, 6vw, 82px); line-height: 0.98; letter-spacing: -0.025em;
  margin-bottom: 26px;
}
.section-sub {
  font-size: clamp(16px, 1.9vw, 19px); color: var(--ink-dim); font-weight: 300; max-width: 460px;
  font-family: "Space Grotesk", sans-serif; line-height: 1.65;
}
.section-head.center { text-align: center; }
.center-sub { margin: 0 auto; }

/* ---------- WORK ---------- */
.work { padding: 140px 0 150px; }
.work-grid { }
.work-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end;
  margin-bottom: 90px;
}

/* the constellation map */
.map {
  position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--line);
  border-radius: 3px; overflow: hidden;
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(203,162,90,0.06), transparent 60%),
    rgba(7, 7, 10, 0.5);
}
.map-label {
  position: absolute; top: 16px; left: 18px; z-index: 3;
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint);
  display: flex; align-items: center; gap: 8px;
}
.map-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 8px var(--live); }
.map-field { position: absolute; inset: 0; }
.map-node {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--ink-faint);
  transition: transform 0.6s var(--ease), background 0.4s ease, box-shadow 0.4s ease;
  transition-delay: calc(var(--i) * 60ms);
}
.map-node::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid transparent; transition: border-color 0.4s ease;
}
.map-node.lit { transform: translate(-50%, -50%) scale(1); }
.map-node--live.lit, .map-node--scaling.lit { background: var(--gold); box-shadow: 0 0 12px rgba(203,162,90,0.7); }
.map-node.hot { transform: translate(-50%, -50%) scale(1.9); }
.map-node.hot::before { border-color: rgba(203,162,90,0.5); animation: nodepulse 1.2s ease-out infinite; }
.map-node-name {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.05em;
  color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity 0.3s ease;
}
.map-node.hot .map-node-name { opacity: 1; }
@keyframes nodepulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* venture list */
.ventures { display: flex; flex-direction: column; }
.venture {
  position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 28px;
  padding: 48px 20px; border-top: 1px solid var(--line);
  transform-style: preserve-3d;
  transition: background 0.5s var(--ease);
}
.venture:last-child { border-bottom: 1px solid var(--line); }
.v-rule {
  position: absolute; left: 0; top: -1px; height: 1px; width: 0;
  background: linear-gradient(90deg, var(--gold), transparent);
  transition: width 0.7s var(--ease);
}
.venture:hover .v-rule, .venture.active .v-rule { width: 100%; }
.venture:hover {
  background: linear-gradient(100deg, var(--gold-soft), transparent 55%);
}
.v-index {
  font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--ink-faint);
  padding-top: 12px; letter-spacing: 0.05em; transition: color 0.4s ease;
}
.venture:hover .v-index { color: var(--gold); }
.v-main { }
.v-top { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.v-name {
  font-family: "Fraunces", serif; font-weight: 400;
  font-size: clamp(30px, 4.4vw, 52px); line-height: 1; letter-spacing: -0.02em;
  transition: transform 0.5s var(--ease);
}
.venture:hover .v-name { transform: translateX(6px); }
.v-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim);
  padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
}
.v-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-dim); }
.v-status--live { color: var(--live); border-color: rgba(102,199,142,0.3); }
.v-status--live .v-dot { background: var(--live); box-shadow: 0 0 0 0 rgba(102,199,142,0.6); animation: dotpulse 2.4s infinite; }
.v-status--scaling { color: var(--gold-bright); border-color: rgba(203,162,90,0.35); }
.v-status--scaling .v-dot { background: var(--gold-bright); box-shadow: 0 0 0 0 rgba(203,162,90,0.6); animation: dotpulse 2.4s infinite; }
.v-status--building { color: var(--building); border-color: rgba(123,167,216,0.3); }
.v-status--building .v-dot { background: var(--building); }
@keyframes dotpulse {
  0% { box-shadow: 0 0 0 0 rgba(203,162,90,0.5); }
  70% { box-shadow: 0 0 0 7px rgba(203,162,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(203,162,90,0); }
}
.v-tagline {
  font-family: "Fraunces", serif; font-style: italic; font-weight: 300;
  font-size: clamp(18px, 2vw, 22px); color: var(--ink); margin-bottom: 14px;
}
.v-desc { font-size: 15.5px; color: var(--ink-dim); font-weight: 300; max-width: 680px; line-height: 1.62; }
.v-visit {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 22px;
  font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: 0.06em; color: var(--ink-faint);
  opacity: 0; transform: translateY(6px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), color 0.4s ease;
}
.venture:hover .v-visit { opacity: 1; transform: translateY(0); color: var(--gold); }
.v-go { display: inline-block; transition: transform 0.3s var(--ease); }
.venture:hover .v-go { transform: translateX(6px); }

/* ---------- TRAJECTORY ---------- */
.trajectory { padding: 150px 0; border-top: 1px solid var(--line); background: rgba(11, 11, 16, 0.4); }
.trajectory .section-head { margin-bottom: 80px; }
.manifesto { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; }
.mline {
  position: relative; display: grid; grid-template-columns: 60px 1fr; gap: 24px; align-items: baseline;
  font-family: "Fraunces", serif; font-weight: 300;
  font-size: clamp(24px, 3.6vw, 44px); line-height: 1.24; letter-spacing: -0.015em;
  color: var(--ink-dim); padding: 30px 0; border-bottom: 1px solid var(--line);
  transition: color 0.5s ease;
}
.mline.last { border-bottom: none; }
.mline:hover { color: var(--ink); }
.mline.last { color: var(--ink); }
.mline-index {
  font-family: "JetBrains Mono", monospace; font-size: 13px; letter-spacing: 0.1em;
  color: var(--gold); text-transform: uppercase; padding-top: 8px;
}

/* ---------- WHY ---------- */
.why { padding: 160px 0; }
.why-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.why .kicker { color: var(--gold); }
.why-quote {
  font-family: "Fraunces", serif; font-weight: 300; font-style: italic;
  font-size: clamp(26px, 4.4vw, 50px); line-height: 1.34; letter-spacing: -0.015em;
  color: var(--ink); margin-top: 24px;
}
.why-quote .wmask:last-of-type .wword { color: inherit; }

/* ---------- CONNECT ---------- */
.connect { padding: 150px 0; border-top: 1px solid var(--line); background: rgba(11, 11, 16, 0.4); }
.connect .section-head { margin-bottom: 60px; }
.connect-cta {
  display: block; width: max-content; max-width: 100%; margin: 0 auto;
  text-align: center; position: relative; will-change: transform;
  transform: perspective(700px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
  transition: transform 0.2s ease;
}
.connect-mail {
  font-family: "Fraunces", serif; font-weight: 400; letter-spacing: -0.02em;
  font-size: clamp(30px, 6vw, 74px); line-height: 1;
  background: linear-gradient(120deg, var(--ink), var(--ink) 40%, var(--gold) 120%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  transition: filter 0.3s ease;
}
.connect-arrow {
  font-family: "Fraunces", serif; font-size: clamp(26px, 5vw, 58px); color: var(--gold);
  display: inline-block; margin-left: 12px; transition: transform 0.4s var(--ease);
}
.connect-cta:hover .connect-arrow { transform: translateX(14px); }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); padding: 44px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer .mark { font-size: 18px; }
.footer-copy { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink-faint); letter-spacing: 0.04em; }
.footer-year { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink-faint); letter-spacing: 0.14em; }

/* ---------- REVEAL PRIMITIVE ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
[data-reveal].in { opacity: 1; transform: none; }
/* stagger venture rows by index */
.venture[data-reveal] { transition-delay: calc(var(--i) * 55ms); }

/* no-JS fallback: show everything */
html:not(.js) [data-reveal] { opacity: 1; transform: none; }
html:not(.js) .wword { transform: none; }
html:not(.js) #nameFallback { opacity: 1; }
html:not(.js) #field, html:not(.js) #cursor, html:not(.js) #cursorRing { display: none; }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .wword { transform: none; }
  #nameFallback { opacity: 1 !important; }
  .map-node { transform: translate(-50%, -50%) scale(1); }
  .map-node--live, .map-node--scaling { background: var(--gold); }
  body { cursor: auto; }
  #cursor, #cursorRing { display: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .work-head { grid-template-columns: 1fr; gap: 40px; }
  .map { max-width: 520px; }
  .section-sub { max-width: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 22px; }
  body { cursor: auto; }
  #cursor, #cursorRing { display: none; }
  .nav-inner { height: 62px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 10px; letter-spacing: 0.06em; }
  .hero { padding: 120px 0 80px; }
  .hero-meta { gap: 34px; }
  .ethos, .work, .trajectory, .why, .connect { padding-top: 90px; padding-bottom: 90px; }
  .venture { grid-template-columns: 44px 1fr; gap: 16px; padding: 34px 8px; }
  .mline { grid-template-columns: 34px 1fr; gap: 14px; }
  .scroll-cue { display: none; }
}
