/* =========================================================
   Pigment Vision — light / high-tech theme
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-2: #f5f3ef;               /* warm ivory */
  --ink: #21212a;               /* charcoal — reads black, isn't pure black */
  --text: #2a2a33;              /* dark grey for body + headings */
  --muted: #5f5c66;
  --faint: #9c99a3;
  --line: rgba(33, 33, 42, 0.12);
  --line-soft: rgba(33, 33, 42, 0.07);

  /* Muted "luxury" pigment palette (dusty rose -> muted plum -> sage-teal) */
  --rose: #be8395;
  --plum: #7e6f9e;
  --teal: #5e8f88;
  --grad: linear-gradient(100deg, var(--rose), var(--plum) 52%, var(--teal));

  --maxw: 1200px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --radius: 16px;

  --font: "Geist", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--ink); color: #fff; }

.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }

.skip-link {
  position: fixed; top: -60px; left: 1rem; z-index: 300;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px;
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

/* Hide native cursor only when custom cursor is active */
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor [data-magnetic] { cursor: none; }

/* ---------- Interactive layers ---------- */
#field {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: -2; pointer-events: none;
}
.grain {
  position: fixed; inset: 0; z-index: 250; pointer-events: none;
  opacity: .035; mix-blend-mode: multiply;
  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.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 260;
  background: transparent; pointer-events: none;
}
.progress span {
  display: block; height: 100%; width: 0; transform-origin: left;
  background: var(--grad);
}

/* Custom cursor */
.cursor { position: fixed; top: 0; left: 0; z-index: 280; pointer-events: none; mix-blend-mode: difference; }
.cursor__dot, .cursor__ring {
  position: absolute; top: 0; left: 0; border-radius: 50%;
  transform: translate(-50%, -50%); background: #fff;
}
.cursor__dot { width: 6px; height: 6px; }
.cursor__ring {
  width: 34px; height: 34px; background: transparent; border: 1px solid #fff;
  transition: width .25s ease, height .25s ease, opacity .25s ease;
}
.cursor.is-hover .cursor__ring { width: 58px; height: 58px; }
.cursor.is-hover .cursor__dot { opacity: 0; }

/* ---------- Layout ---------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(4.5rem, 11vw, 9rem) var(--gutter);
  position: relative;
}
.section__head { max-width: 820px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__title {
  font-weight: 600; font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.04; letter-spacing: -0.035em;
}
.section__sub { color: var(--muted); margin-top: 1rem; font-size: 1.05rem; }

.kicker {
  display: inline-block; font-size: .8rem; color: var(--muted);
  letter-spacing: .04em; margin-bottom: 1.1rem;
}
.kicker--center { display: block; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  --pad: .85rem 1.5rem;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: var(--pad); border-radius: 999px;
  font-weight: 500; font-size: .95rem; border: 1px solid transparent;
  cursor: pointer; will-change: transform;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), background .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.btn svg { transition: transform .25s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { box-shadow: 0 14px 34px -14px rgba(10,10,15,.6); }
.btn--outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--outline:hover { border-color: var(--ink); }
.btn--sm { --pad: .55rem 1.1rem; font-size: .88rem; }
.btn--lg { --pad: 1.05rem 2rem; font-size: 1.05rem; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(14px) saturate(1.6);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; letter-spacing: -.02em; }
.brand__name { font-size: 1.02rem; }
.brand__mark { width: 26px; height: 26px; display: inline-block; flex: none; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.nav__links { display: flex; align-items: center; gap: 1.8rem; }
.nav__links > a:not(.btn) { font-size: .95rem; color: var(--muted); overflow: hidden; }
.nav__links > a:not(.btn) [data-link] {
  display: inline-block; position: relative; transition: color .2s ease;
}
.nav__links > a:not(.btn) [data-link]::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--grad); transition: width .3s cubic-bezier(.2,.8,.2,1);
}
.nav__links > a:not(.btn):hover [data-link] { color: var(--ink); }
.nav__links > a:not(.btn):hover [data-link]::after { width: 100%; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s ease, opacity .2s ease; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  max-width: var(--maxw); margin: 0 auto; padding: 7rem var(--gutter) 5rem; position: relative;
}
.hero__glow {
  position: absolute; z-index: -1; top: 12%; left: 30%;
  width: 60vw; height: 60vw; max-width: 780px; max-height: 780px;
  background: var(--grad); filter: blur(120px); opacity: .16; border-radius: 50%;
  animation: glowDrift 16s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  0% { transform: translate(-10%, -6%) scale(1); }
  100% { transform: translate(12%, 8%) scale(1.15); }
}
.hero__content { max-width: 1000px; }
.eyebrow { font-family: var(--mono); font-size: .82rem; color: var(--muted); letter-spacing: .02em; margin-bottom: 1.6rem; }
.hero__title {
  font-weight: 600; font-size: clamp(3.2rem, 13vw, 9.5rem);
  line-height: .9; letter-spacing: -0.05em; display: flex; flex-wrap: wrap; gap: 0 .28em;
}
.hero__line { display: inline-block; }
.hero__line--accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__rotator { margin-top: 1.7rem; font-size: clamp(1.15rem, 3vw, 1.9rem); color: var(--muted); font-weight: 400; display: flex; align-items: baseline; gap: .5em; flex-wrap: wrap; }
.hero__rotator-static { color: var(--faint); }
.rotator { position: relative; display: inline-block; height: 1.25em; min-width: 6.6em; overflow: hidden; vertical-align: bottom; }
.rotator__word {
  position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(105%);
  transition: transform .6s cubic-bezier(.2,.85,.2,1), opacity .5s ease;
  font-weight: 600; white-space: nowrap;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.rotator__word.is-active { opacity: 1; transform: translateY(0); }
.rotator__word.is-leaving { opacity: 0; transform: translateY(-105%); }
.hero__lead { margin-top: 1.9rem; max-width: 560px; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); }
.hero__cta { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: .9rem; }

.hero__scroll { position: absolute; bottom: 2rem; left: var(--gutter); display: inline-flex; align-items: center; gap: .7rem; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.hero__scroll-line { width: 46px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--ink); animation: scrollLine 2.2s ease-in-out infinite; }
@keyframes scrollLine { 0% { transform: translateX(-100%);} 50% { transform: translateX(0);} 100% { transform: translateX(100%);} }

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.5rem 0; overflow: hidden; white-space: nowrap; background: var(--bg-2);
}
.marquee__track { display: inline-flex; align-items: center; gap: 2.2rem; will-change: transform; animation: marquee 26s linear infinite; }
.marquee__track:hover { animation-play-state: paused; }
.marquee__track span {
  font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 600; letter-spacing: -.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.marquee__track i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: .35; flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.about__text p { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--text); }
.about__text p + p { margin-top: 1.3rem; color: var(--muted); }
.stats { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { padding: 1.6rem 1.5rem; border-bottom: 1px solid var(--line); }
.stat:last-child { border-bottom: 0; }
.stat__num { display: block; font-weight: 600; font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { display: block; margin-top: .5rem; color: var(--faint); font-size: .82rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.card {
  position: relative; overflow: hidden; padding: 1.9rem 1.6rem 2.1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  transform-style: preserve-3d; transition: border-color .4s ease, box-shadow .4s ease, transform .1s ease;
}
.card:hover { border-color: rgba(10,10,15,.22); box-shadow: 0 22px 50px -30px rgba(10,10,15,.45); }
.card__index { font-size: .82rem; color: var(--faint); }
.card__title { font-size: 1.4rem; font-weight: 600; letter-spacing: -.02em; margin: 1.4rem 0 .7rem; }
.card__body { color: var(--muted); font-size: .96rem; }
.card__sheen {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(107,59,255,.12), transparent 60%);
}
.card:hover .card__sheen { opacity: 1; }

.notice { margin-top: 2rem; padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); color: var(--muted); font-size: .95rem; display: flex; gap: .9rem; align-items: baseline; flex-wrap: wrap; }
.notice__tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; background: var(--ink); padding: .2rem .55rem; border-radius: 6px; }

/* ---------- Work ---------- */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.work__item { position: relative; overflow: hidden; padding: 2.3rem 1.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transform-style: preserve-3d; transition: border-color .4s ease, box-shadow .4s ease, transform .1s ease; }
.work__item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); transform: scaleY(0); transform-origin: top; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.work__item:hover { border-color: rgba(10,10,15,.22); box-shadow: 0 22px 50px -30px rgba(10,10,15,.4); }
.work__item:hover::before { transform: scaleY(1); }
.work__num { font-size: 2.6rem; font-weight: 500; color: var(--line); line-height: 1; }
.work__title { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; margin: .9rem 0 .6rem; }
.work__body { color: var(--muted); font-size: .96rem; }

/* ---------- Contact ---------- */
.section--contact { text-align: center; }
.contact { max-width: 720px; margin: 0 auto; }
.contact__title { font-weight: 600; font-size: clamp(2.1rem, 6vw, 4rem); line-height: 1.02; letter-spacing: -.04em; margin: 1rem 0 1.3rem; }
.contact__lead { color: var(--muted); font-size: 1.1rem; margin-bottom: 2.2rem; }
.contact__email { margin-top: 1.4rem; color: var(--faint); font-size: .88rem; }
.contact__email a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.contact__email a:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 2.6rem var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; }
.footer__brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; }
.footer__tagline { color: var(--faint); font-size: .82rem; }
.footer__links { display: flex; gap: 1.3rem; margin-left: auto; }
.footer__links a { color: var(--muted); font-size: .9rem; transition: color .2s ease; }
.footer__links a:hover { color: var(--ink); }
.footer__legal { width: 100%; color: var(--faint); font-size: .78rem; border-top: 1px solid var(--line); padding-top: 1.4rem; margin-top: .4rem; }

/* ---------- Motion primitives ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
[data-reveal].in-view { opacity: 1; transform: none; }

/* word-mask reveal for split headings */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; }
.split-word > span { display: inline-block; transform: translateY(110%); transition: transform .7s cubic-bezier(.2,.85,.2,1); }
.split-word.in > span { transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; inset: 0 0 auto 0; top: 0; flex-direction: column; align-items: flex-start; gap: 1.4rem;
    padding: 6rem var(--gutter) 2.5rem; background: rgba(255,255,255,.96); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); transform: translateY(-100%); transition: transform .4s cubic-bezier(.2,.8,.2,1);
  }
  .nav__links.open { transform: translateY(0); }
  .nav__links > a:not(.btn) { font-size: 1.5rem; color: var(--ink); }
  .about { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat { border-bottom: 0; border-right: 1px solid var(--line); }
  .stat:last-child { border-right: 0; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .work { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .footer__links { margin-left: 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal], .split-word > span { opacity: 1 !important; transform: none !important; }
  #field, .grain, .cursor { display: none !important; }
  .hero__glow { opacity: .12; animation: none; }
}
