/* ============ Tokens ============ */
:root {
  --bg: #0a0a0b;
  --bg-soft: #131315;
  --ink: #ededee;          /* primary text — neutral near-white */
  --ink-dim: #86868b;      /* secondary text — neutral grey */
  --accent: #ffffff;       /* pure white: the rare pop. Color is the exception. */
  --line: rgba(255, 255, 255, 0.12);
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --gutter: clamp(20px, 5vw, 72px);
}

/* View accent themes — color is the exception, scoped to the chosen lens */
[data-view="brands"]    { --accent: #4d8cff; }  /* blue */
[data-view="marketing"] { --accent: #ff5247; }  /* red  */
[data-view="sales"]     { --accent: #2fd27a; }  /* green */

/* smooth recolor when the lens changes */
.accent, .stat-num, .card-price, .seg { transition: color 0.45s ease, background 0.3s ease; }

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

html { scroll-behavior: smooth; }
html.lenis { height: auto; scroll-behavior: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #0a0a0b; }

.accent { color: var(--accent); }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* ============ Preloader ============ */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: flex-end; justify-content: space-between;
}
.preloader-inner {
  width: 100%;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--gutter);
}
.preloader-count {
  font-size: clamp(80px, 18vw, 220px);
  font-weight: 600; line-height: 0.85; letter-spacing: -0.04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.preloader-label {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(18px, 3vw, 32px); color: var(--ink-dim);
}

/* ============ Cursor ============ */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 999;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
  opacity: 0;
}
.cursor.is-active { opacity: 1; }
.cursor.is-hover { width: 56px; height: 56px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ============ Canvas ============ */
#webgl {
  position: fixed; inset: 0;
  width: 100%; height: 100vh;
  z-index: 0; pointer-events: none;
}

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
  mix-blend-mode: normal;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}
.nav.is-scrolled {
  background: rgba(10, 10, 11, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font-weight: 700; font-size: 22px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
/* ============ View switcher ============ */
.viewbar {
  position: relative;
  display: flex; align-items: center; gap: 14px;
}
.viewbar-label {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim);
}
.segmented {
  display: inline-flex; gap: 2px;
  padding: 4px; border: 1px solid var(--line); border-radius: 100px;
}
.seg {
  appearance: none; background: transparent; border: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  color: var(--ink-dim);
  padding: 7px 17px; border-radius: 100px;
  transition: color 0.25s ease, background 0.3s ease;
}
.seg:hover { color: var(--ink); }
.seg.is-active { background: var(--accent); color: #0a0a0b; }
.viewbar-reset {
  position: absolute; top: calc(100% + 11px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; background: none; border: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 12px; color: var(--ink-dim);
  text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.25s ease;
}
.viewbar-reset:hover { color: var(--ink); }
.viewbar-reset[hidden] { display: none; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 32px;
  background: var(--accent); color: #0a0a0b;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1px solid var(--accent); border-radius: 100px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
  will-change: transform;
}
.btn:hover { background: transparent; color: var(--accent); }
.btn-small { padding: 10px 22px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.link-arrow {
  color: var(--ink-dim); text-decoration: none; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.25s ease;
}
.link-arrow:hover { color: var(--accent); }
.link-arrow span { transition: transform 0.25s ease; }
.link-arrow:hover span { transform: translateY(3px); }

/* ============ Hero ============ */
.hero {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) 96px;
  overflow: hidden;   /* clip the portrait's edge bleed */
}
/* Hero portrait — monochrome cutout that tints with the active lens */
.hero-portrait {
  position: absolute; z-index: -1;
  right: clamp(-24px, 1vw, 40px);
  bottom: 0;
  width: clamp(280px, 40vw, 580px);
  pointer-events: none;
  opacity: 0.95;
}
.hero-portrait img { display: block; width: 100%; height: auto; }
.hero-portrait::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  mix-blend-mode: color;
  -webkit-mask-image: url("jimmy-hero.png?v=1");
  mask-image: url("jimmy-hero.png?v=1");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  opacity: 0.85;
  transition: background 0.45s ease;
}

.hero-eyebrow {
  font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 24px;
}
.hero-eyebrow .accent { font-size: 9px; vertical-align: middle; margin-right: 10px; }
.hero-title {
  font-size: clamp(56px, 12.5vw, 188px);
  line-height: 0.92; letter-spacing: -0.045em; font-weight: 700;
  text-transform: none;
}
.hero-line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.ht, .ht-serif { display: inline-block; will-change: transform; }
.ht-serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.hero-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px; margin-top: 56px; flex-wrap: wrap;
}
.hero-sub { max-width: 540px; color: var(--ink-dim); font-size: clamp(15px, 1.6vw, 18px); }
.hero-cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; right: var(--gutter); top: 50%;
  width: 1px; height: 64px; background: var(--line); overflow: hidden;
}
.hero-scroll span {
  position: absolute; left: 0; top: -50%; width: 100%; height: 50%;
  background: var(--accent);
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint { 0% { top: -50%; } 100% { top: 110%; } }

/* ============ Marquee ============ */
.marquee {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden; white-space: nowrap;
  padding: 18px 0;
}
.marquee-track { display: inline-block; will-change: transform; }
.marquee-track span {
  font-size: clamp(16px, 2.2vw, 24px); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-dim); font-weight: 500;
}

/* ============ Sections (shared) ============ */
section { position: relative; z-index: 1; }
.section-tag {
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: clamp(32px, 6vh, 64px);
}
.section-title {
  font-size: clamp(40px, 7vw, 96px); line-height: 1;
  letter-spacing: -0.04em; font-weight: 700;
  margin-bottom: clamp(48px, 8vh, 96px);
}

/* ============ Manifesto ============ */
.manifesto {
  background: transparent;
  padding: clamp(96px, 16vh, 200px) var(--gutter);
}
.manifesto-lines { max-width: 980px; }
.m-line {
  font-size: clamp(26px, 4.2vw, 54px);
  line-height: 1.18; letter-spacing: -0.025em; font-weight: 500;
  margin-bottom: clamp(28px, 5vh, 56px);
  color: var(--ink);
}
.m-line-big {
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 700; letter-spacing: -0.04em;
  margin-top: clamp(40px, 8vh, 88px); margin-bottom: 0;
}

/* ============ Stats ============ */
.stats {
  background: transparent;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding: clamp(56px, 10vh, 112px) var(--gutter);
  gap: clamp(32px, 4vw, 64px);
}
.stat { border-left: 1px solid var(--line); padding-left: clamp(20px, 2.5vw, 36px); }
.stat-num {
  display: block;
  font-size: clamp(48px, 7vw, 104px); font-weight: 700;
  letter-spacing: -0.04em; line-height: 1; color: var(--accent);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.stat-label { color: var(--ink-dim); font-size: 15px; max-width: 320px; display: block; }

/* ============ Work / cards ============ */
.work {
  background: transparent;
  border-top: 1px solid var(--line);
  padding: clamp(96px, 16vh, 200px) var(--gutter);
}
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.cards-two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 1040px;
}
.card {
  position: relative;
  border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(28px, 3vw, 44px);
  background: var(--bg-soft);
  display: flex; flex-direction: column; align-items: flex-start;
  transition: border-color 0.35s ease, transform 0.35s ease;
  will-change: transform;
}
.card:hover { border-color: rgba(255, 255, 255, 0.4); }
.card-featured {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012) 55%), var(--bg-soft);
  border-color: rgba(255, 255, 255, 0.26);
}
.card-num {
  font-family: var(--font-serif); font-style: italic;
  font-size: 22px; color: var(--ink-dim);
  margin-bottom: clamp(40px, 6vh, 72px);
}
.card-title { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.02em; font-weight: 600; margin-bottom: 10px; }
.card-title-link { color: inherit; text-decoration: none; transition: color 0.25s ease; }
.card-title-link:hover { color: var(--accent); }
.card-price { font-size: 17px; color: var(--accent); font-weight: 600; margin-bottom: 22px; }
.card-price span { color: var(--ink-dim); font-weight: 400; }
.card-body { color: var(--ink-dim); font-size: 15px; line-height: 1.65; margin-bottom: 36px; flex: 1; }

/* ============ About ============ */
.about {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: clamp(96px, 16vh, 200px) var(--gutter);
}
.about-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 96px); align-items: start;
}
.about-title {
  font-size: clamp(36px, 5.5vw, 76px); line-height: 1.02;
  letter-spacing: -0.035em; font-weight: 700;
  position: sticky; top: 120px;
}
.about-copy p {
  color: var(--ink-dim); font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.7; margin-bottom: 28px;
}
.about-copy p:first-child { color: var(--ink); }

/* ============ Personal / Off the clock ============ */
.personal {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: clamp(96px, 16vh, 200px) var(--gutter);
}
.personal-grid {
  display: grid; grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(40px, 6vw, 88px); align-items: start;
}
.personal-copy { position: sticky; top: 110px; }
.personal-title {
  font-size: clamp(34px, 5vw, 68px); line-height: 1.04;
  letter-spacing: -0.035em; font-weight: 700;
  margin-bottom: clamp(24px, 4vh, 40px);
}
.personal-copy p {
  color: var(--ink-dim); font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.7; margin-bottom: 24px; max-width: 32em;
}
.personal-copy p:first-of-type { color: var(--ink); }
.inline-link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; transition: color 0.25s ease; }
.inline-link:hover { color: var(--accent); }
.personal-photos { column-count: 2; column-gap: 14px; }
.personal-photos img {
  width: 100%; display: block; margin-bottom: 14px;
  border-radius: 16px; border: 1px solid var(--line);
  break-inside: avoid;
}

/* ============ CTA ============ */
.cta {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: clamp(120px, 20vh, 240px) var(--gutter);
  text-align: center;
}
.cta-title {
  font-size: clamp(48px, 9.5vw, 150px); line-height: 0.95;
  letter-spacing: -0.045em; font-weight: 700;
  margin-bottom: 40px;
}
.cta-line { display: block; overflow: hidden; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.cta-line em { color: var(--accent); }
.cta-sub { color: var(--ink-dim); font-size: clamp(16px, 1.8vw, 20px); margin-bottom: 40px; }
.cta-form {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 560px; margin: 0 auto 20px;
}
.cta-form input, .cta-form textarea {
  width: 100%;
  background: var(--bg-soft); border: 1px solid var(--line);
  color: var(--ink); font-family: var(--font-sans); font-size: 15px;
  outline: none; transition: border-color 0.3s ease;
}
.cta-form input { border-radius: 100px; padding: 16px 28px; }
.cta-form textarea {
  border-radius: 22px; padding: 16px 28px; resize: vertical; min-height: 104px; line-height: 1.5;
}
.cta-form input:focus, .cta-form textarea:focus { border-color: var(--accent); }
.cta-form input::placeholder, .cta-form textarea::placeholder { color: var(--ink-dim); }
.cta-form .btn { align-self: center; margin-top: 4px; }
.cta-form button[disabled] { opacity: 0.6; cursor: default; }
/* honeypot — visually removed, kept in DOM for bots */
.cta-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cta-error { color: #ff5247; font-size: 13px; margin-top: 4px; }
.cta-note { color: var(--ink-dim); font-size: 13px; }

/* ============ Footer ============ */
.footer {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--ink-dim); font-size: 13px;
  background: var(--bg);
  flex-wrap: wrap;
}
.footer-mark { font-family: var(--font-serif); font-style: italic; color: var(--ink); }

/* ============ Reveal helpers (JS sets final state) ============ */
.reveal-up, .reveal-line { opacity: 0; }
.no-js .reveal-up, .no-js .reveal-line { opacity: 1; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .viewbar-label { display: none; }
  .nav .btn-small { display: none; }   /* hero + final CTAs carry the action on mobile */
  .seg { padding: 6px 12px; font-size: 12px; }
  .segmented { padding: 3px; }
  /* portrait moves to the open top-right so it never sits under the copy */
  .hero-portrait { width: 50vw; right: -6vw; top: 8vh; bottom: auto; opacity: 0.85; }
  .stats { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-title { position: static; margin-bottom: 8px; }
  .personal-grid { grid-template-columns: 1fr; gap: 36px; }
  .personal-copy { position: static; }
  .hero { padding-bottom: 72px; }
  .hero-foot { margin-top: 40px; }
  .hero-scroll { display: none; }
}

@media (max-width: 380px) {
  .seg { padding: 6px 9px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll span { animation: none; }
  .reveal-up, .reveal-line { opacity: 1 !important; transform: none !important; }
}
