/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0b;
  --bg-soft: #111113;
  --ink: #f4f1ea;
  --ink-dim: #9c9a94;
  --accent: #c9a969;
  --line: rgba(244,241,234,0.14);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }

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

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  letter-spacing: -0.02em;
}

@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor-dot { display: none; }
}

/* ---------- Starfield ---------- */
/* z-index:0 (not a negative value) on purpose: negative z-index combined
   with position:fixed is inconsistently rendered across browsers (notably
   Safari). Instead, the canvas stays at the stacking baseline and every
   piece of real content is explicitly lifted above it. */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: -100px;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%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.5s steps(2) infinite;
}
@keyframes grain {
  0%   { transform: translate(0,0); }
  50%  { transform: translate(-2%,2%); }
  100% { transform: translate(2%,-1%); }
}

/* ---------- Custom cursor ---------- */
/* A single small dot — no ring. It sits flush on the real point of the
   cursor and just barely swells and warms in color over anything
   interactive, rather than orbiting it with a separate shape. */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  background: var(--ink);
  mix-blend-mode: difference;
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              background-color 0.25s var(--ease), opacity 0.2s, box-shadow 0.25s var(--ease);
}
.cursor-dot.active {
  width: 9px; height: 9px;
  background: var(--accent);
  mix-blend-mode: normal;
  box-shadow: 0 0 10px rgba(201,169,105,0.6);
}
.cursor-dot.hide { opacity: 0; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: transform 1s var(--ease), opacity 0.8s ease;
}
.preloader.done {
  transform: translateY(-100%);
}
.preloader-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  letter-spacing: 0.15em;
}
.preloader-count {
  font-size: 0.85rem;
  color: var(--ink-dim);
  letter-spacing: 0.1em;
}
.preloader-bar {
  width: 200px;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s linear;
}

/* ---------- Nav ---------- */
main {
  position: relative;
  z-index: 1;
}

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem clamp(1.5rem, 5vw, 4rem);
}
.nav-mark {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.12em;
  mix-blend-mode: difference;
}
.nav-mark span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.6rem);
}
.nav-links a {
  position: relative;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  display: inline-block;
  height: 1.1em;
  mix-blend-mode: difference;
}
.nav-links a span {
  display: block;
  transition: transform 0.5s var(--ease);
}
.nav-links a::before {
  content: attr(data-text);
  position: absolute;
  top: 100%; left: 0;
  transition: transform 0.5s var(--ease);
  color: var(--accent);
}
.nav-links a:hover span { transform: translateY(-100%); }
.nav-links a:hover::before { transform: translateY(-100%); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 501;
}
.nav-toggle span {
  width: 22px; height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s;
  mix-blend-mode: difference;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: -6% 0 0 0;
  height: 106%;
  z-index: 0;
  will-change: transform;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.75);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0.25) 35%, rgba(10,10,11,0.65) 78%, rgba(10,10,11,0.95) 100%);
}
.hero-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 18vw rgba(0,0,0,0.65);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
}
.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.2rem;
}
.hero-title {
  font-size: clamp(2.6rem, 8.5vw, 6.5rem);
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.02em;
}
.hero-sub {
  margin-top: 1.4rem;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

.reveal-line span { display: inline-block; }
.reveal-line {
  overflow: hidden;
}
.reveal-line span {
  transform: translateY(110%);
  opacity: 0;
  animation: revealUp 1s var(--ease) forwards;
  animation-delay: var(--d, 0.15s);
}
@keyframes revealUp {
  to { transform: translateY(0); opacity: 1; }
}

.hero-title .line {
  display: inline;
}
.hero-title .word {
  display: inline-block;
  white-space: nowrap;
}
.hero-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(60%) rotate(4deg);
  animation: charIn 0.9s var(--ease) forwards;
}
@keyframes charIn {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

.hero-scroll {
  position: absolute;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 1.6s;
}
.hero-scroll i {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--accent), transparent);
  position: relative;
  overflow: hidden;
}
.hero-scroll i::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--ink);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { top: -100%; }
  60%, 100% { top: 100%; }
}
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.1rem 0;
  background: var(--bg);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee-track span {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  color: var(--ink-dim);
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100% / var(--marquee-copies, 2))); }
}

/* ---------- Section shared ---------- */
section {
  padding: clamp(5rem, 12vw, 9rem) clamp(1.5rem, 6vw, 6rem);
}
.section-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.4rem;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- About ---------- */
.about { padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.about-inner {
  max-width: 980px;
  margin: 0 auto;
}
.about-statement {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.35;
  font-weight: 300;
}
.about-statement em {
  color: var(--accent);
  font-style: normal;
}
.about-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.meta-num {
  display: block;
  font-family: 'Montserrat', sans-serif;
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.meta-label {
  font-size: 0.85rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

/* ---------- Author page ---------- */
.author-top {
  padding-top: clamp(8rem, 16vw, 11rem);
}
.author-intro-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
}
.author-photo {
  overflow: hidden;
  border-radius: 2px;
}
.author-photo img {
  width: 100%;
  display: block;
  filter: saturate(0.92) brightness(0.94);
}
.author-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.2rem;
}
.author-name {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 1.8rem;
}
.author-name .line { display: inline; }
.author-name .word { display: inline-block; white-space: nowrap; }
.author-name .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(60%) rotate(4deg);
  animation: charIn 0.9s var(--ease) forwards;
}
.author-intro-text {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.6;
  font-weight: 300;
  color: var(--ink);
  max-width: 46ch;
}
@media (max-width: 900px) {
  .author-intro-grid { grid-template-columns: 1fr; }
  .author-photo { order: -1; max-width: 420px; margin: 0 auto; }
}

.author-content {
  max-width: 720px;
  margin: 0 auto;
}
.author-block { margin-bottom: clamp(3rem, 6vw, 5rem); }
.author-block:last-child { margin-bottom: 0; }
.author-heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
}
.author-text {
  color: var(--ink-dim);
  line-height: 1.8;
  font-size: 1rem;
  max-width: 68ch;
}
.author-text + .author-text { margin-top: 1.3rem; }

/* ---------- Work ---------- */
.work-item {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.work-item-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-soft);
}
.work-item-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.85);
  transition: transform 1.2s var(--ease);
}
.work-item-media:hover video { transform: scale(1.05); }
.work-item-tag {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.work-item-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 1rem 0 1.4rem;
}
.work-item-desc {
  color: var(--ink-dim);
  line-height: 1.7;
  max-width: 42ch;
  font-size: 0.98rem;
}
.work-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}
.work-item-tags span {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 0.5rem 0.9rem;
  color: var(--ink-dim);
}

.work-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1rem;
  margin-top: 2.4rem;
}
.work-item-actions .watch-full { margin-top: 0; }

.watch-full {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.4rem;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  background: rgba(244,241,234,0.03);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
}
.watch-full span {
  position: relative;
}
.watch-full i {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.watch-full:hover {
  border-color: var(--accent);
  background: rgba(201,169,105,0.08);
  transform: translateY(-2px);
}
.watch-full:hover i {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: translate(2px, -2px);
}

/* ---------- Video modal ---------- */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
}
.video-modal.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s var(--ease), visibility 0s linear 0s;
}
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6,6,7,0.94);
}
.video-modal-inner {
  position: relative;
  width: min(92vw, 1100px);
  transform: scale(0.97);
  transition: transform 0.4s var(--ease);
}
.video-modal.open .video-modal-inner {
  transform: scale(1);
}
.video-modal-inner video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;
}
.video-modal-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s;
}
.video-modal-close:hover { color: var(--accent); }

@media (max-width: 700px) {
  .video-modal-close {
    top: -2.6rem;
    right: 0.2rem;
  }
}

body.modal-open {
  overflow: hidden;
}

/* ---------- Services ---------- */
.services { padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.services-list {
  border-top: 1px solid var(--line);
}
.service-item {
  border-bottom: 1px solid var(--line);
}
.service-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.8rem 0;
  background: none;
  border: none;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transition: padding-left 0.5s var(--ease), color 0.5s var(--ease);
}
.service-row:hover {
  padding-left: 1.2rem;
  color: var(--accent);
}
.service-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  flex: 1;
}
.service-arrow {
  opacity: 0.5;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.service-row:hover .service-arrow {
  opacity: 1;
}
.service-item.open .service-arrow {
  transform: rotate(90deg);
  opacity: 1;
}

.service-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}
.service-item.open .service-detail {
  grid-template-rows: 1fr;
}
.service-detail-inner {
  overflow: hidden;
}
.service-detail p {
  color: var(--ink-dim);
  line-height: 1.7;
  font-size: 0.98rem;
  max-width: 56ch;
  padding: 0 0 1.2rem;
}
.service-list {
  list-style: none;
  margin: 0 0 1.8rem;
  padding: 0;
  max-width: 56ch;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.service-list li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--ink-dim);
  font-size: 0.9rem;
  line-height: 1.5;
}
.service-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Contact ---------- */
.contact {
  text-align: center;
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}
.contact-title {
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1.1;
}
.contact-sub {
  margin-top: 1.4rem;
  color: var(--ink-dim);
}
.contact-link {
  display: inline-block;
  margin-top: 3rem;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--ink);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.contact-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.2rem clamp(1.5rem, 6vw, 6rem) 3rem;
  font-size: 0.78rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.back-top { transition: color 0.3s; }
.back-top:hover { color: var(--accent); }

/* ---------- Magnetic ---------- */
.magnetic { will-change: transform; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .work-item {
    grid-template-columns: 1fr;
  }
  .work-item-media { aspect-ratio: 16/10; }
}

@media (max-width: 700px) {
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 10;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    transform: translateY(-100%);
    transition: transform 0.6s var(--ease);
    mix-blend-mode: normal;
    isolation: isolate;
  }
  .nav-links.open { transform: translateY(0); }
  /* Blend-mode text is a desktop-over-video trick; on the full-screen
     mobile menu it has caused invisible/unreliable text in some mobile
     browsers, so it's forced off here in favor of a plain solid color. */
  .nav-links a {
    font-size: 1.1rem;
    height: auto;
    color: var(--ink);
    mix-blend-mode: normal;
  }
  .nav-toggle {
    display: flex;
    mix-blend-mode: normal;
  }
  .nav-toggle span {
    mix-blend-mode: normal;
  }
  .nav.menu-open .nav-toggle span:first-child { transform: translateY(3px) rotate(45deg); }
  .nav.menu-open .nav-toggle span:last-child { transform: translateY(-3px) rotate(-45deg); }
}
