/* ============================================================================
   TTAG — "MONOLITH / PARTICLE" (site_11)
   Motion-driven SPA. Monochrome void/bone; the logo's brass is the only spark.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/inter-latin-400-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/space-mono-latin-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/space-mono-latin-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('../fonts/syne-latin-500-800.woff2') format('woff2');
}

:root {
  --void:    #0A0A0B;
  --void-2:  #101013;
  --panel:   #16161A;
  --bone:    #E9E7E0;
  --bone-2:  #B9B7AF;
  --mute:    #6E6C66;
  --brass:   #C2A06A;
  --line:    rgba(233, 231, 224, 0.12);
  --line-2:  rgba(233, 231, 224, 0.22);

  --disp: 'Syne', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;

  --pad: clamp(1.15rem, 4vw, 3.25rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--void);
  color: var(--bone);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--brass); color: var(--void); }
:focus-visible { outline: 1px solid var(--brass); outline-offset: 4px; }

/* Hide native cursor when the custom one is active (fine pointers only) */
@media (hover: hover) and (pointer: fine) {
  .js body, .js a, .js button { cursor: none; }
}

/* Resilience: if JS is absent/failed, show everything, drop the chrome candy */
html:not(.js) .loader,
html:not(.js) .cursor,
html:not(.js) .pixels { display: none !important; }
html:not(.js) .view { display: block !important; position: static !important; min-height: 0 !important; }

/* =============================== LOADER ============================== */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: var(--void);
  transition: transform 1s var(--ease-io);
}
.loader.is-done { transform: translateY(-101%); }
.loader__center { width: min(80vw, 30rem); text-align: center; }
.loader__mark {
  width: 4.4rem; height: 4.4rem; aspect-ratio: 1 / 1; object-fit: contain; margin: 0 auto 2rem;
  opacity: .0; transform: scale(.9);
  animation: markIn 1s var(--ease) forwards;
}
@keyframes markIn { to { opacity: .9; transform: none; } }
.loader__row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: .7rem; letter-spacing: 0;
  text-transform: uppercase; color: var(--bone-2); margin-bottom: .8rem;
}
.loader__count i { color: var(--mute); }
.loader__bar { height: 2px; background: var(--line); position: relative; overflow: hidden; }
.loader__fill {
  position: absolute; inset: 0 100% 0 0;
  background: repeating-linear-gradient(90deg, var(--bone) 0 6px, transparent 6px 9px);
}

/* =============================== CURSOR ============================= */
.cursor { position: fixed; top: 0; left: 0; z-index: 900; pointer-events: none; mix-blend-mode: difference; }
.cursor__ring, .cursor__dot {
  position: absolute; top: 0; left: 0; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor__ring {
  width: 34px; height: 34px; border: 1px solid var(--bone);
  transition: width .35s var(--ease), height .35s var(--ease), background-color .35s var(--ease), opacity .3s;
}
.cursor__dot { width: 4px; height: 4px; background: var(--bone); }
.cursor.is-hover .cursor__ring { width: 56px; height: 56px; background: rgba(233,231,224,.12); }
.cursor.is-hidden .cursor__ring, .cursor.is-hidden .cursor__dot { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ======================= PIXEL TRANSITION CANVAS ==================== */
.pixels { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 800; pointer-events: none; }

/* ======================== PARTICLE BRAND FIELD ===================== */
.particle-field {
  position: fixed; z-index: 2; pointer-events: none; overflow: hidden;
  opacity: 0; visibility: hidden;
  transition: opacity .55s var(--ease), visibility .55s;
}
body[data-view="home"] .particle-field,
body[data-view="contact"] .particle-field { opacity: 1; visibility: visible; }
.particle-field.is-contact {
  left: 0 !important; top: 0 !important; width: 100vw !important; height: 100svh !important;
}
.particle-field__canvas { display: block; width: 100%; height: 100%; }
.particle-field__fallback { display: none; width: 88%; height: 88%; object-fit: contain; margin: 6%; opacity: .9; }
.no-webgl .particle-field__canvas { display: none; }
.no-webgl .particle-field__fallback { display: block; }
html:not(.js) .particle-field { display: none !important; }

/* =============================== CHROME ============================= */
.chrome { position: fixed; left: 0; right: 0; z-index: 700; display: flex;
  align-items: center; justify-content: space-between; padding: 0 var(--pad); pointer-events: none; }
.chrome--top { top: 0; height: clamp(4rem, 8vh, 5.5rem); }
.chrome--bottom { bottom: 0; height: 3.2rem; }
.chrome a, .chrome button, .chrome nav { pointer-events: auto; }

.brandmark { display: inline-flex; align-items: center; gap: .84rem; }
.brandmark img { width: 87px; height: 87px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,.48)); }
.brandmark__type { display: flex; flex-direction: column; line-height: 1; }
.brandmark__type b { font-family: var(--disp); font-weight: 700; font-size: 1.4rem; letter-spacing: 0; }
.brandmark__type i { font-family: var(--mono); font-style: normal; font-size: .73rem; letter-spacing: 0;
  text-transform: uppercase; color: var(--mute); margin-top: .3rem; }

.mainnav { display: flex; gap: clamp(1.2rem, 2.6vw, 2.6rem); }
.mainnav a { position: relative; font-family: var(--mono); font-size: calc(.78rem + 3px); letter-spacing: 0;
  color: var(--bone-2); display: inline-flex; align-items: baseline; gap: .4em; transition: color .3s var(--ease); }
.mainnav__i { font-size: .58rem; color: var(--mute); transition: color .3s var(--ease); }
.mainnav a:hover, .mainnav a.is-current { color: var(--bone); }
.mainnav a.is-current .mainnav__i { color: var(--brass); }
.mainnav a::after { content: ""; position: absolute; left: 0; bottom: -.4rem; height: 1px; width: 100%;
  background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.mainnav a.is-current::after { transform: scaleX(1); }

.burger { display: none; width: 42px; height: 42px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.burger span { width: 22px; height: 1.5px; background: var(--bone); transition: transform .4s var(--ease), opacity .3s; }
.burger.is-open span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.burger.is-open span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

.tick { font-family: var(--mono); font-size: calc(.62rem + 3px); letter-spacing: 0; text-transform: uppercase; color: var(--mute); }
.tick--r { text-align: right; }

/* =============================== STAGE ============================= */
.stage { position: relative; isolation: isolate; }
.view { min-height: 100svh; padding: clamp(5rem, 10vh, 7rem) var(--pad) 4.5rem; }
/* Hide only inactive views, so each active view keeps its own display mode
   (home/work/contact are flex; about is block). */
.js .view:not(.is-active) { display: none; }

.eyebrow, .block-label, .view-head__idx {
  font-family: var(--mono); font-size: .72rem; letter-spacing: 0; text-transform: uppercase; color: var(--bone-2);
}

/* reveal primitives */
.js [data-anim] { opacity: 0; transform: translateY(1.4rem); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-anim].is-in { opacity: 1; transform: none; }
.split-word { display: inline-block; white-space: nowrap; }
.split-char { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .16em; margin-bottom: -.16em; }
.split-char > i { display: inline-block; font-style: normal; transform: translateY(115%); transition: transform .9s var(--ease); }
[data-split].is-in .split-char > i { transform: none; }

/* =============================== HOME ============================= */
.view--home { display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: clamp(.4rem, 1.6vh, 1.1rem);
  padding-block: clamp(4.5rem, 8vh, 6rem) clamp(2.5rem, 5vh, 3.5rem); }
.view--home .eyebrow { display: flex; align-items: center; gap: .8em; font-size: calc(.72rem + 3px); }
.view--home .eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: var(--brass); }

/* 3D scene: wireframe cube framing the mark */
.scene { position: relative; z-index: 1; width: clamp(22.1rem, 55.9vmin, 33.8rem); height: clamp(22.1rem, 55.9vmin, 33.8rem);
  perspective: 1400px; display: grid; place-items: center; margin: -.2rem 0 -.4rem; }
.scene__rot { position: absolute; inset: 0; display: grid; place-items: center;
  transform-style: preserve-3d; transform: rotateX(-18deg) rotateY(22deg); }
.cube { --c: clamp(15.6rem, 40.3vmin, 23.4rem); position: relative; width: var(--c); height: var(--c);
  transform-style: preserve-3d; animation: cubeSpin 26s linear infinite; }
.cube__face { position: absolute; inset: 0; border: 1px solid var(--line-2);
  background: linear-gradient(135deg, rgba(233,231,224,.05), rgba(233,231,224,0)); }
.cube__face--fr { transform: translateZ(calc(var(--c) / 2)); }
.cube__face--bk { transform: rotateY(180deg) translateZ(calc(var(--c) / 2)); }
.cube__face--rt { transform: rotateY(90deg)  translateZ(calc(var(--c) / 2)); }
.cube__face--lf { transform: rotateY(-90deg) translateZ(calc(var(--c) / 2)); }
.cube__face--tp { transform: rotateX(90deg)  translateZ(calc(var(--c) / 2)); }
.cube__face--bt { transform: rotateX(-90deg) translateZ(calc(var(--c) / 2)); }
@keyframes cubeSpin { from { transform: rotateY(0) rotateX(8deg); } to { transform: rotateY(360deg) rotateX(8deg); } }
.view--home > :not(.scene) { position: relative; z-index: 3; }

.hero-word { font-family: var(--disp); font-weight: 800; text-transform: uppercase;
  font-size: 5.75rem; line-height: .9; letter-spacing: 0; }
.hero-foot { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: .4rem; }
.hero-cycle { font-family: var(--mono); font-size: .82rem; letter-spacing: 0; color: var(--bone-2);
  display: inline-flex; align-items: baseline; }
.cycler { position: relative; display: inline-block; min-width: 9.5em; text-align: left; height: 1.2em; }
.cycler > span { position: absolute; left: 0; top: 0; color: var(--brass); opacity: 0;
  transform: translateY(60%); transition: opacity .5s var(--ease), transform .5s var(--ease); white-space: nowrap; }
.cycler > span.on { opacity: 1; transform: none; }
.cycler > span.out { opacity: 0; transform: translateY(-60%); }
.hero-tag { font-size: 1rem; color: var(--bone-2); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: .6rem; }

.btn { display: inline-flex; align-items: center; gap: .5em; padding: .85rem 1.5rem; border-radius: 100px;
  font-family: var(--mono); font-size: .74rem; letter-spacing: 0; text-transform: uppercase;
  background: var(--bone); color: var(--void); transition: transform .5s var(--ease), background-color .3s, color .3s; }
.btn i { font-style: normal; transition: transform .4s var(--ease); }
.btn:hover { transform: translateY(-2px); } .btn:hover i { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--bone); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--bone); }

/* =============================== ABOUT ============================= */
.view--about { padding-bottom: 0; }
.view__scroll { max-width: 62rem; margin: 0 auto; }
.view-head { padding-block: clamp(1rem, 5vh, 3rem) clamp(2.5rem, 6vh, 4rem); }
.view-head__idx { display: inline-block; margin-bottom: 1.4rem; }
.statement { font-family: var(--disp); font-weight: 700; font-size: 4.2rem;
  line-height: 1.02; letter-spacing: 0; }
.statement__sub { margin-top: 1.8rem; max-width: 52ch; color: var(--bone-2); font-size: 1.05rem; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line);
  border-block: 1px solid var(--line); }
.pillar { background: var(--void); padding: 2rem clamp(1rem, 2vw, 1.8rem); }
.pillar b { font-family: var(--disp); font-weight: 600; font-size: 1.6rem; color: var(--brass); display: block; margin-bottom: .7rem; }
.pillar span { color: var(--bone-2); font-size: .92rem; }

.principles { padding-block: clamp(3rem, 8vh, 6rem); }
.principles .block-label { display: block; margin-bottom: 2rem; font-size: calc(.72rem + 5px); }
.principles ol { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.principles li { background: var(--void); padding: clamp(1.6rem, 3vw, 2.6rem); }
.principles .rn { font-family: var(--disp); color: var(--brass); font-size: 1.3rem; display: block; margin-bottom: 1rem; }
.principles b { font-family: var(--disp); font-weight: 600; font-size: 1.35rem; display: block; margin-bottom: .6rem; }
.principles p { color: var(--bone-2); font-size: .95rem; max-width: 40ch; }

.pedigree { padding-block: clamp(2rem, 5vh, 4rem) clamp(4rem, 9vh, 7rem); }
.pedigree .block-label { display: block; margin-bottom: 1.6rem; font-size: calc(.72rem + 5px); }
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 1.4rem; }
.marquee__track { display: inline-flex; align-items: center; gap: 1.5rem; white-space: nowrap; width: max-content;
  animation: marq 45s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-family: var(--disp); font-weight: 600; font-size: 2.4rem; }
.marquee__track i { color: var(--brass); font-style: normal; font-size: .7rem; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ============================ CAPABILITIES ======================== */
/* Archive-style numbered index (site_8's 003 page) in Monolith dress */
.view--work { position: relative; padding-bottom: clamp(3rem, 8vh, 6rem); overflow: hidden; }
.view--work .view__scroll { position: relative; z-index: 3; }
.cap-ghost {
  position: fixed; z-index: 0; right: -2rem; top: 50%; transform: translateY(-48%);
  width: min(49vw, 42rem); opacity: .075; pointer-events: none;
  filter: grayscale(1) brightness(.72) contrast(1.15);
}
.cap-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row__head {
  width: 100%; display: grid; grid-template-columns: 4.5rem 1fr auto; align-items: center; gap: 1rem;
  padding-block: clamp(1.2rem, 2.8vh, 1.8rem); text-align: left;
}
.row__head i {
  font-style: normal; font-family: var(--mono); font-size: .68rem; letter-spacing: 0;
  color: var(--mute); transition: color .3s var(--ease);
}
.row__head b {
  font-family: var(--disp); font-weight: 700;
  font-size: 2.1rem; line-height: 1.08; letter-spacing: 0;
  transition: transform .45s var(--ease);
}
.row__x { position: relative; width: 14px; height: 14px; justify-self: end; }
.row__x::before, .row__x::after {
  content: ""; position: absolute; top: 50%; left: 50%; background: var(--bone-2);
  transform: translate(-50%,-50%); transition: transform .4s var(--ease), background-color .3s var(--ease);
}
.row__x::before { width: 14px; height: 1.5px; }
.row__x::after { width: 1.5px; height: 14px; }
.row:hover .row__head i, .row.open .row__head i { color: var(--brass); }
.row:hover .row__head b { transform: translateX(.5rem); }
.row.open .row__x::after { transform: translate(-50%,-50%) rotate(90deg); }
.row.open .row__x::before, .row.open .row__x::after { background: var(--brass); }
.row__body {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .55s var(--ease), opacity .45s var(--ease), padding-bottom .55s var(--ease);
}
.row.open .row__body { max-height: 16rem; opacity: 1; padding-bottom: 1.6rem; }
.row__body p { margin-left: 5.5rem; max-width: 56ch; color: var(--bone-2); font-size: .98rem; }
html:not(.js) .row__body { max-height: none !important; opacity: 1 !important; }

/* ============================== CONTACT =========================== */
.view--contact { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.view--contact > * { position: relative; z-index: 3; text-shadow: 0 2px 18px rgba(10,10,11,.92); }
.view--contact .view-head__idx { font-size: calc(.72rem + 5px); }
.contact-h { font-family: var(--disp); font-weight: 700; font-size: 3.8rem;
  line-height: 1.03; letter-spacing: 0; margin: .9rem 0 1rem; max-width: 16ch; }
.contact-note { color: var(--bone-2); max-width: 42ch; }
.contact-mail { display: inline-block; margin-top: 1.7rem; font-family: var(--disp); font-weight: 600;
  font-size: 2.2rem; color: var(--brass); position: relative; white-space: nowrap; max-width: 100%; }
.contact-mail::after { content: ""; position: absolute; left: 0; bottom: -.1em; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.contact-mail:hover::after { transform: scaleX(1); }
.contact-meta { margin-top: 1.4rem; display: inline-flex; gap: 1rem; font-family: var(--mono);
  font-size: calc(.68rem + 5px); font-style: normal; letter-spacing: 0; text-transform: uppercase; color: var(--mute); }

/* ============================= RESPONSIVE ========================= */
@media (max-width: 820px) {
  .chrome--top { height: clamp(4.5rem, 10vh, 6.5rem); }
  .mainnav { display: none; }
  .burger { display: flex; }
  .brandmark__type i { display: none; }
  .chrome--bottom { display: none; }

  /* Mobile menu: expand the nav as an overlay */
  .mainnav.is-open { display: flex; position: fixed; inset: 0; z-index: 690; flex-direction: column;
    align-items: flex-start; justify-content: center; gap: 1.4rem; padding: 0 var(--pad);
    background: var(--void); }
  .mainnav.is-open a { font-family: var(--disp); font-size: calc(3rem + 3px); color: var(--bone); }
  .mainnav.is-open .mainnav__i { font-size: .8rem; }

  .pillars { grid-template-columns: 1fr; }
  .principles ol { grid-template-columns: 1fr; }
  .view { padding-block: 5.5rem 4rem; }

  /* Capabilities index on small screens */
  .row__head { grid-template-columns: 3rem 1fr auto; }
  .row__head b { font-size: 1.35rem; }
  .row__body p { margin-left: 4rem; }
  .hero-word { font-size: 3.35rem; }
  .statement { font-size: 2.65rem; }
  .marquee__track span { font-size: 1.55rem; }
  .contact-h { font-size: 2.65rem; }
  .contact-mail { font-size: 1.35rem; }
  .cap-ghost { right: -6rem; width: 34rem; opacity: .055; }
  .brandmark img { width: 73px; height: 73px; }
}

@media (max-width: 480px) {
  .hero-word { font-size: 2.55rem; }
  .statement { font-size: 2.15rem; }
  .mainnav.is-open a { font-size: calc(2.2rem + 3px); }
  .contact-h { font-size: 2.25rem; }
  .contact-mail { font-size: 1.02rem; }
  .contact-meta { flex-direction: column; gap: .25rem; }
  .contact-meta i { display: none; }
}

/* =========================== REDUCED MOTION ======================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; }
  .js [data-anim], .split-char > i { opacity: 1 !important; transform: none !important; }
  .cursor { display: none !important; }
  .cube { animation: none; transform: rotateX(-18deg) rotateY(24deg); }
  .loader { display: none !important; }
  .js body, .js a, .js button { cursor: auto; }
}
